Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
EvilKing009
Old
#1  
EvilKing009's Avatar
Senior Member - OP
Thanks Meter 330
Posts: 800
Join Date: Feb 2012
Location: Hyderabad
Default [Q] decompile compile framework.jar?

how do i decompile framework.jar files using ADB?
 
voetbalremco
Old
#2  
voetbalremco's Avatar
Recognized Developer
Thanks Meter 1594
Posts: 3,919
Join Date: Jan 2012
Location: gelderland

 
DONATE TO ME
Use apktool or something..

Cant with Only adb I think

Sent from my GT-S5660 using xda premium


buy me a beer if you like my work
 
SpaceCaker
Old
#3  
SpaceCaker's Avatar
Recognized Themer
Thanks Meter 6271
Posts: 10,487
Join Date: Mar 2011
Location: netherlands

 
DONATE TO ME
Baksmali and smali

Sent from my GT-S5830 using xda premium
 




Team Adreno
Team BroadComCM

My Github Click Here
Github BroadcomCM Click Here
Github CyanoSpaceMod Click Here

ON VACATION TILL 29 May 2013

 
EvilKing009
Old
#4  
EvilKing009's Avatar
Senior Member - OP
Thanks Meter 330
Posts: 800
Join Date: Feb 2012
Location: Hyderabad
Quote:
Originally Posted by CoolCatGetHome View Post
Baksmali and smali

Sent from my GT-S5830 using xda premium
tutorial?
 
MerynGoesAndroid
Old
(Last edited by MerynGoesAndroid; 3rd July 2012 at 10:12 PM.)
#5  
Member
Thanks Meter 33
Posts: 53
Join Date: Apr 2012
Location: Achterhoek
get your framework.jar from your phone by doing this in command prompt while phone is connected:

Code:
 
cd c:\adb\platform-tools       (if this is where you installed android sdk)
adb pull /system/framework/framework.jar c:\adb\platform-tools\framework.jar              (or wherever you want it, 2nd path is where it will get saved)
it is now located in the given map, c:\adb\platform-tools in this case.

Use 7zip to extract the classes.dex file from it (dont extract whole archive, only classes.dex)
put the classes.dex in the same map as your smali/baksmali files (download smali/baksmali files here
go in command prompt (cmd) again and navigate to the map your classes.dex and smali/baksmali are located

to decompile:

Code:
java -jar baksmali-0.93.jar -o <output directory> classes.dex
this makes a map named "classes.dex" with all files from classes.dex in it
edit stuff you want to

to recompile:

Code:
java -Xmx512M -jar smali-0.92.jar <output directory from above step> -o <name for new .dex output file>
This makes a new .dex file which you should rename to "classes.dex", but for now any name will do it. Open framework.jar with 7zip again (Dont extract, just open it), and put your new classes.dex in it

after that you can push it back to your phone or whatever you want to do with it


example:

cd c:\adb\platform-tools
adb pull /system/framework/framework.jar c:\user\outputmap\framework.jar

*extract the classes.dex from framework and place in same directory*

java -jar baksmali-0.93.jar -o c:\user\outputmap classes.dex

*edit, edit edit*

java -Xmx512M -jar smali-0.92.jar c:\user\outputmap -o new_classes.dex

*put new_classes.dex into framework.jar and rename to classes.dex*




Hope this helps
The Following 20 Users Say Thank You to MerynGoesAndroid For This Useful Post: [ Click to Expand ]
 
EvilKing009
Old
#6  
EvilKing009's Avatar
Senior Member - OP
Thanks Meter 330
Posts: 800
Join Date: Feb 2012
Location: Hyderabad
Quote:
Originally Posted by MerynGoesAndroid View Post
get your framework.jar from your phone by doing this in command prompt while phone is connected:

Code:
 
cd c:\adb\platform-tools       (if this is where you installed android sdk)
adb pull /system/framework/framework.jar c:\adb\platform-tools\framework.jar              (or wherever you want it, 2nd path is where it will get saved)
it is now located in the given map, c:\adb\platform-tools in this case.

Use 7zip to extract the classes.dex file from it (dont extract whole archive, only classes.dex)
put the classes.dex in the same map as your smali/baksmali files (download smali/baksmali files here
go in command prompt (cmd) again and navigate to the map your classes.dex and smali/baksmali are located

to decompile:

Code:
java -jar baksmali-0.93.jar -o <output directory> classes.dex
this makes a map named "classes.dex" with all files from classes.dex in it
edit stuff you want to

to recompile:

Code:
java -Xmx512M -jar smali-0.92.jar <output directory from above step> -o <name for new .dex output file>
This makes a new .dex file which you should rename to "classes.dex", but for now any name will do it. Open framework.jar with 7zip again (Dont extract, just open it), and put your new classes.dex in it

after that you can push it back to your phone or whatever you want to do with it


example:

cd c:\adb\platform-tools
adb pull /system/framework/framework.jar c:\user\outputmap\framework.jar

*extract the classes.dex from framework and place in same directory*

java -jar baksmali-0.93.jar -o c:\user\outputmap classes.dex

*edit, edit edit*

java -Xmx512M -jar smali-0.92.jar c:\user\outputmap -o new_classes.dex

*put new_classes.dex into framework.jar and rename to classes.dex*




Hope this helps
very very thanks because i can't finding its briefly tutorial.
 
marcosstr
Old
#7  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Oct 2012
Default can't find file

I have a different phone with 4.0.4, it's rooted and i have allready transfered all content from /system/framework/ to my PC but I cannot find the .dex files inside the framework.jar it only have a "preloaded-classes" file, a meta-inf dir and a "MANIFEST.MF" file inside it.

I'm having the incoming call not showing contacts problem, unless it has the exactly number as the phone book, it's freaking annoying...

Can any one gimme some light?



Quote:
Originally Posted by MerynGoesAndroid View Post
get your framework.jar from your phone by doing this in command prompt while phone is connected:

Code:
 
cd c:\adb\platform-tools       (if this is where you installed android sdk)
adb pull /system/framework/framework.jar c:\adb\platform-tools\framework.jar              (or wherever you want it, 2nd path is where it will get saved)
it is now located in the given map, c:\adb\platform-tools in this case.

Use 7zip to extract the classes.dex file from it (dont extract whole archive, only classes.dex)
put the classes.dex in the same map as your smali/baksmali files (download smali/baksmali files here
go in command prompt (cmd) again and navigate to the map your classes.dex and smali/baksmali are located

to decompile:

Code:
java -jar baksmali-0.93.jar -o <output directory> classes.dex
this makes a map named "classes.dex" with all files from classes.dex in it
edit stuff you want to

to recompile:

Code:
java -Xmx512M -jar smali-0.92.jar <output directory from above step> -o <name for new .dex output file>
This makes a new .dex file which you should rename to "classes.dex", but for now any name will do it. Open framework.jar with 7zip again (Dont extract, just open it), and put your new classes.dex in it

after that you can push it back to your phone or whatever you want to do with it


example:

cd c:\adb\platform-tools
adb pull /system/framework/framework.jar c:\user\outputmap\framework.jar

*extract the classes.dex from framework and place in same directory*

java -jar baksmali-0.93.jar -o c:\user\outputmap classes.dex

*edit, edit edit*

java -Xmx512M -jar smali-0.92.jar c:\user\outputmap -o new_classes.dex

*put new_classes.dex into framework.jar and rename to classes.dex*




Hope this helps
 
voetbalremco
Old
#8  
voetbalremco's Avatar
Recognized Developer
Thanks Meter 1594
Posts: 3,919
Join Date: Jan 2012
Location: gelderland

 
DONATE TO ME
Default Re: [Q] decompile compile framework.jar?

use apktool. much easier than random dcriots

Sent from my GT-S5660 using xda app-developers app


buy me a beer if you like my work
 
NickosD
Old
#9  
Senior Member
Thanks Meter 28
Posts: 383
Join Date: Feb 2013
Location: Amintaio - Divice: Samsung Galaxy Note
Quote:
Originally Posted by voetbalremco View Post
use apktool. much easier than random dcriots

Sent from my GT-S5660 using xda app-developers app
what is the apktool? i searched to play store but i was not able to find it....
Sorry for my bad english, it's not my native language ^^
 
voetbalremco
Old
#10  
voetbalremco's Avatar
Recognized Developer
Thanks Meter 1594
Posts: 3,919
Join Date: Jan 2012
Location: gelderland

 
DONATE TO ME
Default Re: [Q] decompile compile framework.jar?

Quote:
Originally Posted by NickosD View Post
what is the apktool? i searched to play store but i was not able to find it....
search XDA

Sent from my GT-S5660 using xda app-developers app


buy me a beer if you like my work

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Job Interview Prep: Phone Screen Part 1 – XDA Developer TV

XDA Developer TV Producer Jayce has been very busy creating videos to help … more

Auto Test Your Android Apps with Robotium

You’ve just finished coding your very first app, but before you release it to the wild, you … more

Open Source CPU Info App for Windows

So you’re playing with your shiny new Windows 8 tablet PC, when one of your like-minded geeky … more

Guide to Using Adobe Air on Android

When writing an app with performance in mind, you most likely want to write it native code using the … more