How to Sign modified Apk - XPERIA X8 Q&A, Help & Troubleshooting

Hey Guys, I am a new member.I am editing SystemUI.apk to Edit The Low Battery Notification and follow all the instructions from this thread ::
http://forum.xda-developers.com/showthread.php?t=2341065
I followed this steps ::
1.I decompile SystemUI then edit it.
2.Compile It.
3.After compiling I move META-INF and android.manifest.xml to Modified apk
but when i push this apk using root Explorer it shows forced close ...........!! I want to edit it my self !! :crying:
It is necessary to sign modified apk? If yes then How ?

ZipSigner app on Play Store

Related

Editing PNG Files within APK --Help?

Hi guys, I'm trying to edit some .apk files.
I first extract the png file that I want to edit using 7zip.
I open up the file in photoshop, edit it, then save it as a file (interlaced and non interlaced.. i tried both).
I then dump the .png back into the apk.
When I try to install the file back onto my phone, I get "*Apk file* could not be installed on this phone"
Anyone want to help me out?
How do I edit the file without it giving me this error.
Ok based on ur status im assuming ur still new to the concept of apk editing.
Theres 2 types of apks.
1. System apks (/system/app) where once u edit them u dont have to resign them. You just PUSH it back to ur phone.
2. Data apks, (/data/app) where once u edit them u have to resign the apk and install them to ur phone.
If ur on a windows machine, download apk manager from my signature and it'll guide u through the process.
Daneshm90 said:
Ok based on ur status im assuming ur still new to the concept of apk editing.
Theres 2 types of apks.
1. System apks (/system/app) where once u edit them u dont have to resign them. You just PUSH it back to ur phone.
2. Data apks, (/data/app) where once u edit them u have to resign the apk and install them to ur phone.
If ur on a windows machine, download apk manager from my signature and it'll guide u through the process.
Click to expand...
Click to collapse
Thank you SOOOOOO much. Yes I'm pretty new.. I'm good at graphic designing but I have no clue about these apk files
Once again thank you

framwork-res.apk modifying

Hi,
i'am searching for a guide how to manipulate correctly the framework-res.apk.
All ways i have tested fails.
I would modify some symbols in Notification bar (battery 1%) but all Time the my Phone run into bootloop or all Application Crashes after Startup.
I've tryed Apk Manager 4.9 / and Manualy with apktool.
Help plz .....
what i did :
1-extract apk (i use 7zip/WinRAR)
2-edit/replace image file(s)
3-repack with zero compression level ('store' level)
4-sign the apk
5-replace file using apk or create flashable recovery zip.
regards.
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
PapaDocta said:
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
Click to expand...
Click to collapse
But when i add some new Files and Edit some XML the Sign will be Corrupted ?
no it won't...
You need to do two copies.. the original file and the moded one...
1. make a backup of the original file
2. extract the original file using apktool
3. edit and modify anything you like
4. compile the edited file
5. rename the compiled file to framework-res.zip and take the modified resources.arsc
6. using winrar or 7zip open (to view not extract) the backed up framework-res.apk
7. place the moded resources.arsc into the backed up framework-res.apk
by doing this you retain the original signature of the backed up file and not breaking it..
Thx, will test it ;-)
kowalski99 said:
But when i add some new Files and Edit some XML the Sign will be Corrupted ?
Click to expand...
Click to collapse
Android system, signs system apk's on boot, you shouldnt sign them
Sent from my Desire HD using Tapatalk
My signed apk just work well.
AFAIK, we only cant re-sign htc's apk.
PapaDocta said:
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
Click to expand...
Click to collapse
The right approach always depends, what you want to change. There is no need to decompile, if you only change a few standard png. If you change xml in values folder like color, styles or arrays, you can certainly not delete resources.arsc - resources have nothing to do with the signature anyway. So if you want to play safe, you should insert the original Meta-Inf (signature) and Android Manifest after compile. It is also recommended to zipalign the final apk in order to reduce RAM usage.
thanks he_stheone64 for the clarification.. i reached that conclusion based on my own research on the net and yeah i used to change the XML files to add language support and that the only way that worked with me..
And be sure to have a working and up-to-date sdk before trying to use apktool...
First, using a old sdk release i got a partially working result (few graphics bugs and strange reboots), then with a badly updated sdk on top off the old i got apktool making many errors. Finally, re-installing the last sdk from start i got apktool and my resulting apk working correctly.

[Q] Quick Panel @ Toggle

hi. i want to change quick panel @ toggle from gb green to blue like cm.. how i want to do it? is that uot kitchen can do it?? im using. i'm new here.. i don't know how to do it.. i'm using firmware S5830IDXLF1, S5830IOLBLD1 .. anyone can help me..
Decompile SystemUI.apk or framework-res.apk (not sure which), edit the PNGs, recompile, push using adb.
for simpler steps (no need for decompiling/recompiling)
use Ninjamorph (free on play store)
it allows you to change the PNG files in your apks.
if you do not have 15 toggle mod:
Open Ninjamorph, go to system/app/ then choose SystemUI.apk. Then go to res/drawable-mdpi and then modify the pngs you want to modify (quickpanel_icons)
then after you're done, just go back to main menu of ninjamorph and choose finish then choose systemui.
but if you have 15 toggle mod:
Open ninjamorph, go to system/framework then choose lidroid-res.apk. Then do the same steps.
Ninjamorph is useful for beginners, no need to compile.
EDIT: after you finish you need to reboot (because you edited something in the statusbar, and it also applies if you edited a framework apk.)
jraquino said:
for simpler steps (no need for decompiling/recompiling)
use Ninjamorph (free on play store)
it allows you to change the PNG files in your apks.
if you do not have 15 toggle mod:
Open Ninjamorph, go to system/app/ then choose SystemUI.apk. Then go to res/drawable-mdpi and then modify the pngs you want to modify (quickpanel_icons)
then after you're done, just go back to main menu of ninjamorph and choose finish then choose systemui.
but if you have 15 toggle mod:
Open ninjamorph, go to system/framework then choose lidroid-res.apk. Then do the same steps.
Ninjamorph is useful for beginners, no need to compile.
EDIT: after you finish you need to reboot (because you edited something in the statusbar, and it also applies if you edited a framework apk.)
Click to expand...
Click to collapse
what u mean?? ninjamorph is that app?
SemBoyHehe said:
what u mean?? ninjamorph is that app?
Click to expand...
Click to collapse
Yes its an app
It can be used to edit png
But if you want to edit xml
Then compiling and decompiling is the only choice
iamareebjamal said:
Yes its an app
It can be used to edit png
But if you want to edit xml
Then compiling and decompiling is the only choice
Click to expand...
Click to collapse
can u help me? i didnt know ho to do..

[INFO]Editing system files (smali,dex,apks)

NOTE: If you want to edit framework-res.apk or systemui.apk, follow this guide, it's the best available:good:
http://forum.xda-developers.com/showthread.php?t=2086771
Now, lets start
smali, dex....whaaat?
It's simple our odexed ROMs have .apk which use .odex files which contain cache. When the ROM is deodexed the .apk contains classes.dex which now contains information present in the .odex files!:good:
Smali is nothing but disassembled .dex file! The .dex file is disassembled into java code which can be edited via Notepad ++( simple notepad works too)
WHY?
Why do you need to edit classes.dex !
For me, i was trying to make CRT on/off animation which required editing classes.dex in service.jar!
More edits where classes.dex inside services.jar is needed
- Changing status bar clock color
- Changing text color in notification bar
- More? Tell Me!:highfive:
HOW?
Requirements: Java SDK!
I have APK Multi Tool, although it decompiles .apk and .dex files inside the apk, it doesn't provide option to decompile a separate classes.dex!
Still it's best software for decompiling apks and more!
Smali-Me 1.0
Download and Instructions:
http://www.wrapcode.com/android/baksmali-smali-dex-files/
ROM Tools by iamareebjamal - More noob friendly
http://forum.xda-developers.com/showthread.php?t=2163286
Once you have decompiled classes.dex, you'll get various folder with various files. Edit the files required and then recompile!
So after generating new classes.dex, put it back to services.jar by opening the file in winzip!:good:
ONE MORE THING
Make your own flashable zip
The recompiled systemui.apk or framework-res.apk, when pushed via root explorer give lot of force closes. This is normal, however if u wish to avoid it u can create a cwm flashable zip for the same!:good:
I'm attaching the sample.zip here and u can add your files in the specified folders. For more details read the source forum:
http://forum.xda-developers.com/showthread.php?t=1721680
Reserved- for more stuff!
Subscribed.. will see what it is later
Hey, add this to your guide, i far more easier and nice to look at too than smali me
http://forum.xda-developers.com/showthread.php?p=40435351#post40435351

[GUIDE] Deodex any app on android N with phone

This guide we will use systemui as an example for deodexing.
Download androblacks apktool below. Install.
Open apk and update it when prompted. go into settings. Make sure you tick "root" option at the bottom. Close the app.
Use any root file browser and create a folder on SD card called "apktool."
Go into system/privapp and copy over systemUI.apk and systemui.odex into apktool folder on SD card. Go back to system/framework and Copy over framework-res.apk to apktool folder on SD card.
Open apktool app and click on internal storage. Select apktool folder. Click on framework-res and in select install as framework. When its done select systemui.apk and also install as framework.
Once completed click on systemui.odex and select decompile for android N. When finished long press on the decompiled odex folder and select recompile. It will create a systemui.dex file. Click on the systemui.dex file and select "add to apk" option. The dex file will now be added to the original systemui.apk. to make sure it worked click on the apk file in your root browser and select view, inside you will see a classes.dex file. Use apktool to now decompile the original systemui.apk and you will now have a decompiled smali folder.
I used this method to deodex my systemui in order to make the necessary mods for 3minit battery mod.
Link to andro Black's apktool:
https://www.androidfilehost.com/?fid=817550096634742560
Hi thanks for sharing this. It seems really cool but when would this be needed? Is this supposed to be for odexed roms and what does deodexing really do anyway? Or is this just because it's possible. Thanks
Odexed applications cannot be decompiled and edited to the same level that a deodexed application can. I'm not going to go into the detailed differences between odex/deodex, a simple google search will clear that up. Odex apks are bifurcated, with odex file containing optimized code readily available for the system to use.
Anyone wishing to modify an apk, especially theming, will need to deal with deodexed files, no odex.
Pain-N-Panic said:
Odexed applications cannot be decompiled and edited to the same level that a deodexed application can. I'm not going to go into the detailed differences between odex/deodex, a simple google search will clear that up. Odex apks are bifurcated, with odex file containing optimized code readily available for the system to use.
Anyone wishing to modify an apk, especially theming, will need to deal with deodexed files, no odex.
Click to expand...
Click to collapse
Oh okay that makes sense whenever I've modified apks they've been deodexed but I've never really looked at odexed files as I'm always on a custom ROM. Thanks
Sorry for noobish questions. When finished do you recompile the SystemUi_src? Also if doing other apps do you need to install each apk as framework? The system/framework only gets done once, but if moving on to others do I need to delete the other apk that was installed as framework?
Delete

Categories

Resources