Decompiling framework-res.apk? - Xoom Q&A, Help & Troubleshooting

I am trying to decompile the framework-res.apk file with APK Manager. But it's not working. When I did this with the DX, I had to use a dependee apk file (moto-res.apk) to be able to decompile without error but I can't seem to find the write file to use. Does anyone know if there is a dependee file or should I just be able to decompile it? Don't know if the Apk Manager 4.9 will actually work but I am trying to figure it out. Any help would be great.

Couldnt you just rename the .apk extension to .zip unzip it then edit it rezip then sign it to install. Or you could use 7zip if ur on windows to get into the .apk without renaming to .zip and messing around with signing etc.

Will this actually work for a framework-res.apk file?

qubit76 said:
Couldnt you just rename the .apk extension to .zip unzip it then edit it rezip then sign it to install. Or you could use 7zip if ur on windows to get into the .apk without renaming to .zip and messing around with signing etc.
Click to expand...
Click to collapse
This won't work because this way you don't get the Value folders that I need to access. It has to be decompiled to get access to those.

That's the million dollar question. You will not be able to deodex or decompile until hc source is released. Otherwise we'd all have deodexed zip aligned pngopt roms.

bigrushdog said:
That's the million dollar question. You will not be able to deodex or decompile until hc source is released. Otherwise we'd all have deodexed zip aligned pngopt roms.
Click to expand...
Click to collapse
I have done all of these (plus recompiling/odexing). The tools are out there, but they are not 100%. I have had to fix several resources manually before being able to repackage them. I only use apktool/baksmali/smali though so I don't know about the various front-ends like APKManager

sangreal06 said:
I have done all of these (plus recompiling/odexing). The tools are out there, but they are not 100%. I have had to fix several resources manually before being able to repackage them. I only use apktool/baksmali/smali though so I don't know about the various front-ends like APKManager
Click to expand...
Click to collapse
Smali/baksmali needs to be updated to support honeycomb
They cannot be updated until hc source is released.

bigrushdog said:
Smali/baksmali needs to be updated to support honeycomb
They cannot be updated until hc source is released.
Click to expand...
Click to collapse
As I mentioned, these tools have already been fixed (to some degree):
C:\anddev>java -jar baksmali.jar -d c:\anddev\xoomdump\framework\ -x Music2.odex -o Music_deodex
C:\anddev>java -jar smali.jar Music_deodex -o Music.dex
C:\anddev>apktool d -f framework-res.apk framework-res-hc-test
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\anddev>apktool b framework-res-hc-test framework-res-hc-test.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building apk file...
C:\anddev>
Click to expand...
Click to collapse
They do not work perfectly. What is not shown in the log is several manual fixes to the files. They work quite well though. Here is a screenshot to show the streaming music manager after enabling (broken) streaming in Music2.odex and recompiling + reodexing:
{
"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"
}
I also have a thread demonstrating framework-res changes: http://forum.xda-developers.com/showthread.php?t=1015857
I've made a few posts about this but nobody seemed to care too much.
Note: The author of baksmali does not recommend recompiling apps deodexed using this version

sangreal06 said:
As I mentioned, these tools have already been fixed (to some degree):
They do not work perfectly. What is not shown in the log is several manual fixes to the files. They work quite well though. Here is a screenshot to show the streaming music manager after enabling (broken) streaming in Music2.odex and recompiling + reodexing:
I also have a thread demonstrating framework-res changes: http://forum.xda-developers.com/showthread.php?t=1015857
I've made a few posts about this but nobody seemed to care too much.
Note: The author of baksmali does not recommend recompiling apps deodexed using this version
Click to expand...
Click to collapse
Yeah I saw your posted from your other thread but I'm not that edumicated to use that tool you mentioned. That is why I was trying to use the APK Manager.

I don't use APK Manager, so I don't know about that. I believe it is a wrapper around apktool though, so you should be able to just replace apktool.jar in the APK Manager folder

Maybe a really dumb question, but did you copy the framework-res.apk as 1.apk to the apktool folder?

dimitri407 said:
I am trying to decompile the framework-res.apk file with APK Manager. But it's not working. When I did this with the DX, I had to use a dependee apk file (moto-res.apk) to be able to decompile without error but I can't seem to find the write file to use. Does anyone know if there is a dependee file or should I just be able to decompile it? Don't know if the Apk Manager 4.9 will actually work but I am trying to figure it out. Any help would be great.
Click to expand...
Click to collapse
I would learn to use hxd. Hex editer
Sent from my ADR6300 using XDA Premium App

jim_panse said:
Maybe a really dumb question, but did you copy the framework-res.apk as 1.apk to the apktool folder?
Click to expand...
Click to collapse
I am still learning this stuff but why would I rename it to 1.apk?

sangreal06 said:
I have done all of these (plus recompiling/odexing). The tools are out there, but they are not 100%. I have had to fix several resources manually before being able to repackage them. I only use apktool/baksmali/smali though so I don't know about the various front-ends like APKManager
Click to expand...
Click to collapse
Care to share your updated tools? I would like to fix uastring in the wifi version of Xoom. I've got to:
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01030065 style/TextAppearance.StatusBar.Title, config=[DEFAULT]
I think I need to update apktools.jar, but if you have it done that would save me some time.
Thanks,
Jeff

I can't find the updated version of Smali/Baksmali. Got a link?

Related

[Q] Recompiling framework-res.apk problem

Hello,
Was following http://forum.xda-developers.com/showthread.php?t=1109962&page=8# to try and get SIP support on an SG SII running 4.0.3 LPQ [Polish] build.
I had to use another method to decompile and recompile my framework-res.apk due to a bug in apktool. That works well and it recompiles. I followed the instructions in the thread above to the letter, including removing info from the keep folder and eventually get a signed APK.
I copy the APK to my device, restart and suddenly I get loads of force close errors before it eventually restarts. This loops. At the moment I'm copying it in via ES File Explorer or manual 'cp' command in Terminal Emulator.
Please can anyone give some insight into what I'm doing wrong?
Thanks
I don't know what the cause is actually, but here is how I edit framework-res.apk.
If i want to make changes to the code, I extract classes.dex from the package and decompile it with baksmali
"java -jar baksmali-1.3.2.jar -o dexout/ classes.dex "
then i make the changes to the code and i recompile it
"java -Xmx512M -jar smali-1.3.2.jar dexout/"
Then i rename the out.dex file to classes.dex and add it to the framework-res.apk package
And if you need to add/change images just drag n drop the files inside the apk
Hope that helps you
very very sorry wrong post
Try pushing the apk to your phone in recovery mode, with the system partition mounted. Changing framework-res.apk while the phone's running can cause all kinds of odd bugs.
Sent from my U20i using xda premium
Have you updated your SDK tools? I thought that with rev.17 they fixed the bugs with re-compiling. If not, the easiest way I fixed it was to de-compile, then search and open all the plurals.xml files in notepad++, then at the end of almost all the files there will be a line of code that has two(2) %'s in the same line. That's what kicks up the error. all you have to do is add a second % to the last one. Using notepad++ makes this really easy, just use find and replace: FIND- %d</item> REPLACE- %%d</item>
{
"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"
}
To this:
Then I re-compile. I then go to framework-res/build/apk/ and pull out the resources.arsc and any other files I edit(res\values\bools.xml, in your case) and copy them back into the original framework-res.apk, that way I don't have to mess with any signatures or anything else. reboot to recovery, mount system, adb push framework-res.apk, adb reboot.
p.s. This is the only way I have been able to edit, build, and flash framework-res.apk in ICS without problems like fc's and other things. I hope this helps a little bit. and all I use is
Code:
apktool d framework-res.apk
and
Code:
apktool b framework-res newframework.apk
but with this method it always works.
Interesting. I'll bear that in mind but I wouldn't have thought that would cause any bugs. The syntax is technically correct, it's just a little odd.
Sometimes this code makes no sense..lol
Sent from my U20i using xda premium
Ticklefish said:
Interesting. I'll bear that in mind but I wouldn't have thought that would cause any bugs. The syntax is technically correct, it's just a little odd.
Sometimes this code makes no sense..lol
Sent from my U20i using xda premium
Click to expand...
Click to collapse
Yeah a guess it was a "feature" they add in aapt for ICS, but like I said I think they fixed it in rev 17, but I haven't confirmed this yet.
Sent from my Ice Creamed 3D
Ah, that could be right. I'm not on ICS yet. Guess I need to pay more attention when I do!
Sent from my U20i using xda premium

Deodex help!!! [DEV HELP}

Hello fellow devs out there, I'm new to learning these stuff... so i want to deodex my JB rom DDBLI1 using xUltimate, but when i deodex my system/app it shows error
Starting AllshareMediaServer.odex
*****************************************
* Deodexing... *
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find int
erface Landroid/widget/AdapterView$OnItemClickListener;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInte
rfaces(ClassPath.java:865)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:
690)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280
)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:16
3)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.j
ava:131)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:111)
at org.jf.baksmali.main.main(main.java:293)
Error while loading class Landroid/accounts/ChooseAccountActivity$1; from file .
\origi_frame\framework.zip
Error while loading ClassPath class Landroid/accounts/ChooseAccountActivity$1;
what is boot class path files?? How can i fix this? thanks!
Some apks utilize class files from other odex files from other apks. So it is looking for a class file , speficically " Landroid/widget/AdapterView$OnItemClickListener".
Have you ever tried to deodex an apk manually? I've only used Xultimate once, I've always deodexed manually but I'm old school. It's looking for this specific dependancy file which is not contained in AllshareMediaServer.apk. This file most likely needs to be deodexed manually. I do not have my Gtab2 here with me so I can't do a system pull to further look into it.
edit: I just read you're not doing this to the stock ICS rom. Let me d/l this JB rom and I'll see if I can deodex this apk myself.
tucstwo said:
Some apks utilize class files from other odex files from other apks. So it is looking for a class file , speficically " Landroid/widget/AdapterView$OnItemClickListener".
Have you ever tried to deodex an apk manually? I've only used Xultimate once, I've always deodexed manually but I'm old school. It's looking for this specific dependancy file which is not contained in AllshareMediaServer.apk. This file most likely needs to be deodexed manually. I do not have my Gtab2 here with me so I can't do a system pull to further look into it.
edit: I just read you're not doing this to the stock ICS rom. Let me d/l this JB rom and I'll see if I can deodex this apk myself.
Click to expand...
Click to collapse
Thank you for willing to help i havent try doing it manually bcoz i am not familiar with the cmd command for java smali/baksmali...
stephen2282 said:
Hello fellow devs out there, I'm new to learning these stuff... so i want to deodex my JB rom DDBLI1 using xUltimate, but when i deodex my system/app it shows error
Click to expand...
Click to collapse
Ok, so I d/l that JB rom and there is no /system/app/ or /system/framework/ called "allsharemediaserver.apk" Is this an apk from the OTA or from the "base rom" you're suppose to flash first?
nevermind, I found it in the patch files
---------- Post added at 10:12 AM ---------- Previous post was at 10:08 AM ----------
yeah, I can't do this with .p files. Do you already have this rom flashed onto your tab? you went through the process of flashing the base system and then flashing the unofficial ota? If so, the only way I can do this is if you provide me with a pull of your system and framework folders. Do you know how to do that?
tucstwo said:
Ok, so I d/l that JB rom and there is no /system/app/ or /system/framework/ called "allsharemediaserver.apk" Is this an apk from the OTA or from the "base rom" you're suppose to flash first?
nevermind, I found it in the patch files
---------- Post added at 10:12 AM ---------- Previous post was at 10:08 AM ----------
yeah, I can't do this with .p files. Do you already have this rom flashed onto your tab? you went through the process of flashing the base system and then flashing the unofficial ota? If so, the only way I can do this is if you provide me with a pull of your system and framework folders. Do you know how to do that?
Click to expand...
Click to collapse
I am deodexing my base rom apps... I pull all of them to my comp already... I will try uploading 2 apps n odex
If i were to do it manually myself, what would the command be? Oo
EDIT : I could not upload the files... said missing security token... i will try Dropbox..
https://www.dropbox.com/s/tqju2e118j7cf9v/origi_app.zip
stephen2282 said:
I am deodexing my base rom apps... I pull all of them to my comp already... I will try uploading 2 apps n odex
If i were to do it manually myself, what would the command be? Oo
EDIT : I could not upload the files... said missing security token... i will try Dropbox..
https://www.dropbox.com/s/tqju2e118j7cf9v/origi_app.zip
Click to expand...
Click to collapse
No see, this won't help me. The reason you're having trouble deodexing these 2 files is because they are looking for dependency files from ANOTHER apk or jar within your system or framework folders. In order for me to deodex these apks I need an entire pull of your /system/app/ and /system/framework folders.
Do you know how to pull folders from your device with ADB? Do you have ADB? If you understand what I'm saying. Plug your device in and pull the system/app and system/ framework folders. Zip them up and put them in drop box. Then I can deodex the files you're having problems with, or at least try. If you can't do this, you might be in over your head already, with all due respect.
tucstwo said:
No see, this won't help me. The reason you're having trouble deodexing these 2 files is because they are looking for dependency files from ANOTHER apk or jar within your system or framework folders. In order for me to deodex these apks I need an entire pull of your /system/app/ and /system/framework folders.
Do you know how to pull folders from your device with ADB? Do you have ADB? If you understand what I'm saying. Plug your device in and pull the system/app and system/ framework folders. Zip them up and put them in drop box. Then I can deodex the files you're having problems with, or at least try. If you can't do this, you might be in over your head already, with all due respect.
Click to expand...
Click to collapse
I have pulled all framework n apk to my comp... Will upload it when im home. Thanks
edit : do u need the init.rc i found out u might need that file to find the bootclasspath?
edit 2 : Im unable to upload the zip due to my poor home wifi =(
Xultimate bootclasspath error
Hi there , Recently I tried to dedoex using XUltimate my JB ROM. Got the same issue .. Solved Via these methods ..hope they work for you,, if the do.. do inform
Download JAVA SDK ( JDK) not JRE! http://www.oracle.com/technetwork/java/javase/downloads/index.html
Right-click on ‘My Computer’ (or Computer for Vista) and choose ‘Properties’.
Navigate to the ‘Advanced’ tab (or for Vista/7/8, click 'Advanced System Settings’ on the left, then find the ‘Advanced’ tab)
Click ‘Environment Variables’
Under System Variables, find 'Path' and click Edit...
DO NOT ERASE OR REPLACE THE CONTENTS OF THIS. YOU ARE SIMPLY GOING TO ADD TO IT.
At the very end of the text field, add a semicolon [ ; ] and add the location of java.exe.
On my Windows 64-bit system this is in “c:\program files\java\jdk1.7.0_06\bin” . For others it might be "c:\program
files\java\jre7\bin". I seem to have java.exe in both locations but only the first one worked in xUltimate.
Then ‘Okay’ that to save the addition and come out of ‘Properties’
Next Download XUltimate 2.4.2 ( This only work with JB until where i have tried) (http://www.xeudoxus.com/android/xUltimate-v2.4.2.zip)
Copy it C:\
Replace the smali and baksmali file from the jar folder with those given below
Disable your antivirus
Run the Main.exe as Admin
Start from scratch .. It should work
HIT THANKS IF THIS HELPS
Signature
{
"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"
}
[/COLOR][/COLOR][/COLOR][/COLOR]

[TUT]Decompile and compile apk and jar files

In this tutorial i will show you how to decompile and compile apk and jar files with apktool and apk multitool
Apk multi tool
It is easy to use than apk tool and i prefer to use it
- Download apk multitool.zip from here
- Extract apkmultitool.zip to somewhere in a single folder
- Place the apk you want to decompile inside files folder
open AndroidMultitool.exe which inside apkmultitool folder
{
"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"
}
Now click on select file under decompiling menu and open the file you want to decompile from files folder
now click decompile
After decompiling it will show like this
You will find the decompiled file in decompiled apk folder if its a apk and in decompiled jar if its a jar file, now show your modding skills in xml, smali files and pngs
After you complete modding lets recompile it. to recompile select the open file option below recompile menu and open the folder
click compile
the compiled apk will be in compiled_apk folder and jar file in compiled_jar folder. Now most important thing, if you are editing any file inside system the file will work without signing it, if it is in data partition you have to sign it. sign it using the signing option
​
Using Apk Tool
Apk tool
To use apk tool you need these 3 files
download this zip
extract the zip file to a single folder
search cmd.exe in c and copy it to that folder
it should look like this
open cmd.exe and you should see that it navigates to folder location like this
now copy the apk or jar file that you want to decompile in that folder. Before decompiling the file you must install it so first use this command to install it, i took SystemUI.apk for this tutorial
type “apktool if SystemUI.apk” and press enter
Now time to decompile, to decompile type “apktool d SystemUI.apk” and press enter. If its successfully decompiled it should show like this and the decompiled apk will be in the same folder named SystemUI
Now time to show your modding skills after completing editing the files you can compile it again
To compile it use “apktool b SystemUI”
it may show some errors you can simply ignore it
and the build apk will be inside SystemUI/dist folder
Now you have known how to decompile and compile apk and rar files with both apk tool and apk multitool​
reserved
after recompile,, i think we have to place META-INF from original apk to modified...
jagnik said:
after recompile,, i think we have to place META-INF from original apk to modified...
Click to expand...
Click to collapse
I haven't replaced META-INF for any apks that i have modded. And for me it worked without replacing META-INF. I also read about it, i think it is required apk is not working
It seems that OP forgot to say that visual basic power tools needs to be installed in order to make this run.
If anyone bothers about "stopped working" issue, just install the needed redistributable here: http://go.microsoft.com/fwlink/?LinkID=145727&clcid=0x804

[GUIDE][COMPLETE] Apktool on Windows! (Installation,Decompile and Compile)

APK TOOL | WINDOWS
How-To Guide For Beginners​
Intro
Q- What is apk tool?
A- It is a tool for reverse engineering Android apk files. More info here.
Q- What can i do with it?
A- You can easily decompile and compile apks. For example.. if you don't like the new icon of your favorite application, you can get the older icon and replace the new icon with it. Also you can do a lots of other things like change strings.
Prerequisites
Java 7 (JRE 1.7) ( Most Windows computers have already it installed )
This guide is for everybody! So no other prerequisites
Installation​1. Create on your desktop a folder. I called it "xda". Maybe try using simple folder names, don't use names with "_" or "*" etc.
{
"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"
}
2. Save the apktool.bat file in the folder you have created. I'm gonna save it on "xda" folder. Here there is the file.
3. Now it's time to save the jar file of apktool. Find the last here and put it in your folder, remember my folder is "xda". Then go in the folder and rename apktool_2.2.0.jar into apktool.jar. At the same time move the "file.apk" into your folder. As you can see i have an "example.apk" in my "xda" folder. Now you are ready to decompile and compile apks!
Decompile an apk​1. Open the terminal. If you don't know how to do it, just write " cmd " in your windows search bar.
2. This is how terminal looks like!
3. Now get the path of your folder. If you want to do it fast look at point 3.4. If you don't know how to do it, open the folder and click on the bar. It will give you a path like " C:\Users\your name\desktop\your folder name " and copy it.
4. Now navigate into the folder you have created! Just write on terminal and send.
Code:
cd path
3.4. You can by-pass points 3 and 4: press "shift" and "right click" (with mouse) and in the menu select "open the window of command here"!
5. Write this in terminal and you will be able to start decompile and compile apks!
Code:
apktool
6. Decompiling! For decompile an apk you need to write this
Code:
apktool d nameofyourfile.apk
7. If you look in your folder you will find another folder called "nameofyourfile without.apk". Here there is the apk decompiled. Now you can mod your favorite application!
Compile an apk​Follow 1-5 steps for decompiling an apk
1. For compiling just write this on terminal
Code:
apktool b nameofthefolder
2. You can find the apk in this directory: name of your folder/name of your apk folder/dist and here you have the apk.
As you can see, i have it on xda/example/dist.
VERY IMPORTANT: YOU NEED TO SIGN THE APK BEFORE INSTALLING OR IT WILL GIVE AN ERROR.​
Use "ZipSigner" on Play Store to do it. Click here to get it.
Credits​
ibotpeaches for this awesome tool
xda for the website
Yes, ok, continue
Sent from my ALE-L21 using XDA-Developers mobile app
NeedleGames said:
Yes, ok, continue
Sent from my ALE-L21 using XDA-Developers mobile app
Click to expand...
Click to collapse
done.
gosha98_ said:
Compile an apk​Follow 1-5 steps for decompiling an apk
1. For compiling just write this on terminal
Code:
apktool b nameofthefolder
2. You can find the apk in this directory: name of your folder/name of your apk folder/dist and here you have the apk.
As you can see, i have it on xda/example/dist.
VERY IMPORTANT: YOU NEED TO SIGN THE APK BEFORE INSTALLING OR IT WILL GIVE AN ERROR.​
Use "ZipSigner" on Play Store to do it. Click here to get it.​
Click to expand...
Click to collapse
If you use the command
Code:
apktool b [B][COLOR=blue]-c[/B][/COLOR] nameofthefolder
you will NOT have to resign the apk[emoji6] (UNLESS YOU EDIT the file AndroidManifest.xml , if you edit this file, you MUST resign the apk)​
lucadalba said:
If you use the command
Code:
apktool b [B][COLOR=blue]-c[/B][/COLOR] nameofthefolder
you will NOT have to resign the apk[emoji6] (UNLESS YOU EDIT the file AndroidManifest.xml , if you edit this file, you MUST resign the apk)
Click to expand...
Click to collapse
yep, thanks Luca
do you have any information on baksmali
crashpsycho said:
do you have any information on baksmali
Click to expand...
Click to collapse
To backsmali use this command for decompiling:
Code:
apktool d [B][COLOR=blue]-r[/COLOR][/B] Appname.apk
lucadalba said:
To backsmali use this command for decompiling:
Code:
apktool d [B][COLOR=blue]-r[/COLOR][/B] Appname.apk
Click to expand...
Click to collapse
What about recompile command sorry ive had alot of trouble finding baksmali commands anywhere its like a secret club
Sent from my SM-G920T using Tapatalk
crashpsycho said:
What about recompile command sorry ive had alot of trouble finding baksmali commands anywhere its like a secret club
Sent from my SM-G920T using Tapatalk
Click to expand...
Click to collapse
Just normally recompile with
Code:
apktool b -c Appname
Thread updated!

[IDE][4.0.3] APK Studio - IDE for Reverse Engineering Android APKs

APK Studio​
A Cross-Platform IDE for Reverse-Engineering (Disassembling, Hacking & Rebuilding) Android applications (APKs) - featuring a friendly UI and Code editor which supports Syntax-highlighting for smali (dalvik bytecode) files.
APK Studio is powered by Qt Framework, ApkTool and uber-apk-signer
Click to expand...
Click to collapse
Screenshots:
{
"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"
}
​
Features:
Disassembling & Rebuilding APKs
Code Editor with Syntax Highlighting (java, smali, xml & yml)
Built-in Image viewer for Resources
Single-click APK Signing with embedded key-store (New)
Android Signing scheme v2 Support (New)
Flexible Keystore & Key-Alias import
Automatic Zip-Aligning with embedded zipalign (New)
Single-click App Install to device
Frameworks Support
What’s new?
v4.0.3
Added Browse Files under Project menu
Auto Save all opened files before building
Install button added in ToolBar
v4.0.2
Added Support for Android Signing scheme v2 (7.0+) (uber-apk-signer)
Dependency on zipalign binary removed (except for linux-x86) (uber-apk-signer)
KeyStore import made optional (APK will be signed with embedded KeyStore by default) (uber-apk-signer)
Fixed original APK being overwritten (modified apk will have ‘_mod’ in its name)
Minimum JDK 8 required (instead of JDK 7) (uber-apk-signer)
Replaced Post-Signing ‘Open folder’ button with ‘install’ button (for better automation)
Fixed and updated links, strings etc.
Optimized Portable Binaries (linux x64 and windows x86)
Bundled all Qt dependencies for better UI rendering
Links:
Project site
Download
Source
Bug Report
Credits:
vaibhavpandeyvpz for original apkstudio project
iBotPeaches, brutall and JesusFreke for ApkTool
patrickfav for uber-apk-signer
probonopd for linuxdeployqt
How To Use APK Studio​
Deassembling (Decoding):
Open an APK
and select Decode or
Open existing Project
and select apktool.yml file
Hacking the App:
Click on
to show/hide Project structure panel
Edit app_permissions etc. in AndroidManifest.xml file
Edit or replace strings, icon resources etc. in res directory
Edit application logic in smali language in smali directory
Save
before closing
the edited files
Rebuilding the APK:
Build
the modified app and Sign
it.
Then you can install
it on your device too.
Troubleshooting:
Make sure you satisfy these requirements of APK Studio.
Always check Console
output if anything goes wrong.
From that try to figure out what went wrong and how to fix it.
If nothing works, Upload Console output somewhere like Pastebin and then Open an issue here.
Great. Now downloading. Will try later.
knoacc said:
Great. Now downloading. Will try later.
Click to expand...
Click to collapse
Thanks and good luck with that. Will be happy to hear your thoughts on it.
can i reskin apk from playstore with this ?
Sent from my Redmi Note 4 using Tapatalk
tetranova said:
can i reskin apk from playstore with this ?
Click to expand...
Click to collapse
Yes. You can. It's a kind of purpose APK Studio serves well.
How to use for uber driver app.
clarkswalabis said:
How to use for uber driver app.
Click to expand...
Click to collapse
I'm not sure what you want modify in that app but the process is simple: You open the uber-driver-blah-blah.apk > decode it > edit smali code or replace resources > build > sign > install
Check out User Guide above in Post #2
Well, this is to inform you all that APK Studio has been updated recently. Grab the latest binary from GitHub.
Also, if anyone has access to MacOS and can compile APK Studio for Mac, please share it on GitHub repo. Source can be found on GitHub.
Code:
$ java -Xmx256m -jar C:/Users/aximo/.apkstudio/vendor/apktool.jar -f d C:/Users/aximo/Desktop/tjk351.apk -o C:/Users/aximo/Desktop/tjk351_mod
I: Using Apktool 2.3.1 on tjk351.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
S: WARNING: Could not write to (C:\Users\aximo\AppData\Local\apktool\framework), using C:\Users\aximo\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
I: Loading resource table from file: C:\Users\aximo\AppData\Local\Temp\1.apk
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.NullPointerException
at brut.androlib.res.decoder.AXmlResourceParser.getNonDefaultNamespaceUri(AXmlResourceParser.java:312)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeNamespace(AXmlResourceParser.java:299)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeNamespace(XmlPullParserDelegate.java:176)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:124)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:109)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:264)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:132)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
at brut.apktool.Main.cmdDecode(Main.java:163)
at brut.apktool.Main.main(Main.java:72)
Process exited with code 1
whats wrong ?
tunxaximo said:
whats wrong ?
Click to expand...
Click to collapse
This is apktool related issue and I've no idea why it's failing to decode particular XML. Please open an issue in apktool thread with above logs.
Sorry I have some question:
How to install at windows 10?
can this open on android studio?
if can how to open it?
zeroyjk said:
Sorry I have some question:
How to install at windows 10?
can this open on android studio?
if can how to open it?
Click to expand...
Click to collapse
Questions are fine
First, you don't need to install APK Studio because it's portable, just follow download link, download apkstudio-v4.x.x-windows_x86.zip file and extract it. You can then simply run apk-studio.exe .
No. It can't be opened in android studio, it's a standalone app.
hi
first i want to say thx for this great tool!
i have a request for maybe next release, could you pls add a project tree in the view section, cause if i have 2-3 projects, i can only see the last one and im not able to choose other projects!!!
thx
this would be amazing for OSX, I have followed instruction to build but to be honest its above me!
Really like APK Studio for quick changes.
Having issue with a simple change in a java file (changing variable from false to true). No errors are reported in APK Studio console - apk builds and installs correctly, however, when looking at the java code after build, the variable doesn't change. It seems that the APK Studio build process is not recompiling the modified java code.
Is there a build setting required to recompile the apk (including the modified java code)?
Any assistance would be appreciated.
------------
How does one go about setting up the "signing" portion in the settings?
How do you set up the keystore, keystore password, alias, and alias password?
Also, should zipalign be checked?

Categories

Resources