decompile APK - General Questions and Answers

I have decompile the apk using apktool and on public.xml I found something like the following.
<public type="drawable" name="border" id="0x7f020001" />
<public type="drawable" name="button1" id="0x7f020006" />
<public type="drawable" name="button1_1" id="0x7f020007" />
<public type="drawable" name="button2" id="0x7f020008" />
<public type="drawable" name="button2_1" id="0x7f020009" />
<public type="drawable" name="button3" id="0x7f02000a" />
<public type="drawable" name="button3_1" id="0x7f02000b" />
<public type="drawable" name="button4" id="0x7f02000c" />
<public type="drawable" name="button4_1" id="0x7f02000d" />
Click to expand...
Click to collapse
Is there anyway to decompile these values? or if I need to add more, I can compile using the same algorithm?
thanks,

public.xml is not used so much by regular applications.
aapt scans the resources and generates arbitrary numeric identifiers.
It generates R.java which is used to compile these values into your Java code.
When you apktool d an apk, you get smali code with numeric ids for resources.
apktool generates public.xml so you can reference by the same value as the existing code.
It's should be possible to simply add new resources.
The aapt should take note of public.xml and not reissue any of the used numeric ids.

Renate NST said:
public.xml is not used so much by regular applications.
aapt scans the resources and generates arbitrary numeric identifiers.
It generates R.java which is used to compile these values into your Java code.
When you apktool d an apk, you get smali code with numeric ids for resources.
apktool generates public.xml so you can reference by the same value as the existing code.
It's should be possible to simply add new resources.
The aapt should take note of public.xml and not reissue any of the used numeric ids.
Click to expand...
Click to collapse
so how do I understand what is
<public type="drawable" name="button1" id="0x7f020006" />
in this case it is just the button id.
What I was more interested to know what this
<public type="string" name="client_id" id="0x7f08000d" />
is there anyway for me to know the decompile value of the client_id?

-greenboy- said:
<public type="string" name="client_id" id="0x7f08000d" />
is there anyway for me to know the decompile value of the client_id?
Click to expand...
Click to collapse
Um, it's 0x7f08000d.
That means when it was initially compiled that aapt thought that 0x7f08000d was a pretty value for it.
Somebody's original Java code said:
Code:
String secret = getString(R.string.client_id);
Which is exactly the same (given the id assignments) as:
Code:
String secret = getString(0x7f08000d);
If you are looking for the string itself, it's in res/values/strings.xml
Just search for client_id, it's plain as day.

Related

[?] Touchwiz 4 launcher on X10

I've attached the launcher.apk file with this post from the Galaxy SII system dump
Has anyone successfully ported the TouchWiz 4 launcher for the X10 yet?
On TripMIUI: not installed
Wolfbreak CM6.1.3: not installed
If it is straight from the system dump it will probably not install on any x10 rom with out someone tweaking the files a little bit. This was the same problem I faced with the Casio Commando launcher I system dumped.
this one works on my 2.1 rom
http://forum.xda-developers.com/showthread.php?t=1068147
svtfmook said:
this one works on my 2.1 rom
http://forum.xda-developers.com/showthread.php?t=1068147
Click to expand...
Click to collapse
This is the touchwiz 3 launcher (galaxy s), he ask about touchwiz 4 launcher (galaxy s 2).
bye
achotjan not installed
x10iachotjanblisshdluciddark.bb58
have you tried actually moving it to system/apps and changing permissions?
for the record, I tried on rdannars superasop v006, and it was a no go. Both regular install, and push to system/apps....
It doesn't work on any rom, i had tried it before as i wanted to put touchwiz 4 in kryptonfroyo rom, but i couldnt get it working. I'm still trying on it though.
Edit- it doesn't work with any 2.3 rom
jobumaru said:
This is the touchwiz 3 launcher (galaxy s), he ask about touchwiz 4 launcher (galaxy s 2).
bye
Click to expand...
Click to collapse
hence why i said "this one".
The launcher found in touchwiz 4.0 is more deeply rooted to the system then just an .apk. It relies on a few files in the framework, AKA the skin known as TouchWiz. You will see that it'll run fine on any phone with Touchwiz 4.0 (GS &GSII) but nothing else- until we add the files the launcher needs in the framework to the launcher itself. Or make it independent of those files at all.
I'm researching everything right now. I can't be the one to do this, but I can figure out how to do it.
Hello X10 users,
Someone on our neo forums has posted a link to TouchWiz 4, and it works fine on my phone (see signature of info). [It might be noted that I just installed the apk manually as a user app via a file explorer, instead of using th recovery zip, didn't try that.] Recovery zip in attachments.
Now, I see a small problem. The Galaxy SII has a 480x800 resolution, and we have 480x854 resolution. Hence this:
{
"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"
}
So I decompiled the apk to see if I can lower the paginator icons. I think this is the correct xml file. Problem is: I'm a noob in most development stuff, including this. Who can help me?
TouchWiz30LauncherICS.apk\res\values\public.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="attr" name="direction" id="0x7f010000" />
<public type="attr" name="defaultScreen" id="0x7f010001" />
<public type="attr" name="delayedShortcutDisplay" id="0x7f010002" />
<public type="attr" name="cellWidth" id="0x7f010003" />
<public type="attr" name="cellHeight" id="0x7f010004" />
<public type="attr" name="rowStartPadding" id="0x7f010005" />
<public type="attr" name="rowEndPadding" id="0x7f010006" />
<public type="attr" name="columnStartPadding" id="0x7f010007" />
<public type="attr" name="columnEndPadding" id="0x7f010008" />
<public type="attr" name="columnCells" id="0x7f010009" />
<public type="attr" name="rowCells" id="0x7f01000a" />
<public type="attr" name="applyIconHoverColorFilter" id="0x7f01000b" />
<public type="attr" name="drawDeleteZoneBg" id="0x7f01000c" />
<public type="attr" name="inOutAnimationTranslationRatio" id="0x7f01000d" />
<public type="attr" name="inOutAnimationDuration" id="0x7f01000e" />
<public type="attr" name="supportAppUninstall" id="0x7f01000f" />
<public type="attr" name="className" id="0x7f010010" />
<public type="attr" name="packageName" id="0x7f010011" />
<public type="attr" name="screen" id="0x7f010012" />
<public type="attr" name="x" id="0x7f010013" />
<public type="attr" name="y" id="0x7f010014" />
<public type="attr" name="spanX" id="0x7f010015" />
<public type="attr" name="spanY" id="0x7f010016" />
<public type="attr" name="icon" id="0x7f010017" />
<public type="attr" name="title" id="0x7f010018" />
<public type="attr" name="uri" id="0x7f010019" />
<public type="attr" name="multipleSize" id="0x7f01001a" />
<public type="attr" name="classNameFallback" id="0x7f01001b" />
<public type="attr" name="packageNameFallback" id="0x7f01001c" />
<public type="attr" name="foldertitle" id="0x7f01001d" />
<public type="attr" name="count" id="0x7f01001e" />
<public type="attr" name="width" id="0x7f01001f" />
<public type="attr" name="height" id="0x7f010020" />
<public type="attr" name="left" id="0x7f010021" />
<public type="attr" name="top" id="0x7f010022" />
<public type="attr" name="iconColumnCount" id="0x7f010023" />
<public type="attr" name="menuColumnCount" id="0x7f010024" />
<public type="attr" name="itemNumOfPage" id="0x7f010025" />
<public type="attr" name="zoomScaleLM" id="0x7f010026" />
<public type="attr" name="zoomTransYLM" id="0x7f010027" />
<public type="attr" name="modelFamily" id="0x7f010028" />
<public type="attr" name="model" id="0x7f010029" />
<public type="attr" name="useLargeDrawablesOnly" id="0x7f01002a" />
<public type="attr" name="screenCount" id="0x7f01002b" />
<public type="attr" name="defaultScreenCount" id="0x7f01002c" />
<public type="attr" name="useFullScreenQuickViewLandScape" id="0x7f01002d" />
<public type="attr" name="useMainMenuConcentrationEffect" id="0x7f01002e" />
<public type="attr" name="use16BitWindow" id="0x7f01002f" />
<public type="attr" name="useMainMenuListMode" id="0x7f010030" />
<public type="attr" name="workspaceCellsX" id="0x7f010031" />
<public type="attr" name="workspaceCellsY" id="0x7f010032" />
<public type="attr" name="maxHeight" id="0x7f010033" />
<public type="attr" name="backgroundColor" id="0x7f010034" />
<public type="attr" name="dividerThickness" id="0x7f010035" />
<public type="attr" name="dividerColor" id="0x7f010036" />
<public type="attr" name="horizontalScrollbarHeight" id="0x7f010037" />
<public type="attr" name="verticalScrollbarWidth" id="0x7f010038" />
<public type="attr" name="scrollbarPadding" id="0x7f010039" />
<public type="attr" name="scrollbarColor" id="0x7f01003a" />
<public type="attr" name="textBg" id="0x7f01003b" />
<public type="attr" name="textTypeface" id="0x7f01003c" />
<public type="attr" name="textTypefaceStyle" id="0x7f01003d" />
<public type="attr" name="textFontSize" id="0x7f01003e" />
<public type="attr" name="textColor" id="0x7f01003f" />
<public type="attr" name="textUppercase" id="0x7f010040" />
<public type="attr" name="textCharSpacingStrategy" id="0x7f010041" />
<public type="attr" name="textCharSpacingWidth" id="0x7f010042" />
<public type="attr" name="textCharPaddingLeft" id="0x7f010043" />
<public type="attr" name="textCharPaddingRight" id="0x7f010044" />
<public type="attr" name="indexGravity" id="0x7f010045" />
<public type="attr" name="popupWidth" id="0x7f010046" />
<public type="attr" name="popupHeight" id="0x7f010047" />
<public type="attr" name="popupWidthInc" id="0x7f010048" />
<public type="attr" name="popupHeightInc" id="0x7f010049" />
<public type="attr" name="firstCharColor" id="0x7f01004a" />
<public type="attr" name="touchAlpha" id="0x7f01004b" />
<public type="attr" name="normalAlpha" id="0x7f01004c" />
<public type="attr" name="alphaAnimDur" id="0x7f01004d" />
<public type="attr" name="pressDelay" id="0x7f01004e" />
<public type="attr" name="unpressDelay" id="0x7f01004f" />
<public type="attr" name="overflowGrpSepChar" id="0x7f010050" />
<public type="attr" name="firstCharPreMatches" id="0x7f010051" />
<public type="attr" name="indexBg" id="0x7f010052" />
<public type="attr" name="selTextColor" id="0x7f010053" />
<public type="attr" name="indexStr" id="0x7f010054" />
<public type="attr" name="itemsPerPage" id="0x7f010055" />
<public type="attr" name="itemPadding" id="0x7f010056" />
<public type="attr" name="pageFramePaddingLeft" id="0x7f010057" />
<public type="attr" name="pageFramePaddingTop" id="0x7f010058" />
<public type="attr" name="pageFramePaddingRight" id="0x7f010059" />
<public type="attr" name="pageFramePaddingBottom" id="0x7f01005a" />
<public type="attr" name="pageFrameExpandX" id="0x7f01005b" />
<public type="attr" name="pageFrameExpandY" id="0x7f01005c" />
<public type="attr" name="pageBorderPaddingLeft" id="0x7f01005d" />
<public type="attr" name="pageBorderPaddingTop" id="0x7f01005e" />
<public type="attr" name="pageBorderPaddingRight" id="0x7f01005f" />
<public type="attr" name="pageBorderPaddingBottom" id="0x7f010060" />
<public type="attr" name="zoomScaleMain" id="0x7f010061" />
<public type="attr" name="zoomScaleSide" id="0x7f010062" />
<public type="attr" name="normalScaleSlide" id="0x7f010063" />
<public type="attr" name="pageGap" id="0x7f010064" />
<public type="attr" name="zoomPageGap" id="0x7f010065" />
<public type="drawable" name="h_alphagradient_1to0" id="0x7f020000" />
<public type="drawable" name="v_alphagradient_1to0" id="0x7f020001" />
<public type="drawable" name="box_launcher_top" id="0x7f020002" />
<public type="drawable" name="btn_search_dialog_voice" id="0x7f020003" />
<public type="drawable" name="grid_selector" id="0x7f020004" />
<public type="drawable" name="grid_selector2" id="0x7f020005" />
<public type="drawable" name="textfield_searchwidget" id="0x7f020006" />
<public type="drawable" name="widget_frame" id="0x7f020007" />
<public type="drawable" name="widget_preview_button_left" id="0x7f020008" />
<public type="drawable" name="widget_preview_button_right" id="0x7f020009" />
<public type="drawable" name="bg_appwidget_error" id="0x7f02000a" />
<public type="drawable" name="bigpond" id="0x7f02000b" />
<public type="drawable" name="bottompanel" id="0x7f02000c" />
<public type="drawable" name="box_launcher_bottom" id="0x7f02000d" />
<public type="drawable" name="box_launcher_top_normal" id="0x7f02000e" />
<public type="drawable" name="box_launcher_top_pressed" id="0x7f02000f" />
<public type="drawable" name="box_launcher_top_selected" id="0x7f020010" />
<public type="drawable" name="btn_search_dialog_voice_default" id="0x7f020011" />
<public type="drawable" name="btn_search_dialog_voice_pressed" id="0x7f020012" />
<public type="drawable" name="btn_search_dialog_voice_selected" id="0x7f020013" />
<public type="drawable" name="citysearch" id="0x7f020014" />
<public type="drawable" name="downloads" id="0x7f020015" />
<public type="drawable" name="focused_application_background" id="0x7f020016" />
<public type="drawable" name="folder_icon_mainmenu" id="0x7f020017" />
<public type="drawable" name="foxtel" id="0x7f020018" />
<public type="drawable" name="games" id="0x7f020019" />
<public type="drawable" name="grid_gray" id="0x7f02001a" />
<public type="drawable" name="grid_point_gray" id="0x7f02001b" />
<public type="drawable" name="grid_point_red" id="0x7f02001c" />
<public type="drawable" name="grid_point_yellow" id="0x7f02001d" />
<public type="drawable" name="grid_red" id="0x7f02001e" />
<public type="drawable" name="grid_yellow" id="0x7f02001f" />
<public type="drawable" name="homescreen_menu_edit_locked" id="0x7f020020" />
<public type="drawable" name="homescreen_menu_icon_delete" id="0x7f020021" />
<public type="drawable" name="homescreen_menu_icon_edit_bg" id="0x7f020022" />
<public type="drawable" name="homescreen_menu_noti_bg" id="0x7f020023" />
<public type="drawable" name="homescreen_menu_page_focus_large" id="0x7f020024" />
<public type="drawable" name="homescreen_quick_navigation_add" id="0x7f020025" />
<public type="drawable" name="homescreen_quick_navigation_bg" id="0x7f020026" />
<public type="drawable" name="homescreen_quick_navigation_bg_press" id="0x7f020027" />
<public type="drawable" name="homescreen_remove_bg" id="0x7f020028" />
<public type="drawable" name="homescreen_remove_bg_drag" id="0x7f020029" />
<public type="drawable" name="homescreen_remove_icon" id="0x7f02002a" />
<public type="drawable" name="homescreen_remove_uninstall_bg" id="0x7f02002b" />
<public type="drawable" name="homescreen_remove_uninstall_bg_drag_r" id="0x7f02002c" />
<public type="drawable" name="homescreen_remove_uninstall_bg_drag_u" id="0x7f02002d" />
<public type="drawable" name="homescreen_uninstall_icon" id="0x7f02002e" />
<public type="drawable" name="hover_outline" id="0x7f02002f" />
<public type="drawable" name="ic_btn_speak_now" id="0x7f020030" />
<public type="drawable" name="ic_launcher_add_folder" id="0x7f020031" />
<public type="drawable" name="ic_launcher_application" id="0x7f020032" />
<public type="drawable" name="ic_launcher_home" id="0x7f020033" />
<public type="drawable" name="ic_launcher_appwidget" id="0x7f020034" />
<public type="drawable" name="ic_launcher_folder" id="0x7f020035" />
<public type="drawable" name="ic_launcher_shortcut" id="0x7f020036" />
<public type="drawable" name="ic_launcher_wallpaper" id="0x7f020037" />
<public type="drawable" name="ic_menu_add" id="0x7f020038" />
<public type="drawable" name="ic_menu_cancel" id="0x7f020039" />
<public type="drawable" name="ic_menu_details" id="0x7f02003a" />
<public type="drawable" name="ic_menu_discard" id="0x7f02003b" />
<public type="drawable" name="ic_menu_edit" id="0x7f02003c" />
<public type="drawable" name="ic_menu_grid_view" id="0x7f02003d" />
<public type="drawable" name="ic_menu_list_view" id="0x7f02003e" />
<public type="drawable" name="ic_menu_save" id="0x7f02003f" />
<public type="drawable" name="ic_menu_search" id="0x7f020040" />
<public type="drawable" name="ic_menu_settings" id="0x7f020041" />
<public type="drawable" name="ic_menu_market" id="0x7f020042" />
<public type="drawable" name="ic_menu_wallpaper" id="0x7f020043" />
<public type="drawable" name="lm_help_1" id="0x7f020044" />
<public type="drawable" name="mainmenu_icon_application" id="0x7f020045" />
<public type="drawable" name="mainmenu_icon_folder" id="0x7f020046" />
<public type="drawable" name="mainmenu_icon_home" id="0x7f020047" />
<public type="drawable" name="mainmenu_icon_sd" id="0x7f020048" />
<public type="drawable" name="mainmenu_pop_image" id="0x7f020049" />
<public type="drawable" name="makefoldericon" id="0x7f02004a" />
<public type="drawable" name="makefoldericon_f" id="0x7f02004b" />
<public type="drawable" name="makefolderpopup" id="0x7f02004c" />
<public type="drawable" name="makepageicon" id="0x7f02004d" />
<public type="drawable" name="makepageicon_f" id="0x7f02004e" />
<public type="drawable" name="makepagepopup" id="0x7f02004f" />
<public type="drawable" name="motion_moving_panning_l" id="0x7f020050" />
<public type="drawable" name="movies" id="0x7f020051" />
<public type="drawable" name="music" id="0x7f020052" />
<public type="drawable" name="myaccount" id="0x7f020053" />
<public type="drawable" name="myemail" id="0x7f020054" />
<public type="drawable" name="mymagazine_handle" id="0x7f020055" />
<public type="drawable" name="news" id="0x7f020056" />
<public type="drawable" name="page_outline" id="0x7f020057" />
<public type="drawable" name="pageindicator_fastscroll_bar_nine" id="0x7f020058" />
<public type="drawable" name="pageindicator_fastscroll_handle" id="0x7f020059" />
<public type="drawable" name="pageindicator_fastscroll_panel" id="0x7f02005a" />
<public type="drawable" name="panel_frame" id="0x7f02005b" />
<public type="drawable" name="panel_highlight" id="0x7f02005c" />
<public type="drawable" name="placeholder_google" id="0x7f02005d" />
<public type="drawable" name="preview_arrow_left" id="0x7f02005e" />
<public type="drawable" name="preview_arrow_left_disable" id="0x7f02005f" />
<public type="drawable" name="preview_arrow_left_focus" id="0x7f020060" />
<public type="drawable" name="preview_arrow_left_press" id="0x7f020061" />
<public type="drawable" name="preview_arrow_right" id="0x7f020062" />
<public type="drawable" name="preview_arrow_right_disable" id="0x7f020063" />
<public type="drawable" name="preview_arrow_right_focus" id="0x7f020064" />
<public type="drawable" name="preview_arrow_right_press" id="0x7f020065" />
<public type="drawable" name="preview_title_tab_bg" id="0x7f020066" />
(...)
<public type="string" name="viewtype_dialog_item_alphabetical_grid" id="0x7f0800ae" />
<public type="string" name="viewtype_dialog_item_alphabetical_list" id="0x7f0800af" />
<public type="string" name="mm_listmode_alpha_index" id="0x7f0800b0" />
<public type="string" name="tips_dialog_text" id="0x7f0800b1" />
<public type="string" name="tips_dialog_title" id="0x7f0800b2" />
<public type="string" name="tips_dialog_switch_button" id="0x7f0800b3" />
<public type="string" name="tips_dialog_cancel_button" id="0x7f0800b4" />
<public type="string" name="background_note" id="0x7f0800b5" />
<public type="string" name="folder_utility" id="0x7f0800b6" />
<public type="string" name="dmb_rest" id="0x7f0800b7" />
<public type="string" name="restrictdmb" id="0x7f0800b8" />
<public type="string" name="home_screen_delete" id="0x7f0800b9" />
<public type="string" name="lm_help_1_content" id="0x7f0800ba" />
<public type="bool" name="config_force32BitWindowAlways" id="0x7f090000" />
<public type="bool" name="config_useFullScreenQuickViewLandscape" id="0x7f090001" />
<public type="bool" name="config_useMainMenuConcentrationEffect" id="0x7f090002" />
<public type="bool" name="mm_enableListMode" id="0x7f090003" />
<public type="bool" name="pageindicator_largeDrawableOnly" id="0x7f090004" />
<public type="bool" name="pageindicator_showhide_enable" id="0x7f090005" />
(...)
<public type="dimen" name="pageindicator_top" id="0x7f0b003c" />
<public type="dimen" name="pageindicator_padH" id="0x7f0b003d" />
<public type="dimen" name="pageindicator_padV" id="0x7f0b003e" />
<public type="dimen" name="pageindicator_launcherManagerTransY" id="0x7f0b003f" />
<public type="dimen" name="pageindicator_pageicon_fontsize" id="0x7f0b0040" />
<public type="dimen" name="pageindicator_fastscroll_fontsize" id="0x7f0b0041" />
<public type="dimen" name="pageindicator_fastscroll_paneloffset" id="0x7f0b0042" />
Here's the original post in the SGS forum:
http://forum.xda-developers.com/showthread.php?t=1520436
Did you notice there was a link to a modded version with a 'lower bar' for the Nexus?

Changing Status Bar Color - ICS

Hi,
I'm trying to change the status bar clock color in the Glide ICS leak. I decompile SystemUI.apk, navigate to /res/values/styles.xml and change to:
Code:
<style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ff33b5e5</item>
</style>
<style name="TextAppearance.StatusBar.Date" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ff33b5e5</item>
Recompiling, deleting resources.arsc in keep folder and replacing the the resources from the new apk to the old apk, I flash the systemui.apk and the status bar clock stays the same color...The strange thing is before this the lines of code above were already like android_holo_blue or whatever.
Help? Thanks!
Aquethys said:
Hi,
I'm trying to change the status bar clock color in the Glide ICS leak. I decompile SystemUI.apk, navigate to /res/values/styles.xml and change to:
!
Click to expand...
Click to collapse
Buddy. Do not make the changes in styles.xml. Open Status_bar.xml from res/drawable-hdpi/layout. In that search for "com.android.systemui.statusbar.Clock". In that line, at the end add
Code:
android:textColor="#ff33b5e5"
.
Similarly do it for date too by searching for the line "com.android.systemui.statusbar.DateView" and add the same line at the end of that code.
Recompile and follow the rest of procedure.
Didn't do anything: Here's what the line of code is
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:textColor="#ff33b5e5" />
Do I need to change date too? Where is that?
bump
Aquethys said:
Didn't do anything: Here's what the line of code is
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:textColor="#ff33b5e5" />
Do I need to change date too? Where is that?
Click to expand...
Click to collapse
Sorry for late reply buddy. Yeah..tats right. Do that for date too. Find "com.android.systemui.statusbar.DateView" and make a similar change in that.
Hm date doesn't seem to be in there. Our statusbar xml is in res\layout...
Uploaded here
bump

Failed to add Listview Animation on Mediatek Rom

I tried so many time to add list view animation.
but every time i failed.
Please help me......
i followed those thread.
Link:
http://forum.xda-developers.com/showthread.php?t=2685334
http://forum.xda-developers.com/android/themes/guide-how-to-port-mokee-listview-t2808288
Advance thanks
sorry bad english
And how about you tell your progress?
Any logcat . why it did not work?
Vivek_Neel said:
And how about you tell your progress?
Any logcat . why it did not work?
Click to expand...
Click to collapse
I followed this progress
Adi Aisiteru Reborn said:
Guide for CyanogenMod11 KOT49H
HOW TO PORT "Mokee ListView Animations" for CyanogenMod11 only !!
Hello guys, I want to share to you smali Guide how to port with settings. custom Mokee ListView Animation,.
credit to Mokee rom
ok lets go to Guide:
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
Settings.apk
Decompile your CM11 Settings.apk
1. Settings.apk\res\values\arrays.xml
add this to end of it before
Code:
</resources>
so it will be like this
Code:
<string-array name="listview_animation_entries">
<item>@string/listview_off</item>
<item>@string/listview_wave_left</item>
<item>@string/listview_wave_right</item>
<item>@string/listview_scale</item>
<item>@string/listview_alpha</item>
<item>@string/listview_stack_top</item>
<item>@string/listview_stack_bottom</item>
<item>@string/listview_unfold</item>
<item>@string/listview_fold</item>
<item>@string/listview_translate_left</item>
<item>@string/listview_translate_right</item>
<item>@string/listview_rotate</item>
</string-array>
<string-array name="listview_animation_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
</string-array>
<string-array name="listview_interpolator_entries">
<item>@string/listview_off</item>
<item>@string/listview_accelerate_interpolator</item>
<item>@string/listview_decelerate_interpolator</item>
<item>@string/listview_accelerate_decelerate_interpolator</item>
<item>@string/listview_anticipate_interpolator</item>
<item>@string/listview_overshoot_interpolator</item>
<item>@string/listview_anticipate_overshoot_interpolator</item>
<item>@string/listview_bounce_interpolator</item>
</string-array>
<string-array name="listview_interpolator_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
</string-array>
[COLOR="Blue"]</resources>[/COLOR]
2. Settings.apk\res\values\strings.xml
add this to end of it before
Code:
</resources>
so it will be like this
Code:
<string name="listview_animation_title">ListView animation</string>
<string name="listview_off">Off</string>
<string name="listview_wave_left">Wave (left)</string>
<string name="listview_wave_right">Wave (right)</string>
<string name="listview_alpha">Alpha</string>
<string name="listview_scale">Scale</string>
<string name="listview_stack_top">Stack (top)</string>
<string name="listview_stack_bottom">Stack (bottom)</string>
<string name="listview_unfold">Unfold</string>
<string name="listview_fold">Fold</string>
<string name="listview_translate_left">Translate (left)</string>
<string name="listview_translate_right">Translate (right)</string>
<string name="listview_rotate">Rotate</string>
<string name="listview_interpolator_title">ListView interpolator</string>
<string name="listview_accelerate_interpolator">Accelerate</string>
<string name="listview_decelerate_interpolator">Decelerate</string>
<string name="listview_accelerate_decelerate_interpolator">Accelerate decelerate</string>
<string name="listview_anticipate_interpolator">Anticipate</string>
<string name="listview_overshoot_interpolator">Overshoot</string>
<string name="listview_anticipate_overshoot_interpolator">Anticipate overshoot</string>
<string name="listview_bounce_interpolator">Bounce</string>
[COLOR="Blue"]</resources>[/COLOR]
3. Settings.apk\res\xml\system_ui_settings.xml
add this line
Code:
<PreferenceScreen android:title="@string/listview_animation_title" android:key="listview_animation_settings" android:fragment="com.android.settings.adi.ListViewSettings" />
this is the example :
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/system_interface_title"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceScreen android:title="@string/status_bar_title" android:key="status_bar" android:fragment="com.android.settings.cyanogenmod.StatusBar" />
<PreferenceScreen android:title="@string/quick_settings_panel_title" android:key="quick_settings_panel" android:fragment="com.android.settings.quicksettings.QuickSettings" />
<PreferenceScreen android:title="@string/notification_drawer_title" android:key="notification_drawer" android:fragment="com.android.settings.cyanogenmod.NotificationDrawer" />
<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" />
<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>
<Preference android:key="touch_screen_gesture_settings">
<intent android:targetPackage="com.cyanogenmod.settings.device" android:action="com.cyanogenmod.action.LAUNCH_TOUCHSCREEN_GESTURE_SETTINGS" android:targetClass="com.cyanogenmod.settings.device.TouchscreenGestureSettings" />
</Preference>
[COLOR="Red"]<PreferenceScreen android:title="@string/listview_animation_title" android:key="listview_animation_settings" android:fragment="com.android.settings.adi.ListViewSettings" />[/COLOR]
<PreferenceScreen android:title="@string/ram_bar" android:key="recents_panel" android:fragment="com.android.settings.adi.RecentsPanelSettings" />
<PreferenceCategory android:title="@string/navigation_bar_category">
<CheckBoxPreference android:title="@string/navbar_enable_bar" android:key="enable_nav_bar" android:summary="@string/navbar_enable_bar_summary" android:defaultValue="true" />
<PreferenceScreen android:title="@string/navbar_style_dimen_title" android:key="navbar_dimen_settings" android:dependency="enable_nav_bar" android:fragment="com.android.settings.adi.NavbarDimenSettings" />
<PreferenceScreen android:title="@string/navigation_bar_title" android:key="navigation_bar" android:dependency="enable_nav_bar" android:fragment="com.android.settings.cyanogenmod.NavBar" />
<PreferenceScreen android:title="@string/navigation_ring_title" android:key="navigation_ring" android:dependency="enable_nav_bar" android:fragment="com.android.settings.cyanogenmod.NavRing" />
<com.android.settings.cyanogenmod.SystemSettingCheckBoxPreference android:title="@string/navigation_bar_left_title" android:key="navigation_bar_left" android:summary="@string/navigation_bar_left_summary" android:dependency="enable_nav_bar" android:defaultValue="false" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/hw_keys_title" android:key="hw_keys_on_navbar">
<CheckBoxPreference android:title="@string/key_back_enabled" android:key="key_back_enabled" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/key_menu_enabled" android:key="key_menu_enabled" android:defaultValue="true" />
<CheckBoxPreference android:title="@string/key_home_enabled" android:key="key_home_enabled" android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen>
4. Download attached file and merge to your decompiled Settings.apk, done and recompile it
5. Decompile the newly Recompiled APK again
- Next go to res/values/public.xml
open it with Notepad++
search for this line
Code:
<public type="xml" name="adi_mokee_listview_animations" id="[COLOR="Red"]??????????[/COLOR]" />
and pay attention to this ??????????
leave it, but keep it open
6. from the second decompiled Settings.apk , go to Settings.apk\smali\com\android\settings\adi\ListViewSettings.smali
search for this line
Code:
const v6, 0x7f050076
change this ids value 0x7f050076 in the smali
from here
Code:
<public type="xml" name="adi_mokee_listview_animations" id="[COLOR="Red"]??????????[/COLOR]" />
7. Done and recompile your settings.apk
Click to expand...
Click to collapse
Adi Aisiteru Reborn said:
framework.jar
1. Decompile your CM11 framework.jar
go to framework.jar\classout\android\widget\
remove all AbsListView.smali and its subs file
replace them with attached file
2. Decompile your CM11 framework-res.apk
go to \framework-res.apk\res\values\public.xml
search for this lines :
Code:
<public type="attr" name="absListViewStyle" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="style" name="Animation.TypingFilter" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="style" name="Animation.TypingFilterRestore" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="layout" name="typing_filter" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="drawable" name="list_selector_background" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="accelerate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="decelerate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="accelerate_decelerate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="anticipate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="overshoot_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="anticipate_overshoot_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
Code:
<public type="anim" name="bounce_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
pay attention to the red highlight the last 5 digits of each line 0x010?????
3. open AbsListView.smali file I gave
and search for this
- const v0, 0x101006a
change the last 5 digits ids 1006a in the smali according to your own have in
Code:
<public type="attr" name="absListViewStyle" id="0x010[COLOR="Red"]?????[/COLOR]" />
do it too to all of line below
- const v2, 0x10301ed
Code:
<public type="style" name="Animation.TypingFilter" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10301ee
Code:
<public type="style" name="Animation.TypingFilterRestore" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v1, 0x10900b8
Code:
<public type="layout" name="typing_filter" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v1, 0x1080062
Code:
<public type="drawable" name="list_selector_background" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a0005
Code:
<public type="anim" name="accelerate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a0006
Code:
<public type="anim" name="decelerate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a0004
Code:
<public type="anim" name="accelerate_decelerate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a0007
Code:
<public type="anim" name="anticipate_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a0008
Code:
<public type="anim" name="overshoot_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a0009
Code:
<public type="anim" name="anticipate_overshoot_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
- const v2, 0x10a000a
Code:
<public type="anim" name="bounce_interpolator" id="0x010[COLOR="Red"]?????[/COLOR]" />
4. Done and compile your framework.jar
Click to expand...
Click to collapse
Vivek_Neel said:
And how about you tell your progress?
Any logcat . why it did not work?
Click to expand...
Click to collapse
i haven't logcat but i will get you soon

[Guide] Adding Ram in Recents with toggles

Hello guys
here i am back with a new guide on adding Ram Info on Recents.
Before starting this guide make sure you have tried this. Because this guide is based on that guide.
[This guide is only for 5.0+]
Credit:-
KachalkinGeorg (The GK)
Requirement (Deodexed):-
1.Settings.apk
2.SystemUI.apk
3.NotePad++
4.Patience.. if you dont have try to get it
First part ( Settings.apk )
1.Decompile Settings.apk
2.Download ramsettings.zip from attachment. Extarct and copy files to your Decompiled Settings
3.Open Settings\res\xml\gk_recents_panel_settings.xml
add below preference
Code:
<PreferenceScreen android:title="@string/recents_panel_title" android:key="recents_panel" android:fragment="com.android.settings.gk.RecentsPanel.RecentsPanelSettings" />
4.Open Settings\res\values\arrays.xml
add below arrays
Code:
<string-array name="recents_clear_all_location_entries">
<item>@string/recents_clear_all_location_top_right</item>
<item>@string/recents_clear_all_location_top_left</item>
<item>@string/recents_clear_all_location_top_center</item>
<item>@string/recents_clear_all_location_bottom_right</item>
<item>@string/recents_clear_all_location_bottom_left</item>
<item>@string/recents_clear_all_location_bottom_center</item>
</string-array>
<string-array name="recents_clear_all_location_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
5.Open Settings\res\values\strings.xml
add below strings
Code:
<string name="recents_panel_title"><b>Recents</b></string>
<string name="recents_panel_category">Recents panel</string>
<string name="recents_button_show_clear_all_title">Clear all button</string>
<string name="recents_button_show_clear_all_summary">Show clear all button</string>
<string name="recents_clear_all_location_title">Clear all location</string>
<string name="recents_clear_all_location_top_right">Top right</string>
<string name="recents_clear_all_location_top_left">Top left</string>
<string name="recents_clear_all_location_top_center">Top center</string>
6.Recompile and Decompile Settings (For id's)
7.Open Settings\com\android\settings\gk\RecentsPanel\RecentsPanelSettings.smali
find
Code:
0x7f09042c
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_right"
find
Code:
0x7f09042d
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_left"
find
Code:
0x7f09042e
replace with below id
Code:
<public type="string" name="recents_clear_all_location_top_center"
find
Code:
0x7f09042f
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_right"
find
Code:
0x7f090430
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_left"
find
Code:
0x7f090431
replace with below id
Code:
<public type="string" name="recents_clear_all_location_bottom_center"
find
Code:
0x7f06004b
replace with below id
Code:
<public type="xml" name="gk_recents_panel"
8.Recompile Settings and move to your device
Continued on next post.
Continued.
Final part ( SystemUI.apk )
1.Decompile SystemUI.apk
2.Go to "SystemUI\smali\com\android\systemui\recents"
find "RecentsActivity$5.smali". if you found this smali download this. Extract and copy files to your decompiled SystemUI
if you didnt find "RecentsActivity$5.smali" in "SystemUI\smali\com\android\systemui\recents" Download this. Extract and copy files to your decompiled SystemUI
Click to expand...
Click to collapse
3.Open SystemUI\res\values\ids.xm
add below id's
Code:
<item type="id" name="recents_membar">false</item>
<item type="id" name="recents_memory_bar">false</item>
<item type="id" name="recents_memory_text">false</item>
<item type="id" name="floating_action_button">false</item>
4.Open SystemUI\res\values\dimens.xml
and add below demens
Code:
<dimen name="floating_action_button_height">54.0dip</dimen>
<dimen name="floating_action_button_width">54.0dip</dimen>
<dimen name="floating_action_button_translation_z">12.0dip</dimen>
<dimen name="floating_action_button_margin_side">32.0dip</dimen>
<dimen name="floating_action_button_margin_bottom">45.0dip</dimen>
5.Open SystemUI\res\values\colors.xml
add below colours
Code:
<color name="fab_color">#ffdc4c3c</color>
<color name="floating_action_button_icon_color">#ffffffff</color>
6.Recompile and Decompile SystemUI (For id's)
7.Open SystemUI\smali\com\android\systemui\recents\RecentsActivity.smali
find
0x7f0a0000 - <public type="id" name="clear_recents"
Click to expand...
Click to collapse
( Two Times )
replace with
0x7f0f00e2 - <public type="id" name="floating_action_button"
Click to expand...
Click to collapse
8.Open SystemUI\smali\com\android\systemui\recents\views\RecentsView.smali
Find
Code:
0x7f0f016f
replace with below id
Code:
<public type="id" name="floating_action_button"
find
Code:
0x7f0f00db
replace with below id
Code:
<public type="id" name="clear_recents"
find
Code:
0x7f0f016e
replace with below id
Code:
<public type="id" name="recents_memory_text"
find
Code:
0x7f0f016d
replace with below id
Code:
<public type="id" name="recents_memory_bar"
find
Code:
0x1050011
replace with below id
Code:
<public type="dimen" name="status_bar_height"
( Two Times)
find
Code:
0x7f090038
replace with below id
Code:
<public type="dimen" name="status_bar_header_height"
9.Recompile and move to your device
Enjoy...

[Guide] How to Port Pixel Navigation Bar With Animation to Android 7.1.2

Before starting let me clear that this is not my work ! I'm here to share the knowledge and information to much wider audience. :angel:​
Thanks to the Charles' Guide of porting till 7.1.1 HERE
Thanks to @ginger_evil , he helped me porting this on Android 7.1.2​
Lets Get Started
Note :- This only works for CM/AOSP based Roms. Though you can try on any ROM
Tools Needed : APKtool
If you are on odexed ROM you need Baksmali tool too. It is explained in Charles' tutorial so i wont touch this topic​
Step 1 Decompile your ROM's SystemUI.apk
Code:
apktool d SystemUI.apk
Step 2 Extract the Pixel-XX-7.1.2 zip in attachment.
Step 3 Copy/Replace every file in it with your decompiled SystemUI files.
Step 4 Open SystemUI\res\values\dimens.xml and add this code at the end before "</resources>".
Code:
<dimen name="halo_inner_radius">10.0dip</dimen>
<dimen name="halo_thickness">1.0dip</dimen>
<dimen name="halo_diameter">22.0dip</dimen>
<dimen name="opa_dot_diam">10.0dip</dimen>
<dimen name="opa_diamond_translation">16.0dip</dimen>
<dimen name="opa_line_y_translation">16.0dip</dimen>
<dimen name="opa_line_x_trans_ry">15.0dip</dimen>
<dimen name="opa_line_x_trans_bg">30.0dip</dimen>
<dimen name="opa_line_x_collapse_bg">46.0dip</dimen>
<dimen name="opa_line_x_collapse_ry">15.0dip</dimen>
<dimen name="opa_overshoot_translation">8.0dip</dimen>
<dimen name="opa_return_translation">-1.0dip</dimen>
<dimen name="opa_rest_to_collapse">7.0dip</dimen>
Step 5 Open SystemUI\res\values\id.xml and add this code before "</resources>".
Code:
<item type="id" name="red">false</item>
<item type="id" name="blue">false</item>
<item type="id" name="green">false</item>
<item type="id" name="yellow">false</item>
<item type="id" name="white">false</item>
<item type="id" name="home_button">false</item>
<item type="id" name="halo">false</item>
Step 6 Open SystemUI\res\values\styles.xml and add this code before “</resources> ”.
Code:
<style name="DotStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_centerVertical">true</item>
</style>
Step 7 Open SystemUI\res\xml\tuner_prefs.xml and search for
Code:
<Preference android:title="@string/nav_bar" android:key="nav_bar" android:fragment="com.android.systemui.tuner.NavBarTuner" />
if it is present there, skip this step, if not add this code before
Code:
<Preference android:title="@string/other" android:key="other" android:fragment="com.android.systemui.tuner.OtherPrefs" />
if you cant even find this line, skip this step.
Step 8 Now compile SystemUI.
Code:
apktool b SystemUI -c
Step 9 Go to SystemUI/dist/ You'll find the SystemUI.apk, this is the modded apk. Rename it to SystemUImod.apk and copy it in apktool folder.
Step 10 Now Decompile SystemUImod.apk
Code:
apktool d SystemUImod.apk
THE TRICKY PART​
Step 11 Open \SystemUIGoogle\res\value\public.xml and search for
Code:
IN DIMEN
<public type="dimen" name="halo_inner_radius" id="0x7f1002a1" />
<public type="dimen" name="halo_thickness" id="0x7f1002a2" />
<public type="dimen" name="halo_diameter" id="0x7f1002a3" />
<public type="dimen" name="opa_dot_diam" id="0x7f1002a4" />
<public type="dimen" name="opa_diamond_translation" id="0x7f1002a5" />
<public type="dimen" name="opa_line_y_translation" id="0x7f1002a6" />
<public type="dimen" name="opa_line_x_trans_ry" id="0x7f1002a7" />
<public type="dimen" name="opa_line_x_trans_bg" id="0x7f1002a8" />
<public type="dimen" name="opa_line_x_collapse_bg" id="0x7f1002a9" />
<public type="dimen" name="opa_line_x_collapse_ry" id="0x7f1002aa" />
<public type="dimen" name="opa_overshoot_translation" id="0x7f1002ab" />
<public type="dimen" name="opa_return_translation" id="0x7f1002ac" />
<public type="dimen" name="opa_rest_to_collapse" id="0x7f1002ad" />
Code:
IN ID
<public type="id" name="red" id="0x7f1200c9" />
<public type="id" name="blue" id="0x7f1200ca" />
<public type="id" name="green" id="0x7f1200cb" />
<public type="id" name="yellow" id="0x7f1200cc" />
<public type="id" name="white" id="0x7f1200cd" />
<public type="id" name="home_button" id="0x7f1200ce" />
<public type="id" name="halo" id="0x7f1200cf" />
Code:
IN DRAWABLE
<public type="drawable" name="halo" id="0x7f020073" />
<public type="drawable" name="ic_sysbar_opa_blue" id="0x7f02012d" />
<public type="drawable" name="ic_sysbar_opa_green" id="0x7f02012e" />
<public type="drawable" name="ic_sysbar_opa_red" id="0x7f02012f" />
<public type="drawable" name="ic_sysbar_opa_yellow" id="0x7f020130" />
Code:
IN STYLE
<public type="style" name="DotStyle" id="0x7f13022b" />
Copy Them Somewhere. Don't Worry If Your IDs Doesn't Match Mine.
Step 12 open SystemUI\smali\com\google\android\systemui\OpaLayout.smali with sublime text or notepad++.
IMAGE :-
HERE
Now For Example in the above image the id of "red" is "0x7f1202cd". Search for "0x7f1202cd" in OpaLayout.smali and replace this id with Your red's id (Remember you copied it somewhere).
Do The Same For All The IDs.
Step 13 Recompile SystemUImod
Code:
apktool b SystemUImod -c
You'll get the file in SystemUImod/dist/SystemUImod.apk
Rename It - SystemUI.apk
Copy to Device - /system/priv-app/SystemUI/
Reboot And Enjoy
mohit sethi said:
Before starting let me clear that this is not my work ! I'm here to share the knowledge and information to much wider audience. :angel:​
Thanks to the Charles' Guide of porting till 7.1.1 HERE
Thanks to @ginger_evil , he helped me porting this on Android 7.1.2​
Lets Get Started
Note :- This only works for CM/AOSP based Roms. Though you can try on any ROM
Tools Needed : APKtool
If you are on odexed ROM you need Baksmali tool too. It is explained in Charles' tutorial so i wont touch this topic​
Step 1 Decompile your ROM's SystemUI.apk
Code:
apktool d SystemUI.apk
Step 2 Extract the Pixel-XX-7.1.2 zip in attachment.
Step 3 Copy/Replace every file in it with your decompiled SystemUI files.
Step 4 Open SystemUI\res\values\dimens.xml and add this code at the end before "</resources>".
Code:
<dimen name="halo_inner_radius">10.0dip</dimen>
<dimen name="halo_thickness">1.0dip</dimen>
<dimen name="halo_diameter">22.0dip</dimen>
<dimen name="opa_dot_diam">10.0dip</dimen>
<dimen name="opa_diamond_translation">16.0dip</dimen>
<dimen name="opa_line_y_translation">16.0dip</dimen>
<dimen name="opa_line_x_trans_ry">15.0dip</dimen>
<dimen name="opa_line_x_trans_bg">30.0dip</dimen>
<dimen name="opa_line_x_collapse_bg">46.0dip</dimen>
<dimen name="opa_line_x_collapse_ry">15.0dip</dimen>
<dimen name="opa_overshoot_translation">8.0dip</dimen>
<dimen name="opa_return_translation">-1.0dip</dimen>
<dimen name="opa_rest_to_collapse">7.0dip</dimen>
Step 5 Open SystemUI\res\values\id.xml and add this code before "</resources>".
Code:
<item type="id" name="red">false</item>
<item type="id" name="blue">false</item>
<item type="id" name="green">false</item>
<item type="id" name="yellow">false</item>
<item type="id" name="white">false</item>
<item type="id" name="home_button">false</item>
<item type="id" name="halo">false</item>
Step 6 Open SystemUI\res\values\styles.xml and add this code before “</resources> ”.
Code:
<style name="DotStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_centerVertical">true</item>
</style>
Step 7 Open SystemUI\res\xml\tuner_prefs.xml and search for
Code:
<Preference android:title="@string/nav_bar" android:key="nav_bar" android:fragment="com.android.systemui.tuner.NavBarTuner" />
if it is present there, skip this step, if not add this code before
Code:
<Preference android:title="@string/other" android:key="other" android:fragment="com.android.systemui.tuner.OtherPrefs" />
if you cant even find this line, skip this step.
Step 8 Now compile SystemUI.
Code:
apktool b SystemUI -c
Step 9 Go to SystemUI/dist/ You'll find the SystemUI.apk, this is the modded apk. Rename it to SystemUImod.apk and copy it in apktool folder.
Step 10 Now Decompile SystemUImod.apk
Code:
apktool d SystemUImod.apk
THE TRICKY PART​
Step 11 Open \SystemUIGoogle\res\value\public.xml and search for
Code:
IN DIMEN
<public type="dimen" name="halo_inner_radius" id="0x7f1002a1" />
<public type="dimen" name="halo_thickness" id="0x7f1002a2" />
<public type="dimen" name="halo_diameter" id="0x7f1002a3" />
<public type="dimen" name="opa_dot_diam" id="0x7f1002a4" />
<public type="dimen" name="opa_diamond_translation" id="0x7f1002a5" />
<public type="dimen" name="opa_line_y_translation" id="0x7f1002a6" />
<public type="dimen" name="opa_line_x_trans_ry" id="0x7f1002a7" />
<public type="dimen" name="opa_line_x_trans_bg" id="0x7f1002a8" />
<public type="dimen" name="opa_line_x_collapse_bg" id="0x7f1002a9" />
<public type="dimen" name="opa_line_x_collapse_ry" id="0x7f1002aa" />
<public type="dimen" name="opa_overshoot_translation" id="0x7f1002ab" />
<public type="dimen" name="opa_return_translation" id="0x7f1002ac" />
<public type="dimen" name="opa_rest_to_collapse" id="0x7f1002ad" />
Code:
IN ID
<public type="id" name="red" id="0x7f1200c9" />
<public type="id" name="blue" id="0x7f1200ca" />
<public type="id" name="green" id="0x7f1200cb" />
<public type="id" name="yellow" id="0x7f1200cc" />
<public type="id" name="white" id="0x7f1200cd" />
<public type="id" name="home_button" id="0x7f1200ce" />
<public type="id" name="halo" id="0x7f1200cf" />
Code:
IN DRAWABLE
<public type="drawable" name="halo" id="0x7f020073" />
<public type="drawable" name="ic_sysbar_opa_blue" id="0x7f02012d" />
<public type="drawable" name="ic_sysbar_opa_green" id="0x7f02012e" />
<public type="drawable" name="ic_sysbar_opa_red" id="0x7f02012f" />
<public type="drawable" name="ic_sysbar_opa_yellow" id="0x7f020130" />
Code:
IN STYLE
<public type="style" name="DotStyle" id="0x7f13022b" />
Copy Them Somewhere. Don't Worry If Your IDs Doesn't Match Mine.
Step 12 open SystemUI\smali\com\google\android\systemui\OpaLayout.smali with sublime text or notepad++.
IMAGE :-
HERE
Now For Example in the above image the id of "red" is "0x7f1202cd". Search for "0x7f1202cd" in OpaLayout.smali and replace this id with Your red's id (Remember you copied it somewhere).
Do The Same For All The IDs.
Step 13 Recompile SystemUImod
Code:
apktool b SystemUImod -c
You'll get the file in SystemUImod/dist/SystemUImod.apk
Rename It - SystemUI.apk
Copy to Device - /system/priv-app/SystemUI/
Reboot And Enjoy
Click to expand...
Click to collapse
HI:mohit sethi
you said 0x7f1202cd is red
move-result-object v0
iput-object v0, p0, Lcom/google/android/systemui/OpaLayout;->mBlue:Landroid/view/View;
.line 159
const v0, 0x7f1202cd mRed i think is mBlue
invoke-virtual {p0, v0}, Lcom/google/android/systemui/OpaLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
iput-object v0, p0, Lcom/google/android/systemui/OpaLayout;->mRed:Landroid/view/View;
.line 160
const v0, 0x7f1202d0 mYellow
invoke-virtual {p0, v0}, Lcom/google/android/systemui/OpaLayout;->findViewById(I)Landroid/view/View;
last id is const v0, 0x7f1202d2 mHome or mHalo
iD have problem
can you give me the public.xml
may be rhe first ID is RED
iget-object v5, p0, Lcom/google/android/systemui/OpaLayout;->mRed:Landroid/view/View;
iget-object v6, p0, Lcom/google/android/systemui/OpaLayout;->mCollapseInterpolator:Landroid/view/animation/Interpolator;
.line 496
const v7, 0x7f0c02c5 Red
Hey I follow your guide exactly. I got the animation working but my navbar looks like this. I have a lot stylo 2 plus running unofficial lineage os 14.1.
Locke706 said:
Hey I follow your guide exactly. I got the animation working but my navbar looks like this. I have a lot stylo 2 plus running unofficial lineage os 14.1.
Click to expand...
Click to collapse
Edit #1:
Nevermind
Should i remove or hide the Google search orb? I'm trying to figure out why after a reboot when i press home and it does the old animation, then start using the pixel one.
Help for Oreo 8.1
There's someone how can help me updating this tutorial for Oreo 8.1?? I wanna try this on LineageOS 15.1
Will it work on 8.1.0?
this pops up
C:\Users\Rl\Desktop\PixelROM>apktool b SystemUI -c
I: Using Apktool 2.3.4
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: fakeLogOpen(/dev/log_system) failed
W: fakeLogOpen(/dev/log_system) failed
W: fakeLogOpen(/dev/log_crash) failed
W: fakeLogOpen(/dev/log_system) failed
W: fakeLogOpen(/dev/log_stats) failed
W: fakeLogOpen(/dev/log_system) failed
W: fakeLogOpen(/dev/log_crash) failed
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit
code = 1): [C:\Users\Rl\AppData\Local\Temp\brut_util_Jar_10759170936442044448.t
mp, p, --forced-package-id, 127, --min-sdk-version, 25, --target-sdk-version, 25
, --version-code, 25, --version-name, 7.1.2, --no-version-vectors, -F, C:\Users\
Rl\AppData\Local\Temp\APKTOOL13565213843037562078.tmp, -0, arsc, -0, png, -0, re
s/drawable-ldrtl-xxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xhd
pi-v4/lb_card_shadow_focused.9.png, -0, res/drawable-xhdpi-v4/lb_card_shadow_nor
mal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_normal.9.png, -0, res/d
rawable-xhdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-xhdpi-v4/no
tification_bg_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal_pre
ssed.9.png, -0, res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, r
es/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xx
hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxhdpi-v4/abc_ca
b_background_top_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_divider_m
trl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_focused_holo.9.png, -0, res
/drawable-xxhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xxhdpi-v4/
abc_list_pressed_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_ho
lo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_dark.
9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -
0, res/drawable-xxhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawab
le-xxhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/ab
c_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_tra
ck_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png,
-0, res/drawable-xxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-
xxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_tex
tfield_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_defa
ult_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_activated_
mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_a
lpha.9.png, -0, res/drawable-xxhdpi-v4/ic_notification_overlay.9.png, -0, res/dr
awable-xxhdpi-v4/lb_action_bg_focused.9.png, -0, res/drawable-xxhdpi-v4/lb_in_ap
p_search_bg.9.png, -0, res/drawable-xxhdpi-v4/lb_in_app_search_shadow_focused.9.
png, -0, res/drawable-xxhdpi-v4/lb_in_app_search_shadow_normal.9.png, -0, res/dr
awable-xxhdpi-v4/nav_background.9.png, -0, res/drawable-xxhdpi-v4/recents_lower_
gradient.9.png, -0, res/drawable-xxhdpi-v4/recents_status_gradient.9.png, -0, re
s/drawable-xxhdpi-v4/recents_task_shadow.9.png, -0, res/drawable-xxhdpi-v4/scree
nshot_panel.9.png, -0, res/drawable-xxhdpi-v4/search_bg_transparent.9.png, -0, r
es/drawable-xxhdpi-v4/status_background.9.png, -0, ogg, -0, arsc, -I, C:\Users\R
l\AppData\Local\apktool\framework\1.apk, -S, C:\Users\Rl\Desktop\PixelROM\System
UI\res, -M, C:\Users\Rl\Desktop\PixelROM\SystemUI\AndroidManifest.xml]
W: fakeLogOpen(/dev/log_stats) failed
W: fakeLogOpen(/dev/log_crash) failed
W: fakeLogOpen(/dev/log_stats) failed
W: fakeLogOpen(/dev/log_crash) failed

Categories

Resources