Unable to decompile/recompile a certain APK - Android Q&A, Help & Troubleshooting

Hey everyone, can someone please help me in decompiling and recompiling this APK? I seem to have issues with it, when other APKs are working fine with me using apktool. It gives me errors without even modifying it. Seems like something to do with the resources...I just want to edit a couple smali files and maybe an xml.
EDIT: I have seemed to fix this by using the -r command when decompiling!

Related

newbie question -de/recompile androidmanifest.xml

OK, I've been working on my rom and for the most part its actually going really well - I've got it working fast, gsync is working, blah blah
I've run into a permission problem though, and I need to edit HTCDialer.apk's AndroidManifest.xml file to include a new permission line. Sadly, I haven't figured out how to do this on my own (I've been android devving for about 2 weeks now... maybe 3, i forgot haha).
How do I decode those androidmanifest.xml files?
Secondly - I've also tried making other changes to .apk files and using autosign.bat to resign them, but half the time my changed apk's never work. The apps just don't work or appear in my app list, and logcat says something about apk uid signatures not matching, so I ran "fix apk uids" from recovery but that didn't help either. i don't think my apk changes are being signed properly.
Is apktool what you're after?
YES! OMG thank you. I had thought they were just .dex'd xml files so I tried baksmali but I kept getting top level errors. apktool worked perfect for me, got apst whatever baksmali error I had and did it just fine. You're awesome, thanks!
Aeltrius said:
YES! OMG thank you. I had thought they were just .dex'd xml files so I tried baksmali but I kept getting top level errors. apktool worked perfect for me, got apst whatever baksmali error I had and did it just fine. You're awesome, thanks!
Click to expand...
Click to collapse
could please help me?
i would like to decode a exisisting apk to edit the androidmanifest.xml just a little bit to my personal need. somehow the apk tool just leads to an error everytime. when i just unpack the apk and edit the xml-file its of course crypted.
could you give me a explanation of how to just edit the androidmanifest.xml of an exisiting apk and package the apk again?
apktool d name.apk out
(now edit the androidmanifest.apk in out directory)
apktool b out
now you have to SIGN the out.apk that is in /out/dist directory

Recompling an apk questions

Trying to modify contacts.apk to make the dialer multi-dpi compatible. Did that and it works.
My issue is recompiling the apk. Everytime I recompile the apk with apktool it looses over a megabyte in size. In my case went from 4.49MB to 3.19MB after rebuilding. Only file modified was dialer_app.xml and it's size stayed about the same.
I've brought framework-res.apk and twframework.apk into apktool. After copying the resulting contacts.apk back to the device it is not recognized.
I've also tried copying the META-INF directory from the original apk over to the new one. Still no luck. I'm new to this and if anyone has some help for me it would be greatly appreciated!
Did you sign your new apk after recompiling it ?
Do you have classes.dex and resources.arsc files in your new apk ?
since its a system apk I've read it shouldn't be signed. Only thing I did was copy the META-INF folder to the new apk. In the new apk I do see classes.dex and resources.arsc. All the files appear to be there but the apk has shrunken in size.
I'm guessing I'm missing something simple here. But I'm new to this. Been at it for a few hours haven't had any luck.
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Recompiled apks will be quite a bit smaller as they will have more compression applied, this is normal, just be careful as if the tool compresses it to much you will get fc's. But it should work fine.
idhbar said:
I am new in development field. I have two questions 1. Is there same meaning for building and recompiling using apk tool? 2. I know framework-res.apk is needed for apktool d com, but where and the what is the use of twframework.apk file. Please explain anyone .
Click to expand...
Click to collapse
Read the apktool website for info about framework files, as far as which one to use, if you are decompiling a la2 or la4 base use a kl2 or kk5 framework without jkays built in as the laX frameworks are kinda buggy.
Sent from my GT-I9100 using Tapatalk

[Q] What exactly are "SystemUI.apk" and "framework-res.apk"

I have use apktool to decompile an apk and made some customizations on it, there after recompiled it back using the same apktool. But for recompiling SystemUI.apk and framework-res.apk files were needed, anyway i downloaded it from some sites and now the recompiling has done successfully. So i need to know what exactly are these apk's and where to get these apk? I had googled it several times but did't got a right answer, all i understand is that both that apk's are part of rom.

APKTool gives me error everytime i try to modify my system apps??

I Have a Verizon Galaxy S4 and i am running on Hyperdrive ROM RLS 19.... I Wanted to edit some of my system apps specifically my keyboard, Messages, phone, and Notification center toggles. I Know some basics about apktool but not much. i know that you must first Use the command "apktool if framework-res.apk" and i also did the same for the SystemUI and Touchwiz framework apk ... However everytime after ive decompiled and I do the editing-- (Ex. editing image files with image editor or changing color codes in values files)-- and try to recompile it gives me errors and wont allow me to recompile. please help i cant seem to find out what im doing wrong. ive scowered the internet and cant seem to locate a solution. Please Help.... if there is an easier method or program for editing apps please tell me.
Thanks
ampiscool said:
I Have a Verizon Galaxy S4 and i am running on Hyperdrive ROM RLS 19.... I Wanted to edit some of my system apps specifically my keyboard, Messages, phone, and Notification center toggles. I Know some basics about apktool but not much. i know that you must first Use the command "apktool if framework-res.apk" and i also did the same for the SystemUI and Touchwiz framework apk ... However everytime after ive decompiled and I do the editing-- (Ex. editing image files with image editor or changing color codes in values files)-- and try to recompile it gives me errors and wont allow me to recompile. please help i cant seem to find out what im doing wrong. ive scowered the internet and cant seem to locate a solution. Please Help.... if there is an easier method or program for editing apps please tell me.
Thanks
Click to expand...
Click to collapse
Greetings.
Thank you for using XDA Assist. I'm going to move this thread to your device's Q & A forum. You should get an expert response there.
Good luck!

Help modding this APK?

hello. so, i am trying to mod this APK for installation on a 4.4 Kitkat machine. however, it just gets me failed to install notice.
the game is Sword of Chaos. and all i want to do is delete a .MP4 file, which is the opening intro to the game.
i am using apktool to decompile and build. used the option simple d and b for the process. i have also the framework-res.apk. i have tried the -r and -s to not decode when de-compiling. and have also tried the -f option when building.
in the end, i don't know enough of how to get this working. again, i only want to remove a small cutscene.
if someone could help me figure out how to do this, that would be great. thank you! ^_^
okay! i figured out how to do it!
still using apktool to decompile, but using APK Easy Tool to compile. this let me keep the signature!
the APK Easy Tool seems to have apktool built-in, but i can't these programs to work right. APK Easy Tool and a couple others state something like, 'part of the path can't be found'. i tried running the program as a different non-admin user, but did not much help. "ADK" seemed to work fine like that, but "ADK Easy Tool" still had the same error. oh wells.

Categories

Resources