Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Guide/Tut] G2 DEODEXING APK IN 3 SIMPLE STEPS- ANY ROM- PERFECT DEODEXING

OP rastigo

11th September 2014, 07:08 AM   |  #1  
rastigo's Avatar
OP Senior Member
Flag Pune
Thanks Meter: 1,178
 
889 posts
Join Date:Joined: Apr 2013
More
OF LATELY A LOT OF PEOPLE SEEM TO FACE DECOMPILING ISSUES POST DEODEXING, SOME DO NOT KNOW HOW TO DEODEX. SO I MADE THIS VERY SIMPLE YET 100% WORKING GUIDE. FOLLOW IT ANY ONE, I MEAN ANYONE CAN SUCCESSFULLY DEODEX ANY APK IN HIS G2 ROM [THIS METHOD WORKS PERFECTLY FOR OTHER PHONES AS WELL]

WHAT YOU NEED:-

1. TOOLS FOR DEODEXING:- DOWNLOAD HERE
2. FRAMEWORK FOLDER FROM YOUR PHONE [FOUND IN "/system" folder"]
3. APK AND ODEX FILE TO BE DEODEXED [eg. LGSystemUI.apk & LGSystemUI.odex]-Found either in [/system/app OR /system/priv-app]


LETS START:-

PREPARATION-
---Download and unzip the tools folder above to the folder c:\baksmali . Indtall 7zip utility from the tools as made available above.
---Place the entire "framework" folder in the c:\baksmali folder. Also place the apk and odex file to be deodexed in c:\baksmali folder.
---Open up a dos prompt in c:\baksmali folder ...


*STEP 1*

Type the following command:

HTML Code:
java -jar baksmali.jar -d c:\baksmali\framework -x nameofodexfile.odex

You will see that an out folder is created in the c:\baksmali folder

*STEP 2*

Type the following command:

HTML Code:
java -jar smali.jar -o classes.dex out
You will see that a file "classes.dex" is created in the c:\baksmali folder

*STEP 3*

-Open your apk file using 7zip utility.
-Simply Drag the classes.dex file and drop in the 7zip open window. Click YES.
-YOU HAVE SUCCESSFULLY CREATED THE DEODEXED APK FILE.




NOTE:
1. If during step 1 you get errors, it is likely that either the framework is different or apk & odex belongs to a different ROM.
2. Use 7zip as it is better and safe than winrar for handling apk files.
3. If above steps are followed, the chances of any errors are "0".
4. While decompiling apks use apktool 1.5.2. This handles smali files much better than 2.0.3 version.



I certainly hope this guide proves helpful to those intending to take up theming/modding... Best of Luck... If you have any concerns get in touch with me- I will gladly help....

Thank you XDA for this wonderful forum



Consider pressing thanks button if you find this tutorial helpful- It promotes development...
The Following 8 Users Say Thank You to rastigo For This Useful Post: [ View ]
12th September 2014, 06:09 PM   |  #2  
Senior Member
Flag Argentina - Jujuy
Thanks Meter: 25
 
155 posts
Join Date:Joined: May 2012
More
Hi, very good tutorial! Just what I needed. Thanks!
17th September 2014, 07:59 PM   |  #3  
jaymazz13's Avatar
Senior Member
Thanks Meter: 91
 
482 posts
Join Date:Joined: Apr 2012
Quote:
Originally Posted by rastigo

OF LATELY A LOT OF PEOPLE SEEM TO FACE DECOMPILING ISSUES POST DEODEXING, SOME DO NOT KNOW HOW TO DEODEX. SO I MADE THIS VERY SIMPLE YET 100% WORKING GUIDE. FOLLOW IT ANY ONE, I MEAN ANYONE CAN SUCCESSFULLY DEODEX ANY APK IN HIS G2 ROM [THIS METHOD WORKS PERFECTLY FOR OTHER PHONES AS WELL]

WHAT YOU NEED:-

1. TOOLS FOR DEODEXING:- DOWNLOAD HERE
2. FRAMEWORK FOLDER FROM YOUR PHONE [FOUND IN "/system" folder"]
3. APK AND ODEX FILE TO BE DEODEXED [eg. LGSystemUI.apk & LGSystemUI.odex]-Found either in [/system/app OR /system/priv-app]


LETS START:-

PREPARATION-
---Download and unzip the tools folder above to the folder c:\baksmali . Indtall 7zip utility from the tools as made available above.
---Place the entire "framework" folder in the c:\baksmali folder. Also place the apk and odex file to be deodexed in c:\baksmali folder.
---Open up a dos prompt in c:\baksmali folder ...


*STEP 1*

Type the following command:

HTML Code:
java -jar baksmali.jar -d c:\baksmali\framework -x nameofodexfile.odex

You will see that an out folder is created in the c:\baksmali folder

*STEP 2*

Type the following command:

HTML Code:
java -jar smali.jar -o classes.dex out
You will see that a file "classes.dex" is created in the c:\baksmali folder

*STEP 3*

-Open your apk file using 7zip utility.
-Simply Drag the classes.dex file and drop in the 7zip open window. Click YES.
-YOU HAVE SUCCESSFULLY CREATED THE DEODEXED APK FILE.




NOTE:
1. If during step 1 you get errors, it is likely that either the framework is different or apk & odex belongs to a different ROM.
2. Use 7zip as it is better and safe than winrar for handling apk files.
3. If above steps are followed, the chances of any errors are "0".
4. While decompiling apks use apktool 1.5.2. This handles smali files much better than 2.0.3 version.



I certainly hope this guide proves helpful to those intending to take up theming/modding... Best of Luck... If you have any concerns get in touch with me- I will gladly help....

Thank you XDA for this wonderful forum



Consider pressing thanks button if you find this tutorial helpful- It promotes development...

when i unzip the tools zip the baksmali is a file not a folder so i cant add the framework to the file? not sure if you can help me further
17th September 2014, 08:50 PM   |  #4  
devadip's Avatar
Senior Member
Flag Milano
Thanks Meter: 182
 
247 posts
Join Date:Joined: Sep 2012
More
Quote:
Originally Posted by jaymazz13

when i unzip the tools zip the baksmali is a file not a folder so i cant add the framework to the file? not sure if you can help me further

you've to create a folder in c:\
then you rename this new folder baksmali
in this folder you have to unzip the file downloaded here
after unzipped
now you can put here your framework
18th September 2014, 01:33 AM   |  #5  
Senior Member
Flag Argentina - Jujuy
Thanks Meter: 25
 
155 posts
Join Date:Joined: May 2012
More
It works great!
One question, how to odex again?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes