[MOD][PORT][CM11] How to add custom scrolling animation - Xiaomi Redmi 1S

hi guys ,
I want to share a MOD that i ported from PAC man ROM..
This will give you ability to customize scroll on your phone.
This is one of the coolest features from PAC Man ROM. I want to remind you that this is NOT my work. I'M NOT what makes this feature.
all I do is port for CM11 to make them work
Anyone is able to use this mod, just please give proper credit to Devs of PAC Man ROM and me if you want
Also I want to give a BIG THANKS to sir @ocoot - for very helpful hints, thanks um
So let's begin
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk and JAR file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else ( i use apktool 1.5.2 )
SETTINGS.APK
first DECOMPILE Settings.apk
- Download attached file and merge it to your decompiled Settings.apk
- Go to Settings.apk/res/values/
add this lines to end of it before </resources>
attrs.xml add these :
Code:
<attr name="unitsLeft" format="reference|string" />
<attr name="unitsRight" format="reference|string" />
<attr name="interval" format="integer" />
<attr name="minimum" format="integer" />
<attr name="maximum" format="integer" />
[COLOR="RoyalBlue"]</resources>[/COLOR]
ids.xml add these :
Code:
<item type="id" name="hex">false</item>
<item type="id" name="enter">false</item>
<item type="id" name="white_panel">false</item>
<item type="id" name="black_panel">false</item>
<item type="id" name="cyan_panel">false</item>
<item type="id" name="red_panel">false</item>
<item type="id" name="green_panel">false</item>
<item type="id" name="yellow_panel">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="seek_bar">false</item>
<item type="id" name="seekBarPrefUnitsRightCham">false</item>
<item type="id" name="seekBarPrefValueCham">false</item>
<item type="id" name="seekBarPrefUnitsLeftCham">false</item>
<item type="id" name="seekBarPrefBarContainerCham">false</item>
[COLOR="RoyalBlue"]</resources>[/COLOR]
strings.xml add these:
Code:
<string name="press_color_to_apply">Press on color below to apply</string>
<string name="arrow_right">→</string>
<string name="arrow_down">↓</string>
<string name="hex">Hex:</string>
<string name="hex_hint">\#ff000000</string>
<string name="set">Set</string>
<string name="reset">Reset</string>
<string name="animation_settings_title">Custom animations</string>
<string name="scrolling_title">Scrolling</string>
<string name="animation_fling_velocity_title">Fling Velocity</string>
<string name="animation_scroll_friction_title">Scroll Friction</string>
<string name="animation_overscroll_distance_title">Overscroll Distance</string>
<string name="animation_overfling_distance_title">Overfling Distance</string>
<string name="animation_no_scroll_title">Customizing scroll</string>
<string name="animation_no_scroll_summary_on">Enabled</string>
<string name="animation_no_scroll_summary_off">Disabled</string>
<string name="overscroll_glow_title">Overscroll Color</string>
<string name="animation_settings_reset_message">Reset animations to default?</string>
<string name="animation_duration_summary">Set duration</string>
[COLOR="RoyalBlue"]</resources>[/COLOR]
save...
- Now go to res/xml/display_settings.xml
put this line :
Code:
[COLOR="Red"]<PreferenceScreen android:title="@string/scrolling_title" android:key="interface_animation_scroll" android:fragment="com.android.settings.pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.android.settings.BrightnessPreference android:persistent="false" android:title="@string/brightness" />
[COLOR="Red"]<PreferenceScreen android:title="@string/scrolling_title" android:key="interface_animation_scroll" android:fragment="com.android.settings.pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
<PreferenceCategory android:title="@string/display_settings_title" android:key="display_prefs">
<PreferenceScreen android:title="@string/display_rotation_title" android:key="display_rotation" android:fragment="com.android.settings.cyanogenmod.DisplayRotation" />
<ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
<com.android.settings.FontDialogPreference android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" />
<PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
<PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/power_menu_expanded_desktop" android:key="expanded_desktop_category">
<ListPreference android:persistent="false" android:entries="@array/expanded_desktop_entries" android:title="@string/expanded_desktop_style" android:key="expanded_desktop" android:entryValues="@array/expanded_desktop_values" />
<CheckBoxPreference android:persistent="true" android:title="@string/power_menu_expanded_desktop" android:key="expanded_desktop_no_navbar" />
<com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/expanded_desktop_system_bars_visibility" android:key="expanded_desktop_system_bars_visibility" android:summary="@string/expanded_desktop_system_bars_visibility_summary" android:defaultValue="false" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/lights_category_title" android:key="lights_prefs">
<PreferenceScreen android:title="@string/notification_light_title" android:key="notification_pulse" android:fragment="com.android.settings.notificationlight.NotificationLightSettings" />
<PreferenceScreen android:title="@string/battery_light_title" android:key="battery_light" android:fragment="com.android.settings.notificationlight.BatteryLightSettings" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/advanced_settings" android:key="advanced_display_prefs">
<CheckBoxPreference android:title="@string/adaptive_backlight_title" android:key="adaptive_backlight" android:summary="@string/adaptive_backlight_summary" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/sunlight_enhancement_title" android:key="sunlight_enhancement" android:summary="@string/sunlight_enhancement_summary" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/color_enhancement_title" android:key="color_enhancement" android:summary="@string/color_enhancement_summary" android:defaultValue="true" />
<com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/double_tap_to_sleep_title" android:key="double_tap_sleep_gesture" android:summary="@string/double_tap_to_sleep_summary" android:defaultValue="false" />
<CheckBoxPreference android:title="@string/double_tap_to_wake_title" android:key="double_tap_wake_gesture" />
<com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/proximity_wake_title" android:key="proximity_on_wake" android:summary="@string/proximity_wake_summary" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/wake_when_plugged_or_unplugged_title" android:key="wake_when_plugged_or_unplugged" android:summary="@string/wake_when_plugged_or_unplugged_summary" android:defaultValue="false" />
<com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/screen_animation_off_title" android:key="screen_off_animation" android:defaultValue="true" />
<ListPreference android:entries="@array/screen_animation_style_entries" android:title="@string/screen_animation_style_title" android:key="screen_animation_style" android:entryValues="@array/screen_animation_style_values" />
<PreferenceScreen android:title="@string/lcd_density_title" android:key="lcd_density_setup" android:fragment="com.android.settings.interface.fragments.DensityChanger" />
<com.android.settings.hardware.DisplayColor android:persistent="false" android:title="@string/color_calibration_title" android:key="color_calibration" android:summary="@string/color_calibration_summary" android:dialogTitle="@string/color_calibration_title" />
<com.android.settings.hardware.DisplayGamma android:persistent="false" android:title="@string/gamma_tuning_title_head" android:key="gamma_tuning" android:summary="@string/gamma_tuning_summary_head" android:dialogTitle="@string/gamma_tuning_title_head" />
<PreferenceScreen android:persistent="false" android:title="@string/screencolor" android:key="screencolor_settings">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.ScreenColorSettings" />
</PreferenceScreen>
<Preference android:title="@string/radio_controls_title" android:key="advanced_display_settings">
<intent android:targetPackage="com.cyanogenmod.settings.device" android:action="com.cyanogenmod.action.LAUNCH_DEVICE_SETTINGS" android:targetClass="com.cyanogenmod.settings.device.DisplaySettings" />
</Preference>
</PreferenceCategory>
</PreferenceScreen>
but you can put the line whereever you like,.
- Recompile your Settings.apk
- Decompile the newly recompiled APK again
go to your secondly decompiled Settings.apk/res/values/public.xml and keep it open
Pay attention to this 0x7f?????? !!!
- Go to Settings.apk/smali/net/margaritov/preference/color picker/ColorPickerDialog.smali
search this -> const v2, 0x7f040103
1. change this -> 0x7f040103 , according to the value you got in your own public.xml
Code:
<public type="layout" name="dialog_color_picker" id="0x7f??????" />
do it too to all lines below, in the smali
2. const v2, 0x7f080c3c
Code:
<public type="string" name="dialog_color_picker" id="0x7f?????? />
3. const v2, 0x7f0d00c5
Code:
<public type="id" name="color_picker_view" id="0x7f?????? />
4. const v2, 0x7f0d0324
Code:
<public type="id" name="old_color_panel" id="0x7f?????? />
5. const v2, 0x7f0d0325
Code:
<public type="id" name="new_color_panel" id="0x7f?????? />
6. const v2, 0x7f0d031e
Code:
<public type="id" name="white_panel" id="0x7f?????? />
7. const v2, 0x7f0d031f
Code:
<public type="id" name="black_panel" id="0x7f?????? />
8. const v2, 0x7f0d0320
Code:
<public type="id" name="cyan_panel" id="0x7f?????? />
9. const v2, 0x7f0d0321
Code:
<public type="id" name="red_panel" id="0x7f?????? />
10. const v2, 0x7f0d0322
Code:
<public type="id" name="green_panel" id="0x7f?????? />
11. const v2, 0x7f0d0323
Code:
<public type="id" name="yellow_panel" id="0x7f?????? />
12. const v2, 0x7f0d031c
Code:
<public type="id" name="hex" id="0x7f?????? />
13. const v2, 0x7f0d031d
Code:
<public type="id" name="enter" id="0x7f?????? />
14. const v1, 0x7f0d0325
Code:
<public type="id" name="new_color_panel" id="0x7f?????? />
- Go to Settings.apk/smali/com/android/settings/pac/SeekBarPreferenceCham.smali
search this -> const v3, 0x7f0d032f
1. change this -> 0x7f0d032f , according to the value you got in your own public.xml
Code:
<public type="id" name="seekBarPrefBarContainerCham" id="0x7f?????? />
do it too to all lines below, in the smali
2. const v4, 0x7f040106
Code:
<public type="layout" name="seek_bar_preference_cham" id="0x7f?????? />
3. const v5, 0x7f0d032d
Code:
<public type="id" name="seekBarPrefValueCham" id="0x7f?????? />
4. const v5, 0x7f0d032c
Code:
<public type="id" name="seekBarPrefUnitsRightCham" id="0x7f?????? />
5. const v5, 0x7f0d032e
Code:
<public type="id" name="seekBarPrefUnitsLeftCham" id="0x7f?????? />
- Go to Settings.apk/smali/com/android/settings/pac/animations/ScrollAnimationInterfaceSettings.smali
search this -> const v1, 0x7f080c28
1. change this -> 0x7f080c28 , according to the value you got in your own public.xml
Code:
<public type="string" name="reset" id="0x7f?????? />
do it too to all lines below, in the smali
2. const v1, 0x7f080c9e
Code:
<public type="string" name="animation_settings_reset_message" id="0x7f?????? />
3. const v1, 0x7f0801e0
Code:
<public type="string" name="ok" id="0x7f?????? />
4. const v1, 0x7f080559
Code:
<public type="string" name="cancel" id="0x7f?????? />
5. const v7, 0x7f05007a
Code:
<public type="xml" name="scroll_animation_interface_settings" id="0x7f?????? />
6. const v1, 0x7f080c28
Code:
<public type="string" name="reset" id="0x7f?????? />
7. const v1, 0x7f0200a8
Code:
<public type="drawable" name="ic_settings_backup" id="0x7f?????? />
- Go to AndroidManifest.xml
add this lines to end of it before </application>
Code:
[COLOR="Red"]<activity android:name=".pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
Code:
- - - - - -
- - - - - -
- - - - - -
<provider android:name="android.support.v4.content.FileProvider" android:exported="false" android:authorities="com.android.settings.files" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<service android:label="LtoService" android:name=".cyanogenmod.LtoService" android:enabled="true" android:exported="false" />
<service android:name=".search.SearchPopulator" />
[COLOR="Red"]<activity android:name=".pac.animations.ScrollAnimationInterfaceSettings" />[/COLOR]
</application>
</manifest>
- Done and recompile it,
- SIGN it ( you can use signer_keys on attachment )
- Push to system/priv-app/
next step on post #2

FRAMEWORK.JAR
- Decompile / Baksmali your framework.jar
- Download attached file and merge it to your decompiled framework.jar
- Go to smali/android/provider/Settings$System.smali
search
Code:
# static fields
add this :
Code:
.field public static final ANIMATION_CONTROLS_NO_SCROLL:Ljava/lang/String; = "animation_controls_no_scroll"
.field public static final CUSTOM_FLING_VELOCITY:Ljava/lang/String; = "custom_fling_velocity"
.field public static final CUSTOM_OVERFLING_DISTANCE:Ljava/lang/String; = "custom_overfling_distance"
.field public static final CUSTOM_OVERSCROLL_DISTANCE:Ljava/lang/String; = "custom_overscroll_distance"
.field public static final CUSTOM_SCROLL_FRICTION:Ljava/lang/String; = "custom_scroll_friction"
.field public static final OVERSCROLL_GLOW_COLOR:Ljava/lang/String; = "overscroll_glow_color"
- Now decompile your framework-res.apk ( we only need public.xml )
- Go to res/values/public.xml and keep it open
- Now open decompiled framework.jar then go to smali/android/view/ViewConfiguration.smali
search this -> const v12, 0x1110014
ATTENTION! id public for framework.jar
just TAKE the BLUE CODE
and SKIP the RED CODE
1. change this -> 0x1110014 , according to the value you got in your own public.xml of framework-res.apk
Code:
<public type="bool" name="config_ui_enableFadingMarquee" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
2. const v12, 0x1050008
Code:
<public type="dimen" name="config_viewConfigurationTouchSlop" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
- Go to framework.jar.out/smali/android/widget/EdgeEffect.smali
search this -> const v3, 0x10804a5
just TAKE the BLUE CODE
and SKIP the RED CODE
1. change this -> 0x10804a5 , according to the value you got in your own public.xml of framework-res.apk
Code:
<public type="drawable" name="overscroll_edge" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
2. const v3, 0x10804a6
Code:
<public type="drawable" name="overscroll_glow" id="[COLOR="Blue"]0x[/COLOR][COLOR="Red"]0[/COLOR][COLOR="Blue"]???????[/COLOR] />
- Save
- Recompile it
- Push or flash to system/framework/

pertamax sir

ocoot said:
pertamax sir
Click to expand...
Click to collapse
thanks so much sir
do you think , does anyone miss sir ?

woww.. nice bro...
hope work on stockrom

syaeful said:
woww.. nice bro...
hope work on stockrom
Click to expand...
Click to collapse
thanks sir ..
Would you try it ? :fingers-crossed:

thank you, great tutorial u got there dab :good:
just a little request,
if u got a free time, would u mind to share how to add network traffic to status bar ?
for cm / aosp rom.
I see ur work for Armani Multimod is great, but haven't really tried it yet because honestly, all I just need network traffic, LoL
but still, many thanks to you for sharing it

xtro-xda said:
thank you, great tutorial u got there dab :good:
just a little request,
if u got a free time, would u mind to share how to add network traffic to status bar ?
for cm / aosp rom.
I see ur work for Armani Multimod is great, but haven't really tried it yet because honestly, all I just need network traffic, LoL
but still, many thanks to you for sharing it
Click to expand...
Click to collapse
thanks dab
for network traffic on the status bar ,, you can see here
http://forum.xda-developers.com/showpost.php?p=58703754&postcount=1
or
http://forum.xda-developers.com/showthread.php?t=2620272

qoejohn said:
thanks sir ..
Would you try it ? :fingers-crossed:
Click to expand...
Click to collapse
yess. i have to follow your guide this night. but it's give fc on Touchwiz Launcher.. can you post your original ViewConfiguration.smali for compare bro? :laugh:
Sorry no error log :laugh:
Salam Kitul :good:
Click to expand...
Click to collapse

syaeful said:
yess. i have to follow your guide this night. but it's give fc on Touchwiz Launcher.. can you post your original ViewConfiguration.smali for compare bro? :laugh:
Sorry no error log :laugh:
Click to expand...
Click to collapse
ok sir
good luck ... cemungudz

qoejohn said:
ok sir
good luck ... cemungudz
Click to expand...
Click to collapse
thanks... :highfive:

Sir i've try in StockROM KitKat its success and not bootloop but when i try to open apps (that makes Overscroll appear) Its always restarting my phone sir Can you know how to fix sir?

Jawaad_S said:
Sir i've try in StockROM KitKat its success and not bootloop but when i try to open apps (that makes Overscroll appear) Its always restarting my phone sir Can you know how to fix sir?
Click to expand...
Click to collapse
may smali in .jar ..
Just try to compare .. because I 've never tried it in stockrom kitkat :fingers-crossed:

qoejohn said:
may smali in .jar ..
Just try to compare .. because I 've never tried it in stockrom kitkat :fingers-crossed:
Click to expand...
Click to collapse
Already sir but its makes my phone bootloop sir can you tell me what clue in jar name to compare to stock sir?

Jawaad_S said:
Already sir but its makes my phone bootloop sir can you tell me what clue in jar name to compare to stock sir?
Click to expand...
Click to collapse
just compare smali attached in post # 2.
http://forum.xda-developers.com/showpost.php?p=59988770&postcount=2
and this for compare
http://forum.xda-developers.com/showpost.php?p=60112392&postcount=10

Same here, @qoejohn. Tried on Note3 n9005 4.4.2 stock. The selector for overscroll glow color applies fine (modifing EdgeEffect.smali only) but when I mod the ViewConfiguration.smali, the phone gets hot reboot when I click on an app like root explorer. I'll keep on trying. Thanks again!
Enviado desde mi SM-N9005 mediante Tapatalk

thanks for guide sir...but i try on stock toucwiz has stopped

Ih24n said:
thanks for guide sir...but i try on stock toucwiz has stopped
Click to expand...
Click to collapse
try to fix it, and it would be awesome if it is successful in TouchWiz

qoejohn said:
try to fix it, and it would be awesome if it is successful in TouchWiz
Click to expand...
Click to collapse
i will try to fix sir ...berusaha sekuat pikiran tapi

Related

[GUIDE] Creating your own wallpaper-chooser app

Hello guys!
After a bit of searching, trial and error, I managed to hack the TwWallpaperChooser.apk to add more wallpapers to it, or just change the standard ones. It is very simple and it shouldn't take more than 5 minutes to do.
You'll need:
- a bit of time
- apktool
- signapk
- any image-manipulation program that allows you to resize images (or you can use pixlr:http://pixlr.com/editor/)
- any text editor capable to edit .xml files (I recommend Notepad++:http://notepad-plus-plus.org/)
- obviously, wallpapers!
Lets do it. Start by decompiling TwWallpaperChoser (I've attached it) to any folder you want:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Go to the decompiled folder and navigate to res\drawable-mdpi. Here you'll paste the wallpapers you want to add. Each new wallpaper needs two files: the wallpaper itself and a preview, for the wallpaper select screen:
The wallpaper size needs to be 640x480px and the preview needs to be 107x80px. Both PNG and JPEG works. I didn't tried anything else than this. I'll leave the image work to you. After you've finished, rename the wallpaper file to wallpaper_(the name you want here) and the preview to wallpaper_(the name you want here)_small and move/paste them to the folder you've opened before. Note that the names cannot contain any spaces!
I've added wallpaper_80, wallpaper_beach, wallpaper_clouds and wallpaper_wave.
Now go to res\values folder and open public.xml. It will look something like this:
Copy the last drawable entry, in this case:
Code:
<public type="drawable" name="wallpaper_zanzibar" id="0x7f020016" />
<public type="drawable" name="wallpaper_zanzibar_small" id="0x7f020017" />
And paste it right below. It will look like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="drawable" name="APKTOOL_DUMMY_0001" id="0x7f020001" />
<public type="drawable" name="APKTOOL_DUMMY_0006" id="0x7f020006" />
<public type="drawable" name="APKTOOL_DUMMY_0007" id="0x7f020007" />
<public type="drawable" name="APKTOOL_DUMMY_0010" id="0x7f020010" />
<public type="drawable" name="APKTOOL_DUMMY_0011" id="0x7f020011" />
<public type="drawable" name="ic_launcher_wallpaper" id="0x7f020000" />
<public type="drawable" name="wallpaper_16" id="0x7f020002" />
<public type="drawable" name="wallpaper_16_small" id="0x7f020003" />
<public type="drawable" name="wallpaper_17" id="0x7f020004" />
<public type="drawable" name="wallpaper_17_small" id="0x7f020005" />
<public type="drawable" name="wallpaper_default" id="0x7f020008" />
<public type="drawable" name="wallpaper_default_small" id="0x7f020009" />
<public type="drawable" name="wallpaper_desert" id="0x7f02000a" />
<public type="drawable" name="wallpaper_desert_small" id="0x7f02000b" />
<public type="drawable" name="wallpaper_field" id="0x7f02000c" />
<public type="drawable" name="wallpaper_field_small" id="0x7f02000d" />
<public type="drawable" name="wallpaper_grass" id="0x7f02000e" />
<public type="drawable" name="wallpaper_grass_small" id="0x7f02000f" />
<public type="drawable" name="wallpaper_nexuswallpaper1" id="0x7f020012" />
<public type="drawable" name="wallpaper_nexuswallpaper1_small" id="0x7f020013" />
<public type="drawable" name="wallpaper_tree" id="0x7f020014" />
<public type="drawable" name="wallpaper_tree_small" id="0x7f020015" />
<public type="drawable" name="wallpaper_zanzibar" id="0x7f020016" />
<public type="drawable" name="wallpaper_zanzibar_small" id="0x7f020017" />
[B][COLOR="Blue"] <public type="drawable" name="wallpaper_zanzibar" id="0x7f020016" />
<public type="drawable" name="wallpaper_zanzibar_small" id="0x7f020017" />[/COLOR][/B]
<public type="layout" name="wallpaper_chooser" id="0x7f030000" />
<public type="layout" name="wallpaper_item" id="0x7f030001" />
<public type="array" name="extra_wallpapers" id="0x7f040000" />
<public type="array" name="wallpapers" id="0x7f040001" />
<public type="string" name="app_name" id="0x7f050000" />
<public type="string" name="pick_wallpaper" id="0x7f050001" />
<public type="string" name="wallpaper_instructions" id="0x7f050002" />
<public type="id" name="wallpaper" id="0x7f060000" />
<public type="id" name="gallery" id="0x7f060001" />
<public type="id" name="set" id="0x7f060002" />
</resources>
Now, rename the entry you've just added to the name of the wallpaper you've pasted in res\drawable-mdpi. For example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="drawable" name="APKTOOL_DUMMY_0001" id="0x7f020001" />
<public type="drawable" name="APKTOOL_DUMMY_0006" id="0x7f020006" />
<public type="drawable" name="APKTOOL_DUMMY_0007" id="0x7f020007" />
<public type="drawable" name="APKTOOL_DUMMY_0010" id="0x7f020010" />
<public type="drawable" name="APKTOOL_DUMMY_0011" id="0x7f020011" />
<public type="drawable" name="ic_launcher_wallpaper" id="0x7f020000" />
<public type="drawable" name="wallpaper_16" id="0x7f020002" />
<public type="drawable" name="wallpaper_16_small" id="0x7f020003" />
<public type="drawable" name="wallpaper_17" id="0x7f020004" />
<public type="drawable" name="wallpaper_17_small" id="0x7f020005" />
<public type="drawable" name="wallpaper_default" id="0x7f020008" />
<public type="drawable" name="wallpaper_default_small" id="0x7f020009" />
<public type="drawable" name="wallpaper_desert" id="0x7f02000a" />
<public type="drawable" name="wallpaper_desert_small" id="0x7f02000b" />
<public type="drawable" name="wallpaper_field" id="0x7f02000c" />
<public type="drawable" name="wallpaper_field_small" id="0x7f02000d" />
<public type="drawable" name="wallpaper_grass" id="0x7f02000e" />
<public type="drawable" name="wallpaper_grass_small" id="0x7f02000f" />
<public type="drawable" name="wallpaper_nexuswallpaper1" id="0x7f020012" />
<public type="drawable" name="wallpaper_nexuswallpaper1_small" id="0x7f020013" />
<public type="drawable" name="wallpaper_tree" id="0x7f020014" />
<public type="drawable" name="wallpaper_tree_small" id="0x7f020015" />
<public type="drawable" name="wallpaper_zanzibar" id="0x7f020016" />
<public type="drawable" name="wallpaper_zanzibar_small" id="0x7f020017" />
[B][COLOR="blue"] <public type="drawable" name="[COLOR="Red"]wallpaper_80[/COLOR]" id="0x7f020016" />
<public type="drawable" name="[COLOR="red"]wallpaper_80_small[/COLOR]" id="0x7f020017" />[/COLOR][/B]
<public type="layout" name="wallpaper_chooser" id="0x7f030000" />
<public type="layout" name="wallpaper_item" id="0x7f030001" />
<public type="array" name="extra_wallpapers" id="0x7f040000" />
<public type="array" name="wallpapers" id="0x7f040001" />
<public type="string" name="app_name" id="0x7f050000" />
<public type="string" name="pick_wallpaper" id="0x7f050001" />
<public type="string" name="wallpaper_instructions" id="0x7f050002" />
<public type="id" name="wallpaper" id="0x7f060000" />
<public type="id" name="gallery" id="0x7f060001" />
<public type="id" name="set" id="0x7f060002" />
</resources>
Now, note that the ID is the same for the wallpaper_zanzibar entry and for the wallpaper_80 entry. We need to change this, so I'll increase the last digit, following the hexadecimal order (0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f):
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="drawable" name="APKTOOL_DUMMY_0001" id="0x7f020001" />
<public type="drawable" name="APKTOOL_DUMMY_0006" id="0x7f020006" />
<public type="drawable" name="APKTOOL_DUMMY_0007" id="0x7f020007" />
<public type="drawable" name="APKTOOL_DUMMY_0010" id="0x7f020010" />
<public type="drawable" name="APKTOOL_DUMMY_0011" id="0x7f020011" />
<public type="drawable" name="ic_launcher_wallpaper" id="0x7f020000" />
<public type="drawable" name="wallpaper_16" id="0x7f020002" />
<public type="drawable" name="wallpaper_16_small" id="0x7f020003" />
<public type="drawable" name="wallpaper_17" id="0x7f020004" />
<public type="drawable" name="wallpaper_17_small" id="0x7f020005" />
<public type="drawable" name="wallpaper_default" id="0x7f020008" />
<public type="drawable" name="wallpaper_default_small" id="0x7f020009" />
<public type="drawable" name="wallpaper_desert" id="0x7f02000a" />
<public type="drawable" name="wallpaper_desert_small" id="0x7f02000b" />
<public type="drawable" name="wallpaper_field" id="0x7f02000c" />
<public type="drawable" name="wallpaper_field_small" id="0x7f02000d" />
<public type="drawable" name="wallpaper_grass" id="0x7f02000e" />
<public type="drawable" name="wallpaper_grass_small" id="0x7f02000f" />
<public type="drawable" name="wallpaper_nexuswallpaper1" id="0x7f020012" />
<public type="drawable" name="wallpaper_nexuswallpaper1_small" id="0x7f020013" />
<public type="drawable" name="wallpaper_tree" id="0x7f020014" />
<public type="drawable" name="wallpaper_tree_small" id="0x7f020015" />
<public type="drawable" name="wallpaper_zanzibar" id="0x7f020016" />
<public type="drawable" name="wallpaper_zanzibar_small" id="0x7f020017" />
[B][COLOR="blue"] <public type="drawable" name="wallpaper_80" id="0x7f02001[COLOR="Red"]8[/COLOR]" />
<public type="drawable" name="wallpaper_80_small" id="0x7f02001[COLOR="red"]9[/COLOR]" />[/COLOR][/B]
<public type="layout" name="wallpaper_chooser" id="0x7f030000" />
<public type="layout" name="wallpaper_item" id="0x7f030001" />
<public type="array" name="extra_wallpapers" id="0x7f040000" />
<public type="array" name="wallpapers" id="0x7f040001" />
<public type="string" name="app_name" id="0x7f050000" />
<public type="string" name="pick_wallpaper" id="0x7f050001" />
<public type="string" name="wallpaper_instructions" id="0x7f050002" />
<public type="id" name="wallpaper" id="0x7f060000" />
<public type="id" name="gallery" id="0x7f060001" />
<public type="id" name="set" id="0x7f060002" />
</resources>
Repeat these steps for every wallpaper you've added, but don't forget to change its ID or the apk won't compile. When your last digit is F (0x7f02001f, in my example), the next one should be 0x7f020020 and then the counting begins. Also, I don't know if there is a limitation to wallpapers to add!
When you finish this part, save and close. Now, navigate to res\values-mdpi folder and open arrays.xml:
We'll need to add the reference for the wallpaper here, so just copy and paste the last line and rename it to the wallpaper name (like I did on the image above). To change the order that wallpapers will appear on the selection screen, just change the order on this file. So, if you want the wallpaper you've added to be the first, move its entry to the top:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="wallpapers">
[COLOR="red"]<item>wallpaper_80</item>[/COLOR]
<item>wallpaper_default</item>
<item>wallpaper_16</item>
<item>wallpaper_17</item>
<item>wallpaper_desert</item>
<item>wallpaper_zanzibar</item>
<item>wallpaper_tree</item>
<item>wallpaper_grass</item>
<item>wallpaper_field</item>
<item>wallpaper_nexuswallpaper1</item>
</string-array>
</resources>
Save and close. Now, recomplie the apk:
If everything went OK, you'll see this. Now, navigate to TwWallpaperChoser\dist and copy the TwWallpaperChoser.apk to the SignAPK folder (I strongly suggest you to place SignAPK in C:\SignAPK).
Open a terminal window, navigate to the SignAPK folder and enter the following command:
Code:
java -jar signapk.jar certificate.pem key.pk8 TwWallpaperChooser.apk TwWallpaperChooser-signed.apk
You can copy the entire command and right-click any empty space on terminal and select Paste:
SignApk doesn't output anything when it sign the apk successfully, so when your terminal window goes like this:
You're done! Now upload the TwWallpaperChoser-signed.apk to your phone and install it. Done! Now you have your customized wallpaper chooser.
Any questions feel free to ask. Also, thank me if this helped you and forgive me if I did something wrong, this is my first or second tutorial
Whoa,just when I thought of this, there's a thread/guide that was posted recently. Thanks!
GetPatriotized said:
Whoa,just when I thought of this, there's a thread/guide that was posted recently. Thanks!
Click to expand...
Click to collapse
you're welcome
Good tutorial, very easy, very detailed.
Thanks.
Sent from my Galaxy Ace
Adgoosuc said:
Good tutorial, very easy, very detailed.
Thanks.
Sent from my Galaxy Ace
Click to expand...
Click to collapse
And I thought that I could add much more details to it Thanks :highfive:
You can just replace the images from the drawable folder keeping the file name intact. No beed to go to such great lengths!!
But nice guide.
___________XDA Premium__________
Don't be a noob. Be a newbie..!!
Details here.
____________________________________
shaaan said:
You can just replace the images from the drawable folder keeping the file name intact. No beed to go to such great lengths!!
But nice guide.
___________XDA Premium__________
Don't be a noob. Be a newbie..!!
Details here.
____________________________________
Click to expand...
Click to collapse
As I said somewhere before, you can only change images, but not add ones. My tutorial explains how to add more images
Renan Lazarotto said:
As I said somewhere before, you can only change images, but not add ones. My tutorial explains how to add more images
Click to expand...
Click to collapse
shaaan said:
You can just replace the images from the drawable folder keeping the file name intact. No beed to go to such great lengths!!
But nice guide.
___________XDA Premium__________
Don't be a noob. Be a newbie..!!
Details here.
____________________________________
Click to expand...
Click to collapse
Exactly
I won't give up. I'll wait for you.
Nice guide ....
Nice Guide!
But AFAIK the Guides are supposed to be in general section.
The mod will move this thread soon.
Ace King 34 said:
Nice Guide!
But AFAIK the Guides are supposed to be in general section.
The mod will move this thread soon.
Click to expand...
Click to collapse
Hm, I wasn't sure but I posted it here. Sorry for this
Would this work with any HDPI device like the Samsung Galaxy S2 ??
johnhany97 said:
Would this work with any HDPI device like the Samsung Galaxy S2 ??
Click to expand...
Click to collapse
yes but there is a little changes like the file name will be res/drawble-hdpi . and you can't use the apk attached in this topic you have to get the apk from your device if it was stuck or you can get it from any s2 stuck rom :: system/app ,,
Sent from my GT-S5830 using Tapatalk 2
bro how to add addons in it ?
Wow thanks for this I will try it as soon as possible

[CM11][Port][XS]Smallapps/Taskswitcher guide

First of all: this guide is based off the guide by @lukakas found here http://forum.xda-developers.com/showthread.php?t=2460877
I tweaked it to get it to work on CM11, comparing the files of the Z2 system dump, the 4.3 resources provided in the guide by @lukakas and compared the difference with CM11 files.
In this guide I am using OPENsemc rom beta 3, wich is CyanogenMod 11 / Android KitKat
Before flashing the files, perform a FULL BACKUP in case something goes wrong!
Code:
I will NOT be held responsible if something happens to your device while or after flashing any of these files! All flashing is done at your OWN RISK.
I recommend using Virtuous Ten Studio for editing the files. It can be downloaded from: http://www.virtuous-ten-studio.com/index.php/downloads
Setting up Virtuous Ten Studio
Click on “File” then on “Open Settings” then proceed to ApkTool, and install Framework-res.apk from the rom you are trying to port SmallApps to by clicking on “Add single framework”
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Android.policy.jar
Click on “Open” then on “New Project” and import anroid.policy.jar as shown below:
(note, in properties/settings click on “Smali” and make sure the API is set to 4.4 KitKat)
Now open smali\com\android\internal\policy\impl\PhoneWindowManager.smali and select checkAddPermission from the dropdown menu
Find and alter the following lines of code: (added code is marked in green)
.method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;[I)I
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:cond_1
const/4 v0, 0x0
.line 1609
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1627
const/16 v3, 0x18
aput v3, p2, v2
goto :goto_1
.line 1397 - This number should be a new number and should not be found elsewhere in this document
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1398 - This number should be a new number and should not be found elsewhere in this document
goto :goto_1
.line 1609 - This number must match the number above the line.local v0, permission:Ljava/lang/String;
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method
Press control s to save the document and recompile it: (use right click on android.policy and click “Build project”
Framework2.jar
For this step, import and decompile Framework2.jar like in steps show above. Right click on “framework2” and select “Open in windows explorer”
In the explorer screen, navigate to Data/smali/com, copy and paste the “sony” folder provided in the resources zip. Once done, right click on “framework2” and select “Reload project”
Once the project has reloaded, right click on “framework2” and select “Build project”
Framework-res.apk
Import framework-res.apk into the project.
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag. (Remember you installed framework-res.apk earlier?)
Once framework-res.apk has imported, open AndroidManifest.XML
Add the lines marked in green like below.
<permission android:name="com.sony.smallapp.permission.CONTROL_SMALLAPP" androidrotectionLevel="system|signature" />
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" androidrotectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
<permission android:label="@string/permlab_taskSwitcherPluginView" android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="signatureOrSystem" android:description="@string/permdesc_taskSwitcherPluginView" />
<permission android:name="com.sonymobile.permission.ACCESS_BEACON_MANAGER" androidrotectionLevel="system|signature" />
Don’t forget to save the modifications you just made.
Next up: open res/values/ and open “strings.xml”
At the end of the file, copy the green lines:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_taskSwitcherPluginView">Provide plugin-view to the task-switcher</string>
<string name="permdesc_taskSwitcherPluginView">Allows the application to provide a plugin-view to the task-switcher</string>
Save your modifications and and “Build project”
SystemUI.apk
This part can be the trickiest and can cause a lot of headache. Import SystemUI.apk and open AndroidManifest.xml
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag.
Add the lines marked in green like below.
<uses-permission android:name="com.sonymobile.permission.XSSM_PROVIDER" />
<uses-permission android:name="com.sonymobile.permission.XSSM" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.sony.smallapp.app.widget.permission.BIND_SMALLAPP_WIDGET_MANAGER" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPPMANAGER_CONTROL" />
<uses-permission android:name="com.sony.smallapp.launcher.permission.ACCESS_DATABASE" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="normal" />
Add the lines marked in green like below. (in Recents Activity)
<action android:name="com.android.systemui.recent.action.OPEN_RECENTS_INTENT_FROM_SMALL_APP_LAUNCHER" />
Now navigate to res/values/ and open “attrs.xml”
Add the line marked in green at the end of the file:
<attr name="lookupKey" format="string" />
Now navigate to res/values/ and open “ids.xml”
Add the line marked in green at the end of the file:
<item type="id" name="recent_wipe_app">false</item>
<item type="id" name="recents_inject_custom_view">false</item>
<item type="id" name="recents_layout">false</item>
<item type="id" name="recents_pluginview_container">false</item>
Now navigate to res/values/ and open “public.xml”
Since we will be working with hex id’s, a word of advice.
Always create a new hex id in this file. Duplicating other hex number will result in a fail when trying to recompile
As an example:
<public type="attr" name="maxSize" id="0x7f010008" />
<public type="attr" name="holdTime" id="0x7f010009" />
<public type="attr" name="decayTime" id="0x7f01000a" />
<public type="attr" name="orientation" id="0x7f01000b" />
<public type="attr" name="singleRow" id="0x7f01000c" />
<public type="attr" name="lookupKey" id="0x7f01000d" />
Notice that all the hex number are sequential? All these numbers are only found once in the entire document. If I were to add another line below LookupKey it would look like this:
<public type="attr" name="Tutorial" id="0x7f01000e" />
When in doubt as to if the number you assigned to a line, just copy the hex number and use control f to search for it. When you can’t find another line with that number, you know that your hex number is one of a kind.
Let’s get started shall we.
First of all locate the last “attr” line and add the line below marked in green:
<public type="attr" name="lookupKey" id="PUT_HEX_HERE" />
Locate the last “layout” line (like where you put LookupKey in the example above) and add line below marked in green:
<public type="layout" name="plugin_view" id="PUT_HEX_HERE" />
Locate the last “id” line and do the same with the line below
<public type="id" name="recents_inject_custom_view" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_layout" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_pluginview_container" id=" PUT_HEX_HERE" " />
Now copy and paste (and overwrite) the files in the resources to res/layout and res/layout-land.
Now copy and paste (and overwrite) the .smali files in the resources to com/android/systemui and com/android/systemui/recent
Before going any further, don’t forget to save ALL the modifications you made and after that you need to right click on “SystemUI” and click on “Reload project”
Now open up RecentsActivity.smali
Virtuous Ten Studio helps you in which lines you need to alter. Every line that has an hex id will be marked by a little blue box
In the example above, 0x7f07007f represents “recents_pluginview_container” you need to change that hex number to the number you assigned to it earlier in “public.xml”
You need to change every hex number in this file to match the hex numbers you assigned earlier.
These are:
recents_pluginview_container
recents_layout
plugin_view
status_bar_recent_panel
recents_root
config_recent_item_min_alpha
recents_pluginview_container
recents_return_to_launcher_enter
recents_return_to_launcher_exit
Note that the list above is in the same order as the lines containing the hex numbers in RecentsActivity.smali. This means that “recents_pluginview_container” represents the first hex number, “recents_layout” the second, “plugin_view” the third etc. etc.
Once that is done, save the file and open R$styleable.smali.
Find line: sput-object v0, Lcom/android/systemui/R$styleable;->RecentsPanelView:[I
Change that hex id to match the id for LookupKey, you added that in “public.xml”.
Save all modifications and build your project.
Zip up all the files in a flashable zip and start flashing
These are all the steps I made to get it working, I hope this guide will help others to port SmallApps/Taskswitcher.
nice i will try when i come home.
thanks the guide
Sent from my LT26i using xda app-developers app
Well done!
@Kevin-0100, mate where to find Recent Activity? is it in the " smali\com\android\systemui\recent " ??
EDIT: found it already :3
@Kevin-0100
EDIT: im having these errors while doing the last step mate. pls help
In the top bar in VTS, click on view log. There you will find which lines are causing the build error. Are you trying to port it tot OmniRom? If so you should not copy and paste the .smali files in my resources as they come from another ROM (opensemc). Try using the .smali files from the OmniRom
Sent from my Xperia S using XDA Premium 4 mobile app
Ohh ok tnx mate
Sent from my LT26ii using xda premium
Error on
\res\layout\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
\res\layout-land\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
what should I do
Using Beanstalk ROM
I found similar error and fix by find some similar picture
I already change @drawable/ic_recents_clear to @drawable/ic_notify_clear_normal in both status_bar_recent_panel.xml
@MaDMaT80 can you add this taskswitcher and small apps to your 4.4 kitkat rom..it would be awsome..
Sent from my LT28h using Tapatalk
nut27455 said:
Error on
\res\layout\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
\res\layout-land\status_bar_recent_panel.xml:11: error: Error: No resource found that matches the given name (at 'id' with value '@id/recents_clear').'
what should I do
Using Beanstalk ROM
I found similar error and fix by find some similar picture
I already change @drawable/ic_recents_clear to @drawable/ic_notify_clear_normal in both status_bar_recent_panel.xml
Click to expand...
Click to collapse
You need to go to res/values/ids and make a new value for recents_clear. That should fix it
Sent from my C1905 using XDA Premium 4 mobile app
Kevin-0100 said:
You need to go to res/values/ids and make a new value for recents_clear. That should fix it
Sent from my C1905 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Thank you it work for build.
But FC when open recent in phone.
Anyway thank you for sharing this.
If you get a logcat you could try finding the reason for the FC
Sent from my C1905 using XDA Premium 4 mobile app
Got it
I/dalvikvm(3258): Could not find method com.android.systemui.recent.RecentsActivity.dismissAndDoNothing, referenced from method com.android.systemui.recent.RecentsPanelView.dismissAndDoNothing
W/dalvikvm(3258): VFY: unable to resolve virtual method 4171: Lcom/android/systemui/recent/RecentsActivity;.dismissAndDoNothing ()V
There is an error in your RecentsActivity.smali. Open that file and search for PanelView and see if everything is correct. I think the FC may be caused by an error in the PanelView section.
Sent from my C1905 using XDA Premium 4 mobile app
@Kevin-0100
I can't understant last step.In oldu version. 10.1 Op write the line which we must past the hex code at the public. Find the blué line in RecentsActivity.smali but which is the "recents_pluginview_container" or "recents_layout" cant find.
You will not find "recents_activity" etc. In Recentsactivity.smali the names are replaced with hex numbers. Follow the last step precisely (using virtuous ten studio) and you will find which lines to edit
Sent from my C1905 using XDA Premium 4 mobile app
Good working i'll be add my rom. Thanks
Kevin-0100 said:
First of all: this guide is based off the guide by @lukakas found here http://forum.xda-developers.com/showthread.php?t=2460877
I tweaked it to get it to work on CM11, comparing the files of the Z2 system dump, the 4.3 resources provided in the guide by @lukakas and compared the difference with CM11 files.
In this guide I am using OPENsemc rom beta 3, wich is CyanogenMod 11 / Android KitKat
Before flashing the files, perform a FULL BACKUP in case something goes wrong!
Code:
I will NOT be held responsible if something happens to your device while or after flashing any of these files! All flashing is done at your OWN RISK.
I recommend using Virtuous Ten Studio for editing the files. It can be downloaded from: http://www.virtuous-ten-studio.com/index.php/downloads
Setting up Virtuous Ten Studio
Click on “File” then on “Open Settings” then proceed to ApkTool, and install Framework-res.apk from the rom you are trying to port SmallApps to by clicking on “Add single framework”
Android.policy.jar
Click on “Open” then on “New Project” and import anroid.policy.jar as shown below:
(note, in properties/settings click on “Smali” and make sure the API is set to 4.4 KitKat)
Now open smali\com\android\internal\policy\impl\PhoneWindowManager.smali and select checkAddPermission from the dropdown menu
Find and alter the following lines of code: (added code is marked in green)
.method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;[I)I
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:cond_1
const/4 v0, 0x0
.line 1609
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
(Lines of code not needed in the part of the tutorial has been cut, do not delete them though)
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1627
const/16 v3, 0x18
aput v3, p2, v2
goto :goto_1
.line 1397 - This number should be a new number and should not be found elsewhere in this document
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1398 - This number should be a new number and should not be found elsewhere in this document
goto :goto_1
.line 1609 - This number must match the number above the line.local v0, permission:Ljava/lang/String;
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method
Press control s to save the document and recompile it: (use right click on android.policy and click “Build project”
Framework2.jar
For this step, import and decompile Framework2.jar like in steps show above. Right click on “framework2” and select “Open in windows explorer”
In the explorer screen, navigate to Data/smali/com, copy and paste the “sony” folder provided in the resources zip. Once done, right click on “framework2” and select “Reload project”
Once the project has reloaded, right click on “framework2” and select “Build project”
Framework-res.apk
Import framework-res.apk into the project.
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag. (Remember you installed framework-res.apk earlier?)
Once framework-res.apk has imported, open AndroidManifest.XML
Add the lines marked in green like below.
<permission android:name="com.sony.smallapp.permission.CONTROL_SMALLAPP" androidrotectionLevel="system|signature" />
<permission android:label="@string/permlab_smallapp" android:name="com.sony.smallapp.permission.SMALLAPP" androidrotectionLevel="dangerous" android:description="@string/permdesc_smallapp" />
<permission android:label="@string/permlab_taskSwitcherPluginView" android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="signatureOrSystem" android:description="@string/permdesc_taskSwitcherPluginView" />
<permission android:name="com.sonymobile.permission.ACCESS_BEACON_MANAGER" androidrotectionLevel="system|signature" />
Don’t forget to save the modifications you just made.
Next up: open res/values/ and open “strings.xml”
At the end of the file, copy the green lines:
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
<string name="permlab_taskSwitcherPluginView">Provide plugin-view to the task-switcher</string>
<string name="permdesc_taskSwitcherPluginView">Allows the application to provide a plugin-view to the task-switcher</string>
Save your modifications and and “Build project”
SystemUI.apk
This part can be the trickiest and can cause a lot of headache. Import SystemUI.apk and open AndroidManifest.xml
Note: make sure before importing that in the Apk-Tool section you select “Use newest ApkTool” and that you select the Framework tag.
Add the lines marked in green like below.
<uses-permission android:name="com.sonymobile.permission.XSSM_PROVIDER" />
<uses-permission android:name="com.sonymobile.permission.XSSM" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.sony.smallapp.app.widget.permission.BIND_SMALLAPP_WIDGET_MANAGER" />
<uses-permission android:name="com.sony.smallapp.permission.SMALLAPPMANAGER_CONTROL" />
<uses-permission android:name="com.sony.smallapp.launcher.permission.ACCESS_DATABASE" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<permission android:name="com.sonymobile.permission.TASK_SWITCHER_PLUGIN_VIEW" androidrotectionLevel="normal" />
Add the lines marked in green like below. (in Recents Activity)
<action android:name="com.android.systemui.recent.action.OPEN_RECENTS_INTENT_FROM_SMALL_APP_LAUNCHER" />
Now navigate to res/values/ and open “attrs.xml”
Add the line marked in green at the end of the file:
<attr name="lookupKey" format="string" />
Now navigate to res/values/ and open “ids.xml”
Add the line marked in green at the end of the file:
<item type="id" name="recent_wipe_app">false</item>
<item type="id" name="recents_inject_custom_view">false</item>
<item type="id" name="recents_layout">false</item>
<item type="id" name="recents_pluginview_container">false</item>
Now navigate to res/values/ and open “public.xml”
Since we will be working with hex id’s, a word of advice.
Always create a new hex id in this file. Duplicating other hex number will result in a fail when trying to recompile
As an example:
<public type="attr" name="maxSize" id="0x7f010008" />
<public type="attr" name="holdTime" id="0x7f010009" />
<public type="attr" name="decayTime" id="0x7f01000a" />
<public type="attr" name="orientation" id="0x7f01000b" />
<public type="attr" name="singleRow" id="0x7f01000c" />
<public type="attr" name="lookupKey" id="0x7f01000d" />
Notice that all the hex number are sequential? All these numbers are only found once in the entire document. If I were to add another line below LookupKey it would look like this:
<public type="attr" name="Tutorial" id="0x7f01000e" />
When in doubt as to if the number you assigned to a line, just copy the hex number and use control f to search for it. When you can’t find another line with that number, you know that your hex number is one of a kind.
Let’s get started shall we.
First of all locate the last “attr” line and add the line below marked in green:
<public type="attr" name="lookupKey" id="PUT_HEX_HERE" />
Locate the last “layout” line (like where you put LookupKey in the example above) and add line below marked in green:
<public type="layout" name="plugin_view" id="PUT_HEX_HERE" />
Locate the last “id” line and do the same with the line below
<public type="id" name="recents_inject_custom_view" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_layout" id=" PUT_HEX_HERE" " />
<public type="id" name="recents_pluginview_container" id=" PUT_HEX_HERE" " />
Now copy and paste (and overwrite) the files in the resources to res/layout and res/layout-land.
Now copy and paste (and overwrite) the .smali files in the resources to com/android/systemui and com/android/systemui/recent
Before going any further, don’t forget to save ALL the modifications you made and after that you need to right click on “SystemUI” and click on “Reload project”
Now open up RecentsActivity.smali
Virtuous Ten Studio helps you in which lines you need to alter. Every line that has an hex id will be marked by a little blue box
In the example above, 0x7f07007f represents “recents_pluginview_container” you need to change that hex number to the number you assigned to it earlier in “public.xml”
You need to change every hex number in this file to match the hex numbers you assigned earlier.
These are:
recents_pluginview_container
recents_layout
plugin_view
status_bar_recent_panel
recents_root
config_recent_item_min_alpha
recents_pluginview_container
recents_return_to_launcher_enter
recents_return_to_launcher_exit
Note that the list above is in the same order as the lines containing the hex numbers in RecentsActivity.smali. This means that “recents_pluginview_container” represents the first hex number, “recents_layout” the second, “plugin_view” the third etc. etc.
Once that is done, save the file and open R$styleable.smali.
Find line: sput-object v0, Lcom/android/systemui/R$styleable;->RecentsPanelView:[I
Change that hex id to match the id for LookupKey, you added that in “public.xml”.
Save all modifications and build your project.
Zip up all the files in a flashable zip and start flashing
These are all the steps I made to get it working, I hope this guide will help others to port SmallApps/Taskswitcher.
Click to expand...
Click to collapse
when i recompile, erro RecentsActivity$1.smali show screenshotView attachment 2715043
You should use apktool 1.5.2 and not 2.0 beta (you are probably using he beta version
Kevin-0100 said:
You should use apktool 1.5.2 and not 2.0 beta (you are probably using he beta version
Click to expand...
Click to collapse
Can you prapere video. i think better than this. Thanks.
carlito-lt26i said:
when i recompile, erro RecentsActivity$1.smali show screenshotView attachment 2715043
Click to expand...
Click to collapse
+1

[GUIDE] Add Ten Tabs Layout to SystemUI

This mod will provide ten (10) Tabs which supports ten layouts to your SystemUI.
Note: Smali files were decompiled using apktool_2.0.0b9, so pls use the same apktool version in decompiling and recompiling your SystemUI.apk
Steps:
1. Decompile your SystemUI.apk
2. Download the attachment (it contains the needed drawables and smali files).
3. Extract the zip file to your decompiled SystemUI.apk folder (/SystemUI.apk/here).
4. Open your ids.xml (/SystemUI.apk/res/values/ids.xml) then add this code before </resources>
Code:
<item type="id" name="tentabs">false</item>
5. Open your status_bar_expanded.xml (/SystemUI.apk/res/layout/status_bar_expanded.xml) then add this code after
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
OR anywhere in your status_bar_expanded layout, its up to you to layout it as long as it looks like this:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
<com.jeremypacabis.statusbarmods.TenTabsViewChanger android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<com.jeremypacabis.statusbarmods.TenTabs android:id="@id/tentabs" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="First Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Second Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Third Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fourth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fifth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Sixth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Seventh Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Eight Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Ninth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tenth Layout" />
</com.jeremypacabis.statusbarmods.TenTabs>
Note: Every TextView in my example code represents a layout so its up to you to change it, AS LONG AS THE
com.jeremypacabis.statusbarmods.TenTabs has EXACTLY ten (10) child layouts within it. You can change a TextView into:
Code:
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" >
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" >
// YOUR CONTENTS FOR A LAYOUT HERE
</LinearLayout>
</ScrollView>
The above code is considered as ONE CHILD VIEW or LAYOUT.
6. Recompile your SystemUI.apk
7. Decompile your new SystemUI.apk into a new location.
8. Now we will work with the SMALI part of the newly decompiled SystemUI.apk
Now for the SMALI part:
1. After decompiling the new SystemUI.apk take note of these codes from your public.xml (/SystemUI.apk/res/values/public.xml):
Code:
<public type="id" name="tentabs" id="0x7f0a003a" />
<public type="drawable" name="zzz_tab_1" id="0x7f020162" />
<public type="drawable" name="zzz_tab_10" id="0x7f020163" />
<public type="drawable" name="zzz_tab_2" id="0x7f020164" />
<public type="drawable" name="zzz_tab_3" id="0x7f020165" />
<public type="drawable" name="zzz_tab_4" id="0x7f020166" />
<public type="drawable" name="zzz_tab_5" id="0x7f020167" />
<public type="drawable" name="zzz_tab_6" id="0x7f020168" />
<public type="drawable" name="zzz_tab_7" id="0x7f020169" />
<public type="drawable" name="zzz_tab_8" id="0x7f02016a" />
<public type="drawable" name="zzz_tab_9" id="0x7f02016b" />
Note: These were the public ids I got from decompiling my new SystemUI.apk after adding the drawables and the "tentabs" id. These public ids MAY BE DIFFERENT from what you will get after decompiling your own SystemUI.apk.
2. Now open TenTabs.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabs.smali and look for
Code:
const v10, 0x7f060005 # Replace 0x7f060005 with your public.xml tentabs public id
As what the comment says, replace 0x7f060005 with your tentabs public id, which in my case from the example above is 0x7f0a003a. So it will now become:
Code:
const v10, 0x7f0a003a # Replace 0x7f060005 with your public.xml tentabs public id
Note: Your tentabs id might be different, it is still ok and just replace it with yours, and in a SMALI, everything in a line followed by a hashtag or number sign symbol # is just a comment, so you can just ignore it.
3. Save your edited TenTabs.smali
4. Open TenTabsViewChanger.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabsViewChanger.smali and just search for my comments for the id of the drawables for the tabs and replace it as what the comment says.
Code:
const v1, 0x7f020001 # your tab 1 drawable id here
const v1, 0x7f020003 # your tab 2 drawable id here
const v1, 0x7f020004 # your tab 3 drawable id here
const v1, 0x7f020005 # your tab 4 drawable id here
const v1, 0x7f020006 # your tab 5 drawable id here
const v1, 0x7f020007 # your tab 6 drawable id here
const v1, 0x7f020008 # your tab 7 drawable id here
const v1, 0x7f020009 # your tab 8 drawable id here
const v1, 0x7f02000a # your tab 9 drawable id here
const v1, 0x7f020002 # your tab 10 drawable id here
Note: tab 1 drawable id corresponds to 0x7f020162 from <public type="drawable" name="zzz_tab_1" id="0x7f020162" />, tab 2 drawable id corresponds to 0x7f020164 from <public type="drawable" name="zzz_tab_2" id="0x7f020164" /> and so on and so forth. So your new code from my example public ids from above is:
Code:
const v1, 0x7f020162 # your tab 1 drawable id here
const v1, 0x7f020164 # your tab 2 drawable id here
const v1, 0x7f020165 # your tab 3 drawable id here
const v1, 0x7f020166 # your tab 4 drawable id here
const v1, 0x7f020167 # your tab 5 drawable id here
const v1, 0x7f020168 # your tab 6 drawable id here
const v1, 0x7f020169 # your tab 7 drawable id here
const v1, 0x7f02016a # your tab 8 drawable id here
const v1, 0x7f02016b # your tab 9 drawable id here
const v1, 0x7f020163 # your tab 10 drawable id here
5. Now save your edited smali, or review and double check the numbers, If you are confident enough then you may proceed.
6. Recompile your SystemUI.apk
7. Push or Flash your SystemUI.apk and see if your mod works.
Credits:
I used the Black Andy Head With 1% White Text by unknown battery icons for the tab example drawable from TickleMyAndroid user_files.
Screenshots:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Needed files:
View attachment TenTabsFiles.zip v0.1
Source Codes?
You want to play with the code? Add functions? Explore and Learn? Copy method snippets? You can check it at my GitHub.:good::
Suggestions? Comments? Bugs (I hope none)?
Just post a reply here and I will try to attend to it. (The word "try" always has a "catch" Exception, iykwim.)
thx, now i have 15 tabs
73R3WY said:
This mod will provide ten (10) Tabs which supports ten layouts to your SystemUI.
Note: Smali files were decompiled using apktool_2.0.0b9, so pls use the same apktool version in decompiling and recompiling your SystemUI.apk
Steps:
1. Decompile your SystemUI.apk
2. Download the attachment (it contains the needed drawables and smali files).
3. Extract the zip file to your decompiled SystemUI.apk folder (/SystemUI.apk/here).
4. Open your ids.xml (/SystemUI.apk/res/values/ids.xml) then add this code before </resources>
Code:
<item type="id" name="tentabs">false</item>
5. Open your status_bar_expanded.xml (/SystemUI.apk/res/layout/status_bar_expanded.xml) then add this code after
Code:
xmlns:android="diordna/ser/kpa/moc.diordna.samehcs//:ptth">
Note: I reversed the code above because xda recognizes it as an external link.
OR anywhere in your status_bar_expanded layout, its up to you to layout it as long as it looks like this:
Code:
xmlns:android="diordna/ser/kpa/moc.diordna.samehcs//:ptth">
<com.jeremypacabis.statusbarmods.TenTabsViewChanger android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<com.jeremypacabis.statusbarmods.TenTabs android:id="@id/tentabs" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="First Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Second Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Third Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fourth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Fifth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Sixth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Seventh Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Eight Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Ninth Layout" />
<TextView android:textSize="16.0sp" android:gravity="center" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tenth Layout" />
</com.jeremypacabis.statusbarmods.TenTabs>
Note: Every TextView in my example code represents a layout so its up to you to change it, AS LONG AS THE
com.jeremypacabis.statusbarmods.TenTabs has EXACTLY ten (10) child layouts within it. You can change a TextView into:
Code:
<ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" >
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" >
// YOUR CONTENTS FOR A LAYOUT HERE
</LinearLayout>
</ScrollView>
The above code is considered as ONE CHILD VIEW or LAYOUT.
6. Recompile your SystemUI.apk
7. Decompile your new SystemUI.apk into a new location.
8. Now we will work with the SMALI part of the newly decompiled SystemUI.apk
Now for the SMALI part:
1. After decompiling the new SystemUI.apk take note of these codes from your public.xml (/SystemUI.apk/res/values/public.xml):
Code:
<public type="id" name="tentabs" id="0x7f0a003a" />
<public type="drawable" name="zzz_tab_1" id="0x7f020162" />
<public type="drawable" name="zzz_tab_10" id="0x7f020163" />
<public type="drawable" name="zzz_tab_2" id="0x7f020164" />
<public type="drawable" name="zzz_tab_3" id="0x7f020165" />
<public type="drawable" name="zzz_tab_4" id="0x7f020166" />
<public type="drawable" name="zzz_tab_5" id="0x7f020167" />
<public type="drawable" name="zzz_tab_6" id="0x7f020168" />
<public type="drawable" name="zzz_tab_7" id="0x7f020169" />
<public type="drawable" name="zzz_tab_8" id="0x7f02016a" />
<public type="drawable" name="zzz_tab_9" id="0x7f02016b" />
Note: These were the public ids I got from decompiling my new SystemUI.apk after adding the drawables and the "tentabs" id. These public ids MAY BE DIFFERENT from what you will get after decompiling your own SystemUI.apk.
2. Now open TenTabs.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabs.smali and look for
Code:
const v10, 0x7f060005# Replace 0x7f060005 with your public.xml tentabs public id
As what the comment says, replace 0x7f060005 with your tentabs public id, which in my case from the example above is 0x7f0a003a. So it will now become:
Code:
const v10, 0x7f0a003a# Replace 0x7f060005 with your public.xml tentabs public id
Note: Your tentabs id might be different, it is still ok and just replace it with yours, and in a SMALI, everything in a line followed by a hashtag or number sign symbol # is just a comment, so you can just ignore it.
3. Save your edited TenTabs.smali
4. Open TenTabsViewChanger.smali from /SystemUI.apk/smali/com/jeremypacabis/statusbarmods/TenTabsViewChanger.smali and just search for my comments for the id of the drawables for the tabs and replace it as what the comment says.
Code:
const v1, 0x7f020001# your tab 1 drawable id here
const v1, 0x7f020003# your tab 2 drawable id here
const v1, 0x7f020004# your tab 3 drawable id here
const v1, 0x7f020005# your tab 4 drawable id here
const v1, 0x7f020006# your tab 5 drawable id here
const v1, 0x7f020007# your tab 6 drawable id here
const v1, 0x7f020008# your tab 7 drawable id here
const v1, 0x7f020009# your tab 8 drawable id here
const v1, 0x7f02000a# your tab 9 drawable id here
const v1, 0x7f020002# your tab 10 drawable id here
Note: tab 1 drawable id corresponds to 0x7f020162 from <public type="drawable" name="zzz_tab_1" id="0x7f020162" />, tab 2 drawable id corresponds to 0x7f020164 from <public type="drawable" name="zzz_tab_2" id="0x7f020164" /> and so on and so forth. So your new code from my example public ids from above is:
Code:
const v1, 0x7f020162# your tab 1 drawable id here
const v1, 0x7f020164# your tab 2 drawable id here
const v1, 0x7f020165# your tab 3 drawable id here
const v1, 0x7f020166# your tab 4 drawable id here
const v1, 0x7f020167# your tab 5 drawable id here
const v1, 0x7f020168# your tab 6 drawable id here
const v1, 0x7f020169# your tab 7 drawable id here
const v1, 0x7f02016a# your tab 8 drawable id here
const v1, 0x7f02016b# your tab 9 drawable id here
const v1, 0x7f020163# your tab 10 drawable id here
5. Now save your edited smali, or review and double check the numbers, If you are confident enough then you may proceed.
6. Recompile your SystemUI.apk
7. Push or Flash your SystemUI.apk and see if your mod works.
Credits:
I used the Black Andy Head With 1% White Text by unknown battery icons for the tab example drawable from TickleMyAndroid user_files.
Screenshots:
View attachment 2884923View attachment 2884924View attachment 2884925
Needed files:
View attachment 2884926 v0.1
Click to expand...
Click to collapse
Tanks i am work in stockrom deodex :thumbup::thumbup:
Sent from my SM-N9000 using XDA Free mobile app
73R3WY said:
This mod will provide ten (10) Tabs which supports ten layouts to your SystemUI.
Click to expand...
Click to collapse
Thanks. Can I decompile it with apktool for mobile? If not, can you decompile again the smali files with mobile apktool for mobile apktool users? Advance thanks mate.
jasper~ said:
Thanks. Can I decompile it with apktool for mobile? If not, can you decompile again the smali files with mobile apktool for mobile apktool users? Advance thanks mate.
Click to expand...
Click to collapse
I think you can still use the smali's from the attached file sir with apktool mobile. but in case it will not work, you can try the attached zip file from this reply with apktool mobile. I decompiled it using apktool mobile armel v4.3.1, there are slight differences from the output ids of the smali so just compare it with the smali above for reference with the guide.
View attachment TenTabsFilesDecompiledWithapktoolMobile.zip
73R3WY said:
I think you can still use the smali's from the attached file sir with apktool mobile. but in case it will not work, you can try the attached zip file from this reply with apktool mobile. I decompiled it using apktool mobile armel v4.3.1, there are slight differences from the output ids of the smali so just compare it with the smali above for reference with the guide.
View attachment 2888827
Click to expand...
Click to collapse
Oh, thanks bro. How about Apktool v4.1 armel. Can I also decompile it?
jasper~ said:
Oh, thanks bro. How about Apktool v4.1 armel. Can I also decompile it?
Click to expand...
Click to collapse
Try apktool 4.4 sir , its support smali like this
jasper~ said:
Oh, thanks bro. How about Apktool v4.1 armel. Can I also decompile it?
Click to expand...
Click to collapse
yes sir, because apktool mobile v4.1 armel also uses apktool v1.5.2
73R3WY said:
yes sir, because apktool mobile v4.1 armel also uses apktool v1.5.2
Click to expand...
Click to collapse
Ok. Thanks bro
This is what I get.
Sent from my GT-S5360 using XDA Free mobile app
sir can i change tab 1,2,3 with custom text?

[Guide][CM12]How to Make "Looks Like" Sony Stock Clockwidget on Lockscreen

Hi, i'm gonna tell u how to get Sony lollipop digital clock on CM12 lockscreen
Requirements:
- Knowledge how to decompile recompile
- Advanced ApkTool v4.1.0 By BDFreak (use latest apktool)
- Java installed
- Notepad++
- SystemUI.apk
Steps:
VERTICAL CLOCK
1. decompile SystemUI.apk
2. open keyguard_status_area.xml in res/layout folder, replace the whole lines with these
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/res-auto">
<LinearLayout android:layout_gravity="center_horizontal" android:orientation="vertical" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextClock android:textColor="@color/clock_white" android:gravity="center" android:layout_gravity="center_horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:format12Hour="a - EEE, LLL d" android:format24Hour="EEE, LLL d" style="@style/new_style" />
</LinearLayout>
<TextClock android:textColor="@color/clock_white" android:gravity="center" android:id="@id/date_view" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_below="@id/clock" style="@style/widget_label" />
<TextView android:textColor="@color/clock_gray" android:gravity="center" android:id="@id/alarm_status" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawablePadding="6.0dip" android:layout_below="@id/clock" android:drawableStart="@drawable/ic_access_alarms_big" style="@style/new_style" />
</LinearLayout>
3. open keyguard_status_view.xml in res/layout folder, replace the whole lines with these
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.keyguard.KeyguardStatusView android:gravity="center|top" android:orientation="vertical" android:id="@id/keyguard_status_view" android:layout_width="fill_parent" android:layout_height="wrap_content" androidprv:layout_maxHeight="@dimen/keyguard_security_height" androidprv:layout_maxWidth="@dimen/keyguard_security_width"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/res-auto">
<LinearLayout android:layout_gravity="center|top" android:orientation="vertical" android:id="@id/keyguard_clock_container" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerInParent="true">
<LinearLayout android:layout_gravity="center_horizontal" android:orientation="vertical" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextClock android:textAppearance="@style/BoldTimeTextStyle" android:textColor="@color/clock_white" android:layout_gravity="center_horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-13.5dip" android:layout_marginBottom="-11.5dip" android:singleLine="true" android:format12Hour="hh" android:format24Hour="HH" />
</LinearLayout>
<TextClock android:textAppearance="@style/LightTimeTextStyle" android:textColor="@color/clock_white" android:layout_gravity="center_horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="-13.5dip" android:layout_marginBottom="-11.5dip" android:singleLine="true" android:layout_below="@id/clock" android:format12Hour="mm" android:format24Hour="mm" />
<TextClock android:textColor="@color/clock_white" android:layout_gravity="center_horizontal" android:id="@id/clock_view" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" android:singleLine="true" android:textAllCaps="true" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" style="@style/widget_big_thin" />
<include layout="@layout/keyguard_status_area" />
<TextView android:textSize="@dimen/widget_label_font_size" android:textColor="#ccffffff" android:ellipsize="marquee" android:layout_gravity="center_horizontal" android:id="@id/owner_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16.0dip" android:layout_marginTop="@dimen/date_owner_info_margin" android:layout_marginRight="16.0dip" android:singleLine="true" />
</LinearLayout>
</com.android.keyguard.KeyguardStatusView>
4. open colors.xml in res/values folder, add this line
Code:
<color name="time_shadow_color">#71000000</color>
5. open dimens.xml in res/values folder, add these line
Code:
<item type="dimen" name="time_shadow_dy">1.0</item>
<item type="dimen" name="time_shadow_radius">3.0</item>
6. open styles.xml in res/values folder, add these line
Code:
<style name="BoldTimeTextStyle" parent="@style/TimeShadow">
<item name="android:textSize">108.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:focusable">true</item>
<item name="android:fontFamily">x-sst-medium</item>
</style>
<style name="TimeShadow" parent="@style/WrapContent">
<item name="android:shadowColor">@color/time_shadow_color</item>
<item name="android:shadowDy">@dimen/time_shadow_dy</item>
<item name="android:shadowRadius">@dimen/time_shadow_radius</item>
</style>
<style name="WrapContent">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="LightTimeTextStyle" parent="@style/TimeShadow">
<item name="android:textSize">108.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:focusable">true</item>
<item name="android:fontFamily">x-sst-ultralight</item>
</style>
<style name="new_style">
<item name="android:textSize">@dimen/widget_label_font_size</item>
<item name="android:textStyle">normal</item>
<item name="android:maxLines">1</item>
<item name="android:textAllCaps">true</item>
<item name="android:fontFamily">sst</item>
</style>
7. save all changes, recompile, sign, push SystemUI.apk to system
vertical clock has layout issue in landscape mode
HORIZONTAL CLOCK
1. decompile SystemUI.apk
2. open keyguard_status_area.xml in res/layout folder, replace the whole lines with these
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/res-auto">
<LinearLayout android:layout_gravity="center_horizontal" android:orientation="vertical" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextClock android:textColor="@color/clock_white" android:gravity="center" android:layout_gravity="center_horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:format12Hour="a - EEE, LLL d" android:format24Hour="EEE, LLL d" style="@style/new_style" />
</LinearLayout>
<TextClock android:textColor="@color/clock_white" android:gravity="center" android:id="@id/date_view" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_below="@id/clock" style="@style/widget_label" />
<TextView android:textColor="@color/clock_gray" android:gravity="center" android:id="@id/alarm_status" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawablePadding="6.0dip" android:layout_below="@id/clock" android:drawableStart="@drawable/ic_access_alarms_big" style="@style/new_style" />
</LinearLayout>
3. open keyguard_status_view.xml in res/layout folder, replace the whole lines with these
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.keyguard.KeyguardStatusView android:gravity="center|top" android:orientation="vertical" android:id="@id/keyguard_status_view" android:layout_width="fill_parent" android:layout_height="wrap_content" androidprv:layout_maxHeight="@dimen/keyguard_security_height" androidprv:layout_maxWidth="@dimen/keyguard_security_width"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/res-auto">
<LinearLayout android:layout_gravity="center|top" android:orientation="vertical" android:id="@id/keyguard_clock_container" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerInParent="true">
<LinearLayout android:layout_gravity="center_horizontal" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextClock android:textAppearance="@style/BoldTimeTextStyle" android:textColor="@color/clock_white" android:gravity="center" android:layout_gravity="center_vertical" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="-3.0dip" android:singleLine="true" android:format12Hour="h" android:format24Hour="HH" />
<TextClock android:textAppearance="@style/LightTimeTextStyle" android:textColor="@color/clock_white" android:gravity="center" android:layout_gravity="center_vertical" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="-10.0dip" android:singleLine="true" android:format12Hour="mm" android:format24Hour="mm" />
</LinearLayout>
<TextClock android:textColor="@color/clock_white" android:layout_gravity="center_horizontal" android:id="@id/clock_view" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" android:singleLine="true" android:textAllCaps="true" android:format12Hour="@string/keyguard_widget_12_hours_format" android:format24Hour="@string/keyguard_widget_24_hours_format" style="@style/widget_big_thin" />
<include layout="@layout/keyguard_status_area" />
<TextView android:textSize="@dimen/widget_label_font_size" android:textColor="#ccffffff" android:ellipsize="marquee" android:layout_gravity="center_horizontal" android:id="@id/owner_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16.0dip" android:layout_marginTop="@dimen/date_owner_info_margin" android:layout_marginRight="16.0dip" android:singleLine="true" />
</LinearLayout>
</com.android.keyguard.KeyguardStatusView>
4. open colors.xml in res/values folder, add this line
Code:
<color name="time_shadow_color">#71000000</color>
5. open dimens.xml in res/values folder, add these line
Code:
<item type="dimen" name="time_shadow_dy">1.0</item>
<item type="dimen" name="time_shadow_radius">3.0</item>
6. open styles.xml in res/values folder, add these line
Code:
<style name="BoldTimeTextStyle" parent="@style/TimeShadow">
<item name="android:textSize">98.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:focusable">true</item>
<item name="android:fontFamily">x-sst-medium</item>
</style>
<style name="TimeShadow" parent="@style/WrapContent">
<item name="android:shadowColor">@color/time_shadow_color</item>
<item name="android:shadowDy">@dimen/time_shadow_dy</item>
<item name="android:shadowRadius">@dimen/time_shadow_radius</item>
</style>
<style name="WrapContent">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="LightTimeTextStyle" parent="@style/TimeShadow">
<item name="android:textSize">98.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:focusable">true</item>
<item name="android:fontFamily">x-sst-ultralight</item>
</style>
<style name="new_style">
<item name="android:textSize">@dimen/widget_label_font_size</item>
<item name="android:textStyle">normal</item>
<item name="android:maxLines">1</item>
<item name="android:textAllCaps">true</item>
<item name="android:fontFamily">sst</item>
</style>
7. save all changes, recompile, sign, push SystemUI.apk to system
will be better if u use this lollipop clockwidget by @vandroid7 http://forum.xda-developers.com/cro...s/original-z3-5-0-clock-widgets-cm12-t3066866
thanks
Just tried this on CM12.1 Nightly on ZL and works like a charm! One thing, be sure to get the latest apktool (2.0.0, not 2.0.0-RC4) from their page cause that one adds support for 5.1 Lollipop
@idid idamrep may I ask what theme are you using on your rom? I like that battery icon!
xkeita said:
Just tried this on CM12.1 Nightly on ZL and works like a charm! One thing, be sure to get the latest apktool (2.0.0, not 2.0.0-RC4) from their page cause that one adds support for 5.1 Lollipop
@idid idamrep may I ask what theme are you using on your rom? I like that battery icon!
Click to expand...
Click to collapse
Nice ?
To change battery icon, i follow @Erhany & @Ticklefish 's guide here http://forum.xda-developers.com/android/themes/how-to-change-battery-icon-kitkat-rom-t2919361 ?
Nice tutorial friend! But let me save all this trouble.. I've ported Official Xperia Z3 Lollipop SystemUI to CM12.. Which includes this Sony Clock.. I'll soon share! By the way I've also ported Xperia Z3 Particle effect lockscreen..Stay tuned in Cross device thread!
STRYDER~007 said:
Nice tutorial friend! But let me save all this trouble.. I've ported Official Xperia Z3 Lollipop SystemUI to CM12.. Which includes this Sony Clock.. I'll soon share! By the way I've also ported Xperia Z3 Particle effect lockscreen..Stay tuned in Cross device thread!
Click to expand...
Click to collapse
I already saw ur screenshots on XL fb group. U'r awesome, man :good::laugh:
I'm waiting for that
I wrote this guide for those who can't wait for ur work
idid idamrep said:
I already saw ur screenshots on XL fb group. U'r awesome, man :good::laugh:
I'm waiting for that
I wrote this guide for those who can't wait for ur work
Click to expand...
Click to collapse
Tutorials and guides are always welcome friend!Keep up the good work.. :highfive::good:
Nice guide bro :good: very helpful post. Thanks for sharing
Hey can you plz help me to port this clock widget on lockscreen vertical one into my xperia s cm12.......i dont know how to recompile or decompile any apks.....can you do it for me mate? ??
Nice Bro thanks
Can you make for me with my system UI? I don't have knowledge to do it
@idid idamrep Can you share the battery pngs? i have modified my SystemUI with Erhany's Guide
Will be grateful
Black_Eyes said:
@idid idamrep Can you share the battery pngs? i have modified my SystemUI with Erhany's Guide
Will be grateful
Click to expand...
Click to collapse
Here's my systemui, just extract it ?
https://www.dropbox.com/s/ub5menuj8hew72o/SystemUICM12(7.5).zip?dl=0
Just passing by to confirm that it works too under PA 5.1 (Lollipop 5.1.1) but I'm too lazy to edit the battery icon u.u
yes, it's work with PA 5.1.1 System UI.
anyway how i can change the battery icon ?
can someone guide me thanks
error in recompiling using advanced apktool 4.1 (apktool 2.0.0)
Log For : SystemUI.apk
Log Type : Recompiling
Log Recorded At : Sun 17-05-2015 0:26:13.34
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res\values\styles.xml:35: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ProgressBar.Small.Title'.
C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res\values\styles.xml:36: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ProgressBar.Small.Title'.
C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res\values\styles.xml:41: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ProgressBar.Small.Title'.
C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res\values\styles.xml:51: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ProgressBar.Small.Title'.
C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res\values\styles.xml:146: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.RatingBar.Indicator'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\KIEL&J~1\AppData\Local\Temp\brut_util_Jar_3072331022154573574.tmp, p, --forced-package-id, 127, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-eng.pranav.20150503.071102, -F, C:\Users\KIEL&J~1\AppData\Local\Temp\APKTOOL154893395922584544.tmp, -0, arsc, -I, C:\Users\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res, -M, C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\KIEL&J~1\AppData\Local\Temp\brut_util_Jar_3072331022154573574.tmp, p, --forced-package-id, 127, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-eng.pranav.20150503.071102, -F, C:\Users\KIEL&J~1\AppData\Local\Temp\APKTOOL154893395922584544.tmp, -0, arsc, -I, C:\Users\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res, -M, C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\KIEL&J~1\AppData\Local\Temp\brut_util_Jar_3072331022154573574.tmp, p, --forced-package-id, 127, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-eng.pranav.20150503.071102, -F, C:\Users\KIEL&J~1\AppData\Local\Temp\APKTOOL154893395922584544.tmp, -0, arsc, -I, C:\Users\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\res, -M, C:\Users\AdvancedApkTool\3-Out\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 6 more
------------------------------------------------------
the systemUI is from the AICP 9.0 Rom xperia sp cm12.1 based. help me guys
ohmygel said:
the systemUI is from the AICP 9.0 Rom xperia sp cm12.1 based. help me guys
Click to expand...
Click to collapse
Have you installed the framework-res.apk from your ROM before decompiling (the first option)?
JaviMotta98 said:
Have you installed the framework-res.apk from your ROM before decompiling (the first option)?
Click to expand...
Click to collapse
Where can i find framework-res.apk sir? Shall i install it to my phone or to the computer? Actually, i got no error decompiling system ui and home. But when i recompile it, i got error on system ui.
Sent from my Xperia SP using XDA Free mobile app
not working on blisspop 3.4 with caf and my lg g2. I tried with signing the systemui, without, with putting in the manifest and meta-inf but nothing works
Work perfect on my Droid razr HD with CM12.1 rom. Many Thanks.
ohmygel said:
Where can i find framework-res.apk sir? Shall i install it to my phone or to the computer? Actually, i got no error decompiling system ui and home. But when i recompile it, i got error on system ui.
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
The framework-res.apk is already installed in your phone, as it's a system app. You have to install it in Advanced APKTool. The app is located in /system/framework/framework-res.apk. Copy it to the folder "2-In", open Advanced APKTool, select the first option and install the framework-res.apk.

[TUT][CM12.1] Adding Xperia Lockscreen Clock Style to CM12.1 SystemUI

I want to share how I add Xperia lockscreen clock style including analog, vertical, & horizontal clock to CM12.1 (or other rom based on it)
REQUIREMENT:
Before applying this guide, u have to:
- Know how to decompile, recompile, sign apk
- Know how to compare xml & smali
- Use this Sony fonts
- Apply this guide & this
STEPS:
SystemUI.apk
- Apply this
- Decompile SystemUI.apk
- Download attachment, merge to decompiled SystemUI.apk
- Open /res/values/styles.xml, add this
PHP:
<style name="502_hour">
<item name="android:textSize">114.0dip</item>
<item name="android:fontFamily">x-sst-medium</item>
</style>
<style name="502_minute">
<item name="android:textSize">114.0dip</item>
<item name="android:fontFamily">x-sst-ultralight</item>
</style>
<style name="511">
<item name="android:textSize">114.0dip</item>
<item name="android:fontFamily">x-sst</item>
</style>
<style name="601">
<item name="android:textSize">114.0dip</item>
<item name="android:fontFamily">x-sst-light</item>
</style>
<style name="502h_hour">
<item name="android:textSize">88.0dip</item>
<item name="android:fontFamily">x-sst-medium</item>
</style>
<style name="502h_minute">
<item name="android:textSize">88.0dip</item>
<item name="android:fontFamily">x-sst-ultralight</item>
</style>
<style name="511h">
<item name="android:textSize">88.0dip</item>
<item name="android:fontFamily">x-sst</item>
</style>
<style name="601h">
<item name="android:textSize">88.0dip</item>
<item name="android:fontFamily">x-sst-light</item>
</style>
- Recompile it
- Decompile again
- Open /res/values/public.xml
- Open /smali/com/dhian/clock/AnalogClock.smali, change id's with urs
Line 132: const v3, 0x7f0204ba <public type="drawable" name="somc_themeable_analog_clock_face" id="
Line 141: const v3, 0x7f0204bb <public type="drawable" name="somc_themeable_analog_clock_hour_hand" id="
Line 150: const v3, 0x7f0204bc <public type="drawable" name="somc_themeable_analog_clock_minute_hand" id="
Line 159: const v3, 0x7f0204bd <public type="drawable" name="somc_themeable_analog_clock_second_hand" id="
Click to expand...
Click to collapse
- Open /smali/com/dhian/clock2/AnalogClock.smali, change id's with urs
Line 132: const v3, 0x7f02030e <public type="drawable" name="plain_dial" id="
Line 141: const v3, 0x7f0204c0 <public type="drawable" name="plain_hour" id="
Line 150: const v3, 0x7f0204c1 <public type="drawable" name="plain_minute" id="
Line 159: const v3, 0x7f0204c2 <public type="drawable" name="plain_second" id="
Click to expand...
Click to collapse
- Open /smali/com/dhian/clock3/AnalogClock.smali, change id's with urs
Line 132: const v3, 0x7f0204c5 <public type="drawable" name="xplain_dial" id="
Line 141: const v3, 0x7f0204c8 <public type="drawable" name="xplain_hour" id="
Line 150: const v3, 0x7f0204c9 <public type="drawable" name="xplain_minute" id="
Line 159: const v3, 0x7f0204ca <public type="drawable" name="xplain_second" id="
Click to expand...
Click to collapse
- Save all changes
- Recompile, sign, push
NEXT TO POST #2
STEPS:
Settings.apk
- Apply this
- Decompile Settings.apk
- open /res/xml/zen_prefs.xml, add this
PHP:
<PreferenceScreen android:title="Lock screen"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory android:title="Status bar" />
<SwitchPreference android:title="Sony battery icon" android:key="kg_sony_battery" android:defaultValue="true" />
<SwitchPreference android:title="Percentage (right)" android:key="kg_sony_percent_right" android:defaultValue="true" />
<SwitchPreference android:title="Sony battery icon with percentage" android:key="kg_sony_battery_percent" android:defaultValue="false" />
<PreferenceCategory android:title="Analog clock" />
<SwitchPreference android:title="Standard" android:key="analog_clock" android:defaultValue="false" />
<SwitchPreference android:title="Sony" android:key="analog_sony" android:defaultValue="false" />
<SwitchPreference android:title="Xperia" android:key="analog_xperia" android:defaultValue="false" />
<PreferenceCategory android:title="Vertical clock" />
<SwitchPreference android:title="5.0.2 style" android:key="502" android:defaultValue="false" />
<SwitchPreference android:title="5.1.1 style" android:key="511" android:defaultValue="false" />
<SwitchPreference android:title="6.0.1 style (left)" android:key="601_left" android:defaultValue="false" />
<SwitchPreference android:title="6.0.1 style (center)" android:key="601_center" android:defaultValue="true" />
<SwitchPreference android:title="6.0.1 style (right)" android:key="601_right" android:defaultValue="false" />
<PreferenceCategory android:title="Horizontal clock" />
<SwitchPreference android:title="5.0.2 style" android:key="502h" android:defaultValue="false" />
<SwitchPreference android:title="5.1.1 style" android:key="511h" android:defaultValue="false" />
<SwitchPreference android:title="6.0.1 style" android:key="601h" android:defaultValue="false" />
<PreferenceCategory android:title="Others" />
<SwitchPreference android:title="Sony date" android:key="sony_date" android:defaultValue="false" />
<SwitchPreference android:title="RR date" android:key="rr_date" android:defaultValue="false" />
<SwitchPreference android:title="Alarm" android:key="alarm" android:defaultValue="true" />
</PreferenceScreen>
- Save all changes
- Recompile, sign, push
VIDEO PREVIEW
This guide is tested on Xperia M running CM12.1 & Resurrection Remix 5.5.9
For other rom just compare it
CREDITS
Thanks to Dhian Rusdiana for analog clock
Thanks to venkat kamesh, bamzzz, vandroid7
boro2 mo nyobain om, cm12.1 di m2 kaga stable2 ???
Is possible to make swipe to right to unlock?
please dont use such words to critique your nasty government. and I think you should rename your attachment file to more friendly language (or words), especially for user from indonesian.
and sorry for my bad english, coz you know? I am indonesian.

Categories

Resources