IMPORTANT - APK extraction is needed only when you are going to edit or replace png's for theming. If you want edit xml's, you need to decompile the apk instead of extracting it.
If you want to decompile an apk, read this tutorial - http://forum.xda-developers.com/showthread.php?t=1664292
1) Download apkmanager ( http://apkmultitool.com/downloads/Apk_Manager_5.0.2.zip ) and install it
2) Put the apk you want to decompile in 'place-apk-here-for-modding' folder.
3) Double click on 'script'
4) Ignore the 'adb not found' command and press enter
5) Type 22 i.e. 'set current project' and press enter.
6) Type 1 and press enter
7) Type 1 again and press enter to extract
8) Wait until the extraction finishes.
9) Minimize command line and go to projects -> filename.apk -> change/edit the required png's
Warning - Do not edit 9.pngs or replace them just like that. They are not normal png's. For mor info on how to edit 9.png's, follow music.soul's tutorial - http://forum.xda-developers.com/showthread.php?t=1559154
10) Switch back to command-line, type 3 and press enter.
11) If it is a system app's apk, type 1 and press enter. If it is a normal apk, type 2 and press enter.
12) Wait until the command-line comes back to its initial look.
13) Go to 'place-apk-here-for-modding' folder, your new file will be unsignedfilename.apk
14) Copy the file to SD card, rename it and remove 'unsigned' from file's name.
15) Push the file to original folder using root explorer and set proper permissions.
EG - If you modded framework-res.apk, push your new file to /system folder. Set permissions to rw-r--r-- and then move the file to /system/framework folder.
PS - Make a nandroid backup before doing this if you modded framework. Backup the original app's apk in case something goes wrong
Sent from my GT-S5830 using Tapatalk 2
Excellent guide
evil_penguin said:
Excellent guide
Click to expand...
Click to collapse
Thanks
Sent from my GT-S5830 using Tapatalk 2
APK manager is the only thing I need? Or do I also need Java SDK and Android SDK. For theming only.
Thanks dude! now I will start to mod my stock LUBKPL rom to my personal preferences and if it goes fine I will share my mods. Now in Mexico there are president elections and I work for one of the 4 countenders so I will star my mods before July 5 here are a LOOOOOTTTT of work rite now!
kevin03 said:
APK manager is the only thing I need? Or do I also need Java SDK and Android SDK. For theming only.
Click to expand...
Click to collapse
You only need apkmanager and a good image editing software like photoshop.
Sent from my GT-S5830 using Tapatalk 2
How about unpacking and repacking roms? How do I do that?
Woho. One more awesome guide. Thanks dev
Sent from my GT-S5830 using xda premium
Both the guides are very clear and detailed, I think they are eligible enough to be featured on XDA news. What say guys? How can I submit his threads for XDA news?
Sent from my GT-S5830 using xda premium
kevin03
7zip.It's easly
Rishris said:
Both the guides are very clear and detailed, I think they are eligible enough to be featured on XDA news. What say guys? How can I submit his threads for XDA news?
Sent from my GT-S5830 using xda premium
Click to expand...
Click to collapse
Lol, that's too much. I did not write the guides to get featured on XDA news. I just wrote them to help newbies. And I dont think they consider such normal stuff for XDA news. Thanks for the appreciation anyway
Sent from my GT-S5830 using Tapatalk 2
So I got the apk manger from the link you posted and followed all directions, but when I get to the step where I decompile the apk, i get an error.
I've attached a picture maybe this will help.
what im trying to decompile is a MMS.apk from my nexus.
thanks in advance and sorry for reviving an old thread.
Related
I decompiled an apk and made some changes to the xml files in it but I'm having issues compiling it again. I've used apktool and apk manager to try to do it and I get what looks like an apk but I can't get it to show up when I push it to my emulator. Am I missing something here? Any help would be appreciated, I'm new to android programming.
You're pushing it to /system/app/ I assume?
illogic6 said:
You're pushing it to /system/app/ I assume?
Click to expand...
Click to collapse
You assume correctly. I just don't think the apk is being compiled correctly. I see it in the /system/app folder on the emulator but that's as close as it gets for me.
Don't make it harder than it has to be, forget signing the apk and using that method. Simply open the apk your editing with winrar highlight the res folder, press delete, then copy over the res folder with the edited xmls. Hit okay, and push to /system/app, that's what i do. The other method is just to complicated and time consuming.
Sent from my SPH-D700 using XDA App
bubby323 said:
Don't make it harder than it has to be, forget signing the apk and using that method. Simply open the apk your editing with winrar highlight the res folder, press delete, then copy over the res folder with the edited xmls. Hit okay, and push to /system/app, that's what i do. The other method is just to complicated and time consuming.
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Ill give that a try when I get home. It has been time consuming... thanks bubby, I love your rom
Ok, I tried bubby's method, and it show up now in the emulator but I'm getting FC. I was wondering if not transferring the xml back to binary could be the cause? I've seen lots of articles on how to translate the binary xml to human-readable xml but I can't find anything on transferring it back to binary.
Hey guys I need a bit of help..... I was trying to edit the drawables on my gf 's Eris in the framework-res.apk and when I recompiled the Rom and tried to flash my changes recovery tells me that the update script couldn't be verified due to framework-res.apk and aborts the installation.... what am I doing wrong? Do I need to sign this apk or something to make it work correctly? I did this on my Droid incredible the other day with no problem. I know there was another thread on this further down in Dec but unfortunately it didn't give me the answers I need...
Sent from my ADR6300 using XDA App
elixir911911 said:
Hey guys I need a bit of help..... I was trying to edit the drawables on my gf 's Eris in the framework-res.apk and when I recompiled the Rom and tried to flash my changes recovery tells me that the update script couldn't be verified due to framework-res.apk and aborts the installation.... what am I doing wrong? Do I need to sign this apk or something to make it work correctly? I did this on my Droid incredible the other day with no problem. I know there was another thread on this further down in Dec but unfortunately it didn't give me the answers I need...
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
I assume from reading your post that you updated the framework png's inside a Rom Zip package... You don't need to sign the framework, but you do have to resign the Rom Zip file. Try re-signing the rom file, that should get it working...
Macrodroid said:
I assume from reading your post that you updated the framework png's inside a Rom Zip package... You don't need to sign the framework, but you do have to resign the Rom Zip file. Try re-signing the rom file, that should get it working...
Click to expand...
Click to collapse
Any input on how to sign Rom files? I've never signed anything before
elixir911911 said:
Any input on how to sign Rom files? I've never signed anything before
Click to expand...
Click to collapse
You can sign it using gnarlycs kitchen.
Edit: another thing you could have done is just pushed your modded frameworkres to its folder and rebooted the phone.
Sent from my Incredible using Tapatalk
elixir911911 said:
Any input on how to sign Rom files? I've never signed anything before
Click to expand...
Click to collapse
find zip signer i believe its called u can use that
tazzpatriot said:
find zip signer i believe its called u can use that
Click to expand...
Click to collapse
Sterricson Zip Signer, or get SignApkTool from the market and sign it on your phone... Just make sure you use the test-keys for the rom file...
I used zip signer from the market.... is there anyway I can use this to sign apk 's like HTC messaging and HTC IME so that I can edit drawables in those apps?
Sent from my ADR6300 using XDA App
elixir911911 said:
I used zip signer from the market.... is there anyway I can use this to sign apk 's like HTC messaging and HTC IME so that I can edit drawables in those apps?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Y don't u just download the kitchen so u can do it easier and do a bunch together...I think someone said this already I forget lol I need to look haha
Well I know how to sign sips I just want to know if I can sign apps like HTC messaging so they'll install on my device.... if I unzip and rezip afile it won't install on my device... will signing it fix this?
Sent from my ADR6300 using XDA App
i could never get that **** to recompile correctly. i gave up.
I use apk manager to decompile, compile, and sign apks. Unless I'm adding pngs I'm which case I use apktool. If your just editing or replacing what already exists apk manager is the easiest way in my opinion.
Sent from my ERIS using XDA App
elixir911911 said:
Well I know how to sign sips I just want to know if I can sign apps like HTC messaging so they'll install on my device.... if I unzip and rezip afile it won't install on my device... will signing it fix this?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Those won't install...you need to push them to system/app and reboot. No need to sign them unless you resign a whole rom.zip
Conap said:
Those won't install...you need to push them to system/app and reboot. No need to sign them unless you resign a whole rom.zip
Click to expand...
Click to collapse
That's right.. thanks for adding that Conap. Also I was re-reading and just wanted to add as well that you don't want to unzip an apk to modify it and then zip it.. Use one of the other tools mentioned.. apktool or apkmanager
CondemnedSoul said:
That's right.. thanks for adding that Conap. Also I was re-reading and just wanted to add as well that you don't want to unzip an apk to modify it and then zip it.. Use one of the other tools mentioned.. apktool or apkmanager
Click to expand...
Click to collapse
Also for pc 7zip works good also. Just right click the file 7zip open archive drop your png where you want it. Close the apk and push it to system/app or where ever it came from.
If your on ubuntu just click your apk and drop your pngs. You don't even need an apk tool.
dinc¦rockin' the stock root
wildstang83 said:
Also for pc 7zip works good also. Just right click the file 7zip open archive drop your png where you want it. Close the apk and push it to system/app or where ever it came from.
If your on ubuntu just click your apk and drop your pngs. You don't even need an apk tool.
dinc¦rockin' the stock root
Click to expand...
Click to collapse
That does work as well but doing it that way you will need to optimize the .9's if you change them also. xultimate works great for that.
CondemnedSoul said:
That does work as well but doing it that way you will need to optimize the .9's if you change them also. xultimate works great for that.
Click to expand...
Click to collapse
Oh cool. I never really optimized any of them. What does that do?
dinc¦rockin' the stock root
ok big time mess up...I downloaded apk manager....I used the command prompt to adb pull Browser.apk. I put this in the modding folder and used the script.bat file to extract the apk....I edited my files annd hit re zip apk and chose the option to retain signature for system apps. Then when I adb push back it seems to work fine but when I reboot browser doesnt show up in my app list!!!!! help please!!! where did I mess up? I even tried to zip align to see if that would fix it.....If I try to use coommand prompt to adb push the original browser.apk back into place it says error read only file system.....I'm locked out! ah!
elixir911911 said:
ok big time mess up...I downloaded apk manager....I used the command prompt to adb pull Browser.apk. I put this in the modding folder and used the script.bat file to extract the apk....I edited my files annd hit re zip apk and chose the option to retain signature for system apps. Then when I adb push back it seems to work fine but when I reboot browser doesnt show up in my app list!!!!! help please!!! where did I mess up? I even tried to zip align to see if that would fix it.....If I try to use coommand prompt to adb push the original browser.apk back into place it says error read only file system.....I'm locked out! ah!
Click to expand...
Click to collapse
To push the original browser, /system needs to be mounted as r/w which can be done with the command "adb remount"
As for the problem with the modded browser not showing up, try this:
Code:
adb shell chmod 644 /system/app/Browser.apk
adb shell chown 0:0 /system/app/Browser.apk
#now reboot into recovery, wipe cache and dalvik-cache, and reboot
the string you typed for the modded browser....i type that into a normal command prompt not into apk manager correct? I tried to put my normal browser back with adb remount and it still doesnt show in my app list but if i look with a file explorer the apk is in the right place....why wont it show up?
OK i actually pushed my old browser successfully and it wouldnt show in my app list....I then followed your instructions and did adb shell chmod and chown and reboot wipe dalvik and cache and it still wouldnt show up. I really dont wanna have to flash a recovery image....
edit: If it has any importance this is actually on a droid incredible i was testing for my gf's eris. So idk if it changes anything that this is actually an inc.
【Mod 2】【GB】 Remove "Software Update" (ATT) from settings.apk
here is how to remove "Software Update" from Settings.apk found in gingerbread, Att builds.
decompile settings.apk
edit xml settings.apk\res\xml\settings.xml
delete last 3 lines (not including very last line)
Code:
<com.android.settings.IconPreferenceScreen android:title="@string/software_update" android:key="software_update" settings:icon="@drawable/ic_settings_softupdate">
<intent android:action="android.intent.action.SOFTWARE_UPDATE_SETTING" />
</com.android.settings.IconPreferenceScreen>
recompile
I used apk manager
copy file to 'projects' folder
run bat script
option 10
find framework-res.apk from same build and drag to 'apk manager' cmd window
press enter
edit xml
recompile option 11
y for system app
y for add files
dont need to delete any
press enter
output file will be in 'project' folder 'unsigned######.apk'
here is KK4 already done.
also has Mobile hotspot warning message fixed.
copy to system/app
reboot to recovery
wipe cache and delvik
reboot
Who is the ass that rated this 1 star?
I rated 5 just to bump back up to 3.
see the other settings mod: [Mod][GB] Remove ATT tethering warning message
(aka bump... 1/4 the page veiws)
I rated 5 stars to help out. This isn't really helpful for me since I am running CM7 but it is one of the few threads I saw where someone explains in detail how to improve other builds so it can be used by other DEVs.
I just used titanium backup pro to remove it
Sent from my SGH-I897 using XDA Premium App
RichMD said:
I rated 5 stars to help out. This isn't really helpful for me since I am running CM7 but it is one of the few threads I saw where someone explains in detail how to improve other builds so it can be used by other DEVs.
Click to expand...
Click to collapse
Agreed. It would be really nice to see more of these type of posts in the dev section.
justin860 said:
I just used titanium backup pro to remove it
Sent from my SGH-I897 using XDA Premium App
Click to expand...
Click to collapse
use tibu to remove what? try to make sense
tibu cant remove words.
TRusselo said:
Who is the ass that rated this 1 star?
Click to expand...
Click to collapse
this is the usual welcome arent you use to it by now ?
Nice work on this. I, as I'm sure others, appreciate this stuff.
.......................
ICS Framework-res.apk does not like to be decompiled and recompiled by APK tool.
The work around is to use 2 different versions of APK tool and keep swapping files for decompile and recompile.
I have put this in a handy little batch file package to manage all this. It really is basic stuff, but hopefully for those who are not quite sure, it will ease the pain a little.
Please feel free to test it. Enjoy:
This is an updated script to modify ICS *.apk using APK tool.
I take no credit for Apk tool or the process.
I have simply automated it for Windows as there are issues with ICS framework-res modification
Pre -requisites
1. WinRar
2. Java
Click to expand...
Click to collapse
Initial setup
1. Extract the apk folder from the .zip to the root of C:\
The structure should then look like c:\apk\ACTIONS
2. Go into c:\apk\ACTIONS\Install_files
3. Double click "Setup_Install.bat"
Click to expand...
Click to collapse
Usage
Simply double click START.bat and follow the instructions
Click to expand...
Click to collapse
Limitations
Can decompile any one .apk with any name at a time. Do not put any .apk files into the "in" folder until prompted to.
Click to expand...
Click to collapse
Thanks to Rob222 for confirming the method.
Updated the OP. Now can decompile / recompile any name .apk
Simple script. Double Click start and follow prompts.
hi!
got this problem
Ficheiro não encontrado
1 ficheiro(s) copiado(s).
Error: Unable to access jarfile C:\Windows\System32\\apktool.jar
Click to expand...
Click to collapse
any hint ?
i already made the java paths .. tryed java6 and java7
but always that error
ruizit0 said:
hi!
got this problem
any hint ?
i already made the java paths .. tryed java6 and java7
but always that error
Click to expand...
Click to collapse
What command did you run when you did that?
Did you run the setup file first?
You will need to be an administrator. Are you? If so try right click on the start script > Run as administrator
Just realised I somehow had left part of the usage instructions for the old version in the post by mistake. That maybe why some of you have issues.
Nice one bro... that was surely something that many have tried.. nice work..
Sent from my GT-I9300 using Tapatalk 2
Did not work
I set up the script as per the OP but I get the error attached
Think I need this. Getting errors trying to build apks.
Sent from my GT-I9300 using xda premium
Phone_Guru said:
I set up the script as per the OP but I get the error attached
Click to expand...
Click to collapse
Please walk me through, step by step what you did from downloading to receiving this error
Sent from my GT-I9300 using Tapatalk 2
Hey I'm a total noob with apktool on win. But I have unzipped apks on my phone using root explorer swapping res files and made working theme mods...
Could you guide to a good guide to doing this stuff on windows with a GUI I'm code illiterate virtually but know what's going on
Sent from my GT-I9300 using xda premium
I was able to get the CM 10 Framework-res to decompile and recompile using this version:
http://www.mediafire.com/?clk29i70rg7n8i9
The beauty of apks is that if you're swapping oranges for oranges, you don't need to decompile. You only really need to decompile if you're changing XML files.
To swap one image for another image with the same name is easy.
1)Download winrar (or 7zip - but I use winrar).
2)Open the apk with winrar (do NOT extract)
3)Delete the images you want to change
4)Drag the replacement images back in. When the window pops up with options, change "compression" to "store"
5)Close winrar
Sent from my GT-I9300 using Tapatalk 2
rootSU said:
The beauty of apks is that if you're swapping oranges for oranges, you don't need to decompile. You only really need to decompile if you're changing XML files.
To swap one image for another image with the same name is easy.
1)Download winrar (or 7zip - but I use winrar).
2)Open the apk with winrar (do NOT extract)
3)Delete the images you want to change
4)Drag the replacement images back in. When the window pops up with options, change "compression" to "store"
5)Close winrar
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Oh... yeah cool so this automates replacing different images in the apk with the same location... I just use a vrtheme skeleton CMW.zip folder and zip it when done for flashing.
So how do you decompile the arsc archive and mess with deeper stuff?
Sent from my GT-I9300 using xda premium
thankssssssssssssssssssssss Alot
first i Run Setup_instal.bat as administrator in "C:\apk\ACTIONS\Install_Files"
after that my problem solve (i have problem like post 2 and 3)
and thats Awsome ,
graffixnyc said:
content removed
Click to expand...
Click to collapse
Kindly remove your link. This thread is about the mod I am sharing, which I scripted. It is not about other mods.
rlorange said:
Oh... yeah cool so this automates replacing different images in the apk with the same location... I just use a vrtheme skeleton CMW.zip folder and zip it when done for flashing.
So how do you decompile the arsc archive and mess with deeper stuff?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
No, you don't use this at all if you're going to be changing images. This is for the deeper stuff.
rootSU said:
Please walk me through, step by step what you did from downloading to receiving this error
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
I did exactly what the OP says, extracted the files into the root of the C drive, ran the setup and clicked on the start.bat and followed instructions. I now ran the setup again and took a screenshot of what appeared because it was so fast I couldn't see it. It said access denied and 0 files copied. I then took ownership of the System32 folder and ran setup again and it said 1 file copied. I now ran the start.bat again and got the attached error.
So am I right in thinking that you can't simply merge folders/files and zip like you can with root explorer because windows is not a Linux system?
Sent from my GT-I9300 using xda premium
Phone_Guru said:
I did exactly what the OP says, extracted the files into the root of the C drive, ran the setup and clicked on the start.bat and followed instructions. I now ran the setup again and took a screenshot of what appeared because it was so fast I couldn't see it. It said access denied and 0 files copied. I then took ownership of the System32 folder and ran setup again and it said 1 file copied. I now ran the start.bat again and got the attached error.
Click to expand...
Click to collapse
can you try right clicking the start.bat and run as administrator please? You're still getting access denied messages.
rlorange said:
So am I right in thinking that you can't simply merge folders/files and zip like you can with root explorer because windows is not a Linux system?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
You can swap anything like-for-like. You can put in a replacement folder, xml file or png as long as everything has the same name.
If you want to edit an existing XML, you cannot do this without decompiling as when an xml is compiled, it does not appear as plain text. Similarly if you want to add more pngs or xml files, resources changed so it has to be decompiled too.
But if its simply swapping like-for-like, you can just use winrar or 7zip as mentioned earlier.
rootSU said:
can you try right clicking the start.bat and run as administrator please? You're still getting access denied messages.
Click to expand...
Click to collapse
I tried that and still got the error messages.
Hi,
Here is a flashable ZIP template. This is just an empty zip file that you can put anything that you want and will write it to /system. This mod is good if you want to change SystemUI's or something. It will not contain a ROM. This is just adding APK's to ROM's, Frameworks, Libraries, Bootanimations or other things found in /system
GUIDE -
Want to personalize it a little? Here is a quick guide.
What you will need
- NotePad++
1 - Download Flashable ZIP template
2 - Extract it
3 - Go to META-INF/com/google/android/
4 - Right click on 'updater-script' and open with NotePad++
5 - You can only change code line of the text in red ''ui_print("blahblahblah");''
6 - Once editted the test in the UI print tags save it and close
7 - To add things to flash go to /system
8 - Add the file you want in its specific directory* e.g. - Applications go in /system/app and frameworks go in /system/framework and Boot Animations go in system/media
9 - Once done, select both META-INF and System Folder and right click and select 'send to > compressed zip folder
10 -You are all done!
Download -
http://d-h.st/E5n - Don't say thanks. Hit that button
You can use this without credits just giving something back to XDA
Press thanks if this helped. Will do other guides too
XDA:DevDB Information
Flashable ZIP template, a Tool/Utility for the Android General
Contributors
StarFighter
Version Information
Status: Stable
Current Stable Version: V1.0.5
Stable Release Date: 2014-02-06
Created 2014-02-06
Last Updated 2014-02-10
So this is basically Ui_print design which we see in Recovery right?
:...::::Recognized TDT™ member:::...
....::◀Press Thanks if I helped▶:::...
DeveDroid said:
So this is basically Ui_print design which we see in Recovery right?
:...::::Recognized TDT™ member:::...
....::◀Press Thanks if I helped▶:::...
Click to expand...
Click to collapse
Yes. The text in UI print shows up in recovery
Sent from my LG-D802 using XDA Premium 4 mobile app
StarFighter said:
Yes. The text in UI print shows up in recovery
Sent from my LG-D802 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
So it is designed? or is only a text? I mean is this for people who don't know how to create a updater_script? Or it is a designed updater_script for all of'em?
:...::::Recognized TDT™ member:::...
....::◀Press Thanks if I helped▶:::...
there are five ui_print in script, is it ok to edit all of them? I'm just confused because some lines I think are related for writing something to the system. Sorry newb
Geddd said:
there are five ui_print in script, is it ok to edit all of them? I'm just confused because some lines I think are related for writing something to the system. Sorry newb
Click to expand...
Click to collapse
All UI prints can be editted. It doesnt matter. I just put them as the text of what is being installed beneath it.
How to edit script if I'am use kitkat? I want to flash an app to priv-app folder.
Thanks in advance.
exodius48 said:
How to edit script if I'am use kitkat? I want to flash an app to priv-app folder.
Thanks in advance.
Click to expand...
Click to collapse
create a folder called Priv-App in the system folder. Job done
Please don't upload any file on the ****ing d-host. I can't download!!!!!!!!!!!!!!! It is just a bloatware.