[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

jazzespresso

Senior Member
Jul 24, 2012
2,844
1,648
NYC-USA
Learn how to do smali mods and understand them, learn the basics of decompile and recompiling apks, then learn how to theme. Theming a whole ROM is no simple task (this thread touches on some thermography aspects but not much). If you are talking about porting, that's a while different ball game and this thread doesn't really deal with that. However, there are tons of guides on porting in the Android General section. In short, this thread is for modifying the system apps that you already have, which doesn't seem to be your goal. XDA University is also a good place to start learning.

IWSJX5e.jpg

that was not quite helpful response, but thanks anyway...
 

malbert16442

Senior Member
Nov 19, 2014
4,122
7,687
Area 51(◕_◕)
I am working on getting some Grace UX interface back to my non-UX device (Samsung Galaxy Tab S2). This may sound a bit crazy, but like to give a try and see how much progress I can make.
My First start is, getting Galaxy Tab S2's SystemUI look like Note 7's SystemUI.

so asking here some crazy talented developers here to give me a starting point or some guides if all possible.

Looking forward to hear your suggestions.

If you want to try porting a whole firmware I got a guide here.

I touches briefly on certain things you may encounter on samsung devices. So far I had one dev sucessfully make 4 port roms out of this enjoy.

http://xdaforums.com/android/software/how-to-port-samsung-rom-to-samsung-t3481114
 

jazzespresso

Senior Member
Jul 24, 2012
2,844
1,648
NYC-USA
If you want to try porting a whole firmware I got a guide here.

I touches briefly on certain things you may encounter on samsung devices. So far I had one dev successfully make 4 port roms out of this enjoy.

http://xdaforums.com/android/software/how-to-port-samsung-rom-to-samsung-t3481114

thanks, that's useful for troubleshooting, and may come quite handy.

my idea here is not fully port Note 7 to non-ux devices....idea here is make it look like. For example, N7's SysyemUI's qs_tile_background.xml, and then comparing back to my Tab S2, and making change accordingly, of course adding drawables, ids, etc...all needed stuff....and yes it is almost like theming..
I recently ported Not 7 UX TouchWiz launcher (fully functional) back to my Tab S2; I edited two smali files in framework.jar (scrollview.smali and textview.smali) file in Tab S2, copied bunch from Note 7's framework.jar...etc....(similar approach you had in your thread)
Now,I am going, taking a bit further, I know this could be pain in the b...t, but again if only make it look like Note 7 UX interface (like settings, System UI), I will be happy champer:p
 

Laelson

Senior Member
Oct 22, 2013
159
159
29
www.facebook.com
[Guide] How to add Reboot Recovery to power menu With toggle

Credits goes to @sagitt67 and @daxgirl .
Credits for toggle goes to @tdunham main guid is here .big thanks to them.
Well... we'll modify framework-res.apk and services.jar
Remember red notes are for those who added torch or screen shot or screen recorder button before.
framework-res.apk :
first of all download framework-res.zip ,that is attached below, extract and copy it in your framework-res
now open res/values/arrays.xml and add blue line in <string-array name="config_globalActionsList">
Code:
<string-array name="config_globalActionsList">
        <item>power</item>
        <item>datamode</item>
        <item>airplane</item>
        <item>restart</item>
        <item>lockdown</item>
        <item>bugreport</item>
        <item>users</item>
        [COLOR="blue"]<item>rebootrecovery</item>[/COLOR]
        <item>emergencymode</item>
        <item>subscreen</item>
        <item>screenrec</item>
    </string-array>
now go to res/values/strings.xml and add this line at the end of file before </resources>
Code:
<string name="tw_ic_do_rebootrecovery">Reboot Recovery</string>
done with framework-res.apk. recompile.

services.jar :
extract and copy attached smali to services.jar
now open smali/com/android/server/policy/GlobalActions.smali
add blue line in # instance fields
Code:
.field mEmergencyStringId:I

[COLOR="Blue"].field private mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]

.field private mGlobalActionsFrameLayout:Landroid/app/GlobalActionsFrameLayout
find .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;
add blue lines
Note: if you added torch or screen shot or screen recorder button before, remember to add blue line after them after this line :
iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mXXXXXXX:Lcom/android/server/policy/GlobalActions$SinglePressAction;
if you didn't add any of those 3 , just copy like below

Code:
    new-instance v5, Lcom/android/server/policy/GlobalActions$9;  [COLOR="Red"]#  if you added advanced power menu before it is GlobalActions$99 don't worry it's Ok![/COLOR]


    sget-boolean v4, Lcom/android/server/policy/GlobalActions;->mNewFeatureForM:Z

    if-eqz v4, :cond_1ee

    const v4, 0x1080962

    :goto_11c
    const v6, 0x10408d2

    move-object/from16 v0, p0

    invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$9;-><init>(Lcom/android/server/policy/GlobalActions;II)V [COLOR="Red"]if you added advanced power menu before it is GlobalActions$99 don't worry it's Ok![/COLOR]

    move-object/from16 v0, p0

    iput-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;

    [COLOR="blue"]new-instance v4, Lcom/android/server/policy/GlobalActions$47;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const-string v1, "tw_ic_do_rebootrecovery" 

    const-string v2, "drawable" 

    const-string v3, "android"

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v5 

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const-string v1, "tw_ic_do_rebootrecovery"

    const-string v2, "string"

    const-string v3, "android"

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v6

    move-object/from16 v0, p0

    invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$47;-><init>(Lcom/android/server/policy/GlobalActions;II)V

    move-object/from16 v0, p0

    iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction; [/COLOR]

    .line 1551
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    move-object/from16 v0, p0
.
.

add line in blue
Note: if you added torch or screen shot or screen recorder button before, remember to add blue line after them.
the green number depends on which mods you added before. if you add one of those three mode you should put 400 , if you added two of them put 800.
if you didn't add any of those 3 , just copy like below

Code:
.
.
    .line 1566
    const/16 v4, 0x100

    invoke-direct/range {p0 .. p0}, Lcom/android/server/policy/GlobalActions;->getBugReportAction()Lcom/android/server/policy/GlobalActions$Action;

    move-result-object v5

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

    const/4 v7, 0x1

    move-object/from16 v0, p0

    invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z

    [COLOR="Blue"]const/16 v4, 0x[COLOR="Green"]200[/COLOR]

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;

    move-object/from16 v0, p0

    iget-object v6, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

    const/4 v7, 0x1

    move-object/from16 v0, p0

    invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z [/COLOR]

    .line 1569
    const-string v4, "content://com.sec.knox.provider2/KnoxCustomManagerService1"

    const-string/jumbo v5, "getSealedPowerDialogOptionMode"

    move-object/from16 v0, p0

    invoke-direct {v0, v4, v5}, Lcom/android/server/policy/GlobalActions;->isIntEDM(Ljava/lang/String;Ljava/lang/String;)I
.
.
now search for const-string/jumbo v4, "silent" and add blue line above it
Note: if you added torch or screen shot or screen recorder button before, do this: 7 lines upper than const-string/jumbo v4, "silent" you'll find if-eqz v4, :cond_XXX . you must change the green number with next cond of if-eqz v4, :cond_XXX . and for orange number you must change it to next cond of green cond.
if you didn't add any of those 3 , just copy like below

Code:
    :cond_2cc
    const-string/jumbo v4, "emergencymode"

    invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_2e2 [COLOR="Red"]#   change it to  if-eqz v4, :cond_sid [/COLOR]

    .line 1635
    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;

    invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_241
	
    [COLOR="Blue"]:cond_[COLOR="Green"]sid[/COLOR]
    const-string/jumbo v4, "rebootrecovery"

    invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_[COLOR="DarkOrange"]sid1[/COLOR]

    move-object/from16 v0, p0

    iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

    move-object/from16 v0, p0

    iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;

    invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_241  [COLOR="Red"]#  It maybe different  for you so  just change it to your ...![/COLOR][/COLOR]

    .line 1636
    :cond_[COLOR="DarkOrange"]sid1[/COLOR]
    const-string/jumbo v4, "silent"

    invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_2fe
Rom control :

add in xml you want:
Code:
        <SwitchPreference android:title="Reboot Recovery Mode" android:key="reboot_recovery" android:defaultValue="false" android:summaryOn="Reboot Recovery will be shown" android:summaryOff="Currently removed" />
Done. know recompile and push them to system. enjoy.
Devs i'm also thinking about adding an animation like power off button. So if anybody can help, it will be great.
sceenshots :

I could not understand this last step. I should add android: defaultValue = "false" android: summaryOn = "Reboot Recovery will be shown" android: summaryOff = "Currently removed" /> in which .xml file? If possible, tell me where you put Great post.
 
Last edited:

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
[Guide] How to add Reboot Recovery to power menu With toggle

Credits goes to @sagitt67 and @daxgirl .
Credits for toggle goes to @tdunham main guid is here .big thanks to them.
Well... we'll modify framework-res.apk and services.jar
Remember red notes are for those who added torch or screen shot or screen recorder button before.
framework-res.apk :
first of all download framework-res.zip ,that is attached below, extract and copy it in your framework-res
now open res/values/arrays.xml and add blue line in <string-array name="config_globalActionsList">

now go to res/values/strings.xml and add this line at the end of file before </resources>

done with framework-res.apk. recompile.

services.jar :
extract and copy attached smali to services.jar
now open smali/com/android/server/policy/GlobalActions.smali
add blue line in # instance fields

find .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;
add blue lines
Note: if you added torch or screen shot or screen recorder button before, remember to add blue line after them after this line :
iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mXXXXXXX:Lcom/android/server/policy/GlobalActions$SinglePressAction;
if you didn't add any of those 3 , just copy like below


add line in blue
Note: if you added torch or screen shot or screen recorder button before, remember to add blue line after them.
the green number depends on which mods you added before. if you add one of those three mode you should put 400 , if you added two of them put 800.
if you didn't add any of those 3 , just copy like below

now search for const-string/jumbo v4, "silent" and add blue line above it
Note: if you added torch or screen shot or screen recorder button before, do this: 7 lines upper than const-string/jumbo v4, "silent" you'll find if-eqz v4, :cond_XXX . you must change the green number with next cond of if-eqz v4, :cond_XXX . and for orange number you must change it to next cond of green cond.
if you didn't add any of those 3 , just copy like below

Rom control :

add in xml you want:


I could not understand this last step. I should add "" android: defaultValue = "false" android: summaryOn = "Reboot Recovery will be shown" android: summaryOff = "Currently removed" /> "in which .xml file? If possible, tell me where you put Great post.

In the RomControl app in a xml of your RC app. You can build and edit with Android Studio
 

Abdullaharis

Senior Member
Apr 19, 2016
214
100
22
Kerala
www.abdullaharis.tk
I could not understand this last step. I should add android: defaultValue = "false" android: summaryOn = "Reboot Recovery will be shown" android: summaryOff = "Currently removed" /> in which .xml file? If possible, tell me where you put Great post.

Bro,
i think you are noob at building app from source.
download the app in attachment and install it manually. dont need to edit this app. i have already editted it for you:cool:.
i have themed this customsettings to DeviceDefault.Light:eek:

abdu786.png


Enjoy..
 

Attachments

  • CustomSettings.apk
    176.3 KB · Views: 45
Last edited:

djb77

Recognized Developer / Inactive RC
Oct 2, 2011
3,094
7,367
46
NSW
github.com
Change Fota Upgrade Screen Background

Today we will go to framework res.apk

Go to
tw_upgrade_dialog_layout
in layout folder


Locate <LinearLayout android:eek:rientation="vertical" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="fill_parent"


android:background="#00000000" Change this string to any value done

Static change.

If you want black im not a good themer but I have a progress bar bg attached. It gets rid of that nasty green progress bar bg with inverted theme.

res/drawable fota_progress_bg

replace with file attached (only for black) or help me out by posting whatever you could find.

Thank you for this mod :)

I can add to it a little more though. Let's say you want to change the whole background instead of just having a colour.

Here's what to do:

  • Decompile framework-res.apk
  • Add the fles fota_bg.png, fota_progress_bg.png, and fotaprogress.png to the drawable folder.
  • Change the fota_bg.png image to what you need. At the moment the current size is 1080 x 1920 (standard for S7)
  • Recompile framework-res.apk to get the value created in public.xml for your new fota_bg image

  • Decompile the new framework-res.apk to get the value created in public.xml for your new fota_bg image
    (I usually do this seperately from the original frameowk-res I work on, and just copy the value from public.xml)
  • Go to res/layout/tw_upgrade_dialog_layout.xml
  • Before you just changed the number, now we change the number to an image like so:
    Change android:background="#00000000" to android:background="@drawable/fota_bg"
  • Recompile framework-res.apk
  • Done

Enjoy :)

EDIT: I've also added a zip called fota_bg.zip which contains the before and after, so you can see exactly what is done.
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    171.3 KB · Views: 434
  • images.zip
    643.4 KB · Views: 106
  • fota_bg.zip
    892.7 KB · Views: 50
Last edited:

thermax04

Senior Member
Nov 26, 2010
3,055
1,458
[Guides] How to replace signal strength icon in the dual sim phone. Android 6.0.1

SystemUI.apk
Go to folder SystemUI\res\drawable\ and remove
stat_sys_signal_0.spr
stat_sys_signal_1.spr
stat_sys_signal_2.spr
stat_sys_signal_3.spr
stat_sys_signal_4.spr
stat_sys_signal_focus_0.spr
stat_sys_signal_focus_1.spr
stat_sys_signal_focus_2.spr
stat_sys_signal_focus_3.spr
stat_sys_signal_focus_4.spr

and copy attached file to folder SystemUI\res\drawable-sw360dp-xxxhdpi-v13
View attachment 3876708



I have Note 5 run on Note7 UX port rom. (minotaurus v10)
I did exactly the above to change the signal icons on single sim phone but got no statusbar.
Any advice?
 
  • Like
Reactions: sonnguyenpg

talkingmonkeys

Inactive Recognized RC / RT
May 15, 2013
2,644
4,415
Anybody else thats using theme store themes having this issue with music players? Can't seem to figure out where these text colors are being controlled. Systemui or framework-res I believe?
 

Attachments

  • Screenshot_20161206-061306.jpg
    Screenshot_20161206-061306.jpg
    268.1 KB · Views: 333

a.raul

Senior Member
Apr 21, 2014
375
510
Mordor
Anybody else thats using theme store themes having this issue with music players? Can't seem to figure out where these text colors are being controlled. Systemui or framework-res I believe?

They are controlled by the application ...

In res/valuses/colors.xml

Code:
<color name="quick_panel_artist"></color>
    <color name="quick_panel_artist_theme"></color>
    <color name="quick_panel_background_theme"></color>
    <color name="quick_panel_title"></color>
    <color name="quick_panel_brand"></color>
    <color name="quick_panel_close_icon_theme"></color>
    <color name="quick_panel_play_pause_theme"></color>
    <color name="quick_panel_prev_next_theme"></color>
    <color name="winset_list_item_section_divider_text1_theme"></color>
    <color name="winset_list_item_section_divider_text2_theme"></color>

Greetings and luck
 

a.raul

Senior Member
Apr 21, 2014
375
510
Mordor
Tried all of those already and its still the same. Thank you though ?
I have it like this.

I leave it without putting any color in case you wanted to put another.

Greetings and luck

Code:
<color name="quick_panel_artist">#ffffffff</color>
    <color name="quick_panel_artist_theme">#ffffffff</color>
    <color name="quick_panel_background_theme">#ffffffff</color>
    <color name="quick_panel_title">#ffffffff</color>
    <color name="quick_panel_brand">#ffffffff</color>
    <color name="quick_panel_play_pause_theme">#ffffffff</color>
    <color name="quick_panel_prev_next_theme">#ffffffff</color>
    <color name="winset_list_item_section_divider_text1_theme">@color/white_opacity_40</color>
    <color name="winset_list_item_section_divider_text2_theme">@color/white_opacity_40</color>
 

talkingmonkeys

Inactive Recognized RC / RT
May 15, 2013
2,644
4,415
@a.raul its done it for multiple music player apps. I've already edited those lines in the stock music player and it stays the same. I'm sure that its in the framework now but I'm having trouble with force closes when I just change a few colors in the framework. I just changed my notification background color to a light blue for now so that the text is readable. Just don't have more time to spend on it at the moment. I'm sure I'll go back to it eventually though
 

jazzespresso

Senior Member
Jul 24, 2012
2,844
1,648
NYC-USA
@tdunham and other crazy talented developers,, have a quick question:

when comparing two smali files (say you trying to get a mode to original device), you see this line (just as sample, could be more in the file) in one smali

const/high16 v0, 0x43870000

and other smali (original one you moding), does not have that 0x43870000, or sometimes has but total diffrent.

in above case, what you would recommend or how to resolve this?
 

claude96

Senior Member
Mar 18, 2010
1,454
2,460
I edited the grace Ux colors to invert the white but they seems to be a overlay over the panel. The toggle text is not visible clearly it's white in the colors.xml. I feel this is @stangdriver44 speciality
87c942b479e14aa1f17f58bc752ba51f.jpg

I have tested this mod. Unfortunately, when the Reboot button is pressed, the phone will start again

@a.raul its done it for multiple music player apps. I've already edited those lines in the stock music player and it stays the same. I'm sure that its in the framework now but I'm having trouble with force closes when I just change a few colors in the framework. I just changed my notification background color to a light blue for now so that the text is readable. Just don't have more time to spend on it at the moment. I'm sure I'll go back to it eventually though

@malbert16442 for the toggles text you need to invert this color : qs_detail_disable_text_color ( but I see you already did ), so what you need to do is : you should also match all your inverted colors & styles ( if any ! ) in all other value folders ( Exp : values-sw360dp-v13 & so on ), hope this helps. ( see pic btw )

@talkingmonkeys same as above ( see above pic ), do the same in all value folders in music app
@bunnys7679 no pb here see pics ( reboot menu has home wallpaper cos I've inverted my framework-res and made transparent as well btw )
 

santloko

Senior Member
May 21, 2012
80
21
Hi masters!.
I have a problem with my rom port N7 on my note 4 (n910f). When I select adaptive screen mode in screen settings and I use Samsung web browser ot Chrome the screen turns on pink color and I have to set Cinema Amoled mode or other mode in screen settings to resolve it.
Who can say me how to fix this problem?.
Thanks in advance....
 

jaylence

Senior Member
Jun 24, 2012
758
734
Santo Tomas
Hi everyone.
When we decompile and recompile SecSettings.apk, clicking on Do not disturb time picker results to FC.
Now, to fix this we delete "touchwiz:timePickerMode">spinner......" from styles.xml.

In doing so, the time picker is reverted to flip-type timepicker.

I kind of prefer touchwiz's scrolling timepicker over flipping one..

Has anyone, found a way to fix do not disturb error without removing touchwiz's timepicker?

Thanks in advance.

Sent from my SM-G925F using Tapatalk
 
Last edited:

edzamber

Senior Member
Feb 21, 2012
3,916
3,712
Hi everyone.
When we decompile and recompile SecSettings.apk, clicking on Do not disturb time picker results to FC.
Now, to fix this we delete "touchwiz:timePickerMode">spinner......" from styles.xml.

In doing so, the time picker is reverted to flip-type timepicker.

I kind of prefer touchwiz's scrolling timepicker over flipping one..

Has anyone, found a way to fix do not disturb error without removing touchwiz's timepicker?

Thanks in advance.

Sent from my SM-G925F using Tapatalk

Hi,

No way mate, if you want use scrolling time Picker, you need to not mod values folder. Only working with layout modifications but if you mod values (strings, ids...), then only flip time Picker will working.
 

Top Liked Posts