Decompiling Browser.apk with apktool ERROR - General Questions and Answers

I can compile and decompile the two framework apks without problems.
I cannot for the life of me get any other apk file to decompile with the follow errors...
Does anyone know what is causing this?
Here is video of the error I'm getting for any apk other than frameworks.
http://www.youtube.com/watch?v=4gBmTbntMp4
EDIT: I have figured out what's going on! No longer need help.

cortland1998 said:
I can compile and decompile the two framework apks without problems.
I cannot for the life of me get any other apk file to decompile with the follow errors...
Does anyone know what is causing this?
Click to expand...
Click to collapse
Are you using the correct framework -target?
Not even sure if you need to use a framework target when you compile standard apks.

ante0 said:
Are you using the correct framework -target?
Not even sure if you need to use a framework target when you compile standard apks.
Click to expand...
Click to collapse
I'm not sure what you mean as I'm pretty new with this stuff...
It does mention "Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info."

Every browser with ad blocking will have a list of hosts and it's servers right????? But where is that file.....I searched uc browser, kiwi browser, dolphin etc....but I can't find it at least in one....can anyone help....and how to modify it????

Related

Signing APK (HTCSetupWizard.apk)

I keep having issues with the actual signatures when I edit certain system files.
Package com.htc.android.htcsetupwizrd has no signatures that match those in shared use android.uid.system; ignoring!
So basically, I can sign them and they work, but anything that accesses system settings and uses android.uid.system wont work.
Can anyone help me, possibly even provide me with a signature file or instructions on making this work with other signatures?
This is for a custom ROM so even if anyone knows how to add signatures to the system, that would work too.
Don't resign them, leave them as signed by HTC.
SteelH said:
Don't resign them, leave them as signed by HTC.
Click to expand...
Click to collapse
apktool is breaking the APK signatures...I gave up on that file and now I'm trying HTCAlbum.apk to no avail.
Neotelos_com said:
apktool is breaking the APK signatures...I gave up on that file and now I'm trying HTCAlbum.apk to no avail.
Click to expand...
Click to collapse
I don't know anything about dev-ing, but can you edit what you need straight in 7-zip?
awesomecomb said:
I don't know anything about dev-ing, but can you edit what you need straight in 7-zip?
Click to expand...
Click to collapse
No, that definitely breaks signatures.
Neotelos_com said:
No, that definitely breaks signatures.
Click to expand...
Click to collapse
Actually I believe editing without decompiling is what maintains the signature. Except you can only change pngs and replace xmls. To edit xmls you have to decompile the apks though, unless you know hex editing. I've been struggling with apktool trying to modify Rosie.apk from Z roms with absolutely no success (cannot recompile). Although it may have something to do with my resource table...
You can use dsixda's kitchen to sign all the apks so they match, I believe all system apks and one of the framework files (cant think of the exact one atm) all need to be signed the same.

Need someone to compile an APK for me

Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Thanks!!
Here's what I need compiled:
http://mikelierman.com/SystemUI.apk.zip
0vermind said:
Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Thanks!!
Here's what I need compiled:
http://mikelierman.com/SystemUI.apk.zip
Click to expand...
Click to collapse
What did you use to decompile it? APK Manager from this thread?
http://forum.xda-developers.com/showthread.php?t=695701
Oh and once you compile it, you don't have to sign it because is a system app and not a regular app.
0vermind said:
Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Click to expand...
Click to collapse
What errors are you getting from apktool? It's going to be hard for someone else to compile an apk that has not been decoded by them and not knowing what files have been changed. Letting us know at least what .png or .xml files were modified would be a start but will work best if we could just figure out why you aren't able to build with your modifications.
The first thing I noticed from the zip you attached is that it's missing the apktool.yml file that should get created a package is decoded. Second, make sure to pull /system/framework/framework-res.apk so resources can be decoded/built properly. If you are using APK Manager, use option 10 to decode with framework-res.apk. If you are just using apktool run the command "apktool if framework-res.apk" before decoding.
mazdarider23 said:
Oh and once you compile it, you don't have to sign it because is a system app and not a regular app.
Click to expand...
Click to collapse
SystemUI.apk actually does get signed using the platform key. The easiest way to do so in my opinion is to use ZipSigner 2 on your phone. Also, once you've placed the modified SystemUI.apk into /system/app make sure it's permissions are rw-r--r--(chmod 644 /system/app/SystemUI.apk) and it's owner:group is root:root(chown 0:0 /system/app/SystemUI.apk). Next reboot to recovery, wipe dalvik-cache and cache, then reboot.
MongooseHelix said:
What errors are you getting from apktool? It's going to be hard for someone else to compile an apk that has not been decoded by them and not knowing what files have been changed. Letting us know at least what .png or .xml files were modified would be a start but will work best if we could just figure out why you aren't able to build with your modifications.
The first thing I noticed from the zip you attached is that it's missing the apktool.yml file that should get created a package is decoded. Second, make sure to pull /system/framework/framework-res.apk so resources can be decoded/built properly. If you are using APK Manager, use option 10 to decode with framework-res.apk. If you are just using apktool run the command "apktool if framework-res.apk" before decoding.
SystemUI.apk actually does get signed using the platform key. The easiest way to do so in my opinion is to use ZipSigner 2 on your phone. Also, once you've placed the modified SystemUI.apk into /system/app make sure it's permissions are rw-r--r--(chmod 644 /system/app/SystemUI.apk) and it's owner:group is root:root(chown 0:0 /system/app/SystemUI.apk). Next reboot to recovery, wipe dalvik-cache and cache, then reboot.
Click to expand...
Click to collapse
Well I'm glad you told me because little old me has been modifying system apps since the days of the nexus one and I've yet to sign one....I think is all depends on who's doing the modification...hahahaha....Good luck 0vermind on finding someone to compiling your systemui.apk!
mazdarider23 said:
Well I'm glad you told me because little old me has been modifying system apps since the days of the nexus one and I've yet to sign one....I think is all depends on who's doing the modification...hahahaha....Good luck 0vermind on finding someone to compiling your systemui.apk!
Click to expand...
Click to collapse
I'm not quite sure what to make of that comment...I certainly wasn't trying to step on your toes so I apologize if it came across that way. Just wanted to help avoid and rule out any issues that might come up. With APK Manager or by using 7zip, you can move the manifest and/or META-INF folder containing the signature from the original but to imply that system apps are not signed is incorrect.
I also think it is important that those messing with system apps understand that there are different keys used to sign apps. For anybody reading this that wants to figure out how certain packages are signed, here's a bit of an explanation. If we extract SystemUI.apk, we see a directory called META-INF. This holds the key/signature info. The key's serial number can be determined with the following command:
Code:
keytool -printcert -v -file SystemUI/META-INF/CERT.RSA | grep SerialNumber
You can check other apks/jars and noticing which have matching serial numbers, meaning they are signed with the same key...
platform key - SystemUI.apk, Settings.apk, Phone.apk, etc
shared key - Contacts.apk, UserDictionaryProvider.apk, etc
test key - Calendar.apk, DeskClock.apk, etc
google proprietary key - Vending.apk, Talk.apk, etc (including some market user apps like Maps, VoiceSearch, Docs)
MongooseHelix said:
I'm not quite sure what to make of that comment...I certainly wasn't trying to step on your toes so I apologize if it came across that way. Just wanted to help avoid and rule out any issues that might come up. With APK Manager or by using 7zip, you can move the manifest and/or META-INF folder containing the signature from the original but to imply that system apps are not signed is incorrect.
I also think it is important that those messing with system apps understand that there are different keys used to sign apps. For anybody reading this that wants to figure out how certain packages are signed, here's a bit of an explanation. If we extract SystemUI.apk, we see a directory called META-INF. This holds the key/signature info. The key's serial number can be determined with the following command:
Code:
keytool -printcert -v -file SystemUI/META-INF/CERT.RSA | grep SerialNumber
You can check other apks/jars and noticing which have matching serial numbers, meaning they are signed with the same key...
platform key - SystemUI.apk, Settings.apk, Phone.apk, etc
shared key - Contacts.apk, UserDictionaryProvider.apk, etc
test key - Calendar.apk, DeskClock.apk, etc
google proprietary key - Vending.apk, Talk.apk, etc (including some market user apps like Maps, VoiceSearch, Docs)
Click to expand...
Click to collapse
Thanks, I didn't know this! I'm glad there's people like you and mazdarider23 on this forum that know **** like this!!!

theme help

can someone please help me I have edited the files I want edited and have used draw9 to set patches...but when I run the xultimate 9 patch compiler I get this error>>> C:\Documents and Settings\H\Local Settings\Application Data\7z.exe is not a valid Win 32 application and I don't know how to fix it...any help would be GREATLY appreciated!!
filthy1 said:
can someone please help me I have edited the files I want edited and have used draw9 to set patches...but when I run the xultimate 9 patch compiler I get this error>>> C:\Documents and Settings\H\Local Settings\Application Data\7z.exe is not a valid Win 32 application and I don't know how to fix it...any help would be GREATLY appreciated!!
Click to expand...
Click to collapse
not sure what going on there. but try this. instead of using ultimatex, decompile with apk manager, make your edits, then recompile the apk. when you use ultimatex to recompile a .9 it wont decompile properly when you want to make future edits.
apk manager
I was able to do this for tge framework but now I am trying to edit my message bubbles in the mms.apk and am honestly a little,confused on how to decompile and recompile apps....
filthy1 said:
I was able to do this for tge framework but now I am trying to edit my message bubbles in the mms.apk and am honestly a little,confused on how to decompile and recompile apps....
Click to expand...
Click to collapse
do you have apk manager??
gunnermike said:
do you have apk manager??
Click to expand...
Click to collapse
Yes sir sure do! Btw thanks for trying to help.
I answered your q&a thread too. Just re/install 7Zip.
Sent from my Droid Charge running GummyCharged 2.0
kvswim said:
I answered your q&a thread too. Just re/install 7Zip.
Sent from my Droid Charge running GummyCharged 2.0
Click to expand...
Click to collapse
I still had it installed while it was giving me an error but I will try.
no go
So I just reinstalled 7zip but it did the same error tried to use apk manager and it won't decompile cause it says I have to extract it first so I extracted it and tried to recompile it and I got error 21 with a bunch of missing images but there is nothing that I changed other than the .9.png's I am so confused that I may just live with a theme I dislike ....
filthy1 said:
So I just reinstalled 7zip but it did the same error tried to use apk manager and it won't decompile cause it says I have to extract it first so I extracted it and tried to recompile it and I got error 21 with a bunch of missing images but there is nothing that I changed other than the .9.png's I am so confused that I may just live with a theme I dislike ....
Click to expand...
Click to collapse
make sure you have the proper frameworks installed. 7z wont do you any good. put in "place here for mods" or something like that, the select option 9 to decompile. now, you cant have any extras. it theres one extra icon it wont recompile. so make sure you account for every icon that goesn in there.
gunnermike said:
make sure you have the proper frameworks installed. 7z wont do you any good. put in "place here for mods" or something like that, the select option 9 to decompile. now, you cant have any extras. it theres one extra icon it wont recompile. so make sure you account for every icon that goesn in there.
Click to expand...
Click to collapse
I don't have a framework....I am just trying to edit the bubbles in the mms.apk to start....and I keep getting an error that tells me check the log if I try to decompile or recompile the mms.apk
filthy1 said:
I don't have a framework....I am just trying to edit the bubbles in the mms.apk to start....and I keep getting an error that tells me check the log if I try to decompile or recompile the mms.apk
Click to expand...
Click to collapse
ok, you need to get some basics. head over to freenode channel #teamsbrissenmod. thats the best place to go to learn how to do this stuff. i will be on for a little bit.
I think i'm going to go there I would like to learn some basics!....*looks forward to some boot camp*
4G LTE Tapatalked
gunnermike said:
not sure what going on there. but try this. instead of using ultimatex, decompile with apk manager, make your edits, then recompile the apk. when you use ultimatex to recompile a .9 it wont decompile properly when you want to make future edits.
Click to expand...
Click to collapse
thats not really true...xultimate does the exact same thing when compiling .9s as if they were compiled with apktool or eclipse
a lot of the .9s i compile in windows (unfortunate byproduct of work) are with xultimate and the decompile fine later
same with android utility in linux
generally its fine to just use apktool to decompile, edit and recompile but this doesnt always work with some apks that just cant be decompiled without errors
nitsuj17 said:
thats not really true...xultimate does the exact same thing when compiling .9s as if they were compiled with apktool or eclipse
a lot of the .9s i compile in windows (unfortunate byproduct of work) are with xultimate and the decompile fine later
same with android utility in linux
generally its fine to just use apktool to decompile, edit and recompile but this doesnt always work with some apks that just cant be decompiled without errors
Click to expand...
Click to collapse
not doubting you, however i have never had a .9 that compiled with apkmanager or tool seperate during decompile, and where as not all .9's compiled with ultimate x seperate, many do. so...i just dont bother with ultimate x. when your apks decompile and recompile properly, it makes future edits much easier.

HELP with Decompiling APK (using APKTOOL)

I've looked around for some good tutorials on decompiling APKs using APKTool but haven't been able to get a few questions answered. Hoping someone can guide me with this process a bit since I'm really new at it.
A few things first: I am running CM 7.1 on a Droid Incredible (orig) and I'm also on Windows, not Linux. I'm looking to make some changes to the code of an APK and have APKtool downloaded. Questions I have so far are:
1) Do I need to use the CM 7.1 framework-res.apk file for any decompiling / /recompiling work on this 3rd party APK? Or can I do all the work without it? No one seems to have a clear answer on that and I'm not sure exactly what the framework-res.apk is for exactly.
2) After I decompile an APK and make code changes to a SMALI file, is there anything I need to do special before running the compile command?
3) After I have a newly compiled APK, what do I need to do to make this work on my phone? If I do nothing, the overall file size of the compiled APK seems much smaller than the original one that I decompiled so it seems like something is wrong. Plus it won't install. I saw one video where the newly compiled APK is renamed to .ZIP and the contents are put into the ORIGINAL APK (also renamed to .zip), overwriting all the original contents. Is this required?
4) I've also read that APKs need to be signed to install on Android. Is this correct? I found "SignApk" online which seems like it just asks you to rename your APK to app.apk and it does the signing by running a .BAT file. Is that all I have to do before installing the APK on my phone?
Would really appreciate any help on this. Or if there's a great tutorial out there on doing this, I'd be happy to read through.
Thanks for any help in advance!
I want to know these too! Hope someone helps

APK doesn't install even I did no modification to it

Hi masters,
I wanted to modify an android game named Injsutice gods among us. I used ApkEasyTool to decompile the APK and I didn't modify anything. After decompilation I recompiled the APK without doing any changes to its source. After successfully recompilation I installed the APK in android. The error I get while installing the app is "App is not installed". Can you tell me how to recompile the android app in a proper way and what are the steps to make it run successfully? The application is built for arm64-v8a architecture.
Thank you sir.
Use the original APK file.
jwoegerbauer said:
Use the original APK file.
Click to expand...
Click to collapse
Please read the post again. I am trying to modify the application. I would install modified application. But I got an issue while installing the application which is recompiled from apkeasytool.
I was referring to the title of the thread ...

Categories

Resources