WHY after changing APK image .... - Android Software Development

after i used 7zip and also i try winrar to change image png in apk and sing the file again the apk is not able to install again i used the same pixel size , the message i get is (application not installed) before edit it was fine .... can any one help please , i am using windows xp , is there more reliable way to change ???
Thanks again

FORCOMM said:
after i used 7zip and also i try winrar to change image png in apk and sing the file again the apk is not able to install again i used the same pixel size , the message i get is (application not installed) before edit it was fine .... can any one help please , i am using windows xp , is there more reliable way to change ???
Thanks again
Click to expand...
Click to collapse
Try opening the APK with WinRAR and replacing the image then installing without resigning. If you're still having issues with installing it clear the app data and uninstall then try reinstalling. If it's already installed on your phone and you're trying to reinstall with a different signature it'll error out every time.

Uninstall the old app first...
Sent from my SCH-I500 using XDA Premium App

logcat will tell you why it fails. In this case however it's due to signing. All regular packages (non-system) need to be resigned, this also means you have to uninstall the original app as they'll have different signatures.

FORCOMM said:
after i used 7zip and also i try winrar to change image png in apk and sing the file again the apk is not able to install again i used the same pixel size , the message i get is (application not installed) before edit it was fine .... can any one help please , i am using windows xp , is there more reliable way to change ???
Thanks again
Click to expand...
Click to collapse
Open apk with 7zip and navigate to the picture you want to replace. Open Windows explorer and navigate to the folder containing your picture and drag it into 7zip. It will ask you if you want to modify this and say yes. It will now resave the zip file with your replacement picture. That's it, there's NOTHING more to it than that. I do it everyday when I am working on a ROM.

Related

Need a means to compile apks

OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Realorasz said:
OK seeing as my computer currently doesn't work, I need to know if there is an app for my phone that will at least edit the contents of an apk, if not compile one. Anyone?
Also, if this is in the wrong section, feel free to move it, mods.
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
apk's are just renamed zip files.
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Realorasz said:
If so, then is there an app that will directly edit zip files? And do they need to be set to store compression level? If so, is there an app that does so?
From my X10a running WB CM 6.1.3 V053
Click to expand...
Click to collapse
yes, set to store...all you have to do is long-press the file and select rename...same to change it back afterward. I don't know about what app will allow you to set to store, but there are a TON of free zip apps. Check the market
I need to edit them though, and if I extract it edit it then zip it with an app, it's not set to store.
From my X10a running WB CM 6.1.3 V053
Root explorer can open xml files in apps but I don't think it can edit them.
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
CMoney87 said:
After modding the contents of a non-system apk file i believe you'll have to re-sign the apk. I dont know of any way to do that on your phone, i am admittedly not an expert though. Ive modded icons and such for apps and the only way I could find out how to get them installed was to re-sign them on my PC and push back to the phone.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Yeah signapktic can sign on the phone, all I need is an app that either will, zip things set to store like in sundae or one that will directly modify the contents of the zip.
From my X10a running WB CM 6.1.3 V053
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
akila87 said:
The files inside apk is I think encrypted. normal text viewers (ex. notepad) cant see it. and the resource files (styles strings colours ) are archived again. Btw it would be great if we have an app to disassemble them within 4n. Coz copying apk from and to to computer is a pain
Click to expand...
Click to collapse
Well making it a zip on my phone didn't screw anything up. I can still browse normally. What I need is a means to edit a zip without compressing it, like you have to for bootanimatjons and everything else.
From my X10a running WB CM 6.1.3 V053
I would suggest having a look through the market....download every free app you can find and see if any help. There are so many out there that I have no idea which would work for exactly what you will want it to do. Really, trial and error is the best way, sometimes lol
eclipse
I'm not sure I understand correctly, some previously mentioned are right on track.
Contents of an APK file are as normal zip files, extract the APK with winrar, 7zip or similar program.. make modifications and re-zip it and change the file name.
Important process called "Zip Align" optimizes the file for the APK format and helps to optimize and align the archive for memory mapping I/O ensuring the payload is delivered correctly, for more info - mmap
If you would like to reverse an APK file, I choose to use APKTOOL a Google hosted project and complete with it's own reverse engineering syntax called "baksmali" - This wraps AAPT - Android Asset Packaging Tool part of the android SDK - need this installed.
An issue exists with obfuscated Java classes. Meaning source code has been scrambled (obfuscation algorithm) enabling it be understood by a compiler but no longer is human readable. Another issue is Signing the APK file as most installers are to authenticate the issuing publisher.
To build an APK anyone only need's have the Eclipse IDE and Android SDK installed and you can do this without even having an Android device by using the emulator to build and test your application.
Happy play!
EDIT: Apk edit and Apk tool are both able to help in this situation also.

[Q] editing framework-res.apk

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] ICS apk de/recompile script for APK Tool - Windows

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.

[GUIDE] How to easily edit/modify .apk files! (Simple, Noob Friendly)

Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Just hit the thanks button, he doesn't bite your finger!
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Diablo67 said:
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Click to expand...
Click to collapse
You don't have to use this guide just for images. That was just the example. You can use it for almost any file inside an .apk. I was just saying that SOME folders aren't there.
Can you guide me to how do i keep same apps of diff versions.
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
tendyfish said:
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
Click to expand...
Click to collapse
You also have this tool
Easy Apk Dissassembler
http://forum.xda-developers.com/showthread.php?p=14049173
How do I use a flashable to get rid of .apks??? ₩
On the app I have here it returns 20 results that it scrapes from a website. I only want it to return 3 or 4. How do I get in there and change that value?
I want to change values on touchwiz launcher on my note 3, to use it in 440 dpi. When I use it there is so much margin on all sides, and I need to reduce. I need to add a new icon row as well. Can I do that just by modifying the app?
Sent from my GT-I9505 using Tapatalk
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Hi,
I would like to modify the tinychat.apk so that i can find how to change my device info/platform from android to something else, like pc or whatever. I dont want to be identified as using an android device. Is this possible?
Regards.
ksaul said:
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Click to expand...
Click to collapse
Yes, depending on what tool you use to decompile the apk files it may or may not decrypt them. I use apktool and it decrypts them just fine.
I think this method is no longer working for 4.3+
Modify JAR files
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
gilbertgk said:
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
Click to expand...
Click to collapse
rename the jar to apk..after done,rename it back to jar
zamzameir said:
rename the jar to apk..after done,rename it back to jar
Click to expand...
Click to collapse
Can this work on my note 3 4.3 not rooted?
gilbertgk said:
Can this work on my note 3 4.3 not rooted?
Click to expand...
Click to collapse
idk..but you can try n report back
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
Thnax for great guide but,my gopro app has a update and I have changed the icon on it but the app store dosent show me the update button. How to fix so I can update?
What do I need to change in an app to substitute it for another app?
OK so I've installed a new ROM and it comes with a kernel setting app preinstalled. This app has been integrated into the system settings portion of the ROM. I want to replace this kernel settings app with one of my choice but I want to be able to integrate it into the system settings like the original app is. I tried disguising the new app by changing the name of the app and .apk files but that didn't work. Closest I got was being able to convert my app to system app but even though I changed the name, the app, when installed goes back to it's original name. Or what permissions or files do I need to change to allow the integration of my app into the settings interface. Thanks ahead of time, it's appreciated.

[MOD] Add top number row to Swype

Hello guys,
Since I use a Samsung device, I'm used to the extra number row on top of the keyboard so I modded Swype to have that extra row. However since Swype is to be purchased and not distributed, I'll only tell here how to do it for your legally purchased copy. And this is a bit complicated and for advanced users and you need to be rooted. You also need Root Explorer. Here we go:
1- First buy/download Swype from Google Play.
2- Go to /mnt/asec/com.nuance.swype.dtc-1 folder, copy pkg.apk to your sdcard, rename it to com.nuance.swype.dtc-1.apk.(keep a backup of this file at all times)
3- Go to /mnt/asec/com.nuance.swype.dtc-1/lib folder copy the files (libnmsp_speex.so and libswypecore.so) to your sdcard.
4- Using apktool (I used version 1.52) decompile com.nuance.swype.dtc-1.apk.,
5- Go to decompiled folder\res\xml folder. kbd file pertaining to your language is to be edited, I edit kbd_qwerty.xml for English using Notepad++.
6- Check the attached kbd_qwerty.xml in portrait folder and notice the extra row section I added to the top. You can in fact add secondary characters to numbers or customize the keyboard completely, rearrange letters, add symbols etc.
7- Once done, save the file and go to decompiled folder\res\xml-land folder and edit the landscape for the layout, kbd_qwerty.xml file, notice the attached file in landscape folder.
8- Once done, save the file and go to decompiled folder\res\values folder and edit the dimens.xml file. Here I raise the height of the keyboard and height of the key to 270dip and 54dip respectively, check the top rows of the attached dimens.xml. Also increase the keyboard height for landscape (if you want) by changing the dimens.xml under res\values-land folder.
9- Once done, recompile the folder with apktool, go to decompiled folder\dist folder and copy the apk here to a different folder and rename it to temp.apk.zip
10- Open temp.apk.zip with 7z/winrar and copy the resources.arsc and kbd_qwerty.xml files from res\xml and res\xml-land folders to your PC(obviously keep the 2 files in seperate folders not to overwrite)
11- Then, rename the original apk from step 2 to com.nuance.swype.dtc-1.apk.zip , open with winrar and first delete resources.arsc file, then drag the resources.arsc file from step 10 to the archive, it will be added. Staying in winrar, go to res\xml folder and replace the file with kbd_qwerty.xml from step 10 (the portrait version). Do the same with res\xml-land folder and the landcape file.
12- Once finished rename the file back to com.nuance.swype.dtc-1.apk, don't sign it, don't delete META-INF folder, leave it as it is.
13- Now, on your phone, uninstall Swype. Reinstall it from the apk file on Step 2. Go to /data/app-lib/com.nuance.swype.dtc-1 folder and move the 2 files (libnmsp_speex.so and libswypecore.so) to system/lib folder. You have to mount the System R/W from Root Explorer on this step. Fix the permissions so these 2 files have the same permissions with other files there. If you can't find these files just use the ones from Step 3.
14- Once done, copy com.nuance.swype.dtc-1.apk from Step 12 to /system/app and fix the permissions so that it has the same permissions as other files there.
15- Then delete the com.nuance.swype.dtc-1.apk from /data/app/ folder. Restart your phone.
This should be it if you followed it exactly, tracing and Dragon voice dictation also works. While you're doing all this work (takes 10 minutes by the way), you might also consider changing how Swype looks (theming) and changing many other things like swype thickness, colors etc. Please note that this is for advanced and rooted users and please don't ask me to give you the modded apk, you have to do it on your legally bought version. You might consider doing backups just in case anything goes wrong. Have fun.
And a quick tip: if you swype from swype icon to symbol key(123), arrow keyboard opens up.
You can also add arrow keys by copying arrow keys from kbd_edit.xml, check the 2nd screenshot.
Please hit the thanks button if you think this is useful.
Nice how to. But may u should tell that the latest Android versions store purchased apps in data/app-asec as asec version, this need special procedure to get a apk from the asec format.
Can you please update this tutorial to 4.3 ? I couldn't find the files in the mentioned paths. . I'm on stock rooted 4.3 on gt9500
Sent from my GT-I9500 using XDA Premium 4 mobile app
lesalloum said:
Can you please update this tutorial to 4.3 ? I couldn't find the files in the mentioned paths. . I'm on stock rooted 4.3 on gt9500
Sent from my GT-I9500 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
It works same for me on 4.3 stock rooted i9500, maybe you could do a file search to find the necessary folder. Here is another screenshot with the updated Swype(1.6.2.22328), where I made number buttons smaller like original Samsung Keyboard and hide the suggestions bar to save space.
ozkaya said:
Hello guys...
9- Once done, recompile the folder with apktool, go to decompiled folder\dist folder and copy the apk here to a different folder and rename it to temp.apk.zip
....
Click to expand...
Click to collapse
using the current play store version (1.6.3.22544), i decompiled com.nuance.swype.dtc-1.apk (/mnt/asec/com.nuance.swype.dtc-1/pkg.apk) using APKTool 1.52. i made no changes and attempted to recompile without success.
the first error displayed by apktool is:
"C:\Users\Phil\apktool\com.nuance.swype.dtc-1\res\values\arrays.xml:545: error: Found tag dimen-array where item is expected"
i do use APKTool successfully to mod other apps so i am familiar with the process.
QUESTION: what frameworks file are you using when making your mods? are you using a TW ROM frameworks? that's the only other variable i can think of...
EDIT: well, i just tried using TW framework too without success
PhilDX said:
using the current play store version (1.6.3.22544), i decompiled com.nuance.swype.dtc-1.apk (/mnt/asec/com.nuance.swype.dtc-1/pkg.apk) using APKTool 1.52. i made no changes and attempted to recompile without success.
the first error displayed by apktool is:
"C:\Users\Phil\apktool\com.nuance.swype.dtc-1\res\values\arrays.xml:545: error: Found tag dimen-array where item is expected"
i do use APKTool successfully to mod other apps so i am familiar with the process.
QUESTION: what frameworks file are you using when making your mods? are you using a TW ROM frameworks? that's the only other variable i can think of...
EXIT: well, i just tried using TW framework too without success
Click to expand...
Click to collapse
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
ozkaya said:
Latest version of Skype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
Click to expand...
Click to collapse
i'll give this a shot tomorrow, thanks a lot!
ozkaya said:
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
Click to expand...
Click to collapse
it works!!!
thanks man, appreciate the help and info!
I've been going nuts trying to edit swype for a week now and still can't seem to get it to work. All I want to do is change the suggested word color and maybe a few other minor color related things. I assumed just changing the color codes in /res/values/styles.xml that seemed to pertain to the holo theme would work but I can't ever get the app to install. Not even sure where to begin to ask for help on this one but if anyone has any advice I'd greatly appreciate it.
Ok I've tried this a hundred times following all the steps completely and it just wont work.
Once I go to install the final apk it always tries to install then sais App Not Installed.
TeknoGodz said:
Ok I've tried this a hundred times following all the steps completely and it just wont work.
Once I go to install the final apk it always tries to install then sais App Not Installed.
Click to expand...
Click to collapse
You don't install the final apk, in fact you can't since the certificate is no longer valid. You copy the final apk in place as in Step 14.
I would love this! I have used Swype for years but I would love a number row. To be honest I have no idea how to follow those instructions! I have a rooted phone - what can I do?
Am I right in concluding that you can't use TB to backup and restore the finished product and this will have to be done manually? I did this on my rooted Note 3 and I keep going back to my stock image because I don't want to have to keep doing the steps when I flash a new ROM or ROM update.
Would I maybe just have to do steps 12 onward every time?
mr.BeBoT said:
Am I right in concluding that you can't use TB to backup and restore the finished product and this will have to be done manually? I did this on my rooted Note 3 and I keep going back to my stock image because I don't want to have to keep doing the steps when I flash a new ROM or ROM update.
Would I maybe just have to do steps 12 onward every time?
Click to expand...
Click to collapse
When you install a new ROM, you install original Swype from apk file then you move the lib files to /system/lib, copy the modded apk to /system/app and delete original apk from /data/app folder. So it is 4 steps once you have the modded apk ready, should take no more than 5 minutes.
thumm138 said:
I've been going nuts trying to edit swype for a week now and still can't seem to get it to work. All I want to do is change the suggested word color and maybe a few other minor color related things. I assumed just changing the color codes in /res/values/styles.xml that seemed to pertain to the holo theme would work but I can't ever get the app to install. Not even sure where to begin to ask for help on this one but if anyone has any advice I'd greatly appreciate it.
Click to expand...
Click to collapse
This is similar. Please go through the steps, you don't (can't) install the modded apk, you move it in place.
ozkaya said:
This is similar. Please go through the steps, you don't (can't) install the modded apk, you move it in place.
Click to expand...
Click to collapse
Yeah I realized that after I posted and still nothing. I'm no programmer but I've never NOT been able to change a few things and recompile. Not sure how just changing a few color codes is causing such a problem. Shame such a nice keyboard has such little customization and few themes. Don't get me wrong I like orange but it really doesn't mesh at all with the rest of the UI. Thanks for the reply though.
ozkaya said:
This is similar. Please go through the steps, you don't (can't) install the modded apk, you move it in place.
Click to expand...
Click to collapse
I did all that and it changed the height of the keyboard, but didn't add any additional number row.
kdb_qwerty or whatever it's called is the default that comes up when you install it, right? Becuase I tried again and specifically made sure to use this one and it just wont give me the extra row, just the height.
TeknoGodz said:
I did all that and it changed the height of the keyboard, but didn't add any additional number row.
kdb_qwerty or whatever it's called is the default that comes up when you install it, right? Becuase I tried again and specifically made sure to use this one and it just wont give me the extra row, just the height.
Click to expand...
Click to collapse
It depends on your system language. Try kbd_qwerty_panlatin.xml.
ozkaya said:
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
Click to expand...
Click to collapse
Thank you for this change, this is exactly what I was looking for to compile.
Once again my Swype is blue!!! :victory:
here's my creation, what do you guys think?
the theme is "Lucid" from the pay store: https://play.google.com/store/apps/...lucid&pcampaignid=APPU_8szYUoedK9PNsAThnoDQDQ

Categories

Resources