Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,206 Members 43,976 Now Online
XDA Developers Android and Mobile Development Forum

how do you open and edit classes.dex?

Tip us?
 
CarbonKang
Old
#1  
CarbonKang's Avatar
Senior Member - OP
Thanks Meter 1
Posts: 629
Join Date: Apr 2010
Default how do you open and edit classes.dex?

I can not open classes.dex for the life of me. I have tried multiple ways with different commands and such and still can not get it to open.

I have found this method to get me the farthest but still no go on opening it. every time I enter the command

Quote:
java -jar baksmali.jar -o classout/ classes.dex
I get "Unable to access jarfile baksmaili.jar"

Thanks to anyone who is willing to help.
 
kyouko
Old
(Last edited by kyouko; 23rd June 2010 at 08:49 PM.)
#2  
kyouko's Avatar
Senior Member
Thanks Meter 251
Posts: 1,083
Join Date: Mar 2010
Location: IL/WI border
Download AvaboxV2 and unzip the folder. Inside there are tools for editing and such, namely the "Smali" folder which is hopefully what you are looking for.
Greed is for amateurs
The Following 4 Users Say Thank You to kyouko For This Useful Post: [ Click to Expand ]
 
CarbonKang
Old
(Last edited by CarbonKang; 23rd June 2010 at 08:54 PM.)
#3  
CarbonKang's Avatar
Senior Member - OP
Thanks Meter 1
Posts: 629
Join Date: Apr 2010
Quote:
Originally Posted by kyouko View Post
Download AvaboxV2 and unzip the folder. Inside there are tools for editing and such, namely the "Smali" folder which is hopefully what you are looking for.
I tried that. It will only do apks... I need to to do it to a .dex or a .jar

okay now I see the folder C:\Users\Devin\Documents\AvaboxV2\Smali\baksmali

but still I will need the command prompt and I will be in the same trouble i am in now.
 
kyouko
Old
(Last edited by kyouko; 23rd June 2010 at 09:24 PM.)
#4  
kyouko's Avatar
Senior Member
Thanks Meter 251
Posts: 1,083
Join Date: Mar 2010
Location: IL/WI border
Put the classes.dex file in the \smali\baksmali folder. then navigate to that folder in command prompt:
Code:
cd\
cd C:\Users\Devin\Documents\AvaboxV2\Smali\baksmali
java -jar baksmali-1.1.jar -o classout/ classes.dex
*that should create a folder called "classout" in \baksmali with the smali files*
Then make your edits to the .smali files using notepad++ or w/e

To close up the classout folder and put it back into a classes.dex enter this in cmd:
Code:
java -jar smali-1.1.jar classout -o classes.dex
Edit: fixed file name mix-up
Greed is for amateurs
The Following 7 Users Say Thank You to kyouko For This Useful Post: [ Click to Expand ]
 
CarbonKang
Old
(Last edited by CarbonKang; 23rd June 2010 at 09:18 PM.)
#5  
CarbonKang's Avatar
Senior Member - OP
Thanks Meter 1
Posts: 629
Join Date: Apr 2010
Quote:
Originally Posted by kyouko View Post
Put the classes.dex file in the \smali\baksmali folder. then navigate to that folder in command prompt:

Then make your edits to the .smali files using notepad++ or w/e

To close up the classout folder and put it back into a classes.dex enter this in cmd:
Code:
java -jar smali-1.2.1.jar classout -o classes.dex
dude no matter what I type cmd will NOT go to that folder. "Folder not found" or some ****.

I can NOT wait till iPhone 4 comes out android is total ****.

got it to go to teh folder in cmd but like I said i get the stupid ass unable to access jarfile baksmali.jar

When baksmali.jar is clearly in the freaking folder.

Is there not an easier way to do this?
 
kyouko
Old
#6  
kyouko's Avatar
Senior Member
Thanks Meter 251
Posts: 1,083
Join Date: Mar 2010
Location: IL/WI border
Ooohhh shii- lol I'm a dumbass
Haha it should be baksmali-1.1.jar and smali-1.1.jar

I just edited my previous post to fix that mixup
Greed is for amateurs
The Following 2 Users Say Thank You to kyouko For This Useful Post: [ Click to Expand ]
 
CarbonKang
Old
#7  
CarbonKang's Avatar
Senior Member - OP
Thanks Meter 1
Posts: 629
Join Date: Apr 2010
I even pasted strait from yours.. it does not work man. I give up android is gay
 
CarbonKang
Old
(Last edited by CarbonKang; 23rd June 2010 at 09:28 PM.)
#8  
CarbonKang's Avatar
Senior Member - OP
Thanks Meter 1
Posts: 629
Join Date: Apr 2010
Never mind thank you so much man.. I was just getting pissed off because I have been trying this for so long. Thanks for the help.
 
danaff37
Old
#9  
danaff37's Avatar
Senior Member
Thanks Meter 761
Posts: 2,663
Join Date: Mar 2010
Location: Saint Petersburg, FL
Funny thing is, you think you'll be able to mod I phone easier? Ha!

-------------------------------------
Sent via the XDA Tapatalk App
Those who think linux is free, must not value their time.
The Following 2 Users Say Thank You to danaff37 For This Useful Post: [ Click to Expand ]
 
in4nerd
Old
#10  
in4nerd's Avatar
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Aug 2010
Location: PHX
Thumbs up roflcopter

Quote:
Originally Posted by danaff37 View Post
Funny thing is, you think you'll be able to mod I phone easier? Ha!

-------------------------------------
Sent via the XDA Tapatalk App
..Thumbs up

Srsly..its not difficult to mod android and its apps/framework(/resources)...at all. Only 2 real vars: setup and level of incompetence

not related->Getting a mac soon, mostly everything is windows compatible (80% of market/business/etc), mac not so much...parallel+windows 7 good idea?

kthxbai
Attached Thumbnails
Click image for larger version

Name:	d2.jpg
Views:	580
Size:	31.2 KB
ID:	420953  

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes