[Q] Why can't I recompile modified apk? - General Questions and Answers

I am trying to add 1% battery mod to my ROM. I decompiled my SystemUI.apk perfectly with the latest version of apktool. I modified the files I needed then I went to recompile using
Code:
apktool b -f -d SystemUI.apk SystemUI-new.apk
Here's (poor) screenshots of my errors:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I tried manually installing apktool in /usr/local/bin and I also tried Apk-Multi-Tool version 2.0. I'm running the latest version of Mint (17 I believe) and everything is up to date, including Java JRE. I cannot find any related help on Google so any help that u can give is greatly appreciated. Thx

Nick_73 said:
I am trying to add 1% battery mod to my ROM. I decompiled my SystemUI.apk perfectly with the latest version of apktool. I modified the files I needed then I went to recompile using
Code:
apktool b -f -d SystemUI.apk SystemUI-new.apk
Here's (poor) screenshots of my errors:
I tried manually installing apktool in /usr/local/bin and I also tried Apk-Multi-Tool version 2.0. I'm running the latest version of Mint (17 I believe) and everything is up to date, including Java JRE. I cannot find any related help on Google so any help that u can give is greatly appreciated. Thx
Click to expand...
Click to collapse
your error says your lacking of resourses., you need to install also your framework_res.apk, then try to decompile/recompile.,
edit: you can use this awesome tool to decimpile/compile apk or even deodexing., Tickle My Android (TMA) by @Ticklefish here:
http://forum.xda-developers.com/showthread.php?t=1633333

Use apkmultitool for a better experience. In this u dnt gve any command lines. There is a numbers for decompile & recompile . Hit >>>>>>> THANKS
Sent from my GT-S6102 using XDA Free mobile app

airupthere_23 said:
your error says your lacking of resourses., you need to install also your framework_res.apk, then try to decompile/recompile.,
edit: you can use this awesome tool to decimpile/compile apk or even deodexing., Tickle My Android (TMA) by @Ticklefish here:
http://forum.xda-developers.com/showthread.php?t=1633333
Click to expand...
Click to collapse
Say my name and I appear...
It's hard to know quite what the problem is here as the screenshots are missing most of the error message. Including the first error, which is often the key to solving the problem.
By the looks of things though, I would say that you haven't added your png files. These error messages are all saying that you have a reference to image files in your xml..but no actual image files.
(Oh, and TMA isn't available on Linux...yet. But if the OP has access to a Windows PC, I can definitely suggest it!)

Ticklefish said:
Say my name and I appear...
It's hard to know quite what the problem is here as the screenshots are missing most of the error message. Including the first error, which is often the key to solving the problem.
By the looks of things though, I would say that you haven't added your png files. These error messages are all saying that you have a reference to image files in your xml..but no actual image files.
(Oh, and TMA isn't available on Linux...yet. But if the OP has access to a Windows PC, I can definitely suggest it!)
Click to expand...
Click to collapse
Ha thx so much I think that's it I forgot to put my pngs on the system ui.

Fixed one issue, now I got these:
I didn't even modify the public.xml file...

Nick_73 said:
Fixed one issue, now I got these:
I didn't even modify the public.xml file...
Click to expand...
Click to collapse
You should never modify the public.xml file...
I'll be honest, it's really hard to tell what's going just from screenshots of part of the error. Can you provide the entire error message please? And it would help if you're able to provide the screen output from when you decompiled as well.
What type of phone/rom are you using?

Ticklefish said:
You should never modify the public.xml file...
I'll be honest, it's really hard to tell what's going just from screenshots of part of the error. Can you provide the entire error message please? And it would help if you're able to provide the screen output from when you decompiled as well.
What type of phone/rom are you using?
Click to expand...
Click to collapse
I didn't mod it...
When I get back on my computer I'll copy the whole thing

Related

[Tool] ICS APKTool - GUI APK Compile & Decompile Tool

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello I am a developer in Korea.
Sorry my bad English...
I have made ICS APK Decompile & Compile tool.
This is the GUI!
This tool is ICS framework-res.apk completely decompile and compile.
Thank you. ^^
does this work with .jar files too?
Hmm...
I can't decompile a second time, an error appears
Sorry...
dinesh690 said:
does this work with .jar files too?
Click to expand...
Click to collapse
Sorry, this tool does not work with .jar files.
many thx
work great !
Good idea!
Unfortunately, it has many errors. Hangs on this screen and stands:
same here!
It looks to me like you are violating the license of several tools you are including, you may want to fix that.
Go read what the apache and LPGL licenses say about redistributing in binary form.
error
iodes said:
Hello I am a developer in Korea.
Sorry my bad English...
I have made ICS APK Decompile & Compile tool.
This is the GUI!
This tool is ICS framework-res.apk completely decompile and compile.
Thank you. ^^
Click to expand...
Click to collapse
hi i have this error wen i compile fremawork-res. I use fremawork-res from ics LPQ SGS
ERROR in screen
thx for help me
Very interesting this utility! Ready to use it
thanks, will try it
chudy_85 said:
hi i have this error wen i compile fremawork-res. I use fremawork-res from ics LPQ SGS
ERROR in screen
thx for help me
Click to expand...
Click to collapse
I've got that too, I didn't have it...
In the end of compiling operation there is an error..
i hope this project is not death.its very helpfull tool but need some more work..geting error as others posted already
thanks!
I also I have a GUI created for personal use, as have the 8 required the annoying messages publishes
just used this program,
it works finally able to compile since I always had that problem.
dinesh690 said:
does this work with .jar files too?
Click to expand...
Click to collapse
Just rename the .jar extension to .apk
Does it work with CM9 themes?
Ah! Great!
Fantastic Work Developer. this Tool is Both simple and efficient! it works Great on my Computer Running Win7 HP x64
-Moon
I have error too

Help with SMS application

I made a change in application SMS GO to stay with the appearance of the original application of the xperia. I edited the file using EDIT APK, but when trying to install the phone in an error, even using recovery.
NOTE: already edited several apk, but this is not the only one that installs.
If any developer can guide me would be grateful.
Attached is the edited and original apk.
Download
http://www.mediafire.com/?9ccgyzhkhgcwct9
I'm sure that there a right way to modify 3rd part app,but since the moment that I don't know too much, I can only suggest you to convert go sms in a system app (you can do that with titanium backup pro or maybe with some other app...try to google it) and then if you only need to change .png images you can just replace them into the apk file without extracting it and then push the app into system and reboot!! If you need to modify .xml files,you can use apk manager to decompile,compile and sign the apk!! if you try to modify a 3rd part app it will not work (I don't know the technical reason),so converting it in a system app is a solution to this problem!! But maybe you can wait to hear other opinion from anyone else with better knowledge than me!! hope it helps you!!
Sent from my X10i using xda premium
Which method do you used to mod your apk ?
Sent from X10i on M&M CM7.2 with Tapatalk
I used the program "edit apk" it decompresses and subscribes automatically.
The only job I had was to change the images *. png and rename
It worked for all other applications except the sms go
Attached images step by step
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
madsonhsd said:
I used the program "edit apk" it decompresses and subscribes automatically.
The only job I had was to change the images *. png and rename
It worked for all other applications except the sms go
Click to expand...
Click to collapse
You change .9.png or just .png? For editing the first ones you should use a patch, search in the general Android Themes thread.
For editing and compiling system apps you should use apkmanager instead of editapk (wich I don't know)...
If ya need further advice mail or PM me.
And sorry for my bad english!
Sent from my X10i on M&M CM7.2 with Tapatalk
Something strange happened!
Developers, tried all the above methods to install the modified application, but all without success.
I used modified ROM "vmmcs" 2.3.7
Unintentionally I had to reinstall the original rom Xperia 2.3.3.
Before installing custom ROM again. I tried to use the apk HE RAN NORMALLY.
CONCLUSION: SOME APPS MUST HAVE A MEANS TO RECOGNIZE THAT THE ANDROID HAVE ROOT, SO IT DOES NOT ALLOW THE INSTALLATION
Hello, if u have the SMS apk, why dun u try to unzip/unpack the apk contents, replace the PNG icons in Res/drawable-hdpi inside sMS apps, and rezip/repackaged using Formatter? I try to edit my Custom xperia Home.apk icons and it worked!! Here the guide thread for formatter
http://forum.xda-developers.com/showthread.php?t=1108798
Sometimes, u might need to recheck path of files directories which as same as previous file Hope this helps.
Sincerely,
Whitefang
If this helps or convinces, place kindly hit "thanks" button.
Sent from my X10i using XDA

Help Modding Framework-res.apk

Hi Guys,
I am trying to mod framework-res.apk from the Sky-ICS Rom (http://forum.xda-developers.com/showthread.php?t=1763195) in order to get Bluetooth Tethering enabled.
All I have to do is mod the lines in array.xml from this thread (http://forum.xda-developers.com/showpost.php?p=25808002&postcount=114)
I pull framework-res.apk
I decompile the apk using Apk_Manager_ICS
I make my mods to res\values\arrays.xml
recompile
then I grab the resources.arsc from the new APK and add it into the original APK file using 7-zip in STORE mode
push it back to the skyrocket
adb shell in and reset permissions (chmod) to 644
reboot
Never ending Loop
Can someone please point me in the right direction
I've done / used every method to try and get framework-res.apk recompiled and working but no dice!!
You postin in the wrong section
Sent from my SGH-I727 using Tapatalk 2
Mods give me back my report button before I go troll mode grrrrr
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
Instead of copying the res file from the new apk to the original, copy the META-INF folder from the original to the new apk. The META-INF folder contains the signatures, just FYI. And next time, post things like this in the Q&A thread.
Sent from outer space
MikeySmikey said:
Instead of copying the res file from the new apk to the original, copy the META-INF folder from the original to the new apk. The META-INF folder contains the signatures, just FYI. And next time, post things like this in the Q&A thread.
Sent from outer space
Click to expand...
Click to collapse
Ok, Thanks Mikey, I'll give it a try, and sorry about posting in the wrong section....
I thought since my question was related to development, this was the place for it.
MODS, please move my thread, Thank you!!
http://forum.xda-developers.com/showthread.php?p=21113455#post21113455
this tool works flawlessly on ICS. I had to replace the aapt file in the resources folder from the latest SDK, then recompiled with ease, zip, sign, enjoy.
HELP!!!
I think I have tried EVERY APKtool out there (I even built an XP machine to try them in), and i'm still not having luck. I dont know if its something that I'm doing wrong, but i'm all out of options.
I suspect that it may be something with the ROM because even after I restore the backed up, stock framework-res, it still bootloops.
Anyway, if someone can do me a huge favor, take the attached framework-res.apk and add the xml to the /res/values folder and send it back to me, that way I can test to see if its a problem with my system or the ROM
Thanks in Advanced!!
ruben00 said:
HELP!!!
I think I have tried EVERY APKtool out there (I even built an XP machine to try them in), and i'm still not having luck. I dont know if its something that I'm doing wrong, but i'm all out of options.
I suspect that it may be something with the ROM because even after I restore the backed up, stock framework-res, it still bootloops.
Anyway, if someone can do me a huge favor, take the attached framework-res.apk and add the xml to the /res/values folder and send it back to me, that way I can test to see if its a problem with my system or the ROM
Thanks in Advanced!!
Click to expand...
Click to collapse
there is no "values" folder under res directory/folder in the framework apk file
vincom said:
there is no "values" folder under res directory/folder in the framework apk file
Click to expand...
Click to collapse
After decompiling I get....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Values folder is one of the folders that ends up in the resources.arcs file in the apk after complying
Sent from my A500 using Tapatalk 2
StolenVW said:
Values folder is one of the folders that ends up in the resources.arcs file in the apk after complying
Sent from my A500 using Tapatalk 2
Click to expand...
Click to collapse
Yes I know, I then grab resources.arcs from the unsigned-framework-res.apk and copy it to the original framework-res.apk in store mode
push it to the device, set permissions, reboot...
bootloop
I really dont know how, but the Developer has been using Unsigned (missing META folder), I had to go all the way back to his original ROM and download and get the SIG from there.
Problem Solved.
Thanks everyone who tried to help!!

dissesembling android.policy.jar

ok i am having a hard time figuring out how to get the autoapktool to baksmali my android.policy.jar. i keep getting this error:
[*] C:\xdaAutoAPKTool_V3.0.2\_Jar_Files\android.policy.jar
decompiling C:\xdaAutoAPKTool_V3.0.2\_Jar_Files\android.policy.jar...
'jar' is not recognized as an internal or external command,
operable program or batch file.
Can't find the file _JAR_FILES\android.policy.dex\classes.dex
if anyone could help me with this i would be appreciative. or if maybe you know a better program to use to accomplish this task. any help would be amazing.
By the looks of it your typing a wrong command here
paste the one you type here and we'll correct it.
Riyal said:
By the looks of it your typing a wrong command here
paste the one you type here and we'll correct it.
Click to expand...
Click to collapse
It is an automatic tool I don't use any commands let me find the link.
Here it is http://forum.xda-developers.com/showthread.php?t=1053227
2nd post. Maybe a manual method would be better? A better tool?
try apktool it work wonders
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
download here: Link
Riyal said:
try apktool it works wonders
download here: Link
Click to expand...
Click to collapse
sweet!!!! thanks a lot it worked!!! could i get the command to put it back together?
mattlowry said:
sweet!!!! thanks a lot it worked!!! could i get the command to put it back together?
Click to expand...
Click to collapse
Should be apktool b android.policy. jar.out or whatever apktool named the folder
Sent from my myTouch_4G_Slide using Tapatalk 2
strapped365 said:
Should be apktool b android.policy. jar.out or whatever apktool named the folder
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
its telling me could not find resources
mattlowry said:
its telling me could not find resources
Click to expand...
Click to collapse
When you installed apktool did you run the apktool if miui-framework-res.apk to install miui resources
Sent from my myTouch_4G_Slide using Tapatalk 2
strapped365 said:
When you installed apktool did you run the apktool if miui-framework-res.apk to install miui resources
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
No but it worked it still created the jar file that fixed my screen orientation problem with miui
Big thanks to you guys for helping me out!!!!
Ok I guess it's solved but here's a little tip.
It's telling you "could not find resources" because android.policy.jar doesn't have any resources. It's just a plain dex file and no resources.arsc nor res folder. So it's not a bug or failed compilation it's just a warning
Also on some apks it should be asking you for unknown resource all you have to do is isntall all the needed resource files and it should fix almost all common problems.
Here's a couple of frameworks you could install.
SystemUI.apk
framework-res.apk
com.htc.resource.apk
framework-htc-res.apk
you could install it using
apktool if <framework file here>
for a list of commands just type "apktool"
Riyal said:
Ok I guess it's solved but here's a little tip.
It's telling you "could not find resources" because android.policy.jar doesn't have any resources. It's just a plain dex file and no resources.arsc nor res folder. So it's not a bug or failed compilation it's just a warning
Also on some apks it should be asking you for unknown resource all you have to do is isntall all the needed resource files and it should fix almost all common problems.
Here's a couple of frameworks you could install.
SystemUI.apk
framework-res.apk
com.htc.resource.apk
framework-htc-res.apk
you could install it using
apktool if <framework file here>
for a list of commands just type "apktool"
Click to expand...
Click to collapse
I'm learning so many things lately! I don't know what to do next......
mattlowry said:
I'm learning so many things lately! I don't know what to do next......
Click to expand...
Click to collapse
Sleep
Riyal said:
Sleep
Click to expand...
Click to collapse
best advice yet...lol

[GUIDE] Edit the systemUI.apk or any other w/o errors.

So here goes a simple guide for the noobs: who wants to change the .xmls file but always end with a error.
Disclaimer - Dont try this if u r not knowing what u r doing. Its ur own responsibility.
I have done successfully in my GALAXY ACE DUOS GT S6802
BACKUP THOSE SYSTEM FILES BEFORE U DO ANY MODDING
For this u will need :
1.Apk tool
2.root file explorer to push it from phone itself
>>First decompile required apk. [apk-tool recommended]
>>Make .xml changes [edit the clock, date, icons, etc]
>>save [ edit and save in notepad++]
>>recompile [apktool] [no-signing]
>>see log if any error in apktool folder
>> procced if not - [if there is something improper code u have placed - u have to see every code properly with the orignal .xml]
>>now u have two apks 1. orignal 2. modded
>> first push the modded one
>>if works !! great [Will surely not work for systemui.apk]
>> if not then open both apk using the 7zip [This will surely work for systemui.apk ] [Provided u didnt have changed the format of the xml]
>>copy the modded "compiled" .xml from modded apk to orignal apk to its corresponding location
>push the file [Orignal .apk file with the modded .xml ]
>now the file should work unless u have done any coding mismatch.
> Restart
>>Enjoy
Press thanks if u got success in modifying the files.
Any query u can ask freely
I searched at many place but didnt got an easy guide , so i tried 100's time to recompile and decompile the files finally , my own method worked and shared with u all
Removed clock from status bar completely.
For this I edited status_bar.xml and deleted whole clock code.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
|mjp93|
This method still fails when u edit smali files.
Actually I haven't still known the location of smali files after recompling in .apk file.
mjp93 said:
This method still fails when u edit smali files.
Actually I haven't still known the location of smali files after recompling in .apk file.
Click to expand...
Click to collapse
The smali code is within classes.dex
Thanks mate, hope this helps me for further modding. Thanks once again..
OMG !!! No one has yet commented on the thread but you keep Commenting your own post !
Never seen this before :silly:
Sent from Gallifrey using TARDIS

Categories

Resources