When decompiling system apps by using apktool through cmd commands I get an "unable to decode" error on everything that is xxhdpi. After decompile I don't have those folders in my res folder. I have updated SDK, apktool (1..5.2), aapt.exe. Anyone have this issue and work through it before? thanks for any help you can give.
ecsnead69 said:
When decompiling system apps by using apktool through cmd commands I get an "unable to decode" error on everything that is xxhdpi. After decompile I don't have those folders in my res folder. I have updated SDK, apktool (1..5.2), aapt.exe. Anyone have this issue and work through it before? thanks for any help you can give.
Click to expand...
Click to collapse
compile apktool from source and it should work.
Thanks, where can I read how to do that?
So I take the new jar (apktool-cli.jar) and rename it to apktool.jar and replace my current one?
ecsnead69 said:
So I take the new jar (apktool-cli.jar) and rename it to apktool.jar and replace my current one?
Click to expand...
Click to collapse
yep
Thanks, I'll give that a try after work.
Do you have one compiled recently you could post? I am having serious problems with my Linux pc. Thanks
Related
Does anyone have a Mail.apk that will decompile and recompile with out an error? I am trying to invert the Mail apk and when I try to recompile it, it errors out. I think it is something in Smali that is making it error out. If I go ahead and push it to the phone, I get a force close. I have tried several different roms to see if I can get one that will work including the stock Froyo that rmk40 posted back in October.
Devildog8791 said:
Does anyone have a Mail.apk that will decompile and recompile with out an error? I am trying to invert the Mail apk and when I try to recompile it, it errors out. I think it is something in Smali that is making it error out. If I go ahead and push it to the phone, I get a force close. I have tried several different roms to see if I can get one that will work including the stock Froyo that rmk40 posted back in October.
Click to expand...
Click to collapse
If you don't need to decompile the smali, you can use apktool d -s mail.apk, this will decompile resources.arsc, but not devompile the smali.
Also, you may need to change all of the *dpi folders (drawable-hdpi, mdpi, and such) to drawable-hdpi-v4. If you can get a logcat of *:E when it's crashing, I can try to help you out.
WoZZeR999 said:
If you don't need to decompile the smali, you can use apktool d -s mail.apk, this will decompile resources.arsc, but not devompile the smali.
Also, you may need to change all of the *dpi folders (drawable-hdpi, mdpi, and such) to drawable-hdpi-v4. If you can get a logcat of *:E when it's crashing, I can try to help you out.
Click to expand...
Click to collapse
I use APK Manager. Is there a way to exclude smali in there?
I'll see what I can do about the logcat and get back with you. Thanks
Devildog8791 said:
I use APK Manager. Is there a way to exclude smali in there?
I'll see what I can do about the logcat and get back with you. Thanks
Click to expand...
Click to collapse
If you want, you can post the mail.apk, and I can take a look at it.
If you just want to change the graphics, you could just extract the drawable files as if it were a zip file. Just don't edit the 9.png files.
So yea, that. I have tried flashables from the nexus s to no avail.
And if at all possible can we do away with our capacitive buttons all together, or at least disable the led's
I think this will give more of a ice cream sandwichy look lol. Plus I despise our tiny capacitive buttons.
Thanks in advance
Sent from my CM9 Epic 4G
So you would rather waste screen space when the buttons already exist off of the main screen?
Sent from my SPH-D700 using Tapatalk
Enable it in bools.xml
Sent from my SPH-D700 using Tapatalk
Vizzo said:
So you would rather waste screen space when the buttons already exist off of the main screen?
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Yes
marcusant said:
Enable it in bools.xml
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
I tried to find this myself but failed, could you point me to where I can find it?
Sent from my CM9 Epic 4G
xopher.hunter said:
Yes
I tried to find this myself but failed, could you point me to where I can find it?
Sent from my CM9 Epic 4G
Click to expand...
Click to collapse
Decompile framework-res.apk with apktool (the latest ics one).
To do this type get apk tool and the windows files (if you have windows) and put them in the same folder. Now put the framework-res.apk from cm9 in that folder too Then open up cmd and issue the following commands. (My apktool folder is at c:/apktool/
cd C:/apktool/
apktool if framework-res.apk
apktool d framework-res.apk
Now go to the framework-res.apk folder that was created and find /values/bools.xml
If you don't already have notepad++, you are going to need it.
Open up books.xml with notepad++ and find the value pertaining to navigation buttons or something similar and set it to true.
Now reopen cmd and run these commands.
cd C:/apktool/
apktool b framework-res.apk
Now take the framework-res.apk from the apktool folder (it should now be modified) and try putting it in /system/framework/ on your phone and the wipe cache and dalvik.
Hopefully this helps.
marcusant said:
Decompile framework-res.apk with apktool (the latest ics one).
To do this type get apk tool and the windows files (if you have windows) and put them in the same folder. Now put the framework-res.apk from cm9 in that folder too Then open up cmd and issue the following commands. (My apktool folder is at c:/apktool/
cd C:/apktool/
apktool if framework-res.apk
apktool d framework-res.apk
Click to expand...
Click to collapse
I'm having trouble decompiling framework-res.apk, my apktool pops up for a second but does nothing when executed in a command
I made my apktool folder in the root of my c drive and I try running c:/apktool/apktool if framework-res.apk it pops up for a millisecond and does nothing same with running c:/apktool/apktool d framework-res.apk
I also just tried using 7-zip to extract but cannot find /values or books.xml (bools.xml?)
Sent from my CM9 Epic 4G
xopher.hunter said:
I'm having trouble decompiling framework-res.apk, my apktool pops up for a second but does nothing when executed in a command
I made my apktool folder in the root of my c drive and I try running c:/apktool/apktool if framework-res.apk it pops up for a millisecond and does nothing same with running c:/apktool/apktool d framework-res.apk
I also just tried using 7-zip to extract but cannot find /values or books.xml (bools.xml?)
Sent from my CM9 Epic 4G
Click to expand...
Click to collapse
Try getting the latest apktool and windows files from their Google code page. Make sure to not forget the windows files and to get the latest version.
Edit: oh and make sure you have the latest java development kit (JDK) installed.
Sent from my SPH-D700 using Tapatalk
I wanted to try this as well. I decompiled framework-res.apk fine.
I modded the bools.xml.
When I try to rebuild the apk I get an error:
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
Are you on the latest apktool with the latest windows binary?
Sent from my SPH-D700 using Tapatalk
I'll post a zip of my apktool folder.
Sent from my SPH-D700 using Tapatalk
I can get the apk to decompile fine. Now I am getting all sorts of errors trying to build it.
I got the latest apktool from this link:
http://code.google.com/p/android-apktool/downloads/list
bodi524 said:
I can get the apk to decompile fine. Now I am getting all sorts of errors trying to build it.
I got the latest apktool from this link:
http://code.google.com/p/android-apktool/downloads/list
Click to expand...
Click to collapse
that happened to me. I had to do some sdk stuff...
Sent from my SPH-D700 using Tapatalk
http://www.mediafire.com/?dj8dttxj3ahxe7n
hmm... not building for me either... weird
I have read a bunch of threads. I think it may have to do with the aapt.exe file. Although I have tried 3 different versions and I still cant get it to build.
Soft Keys
OK here it is. I was able to get the softkeys by changing the bools.xml.
You can do a preview if you like. It realy screws with the layout and size of things.
I will continue working on it.
Steve
Ok everyone, this is my first tutorial that I am ever putting out and I will try to be as thorough as possible. This tut is not so much for the people that dont know much about android, it is more for the people that understand most of it already. But as always feel free to read through it and start learning as most of us around here have! So without further a do lets get started!!
FIrst you need 7-zip!!! So go install it!!
So first, the first thing you need to do is go to this link and download the apktools and aapt that are in the zip:http://www.mediafire.com/?acrgcd0w850q0gj
After you extract this zip you will have a folder with all the tools we will need to do this!!!! Now, if you are doing this then you probably already have done it on Ice Cream Sandwich or Gingerbread. So the next thing we need to do is remove your "Environmental Variables". Environmental Variables are basically the commands that you can run in command prompt from any folder on the computer. If you have the android sdk or previously have tried to decompile and compile Apk's chances are you have the setups in the Environmental Variables.
Remove Unneeded Environmental :
1)Hit the start menu on the bottom left hand corner of Windows
2)Right-Click on Computer and select Properties
3)On the top left-hand corner select Advanced System Settings
4)A window comes up and select the button that says "Environmental Variables"
5)In the window that comes up there is two boxes. We are going to edit the bottom one labed "System Variables". Now grab the scroll bar and look for the variable Path. It should be under OS and above PATHEXT. Double-Click "Path" Variable
NOTE: Each path ends in a ";"
6) So now you will need remove every instance that would point to anything android related. For example one is "C:\SDK\platform-tools\;" If it has this then apktools will run the aapt.exe from that platform-tools folder instead of the one that is provided in the zip.
ALTERNATIVE: An alternative would be to delete the aapt that you have in your folder that you have in your Path System Variable.
I know this was not very clear but I again this is for the users a bit more advanced.
-------------------------------
DECOMPILE/COMPILE SystemUI.apk and other Apk's. EXCEPT framework-res.apk
Ok, you can do this however you want but for this tut I am going to extract apktools.zip and place the folder on my desktop. So we're going to open the folder and then place the APK we want to edit along with a JELLYBEAN framework-res.apk into the folder. For example if you want to edit a CM10 "SystemUI.apk" then you will pull the framework-res.apk from /system/framework/ folder nd place it in your desktop JBapktools folder.
Once you have both SystemUI.apk and framework-res.apk inside the JBapktools folder we are ready to start. First rename either one of these files "apktool149.jar" "apktool142.jar" "apktool144.jar" to just apktool.jar. REMEMBER only rename ONE cus we need to keep track of the versions of the apktools.
Next, bring up the folder window and anywhere on the white space hold SHIFT and Right-Click. Then youre going to choose open command window here.
The first command is going to be: java -jar apktool.jar if framework-res.apk
This is going to install the framework.
Now close out the window.
Next go back to the folder and make sure you rename the jar file you renamed earlier back to its original name. For example if you have apktool144.jar and apktool149.jar in the folder then you must rename apktool.jar to apktool142.jar because that is its original and actual version number.
To decompile and recompile SystemUI.apk you need apktool149.jar so once all three are named to their real names then rename apktool149.jar to apktool.jar.
Now,YOU ARE READY!!! Finally.
Again, In the folder SHIFT +Right-Click and select open command window here.
the command to decompile is: java -jar apktool.jar d SystemUI.apk
---------------------------------------------------------------------------------------
Then hit enter you should see something like this:I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jose\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
---------------------------------------------------------------------------------------
Of course it wont say Jose but it will say your User Accounts name.
Now in the folder you should see another folder in there called SystemUI. Now its DECOMPILED!!!!! WHOOOOO!!!!!!
You can make your edits and edit the pngs and xmls or the smali or whatever your guru-self wants to do.
Now to RECOMPILE!!!!!
To recompile we will still be using apktool149.jar so no need to rename anything back or whatever.
The first thing you should do is open the SystemUI.apk in 7-zip. You can right-click SystemUI.apk and in there, there should be a META-INF folder and a AndroidManifest.xml file. Select both of these be selecting one first(should be highlighted blue) the holding down Cntrl button and selecting the other file. Now that they are both selected click and drag out to apktools folder. We will need these files in a little bit.
Next in the command prompt window, or if you closed it, the reopen by SHIFT+Right-Click and selecting open command window here. The command to decompile is:
java -jar apktool.jar b SystemUI
NOTE:Make sure you use the letter "b" and dont add .apk to the end of it as we are recompiling the FOLDER and not an actual apk file like we do when decompiling.
It should say something like this:
I: Checking whether sources has changed...
I: Smaling
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Sounds very sexy when reading it I know but we aren't done yet. Remember the META-INF Folder and the AndroidManifest.xml file we pulled out earlier. Ok from the apktools folder select both files again by using Ctrl button. Now type Ctrl C. This will COPY these files to the clipboard. Now that we have the files copied go into SystemUI FOLDER and then go into build folder and then into apk folder. To make it look more neat navigate to /Desktop/apktools/SystemUI/build/apk/ . Now that you are in the apk folder hit Ctrl V. This will PASTE the META-INF and AndroidManifest.xml file into the folder. If a window comes up just choose COPY AND REPLACE.
Last thing to do before we can compile is to go into /SystemUI/dist/ and delete the apk file that is there. The recompiling process is almost complete!!! Go back to command prompt window and just push the ARROW UP on the keyboard. This should bring up the last command you typed in. If its not there then just type it in again:
java -jar apktool.jar b SystemUI
The final apk file should be in SystemUI/dist/ folder!!!!
If you are having any aapt problems then you probably still have a path in Environment Variables that has an aapt.exe in it. Other than that askk and I'm sure myself or someone else can help!!
I will be putting up the how to decompile/recompile framework-res.apk in 2nd post tomorrow or soon because I dont have time right now. The process is different. Have fun themeing and doing whatever it is you do!!!
Added a donate link guys. I'm only 16 so I can't say buy me a beer! So how bout half a gallon of gas? That would be great. Let me know if you donated to I can thank you and put you in my posts!! I have a passion for doing these things so I do not expect any donations from anyone. I do it because I love it and can't get enough of it!! Thanks everyone for being supportive
Donations: Marcismo55
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GL7RKF2EGCH68
FUERRER!!!
1 more just in case
nice
Sent from my Axiom Infekted Razr Maxx using Xparent ICS Blue Tapatalk
Hey man, nice write up. Always good to see people share information.
However, you made it WAY more complicated than it needs to be.
+1 either way. Get you some gas.
_Burst_ said:
Hey man, nice write up. Always good to see people share information.
However, you made it WAY more complicated than it needs to be.
+1 either way. Get you some gas.
Click to expand...
Click to collapse
Sorry man I tried my best :b. And thanks!
Sent from my SPH-L710 using XDA App
Hi,
I was just wondering if the is anyway to decompile the framework-res.apk
I have been trying for ages, but it always gives me errors.
Thanks in advance
Cheers
Corey
fishingfon said:
Hi,
I was just wondering if the is anyway to decompile the framework-res.apk
I have been trying for ages, but it always gives me errors.
Thanks in advance
Cheers
Corey
Click to expand...
Click to collapse
Grab an ICS framework-res apk. Replace manifest resources.arsc and res from the ICS apk with the one from jb apk. Then dexompile with apktool142.jar and then edit. Then recompile with apktoll144.jar. then open the apk that recompiled and take out manifest resources.arsc and res and place back in jb framework sorry if its to confusing. But just a quick write up
Sent from my SPH-L710 using XDA App
monstaX said:
Ok everyone, this is my first tutorial that I am ever putting out and I will try to be as thorough as possible. This tut is not so much for the people that dont know much about android, it is more for the people that understand most of it already. But as always feel free to read through it and start learning as most of us around here have! So without further a do lets get started!!
FIrst you need 7-zip!!! So go install it!!
So first, the first thing you need to do is go to this link and download the apktools and aapt that are in the zip:http://www.mediafire.com/?acrgcd0w850q0gj
After you extract this zip you will have a folder with all the tools we will need to do this!!!! Now, if you are doing this then you probably already have done it on Ice Cream Sandwich or Gingerbread. So the next thing we need to do is remove your "Environmental Variables". Environmental Variables are basically the commands that you can run in command prompt from any folder on the computer. If you have the android sdk or previously have tried to decompile and compile Apk's chances are you have the setups in the Environmental Variables.
Remove Unneeded Environmental :
1)Hit the start menu on the bottom left hand corner of Windows
2)Right-Click on Computer and select Properties
3)On the top left-hand corner select Advanced System Settings
4)A window comes up and select the button that says "Environmental Variables"
5)In the window that comes up there is two boxes. We are going to edit the bottom one labed "System Variables". Now grab the scroll bar and look for the variable Path. It should be under OS and above PATHEXT. Double-Click "Path" Variable
NOTE: Each path ends in a ";"
6) So now you will need remove every instance that would point to anything android related. For example one is "C:\SDK\platform-tools\;" If it has this then apktools will run the aapt.exe from that platform-tools folder instead of the one that is provided in the zip.
ALTERNATIVE: An alternative would be to delete the aapt that you have in your folder that you have in your Path System Variable.
I know this was not very clear but I again this is for the users a bit more advanced.
-------------------------------
DECOMPILE/COMPILE SystemUI.apk and other Apk's. EXCEPT framework-res.apk
Ok, you can do this however you want but for this tut I am going to extract apktools.zip and place the folder on my desktop. So we're going to open the folder and then place the APK we want to edit along with a JELLYBEAN framework-res.apk into the folder. For example if you want to edit a CM10 "SystemUI.apk" then you will pull the framework-res.apk from /system/framework/ folder nd place it in your desktop JBapktools folder.
Once you have both SystemUI.apk and framework-res.apk inside the JBapktools folder we are ready to start. First rename either one of these files "apktool149.jar" "apktool142.jar" "apktool144.jar" to just apktool.jar. REMEMBER only rename ONE cus we need to keep track of the versions of the apktools.
Next, bring up the folder window and anywhere on the white space hold SHIFT and Right-Click. Then youre going to choose open command window here.
The first command is going to be: java -jar apktool.jar if framework-res.apk
This is going to install the framework.
Now close out the window.
Next go back to the folder and make sure you rename the jar file you renamed earlier back to its original name. For example if you have apktool144.jar and apktool149.jar in the folder then you must rename apktool.jar to apktool142.jar because that is its original and actual version number.
To decompile and recompile SystemUI.apk you need apktool149.jar so once all three are named to their real names then rename apktool149.jar to apktool.jar.
Now,YOU ARE READY!!! Finally.
Again, In the folder SHIFT +Right-Click and select open command window here.
the command to decompile is: java -jar apktool.jar d SystemUI.apk
---------------------------------------------------------------------------------------
Then hit enter you should see something like this:I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jose\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
---------------------------------------------------------------------------------------
Of course it wont say Jose but it will say your User Accounts name.
Now in the folder you should see another folder in there called SystemUI. Now its DECOMPILED!!!!! WHOOOOO!!!!!!
You can make your edits and edit the pngs and xmls or the smali or whatever your guru-self wants to do.
Now to RECOMPILE!!!!!
To recompile we will still be using apktool149.jar so no need to rename anything back or whatever.
The first thing you should do is open the SystemUI.apk in 7-zip. You can right-click SystemUI.apk and in there, there should be a META-INF folder and a AndroidManifest.xml file. Select both of these be selecting one first(should be highlighted blue) the holding down Cntrl button and selecting the other file. Now that they are both selected click and drag out to apktools folder. We will need these files in a little bit.
Next in the command prompt window, or if you closed it, the reopen by SHIFT+Right-Click and selecting open command window here. The command to decompile is:
java -jar apktool.jar b SystemUI
NOTE:Make sure you use the letter "b" and dont add .apk to the end of it as we are recompiling the FOLDER and not an actual apk file like we do when decompiling.
It should say something like this:
I: Checking whether sources has changed...
I: Smaling
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Sounds very sexy when reading it I know but we aren't done yet. Remember the META-INF Folder and the AndroidManifest.xml file we pulled out earlier. Ok from the apktools folder select both files again by using Ctrl button. Now type Ctrl C. This will COPY these files to the clipboard. Now that we have the files copied go into SystemUI FOLDER and then go into build folder and then into apk folder. To make it look more neat navigate to /Desktop/apktools/SystemUI/build/apk/ . Now that you are in the apk folder hit Ctrl V. This will PASTE the META-INF and AndroidManifest.xml file into the folder. If a window comes up just choose COPY AND REPLACE.
Last thing to do before we can compile is to go into /SystemUI/dist/ and delete the apk file that is there. The recompiling process is almost complete!!! Go back to command prompt window and just push the ARROW UP on the keyboard. This should bring up the last command you typed in. If its not there then just type it in again:
java -jar apktool.jar b SystemUI
The final apk file should be in SystemUI/dist/ folder!!!!
If you are having any aapt problems then you probably still have a path in Environment Variables that has an aapt.exe in it. Other than that askk and I'm sure myself or someone else can help!!
I will be putting up the how to decompile/recompile framework-res.apk in 2nd post tomorrow or soon because I dont have time right now. The process is different. Have fun themeing and doing whatever it is you do!!!
Added a donate link guys. I'm only 16 so I can't say buy me a beer! So how bout half a gallon of gas? That would be great. Let me know if you donated to I can thank you and put you in my posts!! I have a passion for doing these things so I do not expect any donations from anyone. I do it because I love it and can't get enough of it!! Thanks everyone for being supportive
Donations: Marcismo55
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GL7RKF2EGCH68
Click to expand...
Click to collapse
Can you edit Contacts.apk?
I am trying to modifying Jelly Bean Contacts.apk. The original Contacts.apk is from Helly Bean. Using apktool that has been used for ICS and other Jelly Bean apks, I can decompile and then recomplie it without any error. However, the recompiled Contacts.apk would not work in cell phone, showing a message "Unfortunately, Contacts has stopped!".
To simplify the problem, I simply do decompiling and then recompiling without any modifications. I found that the size of resources.arsc has been changed from 1480 KB to 1525 KB. The new Contacts.apk causes FC!
Note: Files in smali folder can still be modified. After editing, use apktool to recompile and create a new apk. Then use WinRAR or 7zp to drag the newly created classes.dex into the original Contacts.apk. Such a "modified" Contacts.apk works properly. Note here that we did not modify resources.arsc.
This problem is only related to resources.arsc!!!!!!!
SunnyOKOK said:
Can you edit Contacts.apk?
I am trying to modifying Jelly Bean Contacts.apk. The original Contacts.apk is from Helly Bean. Using apktool that has been used for ICS and other Jelly Bean apks, I can decompile and then recomplie it without any error. However, the recompiled Contacts.apk would not work in cell phone, showing a message "Unfortunately, Contacts has stopped!".
To simplify the problem, I simply do decompiling and then recompiling without any modifications. I found that the size of resources.arsc has been changed from 1480 KB to 1525 KB. The new Contacts.apk causes FC!
Note: Files in smali folder can still be modified. After editing, use apktool to recompile and create a new apk. Then use WinRAR or 7zp to drag the newly created classes.dex into the original Contacts.apk. Such a "modified" Contacts.apk works properly. Note here that we did not modify resources.arsc.
This problem is only related to resources.arsc!!!!!!!
Click to expand...
Click to collapse
Not to sure bud. But try the Tut I put up before your post. If not it might need to be compiled from source so nothing will be broken
Sent from my SPH-L710 using XDA App
Thank you. Can I use Eclipse to edit the source code? Any ideas?
SunnyOK said:
Thank you. Can I use Eclipse to edit the source code? Any ideas?
Click to expand...
Click to collapse
Not to sure on that either man. Sorry
Sent from my SPH-L710 using XDA App
I get errors on installing framework!
Any ideas?
i am getting error is there any way to solve.... check attachment image
I'm gonna try this guide. It seems like the last step is something I haven't done in my current journey with recompiling apks.
tapatalked² from cowsquadGnex®
---------- Post added at 08:49 AM ---------- Previous post was at 08:48 AM ----------
sahil001 said:
i am getting error is there any way to solve.... check attachment image
Click to expand...
Click to collapse
Do you have java installed on your system?
tapatalked² from cowsquadGnex®
cowsquad said:
I'm gonna try this guide. It seems like the last step is something I haven't done in my current journey with recompiling apks.
tapatalked² from cowsquadGnex®
---------- Post added at 08:49 AM ---------- Previous post was at 08:48 AM ----------
Do you have java installed on your system?
tapatalked² from cowsquadGnex®
Click to expand...
Click to collapse
i haved installed but which particular version do you recommend me and if possible please share downloading link
sahil001 said:
i haved installed but which particular version do you recommend me and if possible please share downloading link
Click to expand...
Click to collapse
Just Google how to install java jdk in windows. There are plenty tutorials. You need java JDK
Edited:
Make sure your java is in your windows system variables. Step 6 on this guide
tapatalked² from cowsquadGnex®
cowsquad said:
Just Google how to install java jdk in windows. There are plenty tutorials. You need java JDK
Edited:
Make sure your java is in your windows system variables. Step 6 on this guide
tapatalked² from cowsquadGnex®
Click to expand...
Click to collapse
Ok ill try and let u know if it works or not
Ѕєит fяσм ๓ұ gαℓαχу S2®
sahil001 said:
Ok ill try and let u know if it works or not
Ѕєит fяσм ๓ұ gαℓαχу S2®
Click to expand...
Click to collapse
Did it work man?
tapatalked² from cowsquadGnex®
cowsquad said:
Did it work man?
tapatalked² from cowsquadGnex®
Click to expand...
Click to collapse
No
Ѕєит fяσм ๓ұ gαℓαχу S2®
I am trying to edit the smali code in the systemui.apk for a couple mods in the development section. I am having some difficulties. I am trying to use smali/baksmali.
Anyone have a guide or able to provide some steps.
Thanks
First, if you don't have apktool set up Google "How to set up apktool on Windows(or Linux or Mac etc)"
Once set up use this modified apktool and aapt.exe found here. Make sure you select the appropriate aapt.exe depending on you OS
http://forum.xda-developers.com/showthread.php?t=1755243
Rename that modified apktool jar to just apktool.jar and place the jar and exe in your C:\apktool\ directory
Next, get the framework-res.apk and twframework-res.apk (found in /system/framework/). Place them in your apktool directory
CD your apktool folder and type
apktool if framework-res.apk
apktool if twframework-res.apk
Place your SystemUI.apk in your apktool directory and type
apktool d SystemUI.apk
It'll decompile, complete your mods then recompile
apktool b SystemUI
The apk will be in the SystemUI\dist\
Sent from my SPH-L710 using Tapatalk 2
For me the easiest way is baksmali and smali.
For smali its easy. Just extract the classes.dex and run the decompile command. Simple. You will need java installed.
To recompile just run the recompile command and done. You get a new .dex that you pop I the apk you are editing and delete the old one. Name it the same, push the apk and done.
BTW, the command isent actually "decompile" and "recompile"
You will need a little more java experience to know what the commands are.
fergie716 said:
First, if you don't have apktool set up Google "How to set up apktool on Windows(or Linux or Mac etc)"
Once set up use this modified apktool and aapt.exe found here. Make sure you select the appropriate aapt.exe depending on you OS
http://forum.xda-developers.com/showthread.php?t=1755243
Rename that modified apktool jar to just apktool.jar and place the jar and exe in your C:\apktool\ directory
Next, get the framework-res.apk and twframework-res.apk (found in /system/framework/). Place them in your apktool directory
CD your apktool folder and type
apktool if framework-res.apk
apktool if twframework-res.apk
Place your SystemUI.apk in your apktool directory and type
apktool d SystemUI.apk
It'll decompile, complete your mods then recompile
apktool b SystemUI
The apk will be in the SystemUI\dist\
Sent from my SPH-L710 using Tapatalk 2
Click to expand...
Click to collapse
+1
...and don't forget to use 7-zip and grab the META-INF & androidmanifest
XML files, then put them in build/apk and run recompile command again.
"apktool b SystemUI"
Ok I have tried both methods listed above. Maybe I am not understanding something about each way. What I am doing is using root explorer to copy the SystemUI.apk from system/app and the framework-res.apk from system/framework/
When I use apktook, it decompiles but I dont find any smali code i there. I get a list of 2 folders and 2 files (assets, res, androidmanifest, apktool.yml) there are subfolders but still no luck finding smali code in there.
I tried the smali/baksmali method but i cant seem to find any classes.dex (as I understand it, its located in the SystemUI.apk). Am I looking in the wrong place. I used 7zip to view the SystemUIapk, it shows the same folders I mentioned above minus the apktool.yml and additionally a meta-inf folder and resources.arsc.
Am I looking at the wrong place? It is the stock rom. There is a file systemui.odex should I be doing something with that instead?
The editing that I am trying to do is mentioned here in case it helps. http://forum.xda-developers.com/showthread.php?t=1848611
Thanks
deepsix_69 said:
Ok I have tried both methods listed above. Maybe I am not understanding something about each way. What I am doing is using root explorer to copy the SystemUI.apk from system/app and the framework-res.apk from system/framework/
When I use apktook, it decompiles but I dont find any smali code i there. I get a list of 2 folders and 2 files (assets, res, androidmanifest, apktool.yml) there are subfolders but still no luck finding smali code in there.
I tried the smali/baksmali method but i cant seem to find any classes.dex (as I understand it, its located in the SystemUI.apk). Am I looking in the wrong place. I used 7zip to view the SystemUIapk, it shows the same folders I mentioned above minus the apktool.yml and additionally a meta-inf folder and resources.arsc.
Am I looking at the wrong place? It is the stock rom. There is a file systemui.odex should I be doing something with that instead?
The editing that I am trying to do is mentioned here in case it helps. http://forum.xda-developers.com/showthread.php?t=1848611
Thanks
Click to expand...
Click to collapse
Deodex first then use the apk.
I installed a deodexed version of the stock rom, and then used the apktool directions above. They appear to have worked.
Thanks for the help.
hey guys i want to edit twstatusbar.xml with notepad++ but every time I open the file i just get this weird wording or lettering is something wrong?
Note this also happens with other xml files too!
here is a screenshot:
View attachment 2792773
JT1510365 said:
hey guys i want to edit twstatusbar.xml with notepad++ but every time I open the file i just get this weird wording or lettering is something wrong?
Note this also happens with other xml files too!
here is a screenshot:
View attachment 2792773
Click to expand...
Click to collapse
You have to de-compile the apk first, then you can edit it in plain text; then you must re-compile the apk.
gr8nole said:
You have to de-compile the apk first, then you can edit it in plain text; then you must re-compile the apk.
Click to expand...
Click to collapse
okay i have been having trouble at getting apktool setup on my computer. i have looked at all the guides but still can't get it to work!
would you be so kind as to help me set it up on my computer via this messaging way?
also I want to edit .9 pngs and how would i do that properly?
apktool
also do i need the java sdk for apktool because everytime I download from the java website and try to install it it says that its not a valid file
JT1510365 said:
okay i have been having trouble at getting apktool setup on my computer. i have looked at all the guides but still can't get it to work!
would you be so kind as to help me set it up on my computer via this messaging way?
also I want to edit .9 pngs and how would i do that properly?
Click to expand...
Click to collapse
JT1510365 said:
also do i need the java sdk for apktool because everytime I download from the java website and try to install it it says that its not a valid file
Click to expand...
Click to collapse
Any of the toolkits for de-compiling apks should work fine. I still use a very old one (APK Manager 5.0.2). I just update the apktool, baksmali, and smali jar files when an updated version is released.
You will need java installed, but I don't think you need the entire sdk.
As for editing .9 pngs...you have to make sure that you don't change the 1 pixel border around the outer edge of the image.
now what
gr8nole said:
Any of the toolkits for de-compiling apks should work fine. I still use a very old one (APK Manager 5.0.2). I just update the apktool, baksmali, and smali jar files when an updated version is released.
You will need java installed, but I don't think you need the entire sdk.
As for editing .9 pngs...you have to make sure that you don't change the 1 pixel border around the outer edge of the image.
Click to expand...
Click to collapse
okay where do i go to download the tool and those files like backsmali?
Also I heard you can't decompile systemui.apk unless you put your devices framework-res.apk in the apktool folder, where would that go?
thanks for your help!
JT1510365 said:
okay where do i go to download the tool and those files like backsmali?
Also I heard you can't decompile systemui.apk unless you put your devices framework-res.apk in the apktool folder, where would that go?
thanks for your help!
Click to expand...
Click to collapse
Give this a try...it should work http://forum.xda-developers.com/showthread.php?t=2536073
latest Smali and baksmali here https://bitbucket.org/JesusFreke/smali/downloads
gr8nole said:
Give this a try...it should work http://forum.xda-developers.com/showthread.php?t=2536073
latest Smali and baksmali here https://bitbucket.org/JesusFreke/smali/downloads
Click to expand...
Click to collapse
I downloaded the tool and when i tried to open the tool it just crashed