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
Related
I got this figured out already, sorry about that.
Who ever thanked me, I wasn't posting a guide but a question.
I am trying from a fresh firmware base to learn from scratch but no idea how to get that framework to compile correctly.
did you install framework first?
Code:
apktool if framework-res.apk
Easy
I had problems with the apk tool and recompiling. The way I ended up doing it is:
I didnt decompile the framework-res.apk.
rename the file framework-res.apk.zip
open it with 7zip.
Extract the files you are wanting to work on
Do what ever work on the files you need done
Drag and drop the files back in the directories they go into while file is open in 7zip
Close 7zip
Rename file back to framework-res.apk
push to phone with adb
No decompile or recompile.
Hope this helps
Chadw1985 said:
I had problems with the apk tool and recompiling. The way I ended up doing it is:
I didnt decompile the framework-res.apk.
rename the file framework-res.apk.zip
open it with 7zip.
Extract the files you are wanting to work on
Do what ever work on the files you need done
Drag and drop the files back in the directories they go into while file is open in 7zip
Close 7zip
Rename file back to framework-res.apk
push to phone with adb
No decompile or recompile.
Hope this helps
Click to expand...
Click to collapse
If you just want to modify one of the 'normal' XML files or an image then that approach will work fine. The problem is he wants to edit the bool.xml file and that is contained in the 'resources.asrc' file and you need to decompile it first.
I am in the same situation although someone managed to edit the file for me and recompile it so I got there in the end, just not by doing it myself.
I followed the instructions you describe and the file never recompiled properly - or at least my device never booted with the one I recompiled
Try it like this:
1. Place APK in "place-apk-here-for-modding"
2. Choose "9" to Decompile
3. Grab resource "resources.arsc" from framework-res.apk
4. Do my edit in projects\framework-res.apk\res\values\bools.xml
5. Compile - Yes (system app) - Yes (copy files)
6. Go to "keep" folder and delete "resources.arsc" and the bools.xml file
7. Press any key
8. Either push by ADB or Root Explorer or Flash
nickiberli said:
Try it like this:
1. Place APK in "place-apk-here-for-modding"
2. Choose "9" to Decompile
3. Grab resource "resources.arsc" from framework-res.apk
4. Do my edit in projects\framework-res.apk\res\values\bools.xml
5. Compile - Yes (system app) - Yes (copy files)
6. Go to "keep" folder and delete "resources.arsc" and the bools.xml file
7. Press any key
8. Either push by ADB or Root Explorer or Flash
Click to expand...
Click to collapse
I have tried exactly like this and it didn't work for me. I downloaded lots of different APK tools and tried them all - there were comments about using older versions of apktool.jar etc. I kept getting different sizes of the output file depending on which one I used. I gave up in the end as someone edited the file for me and it was only one specific entry in bool.xmls I wanted changing. As far I could tell we were both doing exactly the same thing.
The last thing I said I was going to do was wipe the PC I was attempting to do this on. I never got round to doing it... I'd be interested to know why I could never get this working though
Andy
Give me the framework and tell me what u want to do.
I will do that for u
Btw is the framework ICS based?
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
You have resigned?
Greets!
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
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
Hi, i'm trying to edit SystemUI but the file is corrupted or something, when compile i get unsupported method error, and 7zip can't delete files or add files.
What can i do?
Thank you
potaturrias said:
Hi, i'm trying to edit SystemUI but the file is corrupted or something, when compile i get unsupported method error, and 7zip can't delete files or add files.
What can i do?
Thank you
Click to expand...
Click to collapse
Use apktool to decompile and recompile. Using something like 7zip wont decompile to apk properly.
Heres a guide on how to use apktool http://forum.xda-developers.com/showthread.php?t=1891686
chromium96 said:
Use apktool to decompile and recompile. Using something like 7zip wont decompile to apk properly.
Heres a guide on how to use apktool http://forum.xda-developers.com/showthread.php?t=1891686
Click to expand...
Click to collapse
I always use apktool. When apktool fails 7zip fails too, maybe the apk was a bad compression or something.
I'll try with files from stock rom instead modified rom.
Thank you
OK so I use ninjamorph to theme systemui but it only can it can do nothing with the xmls.
So I decided to use mobile apktool,I downloaded apktool 4.4 armf.zip, extract and put the apktool folder on root of my SD card, set it as data, folder, import framework-res and tw-framework, than decompile my systemui. Apktool automatically delete the meta-inf so I copy Meta inf from system ui. Than i edit some xmls following a guide and recompile it. It again delete meta-inf while recompiling. I sign the apk and it adds meta-inf, than I push it to system/app, set permissions and reboot and right after I got a bootloop !
My device-Samsung galaxy trend s7392
Apktool settings-apktool 2.0,aapt 4.1
Someone please kindly help
(I forget to say I don't have a PC)
Ok i got the solution, thank you thread closed