Replacing png in apk - Sony Xperia P, U, Sola, Go

Hi everyone,
From my understanding, if we want to change the pngs in an apk, we can simply open it with 7zip, then replace the pngs, it's done.
I took EventStreamPluginCallLog.apk from arc s which is updated to ICS.
The apk can be installed in xperia s and it is working fine.
However, when I change the png named icon in res > drawable-hdpi > icon.png
The apk can no longer be installed.
So I go with decompiling and recompiling the apk using apktool, no error shown but I still can't install it
Any idea? Thanks

did you sign it after recompiling?

System apps don't need to be signed. What i did for system apps is:
Decompile app
Replace png
Recompile app
Use TickleMyAndroid -> Prepare files for pushing.

realfelix said:
did you sign it after recompiling?
Click to expand...
Click to collapse
I thought the same even it says no need for system apk, I still do it and get the same problem, can't install
Felimenta97 said:
System apps don't need to be signed. What i did for system apps is:
Decompile app
Replace png
Recompile app
Use TickleMyAndroid -> Prepare files for pushing.
Click to expand...
Click to collapse
I tried everything I know. Apk Multi Tool, simply apktool only, direct replace PNG with 7zip (compression changed to deflate), direct replace with winrar (compression method retained as store), it just doesn't want to install.
I have tried TickyMyAndroid, I am not sure if I done thing correctly but I see no error when recompiling yet can't be installed. My goodness. Time to forget about this stuff

Related

[Q] Editing Images Framework-res.apk file

hello all
I was trying to edit the framework-res.apk which can be found in system/framework/framework-res.apk
this file holds alot of images that you can edit (e.g slider, incoming call, icons etc...) framework-res.apk\framework-res.apk\res\drawable-mdpi folder
i edited the png's jog_dial_bg_rev_down.png and jog_dial_bg_rev.png
they are the call slider revamped (just removed the shadows so it doesnt cover the incoming call)
i have used apk edit, Apk manager, APK sign and everytime i build the framework-res.apk and move it to the system/framework/ folder
everytime i move the file my phone either gets bricks, bootloops or get tons of force close down of some apps
has anyone got any solutions how to edit framework-res.apk without all this bricking bs?
i have uploaded the edited images for the sliders on Slider_Revamped.rar
When you sing apk than you need to replace :
Meta-inf and recourse.so from original framework-res.apk.
You just open both frameworks with 7zip and drag from original to edited
Sent from my U20i using xda premium
Eyama said:
When you sing apk than you need to replace :
Meta-inf and recourse.so from original framework-res.apk.
You just open both frameworks with 7zip and drag from original to edited
Sent from my U20i using xda premium
Click to expand...
Click to collapse
i had same issue.. thanx will try
Download "NinjaMorph" off of the market, it decompiles any APK, TAR whatever and allows you to replace any file (including XMLs if you like) from the APK with those on your SD. What I do is decompile the APK then plug my phone in and navigate to where NinjaMorph decompiled the APK to on the SD, which is "AndroidThemes", do the editing on my PC then disconnect the phone, recompile the APK and it automatically pushes the APK to wherever you pulled it from. I've used it many times when I've been messing with frameworkres, it works every time.
Does this method also work with .9.patched files?
christophermaisch said:
Download "NinjaMorph" off of the market, it decompiles any APK, TAR whatever and allows you to replace any file (including XMLs if you like) from the APK with those on your SD. What I do is decompile the APK then plug my phone in and navigate to where NinjaMorph decompiled the APK to on the SD, which is "AndroidThemes", do the editing on my PC then disconnect the phone, recompile the APK and it automatically pushes the APK to wherever you pulled it from. I've used it many times when I've been messing with frameworkres, it works every time.
Click to expand...
Click to collapse

Compiling framework res help

Hi i am trying to edit the framework res apk so i can change the text colour and the themed clock colour. I can decompile with apktool and change the colors.xml but after compiling framework res i just get stuck in a bootloop. I have tried just copying the reaources file to my original framework but still bootloops. I have searched google and here and finding it hard to find a solution. One thing i noticed in 7zip it says that for resources the OS is FAT but on the edited one it is UNIX as well as being a smaller file when compressed. If anyone can help that will be great.* Thanks
Sent from my GT-I9100 using XDA App
sign the apk as a system app.
no you shouldn't have to sign it just rename unsigned framework-res.apk to framework-res.apk and reflash to phone it shouldn't bootloop when you compiled did you select yes to system file and yes to copy everything then delete what was in keep file? If its an XML when you delete from keep file you have to delete the file you modified also.
txr33 said:
One thing i noticed in 7zip it says that for resources the OS is FAT but on the edited one it is UNIX as well as being a smaller file when compressed.
Click to expand...
Click to collapse
Did you choose Store as the compression method when adding the Resource file to your original apk?
mattfox27 said:
no you shouldn't have to sign it just rename unsigned framework-res.apk to framework-res.apk and reflash to phone it shouldn't bootloop when you compiled did you select yes to system file and yes to copy everything then delete what was in keep file? If its an XML when you delete from keep file you have to delete the file you modified also.
Click to expand...
Click to collapse
I originally just renamed mine and got a bootloop. Signed it as a system apk and stuck it in an update.zip and flashed it and it worked. Also, as the above post mentions, store must be selected as the compression method.

[Q] Apk Edit

Hello ,
I want to install this mod -- > http://forum.xda-developers.com/showthread.php?t=1695202
I decompiled SystemUI.apk and changed bools.xml by Notepad. And I returned script.bat and I selected Compile apk. But error. I tried lots of apk manager but error.
On Notepad , need changed Coding / Character Group ??
If I open apk manager and I saw ADB not found. But apk manager is working , I selected decompile apk , Apk manager decompiled systemUI.apk but I can't compile apk. Thank you..
Ok if i remember correctly, you can open the apk with 7zip, modify the files you want to and they should work. I tried this with systemui.apk before and it worked..
NightWatch71 said:
Ok if i remember correctly, you can open the apk with 7zip, modify the files you want to and they should work. I tried this with systemui.apk before and it worked..
Click to expand...
Click to collapse
I can't arrived values files by 7zip. Need Decompile apk by apk manager..
Arnadel said:
Hello ,
I want to install this mod -- > http://forum.xda-developers.com/showthread.php?t=1695202
I decompiled SystemUI.apk and changed bools.xml by Notepad. And I returned script.bat and I selected Compile apk. But error. I tried lots of apk manager but error.
On Notepad , need changed Coding / Character Group ??
If I open apk manager and I saw ADB not found. But apk manager is working , I selected decompile apk , Apk manager decompiled systemUI.apk but I can't compile apk. Thank you..
Click to expand...
Click to collapse
I have had issues in the past using notepad to edit apk files. I suggest that you use notepad++ for editing xml and smali files. It can be easily found with a Google search. Using notepad will probably give you formatting issues.
Sent from my SGH-I777 using xda premium

{Q} TIPS

Any tips how to recompile without error?
IceThor said:
Any tips how to recompile without error?
Click to expand...
Click to collapse
Use apk multi tool, and search xda.
Sent from my Xperia Ray using xda premium
Simple..
Install apktool and apkmanager ics....
Install all framework apk files with apktool and then decompile/compile with apkmanager
Sent from my WT19i using xda premium
Well maybe you are doing some mistakes... Or maybe you just need to install files with apktool, or delete files from keep if you are on apkmanager, i don't know, lots of methods
Tried all but failed it says failed to recompile due to img etc
IceThor said:
Tried all but failed it says failed to recompile due to img etc
Click to expand...
Click to collapse
There are so many guides in xda for editing/compiling apks...
guide 1
guide 2
guide 3
guide 4
You must install java jdk
And you must "install" framework for decompiling from that rom, that you edit:
copy out frmework-res.apk and systemUI.apk from your rom and move it to C:/apktool folder
then run a command:
Code:
apktool if framework-res.apk
this will install framework files on pc
then run a command again
Code:
apktool if systemUI.apk
this will install systemUI files on pc.
Now you can decompile apks with
apk multi tool
it's easy to use
be careful with *.9.png editing! (search xda)
the *.xml files you must edit with notepad++ (free on web)
if you choose compile system apk, then chose y, and you will have a keep folder, if you decompiled a non-system apk, choose 1
("choose unsigned apk using keep folder option")
if you edited the png files, then delete in keep folder the *.png files what you edited.
if you edit any *.xml file then in keep folder delete the resources.arsc file
The non-system apk's you must sign with 13. (you will have first unsisgned-APPNAME.apk, then with sign signed_APPNAME.apk)
The system apks are signed with original sign, (you will have system-APPNAME.apk
Thanks Wechy77 i will try

[Q] Help systemUi decompile sense recent apps

Hello , i realy need help i am not able to decompile my s3 4.1.2 systemUI apk plz help .or if someone can plz do it for me i would like to have sense recent apps in it .Plz every help is much aprreciate it
update systemUi apk DOWNLOAD
Framework res.apk DOWNLOAD
If you can't decompile, then you sure won't be able to compile it back. so the files are useless
Glebun said:
If you can't decompile, then you sure won't be able to compile it back. so the files are useless
Click to expand...
Click to collapse
No the file is for someone to do it for me and get the sense recent apps in it
Mostunique99 said:
No the file is for someone to do it for me and get the sense recent apps in it
Click to expand...
Click to collapse
Why can't you decompile it, have you decompiled apk's before or is this your first attempt at this.
ag4751 said:
Why can't you decompile it, have you decompiled apk's before or is this your first attempt at this.
Click to expand...
Click to collapse
No i have put its always giving me errors
Mostunique99 said:
No i have put its always giving me errors
Click to expand...
Click to collapse
Check this then, before you decompile the apk.,
Open the apk with 7zip or whatever you normally use for zip files then look for classes.dex file, it will be in the main zip not in any sub folders, if there is one this will be causing the decompile error so extract it to your PC then delete it from the apk.
Now decompile the apk, do what you want, compile the apk then put the classes.dex file you extracted to your PC back in the apk.
ag4751 said:
Check this then, before you decompile the apk.,
Open the apk with 7zip or whatever you normally use for zip files then look for classes.dex file, it will be in the main zip not in any sub folders, if there is one this will be causing the decompile error so extract it to your PC then delete it from the apk.
Now decompile the apk, do what you want, compile the apk then put the classes.dex file you extracted to your PC back in the apk.
Click to expand...
Click to collapse
Thank you very much worked out perfectly :good:

Categories

Resources