Quantcast
Channel: xda-developers - Android Themes
Viewing all articles
Browse latest Browse all 4090

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

$
0
0




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://forum.xda-developers.com/show....php?t=2685748

Viewing all articles
Browse latest Browse all 4090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>