[Q]Editing Settings.apk - Sony Xperia S, Acro S, Ion

I've searched everywhere how to edit Settings.apk using Apktool or Apkmanager. but i can't understand it.
i just want to add a description in my Brightness settings Powered by WhiteMagic.
what should i do? please help me.

rambg2 said:
I've searched everywhere how to edit Settings.apk using Apktool or Apkmanager. but i can't understand it.
i just want to add a description in my Brightness settings Powered by WhiteMagic.
what should i do? please help me.
Click to expand...
Click to collapse
Download apktool by iBotpeaches. Get the aapt for windows. Extract both the things in the same folder. Get framework-res.apk and SemcGenericUxpRes.apk in /system/framework and place it in this folder. Now shift+right click in that folder and open cmd there. Type - apktool if framework-res.apk nozomi
Then type - apktool if SemcGenericUxpRes.apk nozomi
Now place settings.apk in that same folder and type - apktool d -f -t nozomi Settings.apk
Then make any changes that you want to do and type - apktool b Settings
Collect your new apk in Settings/dist. Then open your original settings.apk with winrar and also open your new apk with winter. Copy the Meta-inf folder from old to new and chose store as compression method. Enjoy!
Sent from my LT26i using xda app-developers app

abcdjdj said:
Download apktool by iBotpeaches. Get the aapt for windows. Extract both the things in the same folder. Get framework-res.apk and SemcGenericUxpRes.apk in /system/framework and place it in this folder. Now shift+right click in that folder and open cmd there. Type - apktool if framework-res.apk nozomi
Then type - apktool if SemcGenericUxpRes.apk nozomi
Now place settings.apk in that same folder and type - apktool d -f -t nozomi Settings.apk
Then make any changes that you want to do and type - apktool b Settings
Collect your new apk in Settings/dist. Then open your original settings.apk with winrar and also open your new apk with winter. Copy the Meta-inf folder from old to new and chose store as compression method. Enjoy!
Sent from my LT26i using xda app-developers app
Click to expand...
Click to collapse
I just think his problem isn't on how to compile/recompile, but wheter on where to edit it.

thanks man, that's my another problem. I finally solved how to compile settings.apk. My only problem now is how to show the "Powered by WhiteMagic" on the brightness in settings. do you know how to do it? Thank you in advance mate!
EDIT: I already compiled it. but i can't make it work on my phone. the Settings are missing when i replace it with my new one. Sorry for my English

I just think his problem isn't on how to compile/recompile, but wheter on where to edit it.
Click to expand...
Click to collapse
that's my main problem is.

rambg2 said:
that's my main problem is.
Click to expand...
Click to collapse
Ok. I can trying doing it, if you help me with something else. I will give you an Settings.apk. You gonna decompile it and look at every .xml file for the WhiteMagic line. When you find it, I will try to add it and help ya.
Here is it: Decompile, go at all .xml files and search for WhiteMagic inside the .xmls. When you find, tell me the file and in which line it is located.
Sorry: Dropbox failed. I will get you the link when it works again.

okay! please upload here the file. Thank You Mate!
EDIT: okay i'll just wait until you fix your DropBox.

rambg2 said:
okay! please upload here the file. Thank You Mate!
EDIT: okay i'll just wait until you fix your DropBox.
Click to expand...
Click to collapse
Here is it:
https://www.dropbox.com/s/qhu7buabnalj64w/Settings.apk
Good luck

I found in folder res/values/string.xml i found it there.
and the others is in the
res/value-xx and res/value-xx-mdpi every folder of that inside the string have whitemagic thins.
in every string.xml there is Powered by Whitemagic.

rambg2 said:
I found in folder res/values/string.xml i found it there.
and the others is in the
res/value-xx and res/value-xx-mdpi every folder of that inside the string have whitemagic thins.
in every string.xml there is Powered by Whitemagic.
Click to expand...
Click to collapse
Thanks. That should do it. I will take a look at it when I have access to my PC. Should be fairly easy to do. I will test on my first, and if I manage, you can upload yours so O can mod for you.
Wow... This is harder than I thought. But Niaboc helped me find it. He will teach me so I can do it myself
Sent From my LT26i using Tapatalk HD

Related

*{HOW TO}{TEAM REJECTS}{Windows} Quick DECOMPILE/COMPILE - Jelly Bean updated 7/1/13

TEAM REJECTZ QUICK JB FIX
If anyone was having a problem with adding the 15 toggles, now just pull the classes.dex file out and quick baksmali/smali to fix it. Even though it
compiled correct it still didn't lol if you get that, but now its fixed
Since i did this for the E4GT i figured i would do the same. Well since the bean is here​
1. You need to make sure you have the latest java
2. Download Notepad++ (google it) lol
3. Download the Team Rejectz Quick JB Fix (the latest one) which is linked below
Instructions Decompile/Recompile​
1. UNzip and place the JB Quick Fix Folder on your c: drive and name it apktool
2. Since this is TW/CM10 you should drag your framework-res.apk, twframework-res.apk, and systemUI.apk onto the apktool-if cmd file
3. Now time to decompile. You can actually drag your apk from where ever its located but i suggest you place them in the Quick Fix folder.
and drag and drop it on top of the Quick-Deompile cmd file
4. To get an error less decompile i prefer you to use the stock apk
5. Once the decompile process is done. you can go into the apks folder that was created and make your edits with notepad++
warning if you create to many edits that would cause and error. then begin the process over but do them one by one​
6. Now its time to recompile ^^^^^^^^^remember the warning^^^^^^^ drag and drop the apks folder on top of the Quick-Recompile cmd file
7. Now once your done go into the apks folder you should see dist folder. Your new compiled apk is located there. I prefer to just use the build folder and drag the things I need into the apk. Much easier. Also remember if any images has been added you need to make sure you drag the new arsc file because the public.xml may have been changed
8. Don't worry about signing the apk. All of your edits besides the ones in drawable folder will be in the resource.arsc file
9. Drag that file into the apk thats in the rom your editing
10. If you decide to edit the decompressed .9 images you can check my Team Rejectz Theme Cheat Sheet located >>>Here
Baksmali/Smali​
1. Grab the apk/jar file you want to edit
2. Drag the classes.dex file out of the apk/jar file
3. Drag and drop the classes.dex file onto the Quick-Baksmali cmd file
4. A smali folder will be created
5. Now you can make your smali edit inside of the smali folder and close and save them.
6. After the edits and save, drag and drop the smali folder on top of the Quick-Smali cmd file
7. You should now see a new file called new-classes.dex. rename it to classes.dex
8. Finally drag the classes.dex file into the original apk/jar you pulled it from
If this helped you in anyway just hit that thanks button thanks!!!!!!!!!!
Download:
Team Rejectz Quick JB Fix 2.5
Change Log
Quick Fix 2.5
Faster Compile times and Less errors
Updated to apktool 1.5.2, left the older ones in
Updated aapt to most recent
Updated baksmali/smali to 2.0
Thanks for sharing man.
dazednconfused said:
Thanks for sharing man.
Click to expand...
Click to collapse
No prob. Besides I know a lot of people like simple and it couldnt get any simpler than this lol
Sent from my SPH-L710 using xda premium
Thanks for sharing the knowledge!! this should be stickied!!
im going to try this i would like to contribute to the community thanks for the (tut)
Thanks fpr sharing... unfortunately i cant get it to work...
not sure what I am doing wrong.
i grabbed the 3 files from the zip, moved them to a folder on my desktop, then dropped them in the apktool-if cmd.
then grabbed the systemui, and dropped on the quickdecompile cmd, and nothing is happening.
what else do I need to do?
Thanks again for the tool, hope I can get it working...
joshbeach said:
Thanks fpr sharing... unfortunately i cant get it to work...
not sure what I am doing wrong.
i grabbed the 3 files from the zip, moved them to a folder on my desktop, then dropped them in the apktool-if cmd.
then grabbed the systemui, and dropped on the quickdecompile cmd, and nothing is happening.
what else do I need to do?
Thanks again for the tool, hope I can get it working...
Click to expand...
Click to collapse
Put the folder on the root of your c: drive and name it apktool.
Sent from my SPH-L710 using xda premium
lorjay589 said:
Put the folder on the root of your c: drive and name it apktool.
Sent from my SPH-L710 using xda premium
Click to expand...
Click to collapse
got systemui decompile, but with errors, brut.something. tried recompiling, but still errored, even without making any changes.
joshbeach said:
got systemui decompile, but with errors, brut.something. tried recompiling, but still errored, even without making any changes.
Click to expand...
Click to collapse
If you worked on a ics rom and you did the apk-tool if then you need to do the jelly bean frame. But if thats not the case post a pic of your error so I can tell you whats wrong
Sent from my SPH-L710 using xda premium
good share of tools
thanks
15 toggle classes.dex figured out and updated. now just pull the classes.dex out and use the quick smali and baksmali
lorjay589 said:
15 toggle classes.dex figured out and updated. now just pull the classes.dex out and use the quick smali and baksmali
Click to expand...
Click to collapse
Nice. Where are all the Rejectz threads here? We got mijjah representing? whats going on up in the S3 section.. Do I really have to go out and buy another phone just to put some awesome stuff here?
I keep getting this error when trying to decompile SystemUI.apk
Code:
[*] SystemUI.apk
decompiling SystemUI.apk...
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 36 00
at org.jf.dexlib.DexFile.(DexFile.java:377)
at org.jf.dexlib.DexFile.(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
is there anything I can do to fix this?
Nevermind, I don't think I need it. Pretty sure I can do it in 7.zip
Stryke_the_Orc said:
I keep getting this error when trying to decompile SystemUI.apk
Code:
[*] SystemUI.apk
decompiling SystemUI.apk...
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 36 00
at org.jf.dexlib.DexFile.(DexFile.java:377)
at org.jf.dexlib.DexFile.(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
is there anything I can do to fix this?
Nevermind, I don't think I need it. Pretty sure I can do it in 7.zip
Click to expand...
Click to collapse
did you do the apktool-if instructions. and also, if this problem continues. drag out the classes.dex file and it will decompile. and use baksmali to decompile the classes.dex file
lorjay589 said:
did you do the apktool-if instructions. and also, if this problem continues. drag out the classes.dex file and it will decompile. and use baksmali to decompile the classes.dex file
Click to expand...
Click to collapse
Found my error. In the install process I went A.D.D. and added an extra directory so nothing wanted to work properly. Fixed the directory and now the SystemUI.apk decompiled correctly, thank you for this tool :good:
Stryke_the_Orc said:
Found my error. In the install process I went A.D.D. and added an extra directory so nothing wanted to work properly. Fixed the directory and now the SystemUI.apk decompiled correctly, thank you for this tool :good:
Click to expand...
Click to collapse
ok cool no problem, and remember its best to make changes 1 by 1, and compile. so you could no each and every error. it also tell u what went wrong so read it carefully. it would also tell you which line in a xml is causing problems
updated
lorjay589 said:
updated
Click to expand...
Click to collapse
Damn got to wait til i get off work to flash
mighty S3
---------- Post added at 05:02 PM ---------- Previous post was at 05:00 PM ----------
kilawayne said:
Damn
mighty S3
Click to expand...
Click to collapse
mighty S3
I love how noob friendly everyone is here..... Not a noob to rooting/flashing etc.... But actually changing stuff myself...... Total noob
Sent from my SPH-D710 using xda premium
Since this thread was dug up I just want to say that's an awesome little guide for decompiling lol. Just what I have been looking for.
Sent from my SPH-L710 using xda app-developers app

[Q]How to decompile framework.apk?

When I recompile framework-res.apk,the apktool notice "aapt:...".And the framework-res.apk still be builded.But I replace the resources.arsc and put it in the phone,reboot and always in bootanimation.I used apktool 1.4.10,1.5.0,1.5.1... and so on.I can not solve this problem,I need help.
Sent from my lt28h use sony fw.
kin912 said:
When I recompile framework-res.apk,the apktool notice "aapt:...".And the framework-res.apk still be builded.But I replace the resources.arsc and put it in the phone,reboot and always in bootanimation.I used apktool 1.4.10,1.5.0,1.5.1... and so on.I can not solve this problem,I need help.
Sent from my lt28h use sony fw.
Click to expand...
Click to collapse
I am not clear from what you did. But you need to do it this way.
apktool if ion SemcGenericUxRes.apk
apktool d -t ion framework-res.apk out
make changes to decompiled source
apktool b out new.framework-res.apk
Now open both framework-res.apk and new.framework-res.apk side by side using an archiver. Do not use windows open.
Now you will notice one thing that the new framework does not contain META-INF folder.
Delete the resources.arsc file from the original framework-res. Drag the resources.arsc from the new framework-res and dump it on to the original framework-res. Close both the files.
Now you are ready to use the updated original framework-res.apk
ganeshbiyer said:
I am not clear from what you did. But you need to do it this way.
apktool if ion SemcGenericUxRes.apk
apktool d -t ion framework-res.apk out
make changes to decompiled source
apktool b out new.framework-res.apk
Now open both framework-res.apk and new.framework-res.apk side by side using an archiver. Do not use windows open.
Now you will notice one thing that the new framework does not contain META-INF folder.
Delete the resources.arsc file from the original framework-res. Drag the resources.arsc from the new framework-res and dump it on to the original framework-res. Close both the files.
Now you are ready to use the updated original framework-res.apk
Click to expand...
Click to collapse
No need to install framework-res.apk only just SemcGenericUxpRes.apk?
ganeshbiyer said:
I am not clear from what you did. But you need to do it this way.
apktool if ion SemcGenericUxRes.apk
apktool d -t ion framework-res.apk out
make changes to decompiled source
apktool b out new.framework-res.apk
Now open both framework-res.apk and new.framework-res.apk side by side using an archiver. Do not use windows open.
Now you will notice one thing that the new framework does not contain META-INF folder.
Delete the resources.arsc file from the original framework-res. Drag the resources.arsc from the new framework-res and dump it on to the original framework-res. Close both the files.
Now you are ready to use the updated original framework-res.apk
Click to expand...
Click to collapse
I try to decompile this mod and it's sucessful.--->http://forum.xda-developers.com/showthread.php?t=2047999
Once I do the original framework-res I fail to make it use.
kin912 said:
I try to decompile this mod and it's sucessful.--->http://forum.xda-developers.com/showthread.php?t=2047999
Once I do the original framework-res I fail to make it use.
Click to expand...
Click to collapse
How are you trying to use it. Tell me the steps.
ganeshbiyer said:
How are you trying to use it. Tell me the steps.
Click to expand...
Click to collapse
1.Install framework about framework-res.apk and SemcGenericUxpRes.apk.
2.Decompile framework-res.apk and make change of the source.
3.Recompile framework-res.apk and build the new framework-res.apk.
4.Take the resources.arsc and the raw which I changed from the new framework-res.apk to the original framework-res.apk.
5.Replace the final framework-res.apk in my phone with 644 permission.
I reboot and loop in the bootanimation.
kin912 said:
1.Install framework about framework-res.apk and SemcGenericUxpRes.apk.
2.Decompile framework-res.apk and make change of the source.
3.Recompile framework-res.apk and build the new framework-res.apk.
4.Take the resources.arsc and the raw which I changed from the new framework-res.apk to the original framework-res.apk.
5.Replace the final framework-res.apk in my phone with 644 permission.
I reboot and loop in the bootanimation.
Click to expand...
Click to collapse
What are the sizes of the frameworks-res.apk's
ganeshbiyer said:
What are the sizes of the frameworks-res.apk's
Click to expand...
Click to collapse
Original:21MB
Decompile:14.9MB
If I do nothing change only recompile the frameworks-res.apk,it still has the bug.
kin912 said:
Original:21MB
Decompile:14.9MB
If I do nothing change only recompile the frameworks-res.apk,it still has the bug.
Click to expand...
Click to collapse
If you have followed pepitos tutorial from themes section then it should be ok.
There is nothing else to do.
Sent from my LT28i using xda premium
ganeshbiyer said:
If you have followed pepitos tutorial from themes section then it should be ok.
There is nothing else to do.
Sent from my LT28i using xda premium
Click to expand...
Click to collapse
I make sure the steps are ok because I can decompile the framework.apk of miui.Anyway,thanks a lot!

[Q] Decompiling SystemUI.apk (3G/1x Icon Fix)

As you all know, Sprint disables the 1x icon from displaying when you are in 1x coverage. It still shows the 3G icon. I know that you can modify the values file and edit the boolean to enable it. I have tried to use apktool and I cannot even get the program to work.
Anyhow, I was wondering if someone who knows how to do this could decompile my SystemUI.apk file, fix it, recompile it and send it back to me. It would be greatly appreciated! Just let me know, and I'll email you my SystemUI.apk file and whatever you may need to get it done.
Thanks,
Rich
DONE. if there's anything else you need PM me or whatever
Hit thanks if this worked.
Please read forum rules before posting
Questions go in Q&A
Thread moved
Thank you for your cooperation
Friendly Neighborhood Moderator
Attached is my SystemUI.apk. The reason I need this particular one done is because I've made a bunch of image changes and stuff, particularly for the signal bars, battery, and data icons.
Thanks!
Use apktool 1.5. Flip the 3g minimum value in bools.xml
shiftr182 said:
Use apktool 1.5. Flip the 3g minimum value in bools.xml
Click to expand...
Click to collapse
There inlies the problem. I can't get apktool to work on my computer for some reason, lol
Any way to do this with an odex rom?
Sent from my SPH-L900 using xda premium
M4ver1ck said:
Any way to do this with an odex rom?
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
yes there is
owensri said:
Attached is my SystemUI.apk. The reason I need this particular one done is because I've made a bunch of image changes and stuff, particularly for the signal bars, battery, and data icons.
Thanks!
Click to expand...
Click to collapse
tis below
t3project said:
tis below
Click to expand...
Click to collapse
Awesome, works great! Thanks! Very much appreciated.
owensri said:
Awesome, works great! Thanks! Very much appreciated.
Click to expand...
Click to collapse
now, why cant you get apktool to work on your pc? what is happening?
t3project said:
now, why cant you get apktool to work on your pc? what is happening?
Click to expand...
Click to collapse
I download the files, and extract them where they say to do so. I can't get it to run at all though. Says the file isn't valid or something like that.
owensri said:
I download the files, and extract them where they say to do so. I can't get it to run at all though. Says the file isn't valid or something like that.
Click to expand...
Click to collapse
firstly make sure you have the JRE/JDK installed from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
download this file: http://www.androidfilehost.com/?fid=9390288116658471591
extract it to c:\apktool
copy framework-res.apk to c:\apktool
copy twframework-res.apk to c:\apktool
open a command prompt (with admin privileges if on win8), navigate to c:\apktool
type apktool if framework-res.apk
next type apktool if twframework-res.apk
copy any.apk to c:\apktool
type apktool d any.apk to decompile
edit the files in the c:\apktool\any\ you need changed
to recompile type apktool b any any.apk
there are a few more steps left but you need to be able to get this working first.
na7q said:
DONE. if there's anything else you need PM me or whatever
Hit thanks if this worked.
Click to expand...
Click to collapse
Which rom will this systemui work on, like Lk8 stock deodex or....? Is This systemui stock with the exception of 1x/3x? Thanks....
transmitting from:
GaLaXy Class Starship Enterprise NCC-SPH-L900
owensri said:
As you all know, Sprint disables the 1x icon from displaying when you are in 1x coverage. It still shows the 3G icon. I know that you can modify the values file and edit the boolean to enable it. I have tried to use apktool and I cannot even get the program to work.
Anyhow, I was wondering if someone who knows how to do this could decompile my SystemUI.apk file, fix it, recompile it and send it back to me. It would be greatly appreciated! Just let me know, and I'll email you my SystemUI.apk file and whatever you may need to get it done.
Thanks,
Rich
Click to expand...
Click to collapse
Just updated to ma7. Is there any way to get this working again on ma7? Thanks
Sent from my SPH-L900 using xda premium
t3project said:
firstly make sure you have the JRE/JDK installed from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
download this file: http://www.androidfilehost.com/?fid=9390288116658471591
extract it to c:\apktool
copy framework-res.apk to c:\apktool
copy twframework-res.apk to c:\apktool
open a command prompt (with admin privileges if on win8), navigate to c:\apktool
type apktool if framework-res.apk
next type apktool if twframework-res.apk
copy any.apk to c:\apktool
type apktool d any.apk to decompile
edit the files in the c:\apktool\any\ you need changed
to recompile type apktool b any any.apk
there are a few more steps left but you need to be able to get this working first.
Click to expand...
Click to collapse
ok thanks for this.. got apktool working finally yah yah.. what are the few more steps left????
this is awsome.. on my way to being a rom developer..
I am sooo excited..
t3project said:
firstly make sure you have the JRE/JDK installed from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
download this file: http://www.androidfilehost.com/?fid=9390288116658471591
extract it to c:\apktool
copy framework-res.apk to c:\apktool
copy twframework-res.apk to c:\apktool
open a command prompt (with admin privileges if on win8), navigate to c:\apktool
type apktool if framework-res.apk
next type apktool if twframework-res.apk
copy any.apk to c:\apktool
type apktool d any.apk to decompile
edit the files in the c:\apktool\any\ you need changed
to recompile type apktool b any any.apk
there are a few more steps left but you need to be able to get this working first.
Click to expand...
Click to collapse
Ok well I did this and decompiled flashbar service made a test Color change and than built it back. Installed the new apk into my rom and flashed it and now my multi window does not work.. sooooooo there must be some thing else I need to do. .can someone help please. Anxious to get my first ron going
I DID IT!!!!!!!!!!!!!!!!!!!!!
I decompiled an apk made a change abs recompiled it. . I know I know whoopee people do it every day. . But this is my first time. . Yeah Yeah Yeah I did it. .
t3project said:
firstly make sure you have the JRE/JDK installed from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
download this file: http://www.androidfilehost.com/?fid=9390288116658471591
extract it to c:\apktool
copy framework-res.apk to c:\apktool
copy twframework-res.apk to c:\apktool
open a command prompt (with admin privileges if on win8), navigate to c:\apktool
type apktool if framework-res.apk
next type apktool if twframework-res.apk
copy any.apk to c:\apktool
type apktool d any.apk to decompile
edit the files in the c:\apktool\any\ you need changed
to recompile type apktool b any any.apk
there are a few more steps left but you need to be able to get this working first.
Click to expand...
Click to collapse
t3 can you make this for your MA7 deodex so we can flash this to have the 1x/3x on the new rom?
transmitting from:
GaLaXy Class Starship Enterprise NCC-SPH-L900
Or would someone be able to make a standalone that would work with any of the TW based MA7 roms?
Sent from my SPH-L900 using xda app-developers app
cherylbaker said:
Ok well I did this and decompiled flashbar service made a test Color change and than built it back. Installed the new apk into my rom and flashed it and now my multi window does not work.. sooooooo there must be some thing else I need to do. .can someone help please. Anxious to get my first ron going
I DID IT!!!!!!!!!!!!!!!!!!!!!
I decompiled an apk made a change abs recompiled it. . I know I know whoopee people do it every day. . But this is my first time. . Yeah Yeah Yeah I did it. .
Click to expand...
Click to collapse
great job cheryl. i just seen your posts. lol
elniper said:
t3 can you make this for your MA7 deodex so we can flash this to have the 1x/3x on the new rom?
transmitting from:
GaLaXy Class Starship Enterprise NCC-SPH-L900
Click to expand...
Click to collapse
yes but digitalblur posted his up in a flashable zip in his thread unless you want something totally stock

[Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar

How to Decompile, Recompile & Sign apk
This Guide/Tutorial for Windows user
Requirement :
1. Android SDK, you can download from here (this including Java)
2. Download Latest Apktool 4.2.2 (Including Sign & baksmali) from here (this Support All apk from GB/ICS/JB 4.1.2/4.2.2)
3. Notepad++ for your tool editing xml/smali you can download from here
If you already download/Installed Android sdk/java & Notepadd++ you just download Latest Apktool 4.2.2
Download Latest Apktool, extract to :
Windows XP : C:\Document and setting\folder your computer name
Windows 7 : C:\user\folder your computer name
copy your apk & framework-res.apk/SemcGenericUxpRes.apk/framework 2 to same folder with apktool
Now you can start Editing apk
Example Editing Walkman
Open Command Prompt (CMD)
to decompile :
Code:
apktool if framework-res.apk
apktool d semcmusic.apk ( can be whatever name you give to your apk )
Some Original system apps need installed framework 2 like on stock ROM (SemcGenericUxpRes.apk)
Example
Code:
apktool if framework-res.apk
apktool if semcgenericuxpres.apk
apktool d semcmusic.apk ( can be whatever name you give to your apk )
You can start editing as you want
to recompile :
Code:
apktool b -f -d semcmusic.apk ( can be whatever name you give to your apk )
If done, you can exit CMD
open original SemcMusic.apk using Winrar or 7zip go to folder semcmusic>dist, open semcmusic.apk using Winrar or 7zip
Drag & drop folder META-INF & Lib in original apk to Modified apk, set compression to store and click ok
to sign :
Move apk modified from folder semcmusic>dist to same folder with apktool
Open Command Prompt (CMD)
Example
Code:
java -jar SignApk.jar testkey.x509.pem testkey.pk8 semcmusic.apk semcmusic_signed.apk ( can be whatever name you give to your apk )
NOTE : Sign apk only for apps 3rd Party but you can use for system>app but not all apps
to zipalign :
Open Command Prompt (CMD)
Example
Code:
zipalign -fv 4 semcmusic_signed.apk semcmusic_signed_zipaligned.apk
How to Decompile/Recompile Jar/Editing classes.dex
Copy Jar file to same folder Apktool
Example
framework.jar
to decompile :
Open framework.jar using Winrar or 7zip and extract classes.dex
Drag & drop classes.dex to Quick-Baksmali (CMD)
if done, you can find folder classes-out
now you can start editing smali file using Notepad++
to recompile :
Drag & drop folder classes-out to Quick-Smali (CMD)
if done, you can find New file "new-classes.dex"
rename file to classes.dex
Open framework.jar using Winrar or 7zip
Drag & drop file classes.dex modified to framework.jar using Winrar or 7zip set compression to normal
Credits :
Thanks to Brut.all for apktool
Thanks to Yorzua for Sign apk tool/file
Thanks to Team Reject for Quick baksmali/smali file
NOTE : If you get error when compiling, don't blame me lolz it's your mistake when editing apk
Great Guide Rizal. I am sure many were asking for it.
great tut but can you add some screens/screenshots
auni said:
Great Guide Rizal. I am sure many were asking for it.
Click to expand...
Click to collapse
Thanks, yeah some user confusing editing apk, so i share latest apktool with easy guide
Mtakween said:
great tut but can you add some screens/screenshots
Click to expand...
Click to collapse
Later i will add screenshot for this tutorial
thx nice guide
Sent from my LT26i using xda app-developers app
No doubt.. Its a great guide for some one like me.... Will sit today night and going to learn.... Thanks a lot..
From My Xperia S With XTX7 ROM
now bookmark it!! thanks dude!! :good:
thanks
Thanks for the credits, buddy
nice share there
Great guide Rizal. Decent English too. Lol. Proud to be Sundanese..
In my opinion, there are other more simplified tools that utilized apktool better (I use apkmultitools and vts (virtuous ten studios)) but people needs to know the basic right..
And I think, you need to put the java\bin directory in Path in windows system variables (or Java_home in win8). And it's better (I think) to put sdk directory (adb, fastboot), apktool and the smali jars files in the Path too, so that users can access from any folders/directory.
Sent from my LT26i using Tapatalk 2
WahyuAndri said:
now bookmark it!! thanks dude!! :good:
Click to expand...
Click to collapse
:thumbup:
Yorzua said:
Thanks for the credits, buddy
nice share there
Click to expand...
Click to collapse
Thanks for your support my friend
m1st3r1 said:
Great guide Rizal. Decent English too. Lol. Proud to be Sundanese..
In my opinion, there are other more simplified tools that utilized apktool better (I use apkmultitools and vts (virtuous ten studios)) but people needs to know the basic right..
And I think, you need to put the java\bin directory in Path in windows system variables (or Java_home in win8). And it's better (I think) to put sdk directory (adb, fastboot), apktool and the smali jars files in the Path too, so that users can access from any folders/directory.
Sent from my LT26i using Tapatalk 2
Click to expand...
Click to collapse
Yeah I know, but some user will confusing lolz, this apktool is latest version so will work for apk 4.2.2, old version doesn't work
:thumbup:
Sent from my Xperia V using Tapatalk 2
I've seen other guides say that resources.arsc should be copied from the old apk and stored in the new one.... is that necessary?
thanks =)
THANKS:good::laugh:
Why So Serious? said:
I've seen other guides say that resources.arsc should be copied from the old apk and stored in the new one.... is that necessary?
Click to expand...
Click to collapse
Can anybody shed any light on this?
Hey rizal, following your decmpile/recompile method, the apk wont install, signature problem.
zhuhang said:
Hey rizal, following your decmpile/recompile method, the apk wont install, signature problem.
Click to expand...
Click to collapse
There are some problems when signing the apk. The workaround for this: use some tools (ticklemyandroid does good jobs) to completely signing the apk (I've done this when modifying systemui.apk), you can also learn from it (learn some of its codes). Or just move files that u've modified from the modified (recompiled) apk to original apk (7zip is your friend)
Why So Serious? said:
I've seen other guides say that resources.arsc should be copied from the old apk and stored in the new one.... is that necessary?
Click to expand...
Click to collapse
I don't think it's necessary. But keep in my mind my post above. So it's like u keep the old resource but put the modified (and compiled) files to the original.
Sent from my LT26i using Tapatalk 2
m1st3r1 said:
There are some problems when signing the apk. The workaround for this: use some tools (ticklemyandroid does good jobs) to completely signing the apk (I've done this when modifying systemui.apk), you can also learn from it (learn some of its codes). Or just move files that u've modified from the modified (recompiled) apk to original apk (7zip is your friend)
Click to expand...
Click to collapse
Just moving with normal compression?
zhuhang said:
Just moving with normal compression?
Click to expand...
Click to collapse
Yes. Just move it to one 7zip window to another one...
Sent from my LT26i using Tapatalk 2

owner info

hi man, i have a dude, i can add my name in lockscreen?
look, when i paint my pattern here i wish can look my name
thanks and sorry for my bad english. i'm argentinian man!
Sent from my GT-S5360L using XDA Free
saltalabanca said:
hi man, i have a dude, i can add my name in lockscreen?
look, when i paint my pattern here i wish can look my name
thanks and sorry for my bad english. i'm argentinian man!
Sent from my GT-S5360L using XDA Free
Click to expand...
Click to collapse
i believe spacecaker have that guide sir
just search his name and you can change your name in lockscreen too
saltalabanca said:
hi man, i have a dude, i can add my name in lockscreen?
look, when i paint my pattern here i wish can look my name
thanks and sorry for my bad english. i'm argentinian man!
Sent from my GT-S5360L using XDA Free
Click to expand...
Click to collapse
1. Decompile framework res.apk
2. Go to res/values/string.xml
3. Edit with notepad++
4. Find this : Draw pattern to unlock
5. Replace with ur name
Note: This'll make the Draw pattern to unlock into ur name
thanks sir, before school i try do this.
thanks for two
Sent from my GT-S5360L using XDA Free mobile app
GalKill said:
1. Decompile framework res.apk
2. Go to res/values/string.xml
3. Edit with notepad++
4. Find this : Draw pattern to unlock
5. Replace with ur name
Note: This'll make the Draw pattern to unlock into ur name
Click to expand...
Click to collapse
when i go to res dont find values
saltalabanca said:
when i go to res dont find values
Click to expand...
Click to collapse
you didnt decompile the apk then - you probably just unzipped it
decompiling means you must use apktool to decompile the apk using baksmali
see my thread in my signature for apktool guide
wehn i decompile the apk with apk manager 5.0 cant view the value carpet help me
saltalabanca said:
wehn i decompile the apk with apk manager 5.0 cant view the value carpet help me
Click to expand...
Click to collapse
like I said use apktool and read my thread for the guide - link in my signature
i search with root explorer the framework-res.apk and i send the apk from gmail for hotmail and download with my computer. this are ok?
okay, i do all, how to add the newframework-res.apk to mi phone??
saltalabanca said:
okay, i do all, how to add the newframework-res.apk to mi phone??
Click to expand...
Click to collapse
rename it back to framework-res.apk and put in a flashable zip and flash in cwm with system mounted
cwm flashable template is
http://d-h.st/sr9
just open with winrar and put your framework-res.apk in system/framework
marcussmith2626 said:
rename it back to framework-res.apk and put in a flashable zip and flash in cwm with system mounted
cwm flashable template is
http://d-h.st/sr9
just open with winrar and put your framework-res.apk in system/framework
Click to expand...
Click to collapse
i sign the apk or no sign?
cant sign with drag2sign
saltalabanca said:
i sign the apk or no sign?
cant sign with drag2sign
Click to expand...
Click to collapse
no need to resign if you havent changed the androidmanifest.xml and dont use drag2sign to sign system apps - use zipsigner from the playstore
marcussmith2626 said:
no need to resign if you havent changed the androidmanifest.xml and dont use drag2sign to sign system apps - use zipsigner from the playstore
Click to expand...
Click to collapse
i flash the zip but nothing change :/
thanks of all mods
saltalabanca said:
i flash the zip but nothing change :/
thanks of all mods
Click to expand...
Click to collapse
did you mount system before you flashed the zip?
in cwm goto mounts and storage and mount system (if system is mounted it will display "unmount system")
remember if you are using a cm kernel like biels kernel you have to unmount system and remount it so its best to just unmount it and remount anyway just to make sure

Categories

Resources