*ALWAYS HAVE A BACK~UP
DONT BLAME ME IF YOU MESS UP*
things needed
apktool mobile
root explorer
zarchiver
920 text editor
first
copy the .jar file to the apktool folder where you decompile and recompile things
next
using zarchiver...
go to the .jar file in the apktool folder
VIEW the files inside
*IMPORTANT*
VIEW ONLY ....DON'T EXTRACT
when you get inside the .jar file you will see two files inside
~Meta-inf
~classes.dex
copy classes.dex
paste it in the apktool folder
now
using apktool..
decompile classes.dex
you will get classes_dex folder as result
delete classes.dex file that you have in the apktool mobile
edit necessary files using 920 text editor
after editing desired files
recompile the classes_dex
if successful.
you will get classes.dex file
using zarchiver again
view .jar files inside
this time delete the classes.dex file inside
then add the NEW classes.dex you have compiled
finally push the new .jar file to your system/framework using root explorer
DONE
Related
I have apk manager 5.02 which I can de-compile framework and recompile with out any issues.
I downloaded the stock 2.08 sense 3.5 rom and used explore2fs to extract the contents of the system.img file. From there I then put htcdialer.apk file into apk manager to decompile it and I get the following errors:
See attached log file as it is too big to put into the forum.
Any ideas why the apk file is not decompiling?
I dont hink that apkmanager can correctly decompile sense 3.5 apks, I could be wrong but i could never get them to work properly
If APK Manager and Tool cant extract even GB ROM apks is there a way of extracting and editing xml files? I tried 7zip and I can edit images but XML's do not extract correctly
Really interested to see how to edit XML files if APK Manager and APK Tool cant decode the APK's.
Found out what I was doing wrong!! When decompiling the apk file I wasn't adding the dependancy. So for example when I was decompiling the systemui.apk, I was simply using option 9 to decompile which is not right!
What you need to do is copy the systemui.apk file in to place-apk-here-for-modding
Then find the dependency framework so for example the systemui.apk depends on com.htc.recources.apk. So pull this from your phone on to the desktop and then use option 10 to decompile. It will then prompt you for the dependancy apk file. Drag that on to the command window and press enter and it decompiles! It is easy when you know how
Also when you recompile you will probably get errors...You need to take the newly created classes.dex and drop it into the original apk then push to your phone
Where can I find the dependency file??
I got the same problem when I try to Decompile any system app, like "SystemUI.apk" or "Settings.apk" ...etc
Now I understand from you that I need a dependency file, Where can I get it??
I use Samsung Galaxy SL (I9003), Rooted and Deodxed
i use samsung galaxy mini. can i use apkmanager to decompile any apk for my device......by pressing 9 directly.....? i want to decompile settings.apk....thnx in advance......
hello i found new way how to patch all services.jar to tablet UI it is easy and better then recompile
1 download winrar
2 download dex2jar
3 hex editor
4 deodexed services.jar
dump your services.jar from your phone by droidexplorer etc .......
open services.jar by winrar and extract classes.dex
dex2jar classes.dex
and open classes_dex2jar.jar in winrar
extract WindowManagerService.class form classes_dex2jar.jar\com\android\server\wm
open it in hexworkshop or other hex editors and find
8E0009000A000000821B9900781D36061C36072A2A2A2A1506
and repace it by
930009000A000000871B99007D1D36061C36072A2A2A2A15068617046E8B
find
B11C36061D3607A7FF8B
and replace it by
B11C36061D3607A7FF86
save WindowManagerService.class
replace WindowManagerService.class by winrar in classes_dex2jar.jar without compression
use jar2dex and create new dex file
rename it to classes.dex
replace your classes.dex in services.jar without compression
copy new classes.jar to your phone
change density to 120 and now you have tablet phone
reserved
Sorry if this is a duplicate or in the wrong place, but i cant find any solutions.
I am having trouble recompiling the settings.apk. I decompile it without problems but the apk can't recompile unless I paste in the .arsc file from the stock apk (by unziping). The problem is that when I edit the xml, it needs to make a new .arsc file since I edited xml within the layout folder.
I am using apktool and have had no problems with other apk files. This is on the Samsung galaxy player 5.0 USA.
Another note, if I decompile, put in the resources.arsc file, and recompile, the new apk file is smaller. In addition, if I unzip the recompiled apk I can edit the xml w/o a problem. This is weird because when I unzip the stock settings.apk the xml files are un-readable.
Any Ideas about what I am doing wrong?
Sorry for being a noob.
tchen510 said:
Sorry if this is a duplicate or in the wrong place, but i cant find any solutions.
I am having trouble recompiling the settings.apk. I decompile it without problems but the apk can't recompile unless I paste in the .arsc file from the stock apk (by unziping). The problem is that when I edit the xml, it needs to make a new .arsc file since I edited xml within the layout folder.
I am using apktool and have had no problems with other apk files. This is on the Samsung galaxy player 5.0 USA.
Another note, if I decompile, put in the resources.arsc file, and recompile, the new apk file is smaller. In addition, if I unzip the recompiled apk I can edit the xml w/o a problem. This is weird because when I unzip the stock settings.apk the xml files are un-readable.
Any Ideas about what I am doing wrong?
Sorry for being a noob.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2251719
Hi i want to enable "Unknown Sources" by default, when a ROM flashed.
I know that i need to modify the SettingsProvider.apk, and exactly the file settingsprovider.apk/res/values/bools.xml
Code:
<bool name="def_install_non_market_apps">true</bool>
when i edit this file, and repack, e resign the file, i flash the rom, and the phone not startup, freeze on loading bootanimation.
I use apktool 1.5.2
brunosso said:
Hi i want to enable "Unknown Sources" by default, when a ROM flashed.
I know that i need to modify the SettingsProvider.apk, and exactly the file settingsprovider.apk/res/values/bools.xml
Code:
<bool name="def_install_non_market_apps">true</bool>
when i edit this file, and repack, e resign the file, i flash the rom, and the phone not startup, freeze on loading bootanimation.
I use apktool 1.5.2
Click to expand...
Click to collapse
After you compile it open the modified settingsprovider.apk as an archive with 7zip or winrar and pull out the res folder and then take the original settingsprovider.apk and open that with 7zip or winrar and replace the res folder with the modified res folder you pulled out of your modified apk. You can use VTS to decompile and recompile and key old signature and that will work too.
mkinney88 said:
After you compile it open the modified settingsprovider.apk as an archive with 7zip or winrar and pull out the res folder and then take the original settingsprovider.apk and open that with 7zip or winrar and replace the res folder with the modified res folder you pulled out of your modified apk. You can use VTS to decompile and recompile and key old signature and that will work too.
Click to expand...
Click to collapse
didn't work
is there other solution ?
i want to edit settingsprovider for Android10
Modifying Mms.apk. I installed Java, and used the following command to decompile the .apk:
apktool.jar d Mms.apk
I then made my changes, and am trying to recompile with the command:
apktool.jar b Mms Mms.apk
The guides I'm following say this will create a "dist" folder within the Mms folder, containing the new (but unsigned) .apk file. This doesn't happen.
No output is given in Command Prompt.
A "build" folder is created, however. Inside is an "apk" folder. Inside of that is a "classes.dex" file.
Why won't apktool create the dist folder?
How can I get the recompiled apk file?
Mellowmarrow said:
Modifying Mms.apk. I installed Java, and used the following command to decompile the .apk:
apktool.jar d Mms.apk
I then made my changes, and am trying to recompile with the command:
apktool.jar b Mms Mms.apk
The guides I'm following say this will create a "dist" folder within the Mms folder, containing the new (but unsigned) .apk file. This doesn't happen.
No output is given in Command Prompt.
A "build" folder is created, however. Inside is an "apk" folder. Inside of that is a "classes.dex" file.
Why won't apktool create the dist folder?
How can I get the recompiled apk file?
Click to expand...
Click to collapse
Alternatively, if we can't figure out why it's not working, can someone compile it? I've attached the files.
Mellowmarrow said:
Alternatively, if we can't figure out why it's not working, can someone compile it? I've attached the files.
Click to expand...
Click to collapse
uhmm when building the apk you don't include the ".apk"
For example if I want to decompile app.apk, I type this:
apktool d app.apk
If I want to recompile, I type this:
apktool b app
YOU DON'T TYPE THE ".apk" AT THE END.
As for your Mms.apk:
1. "apktool d Mms.apk" > Correct
2. "apktool b Mms Mms.apk" > Incorrect
3. apktool b Mms > Correct
This is how it works:
1. If I have an app.apk in the APKTOOL directory, I decompile it by using the command apktool d app.apk
2. This will create a folder named app
3. If I recompile by using the command apktool b app, a new apk will be created inside the dist folder....inside the "app" folder