Saturday, December 23, 2017

Cara decompile apk

 Home  Sony Ericsson Xperia Arc  Xperia Arc Themes and Apps  [Tutorial] Decompile/Recompile Apk with Apk Multitool + Decompile/Recompile Jar Files by Saqib Nazm

Page 1 of 9Page 2Page 3Page 4Page 5Page 6Page 7Page 8Page 9

Page 1 of 9

Page 1 of 9Page 2Page 3Page 4Page 5Page 6Page 7Page 8Page 9

 Saqib Nazm

OP Retired Forum Moderator / Recognized Themer

Thanks: 7,858

 

" This thread will cover various useful guides starting from how to Decompile/Recompile Apk & Jar files. Me & my friend Aneel will provide new guides/tutorial day by day so that you guys can get many handy guidance in one place. Please Suggest us If you need any guide & we will try to post it If we actually can. Also If you find our guides useful then support us my giving feedback, hitting thanks & adding in credits section "

1st Let's start with [How to decompile & recompile with Apk Multitool]:

*Requirements*
Latest JavaLatest JDK+JRE (get everything fromhttp://www.oracle.com/technetwork/ja...ads/index.html)
Apk Multi Tool (Download from attachment)Steps

1. Unzip Apk Multi Tool into a folder
2. Now run Setup.bat. It will look like this

3. Now choose 3. Setup Directories & press enter
4. This will create the folders needed. It will look like this

5. Now place the apk you want to decompile inplace-apk-here-for-modding
6. Place a framework-res.apk, SemcGenericUxpRes.apk & SystemUI.apk inother folder. Preferebly it should be from the same package of apk/same apks of a Rom which you placed in the place-apk-here-for-modding folder. If there is no corresponding apks then you can try with other framework & systemUI apks also.
7. Now again run Setup.bat & press enter & choose 2. Installing Framework-Res. It will look like this

8. Now choose option 1 & enter to installframework & again option 4 & enter to installSystemUI
9. Now run Script.bat & press enter to activate various menu. Choose option 9 to decompilethe apk. Then press enter. It will look like this

10. Once decompile is complete close the script & go to projects folder
11. Do the necessary changes you want to
12. When editing is done again run Script.bat
13. Choose option 11 to recompile & press enter. It will prompt a message after sometimes, Aside from the signatures....of errors (y/n)

14. Input y & press enter
15. Now after sometimes, it will again ask you to delete everything you have modified fromkeep folder & also delete resources.arsc if you have modified any xml. Minimize the script, delete the xml(s) you have modified (other than from values folder, it won't appear in keep folder) & also resources.arsc. If you have modified any png (not added) then delete it too. Then press enter when you are ready.

16. Now your new apk is ready. You can find it in place-apk-here-for-modding folder. Note that, your original apk will also be in the same folder with original name. Your modified apk will haveSystem_ attached in the name.

17. Copy it to some other place & rename to original apk name & enjoy.
18. When you want to work on the next project then delete everything from place-apk-here-for-modding & projects folder. Now follow the same steps again from Number 5 of this guide.

[How to decompile & recompile Jar Files]:

*Requirements*
Winrar/7zipDeodexed Jar filessmali.jarbaksmali.jar (both are in the attachment)Command Prompt/Terminal0. Take the classes.dex from jar file by opening it with 7zip/Winrar.
1. Open a new folder in Desktop named suppose "Jar"
2. Place smali.jar & baksmali.jar in the folder
2. Open Command Prompt. On windows type cmd in Run
3. cd to your directory where you have opened the new folder. In my case it is 

Code:

C:\Documents and Settings\USER\Desktop\Jar

4. Write

Code:

cd C:\Documents and Settings\USER\Desktop\Jar

& press enter. Note that, on your case the directory will be different from mines. So get the correct directory by going into that directory from C:

5. Now type this to Decompile. Note that, there is a "space" before "classes.dex"

Code:

java -jar baksmali.jar -o classout\ classes.dex

& press enter

6. When Decompiling is done there will a folder named "classout" be placed in Jar folder.Minimize the cmd.

7. Now make the necessary changes inside theclassout folder
8. When done,type this to recompile & press enter. Remember, there is a "space" before "new-classes.dex"

Code:

java -Xmx512M -jar smali.jar classout\ -o new-classes.dex

9. When recompiling is done there will be a new file in the folder named "new-classes.dex"

10. Now rename new-classes.dex to classes.dex & put it in the jar file with7zip/Winrar

Attached Files

File Type: zipAPK-Multi-Tool-Stable-RELEASE.zip - [Click for QR Code](6.65 MB, 26801 views)
File Type: jarbaksmali.jar - [Click for QR Code] (528.4 KB, 3886 views)
File Type: jarsmali.jar - [Click for QR Code] (717.1 KB, 3639 views)


Sumber XDA Developer

No comments:

Post a Comment