Related
alright...ive got the classes.dex file open and able to make edits but when i try to close it and recompress it it gives me errors. can someone help please.
Gtalk is [email protected]
You need to use smali from avabox by avalaunch
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
danaff37 said:
You need to use smali from avabox by avalaunch
Sent from my HERO200 using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
ok thats how i got the classes.dex file by breaking down the apk.
then ran a command to open up the classes.dex file.
it created a file called classout which had all the folders and files inside of the classes.dex file
i made it to the change i needed to make and edited and saved.
then ran a command that should close up the classes out folder back into the classes.dex file and it gives me errors. im changing colors of text in the keyboard and used hex codes to change the color
So whats the error and what command are you using?
Are you using the batch file or typing it in in command prompt.
Not sure which one you are doing so I will post what works for me
I double clicked backsmali.bat and when done editing smali.bat.
java -jar baksmali-1.2.1.jar -x blah.apk will deodex the .apk and make an out folder for the the classes.dex.
java -jar smali-1.2.1.jar out -o classes.dex will recompile the .smali files including the ones you edited. This will make a "New" classes.dex that you can drag and drop into your .apk. This is the best way rather than using a script that may or may not work...
&RoidRage said:
Are you using the batch file or typing it in in command prompt.
Not sure which one you are doing so I will post what works for me
I double clicked backsmali.bat and when done editing smali.bat.
Click to expand...
Click to collapse
i go to command prompt and type in this in the sdk/tools folder
java -jar baksmali.jar -o classout/ classes.dex
that pulls the files out into a classout file
do my editing
then
type in
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
then comes up with these errors afterward
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Chad Barlan>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
Unable to access jarfile baksmali.jar
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[0,0] -0xFF1874CD cannot fit into an int
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3889,4] mismatched tree node: I_STATEMENT_FORMAT35c_METHOD expecting I_CAT
CHES
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3892,4] mismatched tree node: I_STATEMENT_FORMAT11n expecting <UP>
these r the errors i get
im changing text color
using FF1874CD
whitch is just a shade of blue in a hex code form
Lol, that's not how it works .
Color codes, typically in decompiled code are in the form of ARGB bitwise shifted hex values, not standard hex.
R bitwise shifted 16 bits to the left
G bitwise shifted 8 bits to the left
B No shift
Here is a good explanation of how to handle color values in the code:
http://board.flashkit.com/board/archive/index.php/t-657269.html
cbarlan said:
i go to command prompt and type in this in the sdk/tools folder
java -jar baksmali.jar -o classout/ classes.dex
that pulls the files out into a classout file
do my editing
then
type in
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
then comes up with these errors afterward
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Chad Barlan>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
Unable to access jarfile baksmali.jar
C:\android-sdk-windows\tools>java -jar baksmali.jar -o classout/ classes.dex
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[0,0] -0xFF1874CD cannot fit into an int
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3889,4] mismatched tree node: I_STATEMENT_FORMAT35c_METHOD expecting I_CAT
CHES
C:\android-sdk-windows\tools\classout\com\htc\android\htcime\ezsip\KeyboardView.
smali[3892,4] mismatched tree node: I_STATEMENT_FORMAT11n expecting <UP>
these r the errors i get
im changing text color
using FF1874CD
whitch is just a shade of blue in a hex code form
Click to expand...
Click to collapse
By any chance do you have the .smali files still open? By the way, you dont have to use -o classout/ when you baksmali. Baksmali creates an out folder by default. It was designed that way. When you smali, you also dont need -Xmx512M. My suggestion is go here... http://code.google.com/p/smali/ Download the latest baksmali-1.2.2.jar and smali-1.2.2.jar. This will alleviate any errors. Also, do me a favor, pastebin both your edited and non edited .smali files. I'll take a look at them.
By the way, what Js said is correct. You need to use this value for .smali Smali color = -0x100. This is the shifted hex values converted from your standard hex.
JsChiSurf said:
Lol, that's not how it works .
Color codes, typically in decompiled code are in the form of ARGB bitwise shifted hex values, not standard hex.
R bitwise shifted 16 bits to the left
G bitwise shifted 8 bits to the left
B No shift
Click to expand...
Click to collapse
yeah i just figured that out when i looked at another file that has a different color already
so i dropped the transperency
And please FOR THE LOVE OF GOD, upgrade your baksmali and smali .jars
VinceOB said:
By any chance do you have the .smali files still open? By the way, you dont have to use -o classout/ when you baksmali. Baksmali creates an out folder by default. It was designed that way. When you smali, you also dont need -Xmx512M. My suggestion is go here... http://code.google.com/p/smali/ Download the latest baksmali-1.2.2.jar and smali-1.2.2.jar. This will alleviate any errors. Also, do me a favor, pastebin both your edited and non edited .smali files. I'll take a look at them.
By the way, what Js said is correct. You need to use this value for .smali Smali color = -0xe78b33. This is the shifted hex values converted from your standard hex.
Click to expand...
Click to collapse
yeah so im an idiot and got it to work.
thanks for ur help
i had already downloaded the newer smali and baksmali files and put them in the sdk tools folder. was typing to much in the commands and also used the transperency when i was putting in the hex color i.e. FF1874CD instead of just using 1874CD which is what worked and didnt give me any errors.
cbarlan said:
yeah so im an idiot and got it to work.
thanks for ur help
i had already downloaded the newer smali and baksmali files and put them in the sdk tools folder. was typing to much in the commands and also used the transperency when i was putting in the hex color i.e. FF1874CD instead of just using 1874CD which is what worked and didnt give me any errors.
Click to expand...
Click to collapse
So did it change the color for you?
VinceOB said:
And please FOR THE LOVE OF GOD, upgrade your baksmali and smali .jars
Click to expand...
Click to collapse
i upgraded them just changed the name of them to take of the numbers lol much less typing, im lazy lol
cbarlan said:
yeah so im an idiot and got it to work.
thanks for ur help
i had already downloaded the newer smali and baksmali files and put them in the sdk tools folder. was typing to much in the commands and also used the transperency when i was putting in the hex color i.e. FF1874CD instead of just using 1874CD which is what worked and didnt give me any errors.
Click to expand...
Click to collapse
That might have "fit" into the size of the variable defined in the code, but that is not how you calculate the color code. Odds are, if it works, you are going to end up with black, regardless of the color you are trying to achieve. See my previous post.
JsChiSurf said:
That might have "fit" into the size of the variable defined in the code, but that is not how you calculate the color code. Odds are, if it works, you are going to end up with black, regardless of the color you are trying to achieve...
Click to expand...
Click to collapse
what do u mean
im using codes from this site
http://www.december.com/html/spec/colorhex.html
cbarlan said:
what do u mean
im using codes from this site
http://www.december.com/html/spec/colorhex.html
Click to expand...
Click to collapse
What happened when you booted? Did you get the color you expected?
you should use the bat files for that. i only use cmd line codes for auto sign. i find the batch files for baksmali to be perfect for me.
good luck.
Avalaunchmods said:
you should use the bat files for that. i only use cmd line codes for auto sign. i find the batch files for baksmali to be perfect for me.
good luck.
Click to expand...
Click to collapse
Here's what I was getting at with Avabox. He has batch files in there and if you put the apk's in the folder called apk run backsmali.bat. It will create a folder inside the apk folder with the decompressed apk. You can go in there and edit all the .smali files and when you are done run smali.bat. It will recompress and put it back into the apk you originally put into the folder.
Am I correct Avalaunch?
This just makes it easier as you are not having to type anything in.
&RoidRage said:
Here's what I was getting at with Avabox. He has batch files in there and if you put the apk's in the folder called apk run backsmali.bat. It will create a folder inside the apk folder with the decompressed apk. You can go in there and edit all the .smali files and when you are done run smali.bat. It will recompress and put it back into the apk you originally put into the folder.
Am I correct Avalaunch?
This just makes it easier as you are not having to type anything in.
Click to expand...
Click to collapse
tadaa. but it depends on what your doing. i use it to extract the whole apk easily into afolder. then do edits to png's so forth. but it only re creates the classes.dex so png edits wont save. i just recreate the apk. archive to zip, sign, change to apk.
and im not gonna give to much away for free butttt you can also open and edit alot of different android files by changing their extensions and placing them into a folder.
Here is a pack of 3 files that, if pushed to your rom will give you the white task bar. This will change status icons and is just a work in progress "fill in the the gap" type of thing until I can write a proper update script for an update.zip. Currently this has only been tested to work 100% with:
Evil Eris 2.0.1 (It will, however, break the Sense launcher. So if you want the white bar, use another launcher)
Ic3Rom 2.0
It DOES NOT work on
TaintedVanilla 1.3.1
Or any rom that has it's System/Framework apk's and jar's odexed.
Please let me know if it works with any others.
Also, please not that this will change the status bar highlights to green.
http://www.multiupload.com/4YV5D61YRX
Click to expand...
Click to collapse
Just push the three files and reboot. Reboot will take about 5 min, so don't freak out if it takes forever. If you get into a boot loop, however, it didn't work.
DISCLAIMER: I'm not responsible if this bricks your phone. Please don't yell at me if it does. Also, be smart: do a nandroid backup before you try this.
Click to expand...
Click to collapse
This tutorial is for a white menu bar. It's still kind of a work in progress, but it works for the most part. When done, it looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Ok. Here is the extremely long way to do this, but it should work with any rom and will give you a full (date/time/notifications) white/vanilla task bar.
(Seriously, this may take 30 minutes or more if you're unfamiliar with some of these commands)
DOWNLOAD: http://www.multiupload.com/VZWCE0A0FN
Unzip the files and there should be 4 folders and 1 file: framework-res, com.htc.resources, PCSCII, Tools, and StatusBarIcon.smali.
Also included are the tools needed to crack open the .dex file from services.jar, smali.jar and backsmali.jar
First you'll need to pull the proper files to modify from whatever rom you're using. Open up your command line program of choice and do this:
cd [your tools folder in the android sdk]
adb remount
adb pull /system/framework/framework-res.apk framework-res.apk
adb pull /system/framework/com.htc.resources.apk com.htc.resources.apk
adb pull /system/app/PCSCII.apk PCSCII.apk
adb pull /system/framework/services.jar services.jar
Click to expand...
Click to collapse
Copy all these files into a new folder.
Things can get messy so name them whatever you'd like to keep things organized.
After all this you can start copying files. First we need to open up services.jar. Easiest way is to change the .jar ending to .zip and expand it with whatever program you'd like. Copy the classes.dex into a new folder. Keep the original folder of the expanded services.jar, it makes things easier in a few minutes.
Here is where things get a little complicated. You'll need to open up the classes.dex file with backsmali.jar. First, make sure Backsmali.jar is in the same folder as classes.dex. Next enter this command into the terminal:
cd [the folder with backsmali and classes.dex file]
java -Xmx512M -jar baksmali.jar -o classes/ classes.dex
Click to expand...
Click to collapse
This will expand classes.dex into a folder. Click through this folder until you find a folder called Status. Now drag the StatusBarIcon.smali into the Status folder. Allow the replacement.
Now we need to close the classes.dex file back up. Make sure smali.jar is in the same folder as the classes folder (make a new folder just to avoid a conflict with your original files) and use these commands:
cd [the folder with smali and the classes folder]
java -Xmx512M -jar smali.jar -o classes.dex classes/
Click to expand...
Click to collapse
You should have a fresh classes.dex file now. Now put this new classes.dex file into the original services.jar folder (that you expanded from a zip) and rezip that file. Then change the name from a .zip to .jar.
Step 1: done.
The next few parts are a lot easier, so stick with me here.
Now we need to open up the Framework-res.apk and replace all of the image files needed for a sexy white menu bar. All of the needed files are in the folder named (you guessed it) framework-res. First, you'll need to expand this .apk, do so by changing it into a .zip. After you expand it, copy the files from my folder to the matching folders. Don't drag and drop the folders, it won't work. Select all inside them and paste/drag/whatever over to the one from your phone. There should be a folder of image files, and a folder with two xml files. Once done return to the top folder of the framework-res.zip you expanded and re-zip the contents. Make sure you select the contents and zip them.
**DO NOT ZIP THE FRAMEWORK-RES FOLDER ITSELF, SELECT THE FILES INSIDE THE FOLDER AND RE-ZIP THEM**
You should now how have a new archive. Rename it to framework-res.apk and set it aside for later use.
The last parts are essentially the same things, but with the other two folders I've included: PCSCII and com.htc.resources. Copy the files, and re-zip them into .apk files.
Ok. Almost done.
Now it's time to send the files back to your phone. Place the new versions of these files into your Tools folder in the Android SDK.
Now let's push them back to your phone:
cd [your tools folder... again]
adb remount
adb push PCSCII.apk /system/app/PCSCII.apk
adb push framework-res.apk /system/framework/framework-res.apk
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
adb push services.jar /system/framework/services.jar
adb reboot
Click to expand...
Click to collapse
Reboot can take a while, so be patient. I'm thinking rebooting into recovery and clearing your dalvik cache may help, but haven't tried it.
If everything worked correctly, you should have a brand spankin' new notification bar.
Just a note, I have tested this on Evil Eris 2.0 and IceRom 2.0 and it works perfectly. However, it should work with whatever rom you're using. Also, this will change some of your icons to Vanilla ones. If you don't want them changed, don't copy the files that will change them. Those should be apparent when copying the image files from the folders I've included.
If you have any questions, feel free to ask.
Also, if anyone knows how to wrap this all up into a nice little update.zip, please do it or let me know how to do it. It would be greatly appreciated.
Hello, I appreciate the tutorial! I'm attempting to get this set up for my Tainted Vanilla rom and ran into a snag at the beginning. Our services.jar file contains no classes.dex file. All it contains is MANIFEST.MF. Any ideas about how I should proceed?
Ok, I think I've figured it out.
The .odex file is basically the .dex file in an uncompressed format. To break it open you do the same thing you would do with a dex file. Plug it into baksmali and it should yield you a Classes folder. You do have to reassemble it though, which requires you to first deodex it... and it's kind of a pain in the ass. I've figured out the first portion of it, but deodexing the file is decently complicated for a n00b like me. I'll continue to work on it and will hopefully have a solution tomorrow.
Here's where I'm stuck if anyone wants to figure it out:
$ java -Xmx512m -jar baksmali.jar -x services.odex
Error while disassembling method Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: class Lcom/htc/connectivity/DummyStateTracker; cannot be resolved.
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedValidationException(ClassPath.java:535)
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getClassDepth(ClassPath.java:543)
at org.jf.dexlib.Code.Analysis.ClassPath.getCommonSuperclass(ClassPath.java:383)
at org.jf.dexlib.Code.Analysis.RegisterType.merge(RegisterType.java:274)
at org.jf.dexlib.Code.Analysis.AnalyzedInstruction.mergeRegister(AnalyzedInstruction.java:199)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.propagateRegisterToSuccessors(MethodAnalyzer.java:479)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.setPostRegisterTypeAndPropagateChanges(MethodAnalyzer.java:459)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeDirectCommon(MethodAnalyzer.java:2968)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeDirectRange(MethodAnalyzer.java:2927)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:856)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:202)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:290)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:130)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:322)
at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:291)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:135)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:187)
at org.jf.baksmali.main.main(main.java:277)
opcode: invoke-direct/range
CodeAddress: 811
Method: Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV
Click to expand...
Click to collapse
I know that in order for successfully deodex, all the file paths have to be correct. I, however, do not have them yet.
More info here for anyone interested: http://code.google.com/p/smali/wiki/DeodexInstructions
Good work, this should be an update.zip once we have confirmed it working successfully.....
stopxstart said:
Ok, I think I've figured it out.
The .odex file is basically the .dex file in an uncompressed format. To break it open you do the same thing you would do with a dex file. Plug it into baksmali and it should yield you a Classes folder. You do have to reassemble it though, which requires you to first deodex it... and it's kind of a pain in the ass. I've figured out the first portion of it, but deodexing the file is decently complicated for a n00b like me. I'll continue to work on it and will hopefully have a solution tomorrow.
Here's where I'm stuck if anyone wants to figure it out:
I know that in order for successfully deodex, all the file paths have to be correct. I, however, do not have them yet.
More info here for anyone interested: http://code.google.com/p/smali/wiki/DeodexInstructions
Click to expand...
Click to collapse
I get the same error. I posted a issue about this on the project page.
EDIT: Figured it out. Add -c :com.htc.resources.jar
You will need to deodex it first thou.
Can we see screenshots of this notification bar
If you look at the IC3 rom screenshots, this should be the same.
Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
gritts said:
If you look at the ICQ rom screenshots, this should be the same.
Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
Click to expand...
Click to collapse
ICQ ROM do you mean IC3 ROM?
Yes, thanks, I corrected it.
gritts said:
If you look at the IC3 rom screenshots, this should be the same.
Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
Click to expand...
Click to collapse
It's easy just to keep it connected but it's not required. Just make sure you adb remount before pushing and pulling the files.
Going to try out a workaround for all of this, I'll report back sometime tonight.
Also, if this works it will allow me to write a sufficient update.script for a standalone zip.
For those following the progress of this, I am currently testing some standalone files to push that should make this whole process easier.
So far works on: Evil Eris 2.0 and Ic3Rom 2.0 (well, fixes it).
Testing others now.
I'm looking forward to your testing on Tainted Vanilla
hoban_eris said:
Hello, I appreciate the tutorial! I'm attempting to get this set up for my Tainted Vanilla rom and ran into a snag at the beginning. Our services.jar file contains no classes.dex file. All it contains is MANIFEST.MF. Any ideas about how I should proceed?
Click to expand...
Click to collapse
I second that.
ok so these are the things i can't get
the verizon wireless text is white
and the clear button is black with white text
how can i fix these
Re: [Tutorial] White Notification Bar
Did you follow the tut
-------------------------------------
Sent via the XDA Tapatalk App
gritts said:
Did you follow the tut
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
ok ive tried several times and failed every time could someone put up the final zip I could flash
iloveandroid said:
ok so these are the things i can't get
the verizon wireless text is white
and the clear button is black with white text
how can i fix these
Click to expand...
Click to collapse
Let me double check the XML files in the Framework-res.apk to make sure I put the right ones in. I literally have 60 folders filed with the same file from different testing so I could have easily posted the wrong one.
Also, there isn't a zip to flash because I haven't written the update script for it. If you would like to, please do.
stopxstart said:
Let me double check the XML files in the Framework-res.apk to make sure I put the right ones in. I literally have 60 folders filed with the same file from different testing so I could have easily posted the wrong one.
Also, there isn't a zip to flash because I haven't written the update script for it. If you would like to, please do.
Click to expand...
Click to collapse
I would make a flashable but i dont know how
Ok, I fixed the button problem.
You're using Ic3Rom right? Pretty sure the files I have will work with it straight up but let me test it.
Also, I added screenshots to first page.
Is there a way i can change png files on my phone from my phone? I want to change the calling icon in the framework-res.apk. i found out a way to change it with an app in the market. But i dont know how to put it back in the apk. Help please.
find the picture --> backup it --> put in your picture with the same name and exactly the same bigness (pixels) --> bingo
cheers, stephan1
its not that easy. any other ideas anybody please.
Well if the file is a .9.png then it won't be that easy because these files are compiled to binary. (correct me if I'm wrong devs) You will need to do a little more reading to figure this one out. Also, you can't just "unzip" an apk and mess around with the pics and think that it's going to work when you zip it backup. My understanding is that you have to place the file that you are replacing into the compressed(i.e. zipped) apk.
Once again, Devs, correct me if I am wrong but all my info comes straight from using the search button...Try it out
jballz0682 said:
Well if the file is a .9.png then it won't be that easy because these files are compiled to binary. (correct me if I'm wrong devs) You will need to do a little more reading to figure this one out. Also, you can't just "unzip" an apk and mess around with the pics and think that it's going to work when you zip it backup. My understanding is that you have to place the file that you are replacing into the compressed(i.e. zipped) apk.
Once again, Devs, correct me if I am wrong but all my info comes straight from using the search button...Try it out
Click to expand...
Click to collapse
You're right, and wrong. You can unzip an .apk and mess with the images, then rezip it back up and rename it to (yourapk).apk from (yourapk).zip, you just need to sign it when you're done.
I haven't messed with anything entitled ".9.png", but if it's binary then hex editing it is probably the quickest way to edit it, otherwise there is a program called 'apktool' that can decompile apk's and is pretty effective, I've used it a few times
dmullins80 said:
its not that easy. any other ideas anybody please.
Click to expand...
Click to collapse
Pull framework-res.apk from your phone, to your computer's desktop. Use Winrar, or a similar archive extracting program, to open the file, then click Extract -> (some folder on your desktop that has nothing else in it)
Find the picture you want to change, make sure your new picture is the same dimensions (e.g; 320x480) and is the same type of file (e.g; .png) and replace the stock image with your custom image.
Once that's done, highlight all files and folders in the root of the folder you extracted framework-res.apk to -> (if using Winrar) Right-Click -> Add to archive -> Change archive type to .zip and click OK -> Right click on your newly created framework-res.zip and change the extension to .apk (you might need to open a windows explorer window and select tools->folder options->view tab->uncheck 'hide extensions for known filetypes).
Once that's done, you'll need to sign your new framework-res.apk. You can do that with EasySign. Download EasySign to your desktop, extract the archive and open a Windows Command Prompt (Start->All Programs->Accessories->Command Prompt). You'll need the Java JDK installed.
Drag your newly created framework-res.apk file into your EasySign folder on your desktop and down the following;
Type the following, assuming you have Windows 7 or Vista:
Code:
cd C:\Users\(your username on your PC)\Desktop\EasySign
You should now see the following;
Code:
C:\Users\(your username on your PC)\Desktop\EasySign>
You should now type the following;
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-res_signed.apk
It'll take a moment, then you'll see;
Code:
C:\Users\(your username on your PC)\Desktop\EasySign>java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-res_signed.apk
C:\Users\(your username on your PC)\Desktop\EasySign>
...and you should now have framework-res_signed.apk in your EasySign folder on your desktop.
Pull it to your desktop and rename it framework-res.apk and put it back where you got it, most likely using adb (if using adb, put it in C:\(your androidsdk folder)\tools and type the following;
Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
Alternatively, you can place it on your sdcard and use a program like Astro to move it to /system/framework and immediately reboot your phone for the changes to take effect.
Enjoy, it took me like 10 minutes to type this
-mak
Thanks for the wirte up, (i've been try to do something simaler to this for a while). I got to the end but then I get this error in the cmd window. Any thoughts?
'java' is not recognized as an internal or external command,
operable program or batch file.
jadesdan said:
Thanks for the wirte up, (i've been try to do something simaler to this for a while). I got to the end but then I get this error in the cmd window. Any thoughts?
'java' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
Sorry, I should have mentioned you'll need the Java JDK installed.
.mak is that the same one by Stericson?
here
sorry if that is slightly OT, just rebuilding the PC setup and need the files, so not sure which one I want to use - his worked last time for me well.
thanks~
dianeofarcadia said:
.mak is that the same one by Stericson?
here
sorry if that is slightly OT, just rebuilding the PC setup and need the files, so not sure which one I want to use - his worked last time for me well.
thanks~
Click to expand...
Click to collapse
EasySign? I'm not sure, I've only downloaded it from grdlock's site. The one you linked to actually looks easier to use..
when you re-zip the file after editing do you use normal compression or store?
Magnum72 said:
when you re-zip the file after editing do you use normal compression or store?
Click to expand...
Click to collapse
Normal if you're in Windows, otherwise .gz (most compatible) under linux.
.mak said:
Sorry, I should have mentioned you'll need the Java JDK installed.
Click to expand...
Click to collapse
I've installed it, but I still get the same error. Do I need to set a system path within java?
If I get this working it will solve many of my 'problems' Thank you!
I used ubuntu... what I did was change the default unknown call icon... I opened the Phone.apk in ubuntu and replaced the pic with another icon from another rom of my choice making sure it had the exact same name.. then went back to windows, pushed phone.apk and got it no problem... ubuntu opens the apk's without having to unzip them...
droidfreak said:
I used ubuntu... what I did was change the default unknown call icon... I opened the Phone.apk in ubuntu and replaced the pic with another icon from another rom of my choice making sure it had the exact same name.. then went back to windows, pushed phone.apk and got it no problem... ubuntu opens the apk's without having to unzip them...
Click to expand...
Click to collapse
I did that with the numbers on the dialer and the home launcher icon in the Tainted Vanilla thread. But there are other apk's that are a bit touchy. Once I learn how to sign them, I think it might open up a whole new world of skinning for me.
Yeh it would be good to get that down... it would open a huge door.. make things easier..
Question; in order for the above process to work, must you be rooted? I would love to change icons...unfortunately my naive-impatient self flashed the leak when it was first brought public.
Ngmanis said:
Question; in order for the above process to work, must you be rooted? I would love to change icons...unfortunately my naive-impatient self flashed the leak when it was first brought public.
Click to expand...
Click to collapse
Unfortunately you do need to be rooted for these changes to occur, however you can still do some customization with apps like Bettercut or ones similar.
jadesdan said:
I've installed it, but I still get the same error. Do I need to set a system path within java?
If I get this working it will solve many of my 'problems' Thank you!
Click to expand...
Click to collapse
I didn't, and it works for me. Are you using the proper commands, exactly as shown in my tutorial?
.mak said:
I didn't, and it works for me. Are you using the proper commands, exactly as shown in my tutorial?
Click to expand...
Click to collapse
Yes! Even coy and paste (except for changing the name of the apk I'm trying to sign).
I've downloaded the java link that you provided and installed, redownloaded and installed the JRE, rebooted. THe java site tells me I have the latest and greatest of everything.
I know it's got to be something I'm doing wrong, I get the same error with Autosign and other batch signing tools. I just don't know what my problem is.
jadesdan said:
I've installed it, but I still get the same error. Do I need to set a system path within java?
If I get this working it will solve many of my 'problems' Thank you!
Click to expand...
Click to collapse
jadesdan said:
Yes! Even coy and paste (except for changing the name of the apk I'm trying to sign).
I've downloaded the java link that you provided and installed, redownloaded and installed the JRE, rebooted. THe java site tells me I have the latest and greatest of everything.
I know it's got to be something I'm doing wrong, I get the same error with Autosign and other batch signing tools. I just don't know what my problem is.
Click to expand...
Click to collapse
Did you make sure to cd into the proper folder from command prompt? I've made this mistake a time or two;
Code:
cd C:\Users\(your username on your PC)\Desktop\EasySign>
^^ assuming you have EasySign in a folder called EasySign on your desktop, and that you change (your username on your PC) to your actual username.
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
java -jar baksmali.jar -o classout/ classes.dex
Click to expand...
Click to collapse
I get "Unable to access jarfile baksmaili.jar"
Thanks to anyone who is willing to help.
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.
kyouko said:
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.
Click to expand...
Click to collapse
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.
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
kyouko said:
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
Click to expand...
Click to collapse
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?
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
I even pasted strait from yours.. it does not work man. I give up android is gay
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.
Funny thing is, you think you'll be able to mod I phone easier? Ha!
-------------------------------------
Sent via the XDA Tapatalk App
roflcopter
danaff37 said:
Funny thing is, you think you'll be able to mod I phone easier? Ha!
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
..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
I run a dual boot between ubuntu and windows 7 for work
Sent from my HERO200 using XDA App
Anyone have a clue why i get this error?
Smali\baksmali>java -jar framework.jar
-o classout/ classes.dex
Failed to load Main-Class manifest attribute from
framework.jar
This prog hero specific?
Thanks'
hellmonger said:
Anyone have a clue why i get this error?
Smali\baksmali>java -jar framework.jar
-o classout/ classes.dex
Failed to load Main-Class manifest attribute from
framework.jar
This prog hero specific?
Click to expand...
Click to collapse
it not hero specific > link
framework.jar doesn't have the "Main-class" header which is why you're getting that error.
it should be
Code:
java -jar baksmali.jar -o classout/ classes.dex
NOT
Code:
java -jar [COLOR="red"]framwork[/COLOR].jar -o classout/ classes.dex
java -jar is used to run the baksmali and smali.jar "applications"
can this be done in window? cygwin? I have tried to call baksmali for a classes.dex also and having no luck. any insight?
thank
thanksssssss
this app, everytime i start it, i have to press OK button (that annoying) but it work. see what can we do with it:
- i try to extract the classes.dex file, (using winrar)
- edit some code (to remove the dialog appear when it start),
- compress the code back .dex file
- put the .dex into .apk file
- install on the phone fail
can anyone give me suggestion or please do something..
khanhj said:
this app, everytime i start it, i have to press OK button (that annoying) but it work. see what can we do with it:
- i try to extract the classes.dex file, (using winrar)
- edit some code (to remove the dialog appear when it start),
- compress the code back .dex file
- put the .dex into .apk file
- install on the phone fail
can anyone give me suggestion or please do something..
Click to expand...
Click to collapse
Why you have attached a warez spy app?
Can anyone tell why I get this error?
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: bad magic value: 64 65 79 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:359)
at org.jf.baksmali.main.main(main.java:176)
Using Win7. I've always just thrown all editing files in Android/SMALI folder.
Hold Shift, Right Click "Open Command Window Here".
Then for compressing/decompressing the commands I use are.
java -jar baksmali.jar -o classout/ classes.dex
java -Xmx512M -jar smali.jar classout -o classes.dex
Haven't run into any issues yet. I noticed no one has put the "-Xmx512M" in their code.
I hope this helps.
Has anyone been able to deodex the vivid yet? I attempted with xUltimate but i got a variety of errors when trying. To my knowledge it was something to do with the phone not the program. Any other alternatives to doing so?
There are numerous deodexed roms out there.
Sent from my aokp_tenderloin using Tapatalk
i know, but currently i'm using RumRaider Beta 4 and i dont want to downgrade just for the deodex
Have you tried the kitchen yet? It does work.
Sent from my Transformer TF101 using xda premium
Jirv311 said:
Have you tried the kitchen yet? It does work.
Sent from my Transformer TF101 using xda premium
Click to expand...
Click to collapse
im installing it right now, it's a bit of a pain since xcode doesn't install GCC anymore so i have to get it manually. but i'll let you know
Only partly works, have to do some changes to it
Wild Child said:
Only partly works, have to do some changes to it
Click to expand...
Click to collapse
This. Sometimes it will get the whole way through. Otherwise you can do it manually with baksmali/smali. I bet someone could write a script, using the kitchen's brute force method (checking all .odex files against all .jar files for dependencies)..
The way I do it when I have to do it manually.. first dump all .apk, .jar, and .odex to the same directory (not necessary, just less changing directories with the following commands), and get baksmali and smali in the same directory, then open a command prompt there..
Decompile odex:
java -jar baksmali.jar -c :dependency:dependency -x <output directory> <.dex file, typically classes.dex>
(This part can be a real pain in the ass. But usually you can find the dependencies from the errors baksmali throws at you)
Compile to classes.dex:
java -Xmx512M -jar smali.jar <output directory from above step> -o classes.dex
Then change .jar to .zip and open with 7zip (or just open .apk with 7zip), add your classes.dex to the .zip (or .apk), change back to .jar, delete to .odex, classes.dex, and output folder, and move on to the next one. Once you're done, put the .jar files and framework-res.apk and com.htc.resources.apk back to /framework/ and the rest of the .apks to /app/
I didn't have to make any changes to the kitchen at all. Per PG's tip, I plucked the ATT VVM.jar temporarily and everything de-odexed just fine. This was using the ATT ICS RUU.
zacgoesrawr said:
i know, but currently i'm using RumRaider Beta 4 and i dont want to downgrade just for the deodex
Click to expand...
Click to collapse
Gotcha. From your wording I thought you were under the impression that there were no deodexed ROMs available. Sorry for the confusion.