[GUIDE][JB][4.1.2][TW] CM power dialog on JB TW

Search This thread

ocoot

Senior Member
19160116d7dbe6b07b12615c508cafe6e25cc005.png




hello guys, now i'm presenting you how to make your stock power dialog look a like power dialog on CM. it's easy :p

ok lets go :D

What i need?
1. tools for decompile/compile apk and jar files
2. the resource-file.zip
3. patient :D

How to?
A. FRAMEWORK-RES.APK

1. decompile your framework-res.apk
2. open your strings.xml then add this code below

Code:
<string name="power_dialog_header" />
<string name="power_dialog_airplane" />
<string name="power_dialog_airplane_2" />
<string name="power_dialog_network" />
<string name="power_dialog_network_2" />

3. compile your framework-res.apk then decompile again
4. open public.xml then search a new public code from code above like this

Code:
<public type="string" name="power_dialog_header" id="0x0104074f" />
<public type="string" name="power_dialog_airplane" id="0x01040750" />
<public type="string" name="power_dialog_airplane_2" id="0x01040751" />
<public type="string" name="power_dialog_network" id="0x01040752" />
<public type="string" name="power_dialog_network_2" id="0x01040753" />

5. now, open the file resource that we download earlier
6. merge/compare with yours
7. compile your framework-res.apk again
8. and then we done with framework-res.apk

B. ANDROID.POLICY.JAR
1. decompile your android.policy.jar
2. open GlobalAction.smali
3. now find this code .method private prepareDialog()Z
4. then a few line below it, you'll see a code 0xXXXXXXX (it from framework-res.apk/res/values/public-><public type="string" name="global_actions")
5. replace the code with code from <public type="string" name="power_dialog_header"
6. then, search code id public from

Code:
<string name="global_actions_airplane_mode_on_status">Flight mode is ON</string>
<string name="global_actions_airplane_mode_off_status">Flight mode is OFF</string>
<string name="global_action_data_mode_on_status">Data network mode activated</string>
<string name="global_action_data_mode_off_status">Data network mode deactivated</string>

and replace the code with code from (do a same things like step 4-5)

Code:
<string name="power_dialog_airplane" />
<string name="power_dialog_airplane_2" />
<string name="power_dialog_network" />
<string name="power_dialog_network_2" />

7. then, after it save your globalaction.smali
8. recompile your android.policy.jar
9. flash your framework-res.apk and android.policy.jar


NB:
1. do with your own risk
2. do backup first
3. if you get a errors, please report with a logcat
4. if you want to get a interface like aosp interface, go here -> http://xdaforums.com/showthread.php?t=2685748
 
Last edited:

Javho

Senior Member
Nov 26, 2012
325
20
man i try your method and its work perfectly but if doesnt look like your screenshot heres mine, could you tell me how can i repositioned the words and how can eliminate the vertical dividers ?
 

Attachments

  • Screenshot_2014-03-23-20-30-10.png
    Screenshot_2014-03-23-20-30-10.png
    187.8 KB · Views: 425

Sami Kabir

Senior Member
Oct 3, 2012
2,233
1,410
Hey mate, can you please help me remove "Device Options" from my Power menu?
 

Attachments

  • Samsung-Galaxy-s4-reboot-restart.png
    Samsung-Galaxy-s4-reboot-restart.png
    41.5 KB · Views: 206

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    19160116d7dbe6b07b12615c508cafe6e25cc005.png




    hello guys, now i'm presenting you how to make your stock power dialog look a like power dialog on CM. it's easy :p

    ok lets go :D

    What i need?
    1. tools for decompile/compile apk and jar files
    2. the resource-file.zip
    3. patient :D

    How to?
    A. FRAMEWORK-RES.APK

    1. decompile your framework-res.apk
    2. open your strings.xml then add this code below

    Code:
    <string name="power_dialog_header" />
    <string name="power_dialog_airplane" />
    <string name="power_dialog_airplane_2" />
    <string name="power_dialog_network" />
    <string name="power_dialog_network_2" />

    3. compile your framework-res.apk then decompile again
    4. open public.xml then search a new public code from code above like this

    Code:
    <public type="string" name="power_dialog_header" id="0x0104074f" />
    <public type="string" name="power_dialog_airplane" id="0x01040750" />
    <public type="string" name="power_dialog_airplane_2" id="0x01040751" />
    <public type="string" name="power_dialog_network" id="0x01040752" />
    <public type="string" name="power_dialog_network_2" id="0x01040753" />

    5. now, open the file resource that we download earlier
    6. merge/compare with yours
    7. compile your framework-res.apk again
    8. and then we done with framework-res.apk

    B. ANDROID.POLICY.JAR
    1. decompile your android.policy.jar
    2. open GlobalAction.smali
    3. now find this code .method private prepareDialog()Z
    4. then a few line below it, you'll see a code 0xXXXXXXX (it from framework-res.apk/res/values/public-><public type="string" name="global_actions")
    5. replace the code with code from <public type="string" name="power_dialog_header"
    6. then, search code id public from

    Code:
    <string name="global_actions_airplane_mode_on_status">Flight mode is ON</string>
    <string name="global_actions_airplane_mode_off_status">Flight mode is OFF</string>
    <string name="global_action_data_mode_on_status">Data network mode activated</string>
    <string name="global_action_data_mode_off_status">Data network mode deactivated</string>

    and replace the code with code from (do a same things like step 4-5)

    Code:
    <string name="power_dialog_airplane" />
    <string name="power_dialog_airplane_2" />
    <string name="power_dialog_network" />
    <string name="power_dialog_network_2" />

    7. then, after it save your globalaction.smali
    8. recompile your android.policy.jar
    9. flash your framework-res.apk and android.policy.jar


    NB:
    1. do with your own risk
    2. do backup first
    3. if you get a errors, please report with a logcat
    4. if you want to get a interface like aosp interface, go here -> http://xdaforums.com/showthread.php?t=2685748
    1
    man i try your method and its work perfectly but if doesnt look like your screenshot heres mine, could you tell me how can i repositioned the words and how can eliminate the vertical dividers ?

    thx for trying. i'll tell you to night if am on computer ;)

    Sent from my Google Nexus 5 using Tapatalk
    1
    Good guide..
    Going to try it
    Thanks.