• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Support] APK multi/auto tool

ShinySide

Extreme Android User
So I broke my apktool a while back. Tried to fix it and gave up on it and then tried again...no dice.It would not recompile, decompile with out issue but wouldnt recompile. So I started looking around and found V2.0.3-autoAPKTool. Its apk multitool thats been given an interface other then just a cmd. Actually pretty cool. Well once again I could decompile but not recompile. I then got it to the point where it would get stuck running/opening the apktool_1.3.2.jar Thats the only thing it told me in the log was it couldnt open that jar to recompile. Fixed that and now I get this error which its pretty much the same one I got running apkmultitool...Anyone make light on it and tell/show me how to get this *beep* up and running so I can recompile an apk?


Heres whats in my error log:


-----------------------------------------------------
[*] Processing framework-res folder...
-----------------------------------------------------
Recompiling framework-res.apk...
W: Could not find sources
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL1002924117280004880.tmp, -x, -S, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL1002924117280004880.tmp, -x, -S, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
DONE!
 
I've ALWAYS had problem trying to recompile with APK multi.

The only one that ever works for me is the Easy APK and I have to use a bone stock framework and replace all my ish after the fact.
 
Yeah that second link is what Im using...trying to use...now

Gonna try out that other one...crap is pissing me off...

Yeah that ish can get VERY aggravating very quick so i understand.

Try out Easy APK and if you still have the problem then you will at least know it's not localized to those programs.
 
So I broke my apktool a while back. Tried to fix it and gave up on it and then tried again...no dice.It would not recompile, decompile with out issue but wouldnt recompile. So I started looking around and found V2.0.3-autoAPKTool. Its apk multitool thats been given an interface other then just a cmd. Actually pretty cool. Well once again I could decompile but not recompile. I then got it to the point where it would get stuck running/opening the apktool_1.3.2.jar Thats the only thing it told me in the log was it couldnt open that jar to recompile. Fixed that and now I get this error which its pretty much the same one I got running apkmultitool...Anyone make light on it and tell/show me how to get this *beep* up and running so I can recompile an apk?


Heres whats in my error log:


-----------------------------------------------------
[*] Processing framework-res folder...
-----------------------------------------------------
Recompiling framework-res.apk...
W: Could not find sources
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL1002924117280004880.tmp, -x, -S, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL1002924117280004880.tmp, -x, -S, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\Users\Adam\Downloads\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
DONE!
here's some advice that will save you tons of head aches lol, thos apk multi-whatever things will never work for you with files from an lg-esteem.. or damn near any other device that has come out recently man..

half the time when these guys make these lil scripts and programs they are slapped together with bunch of crap that will lead you nowhere except down a stressfull wasted weekend bro! best way to solve a problem is always going to the 'root' of the issue.. which in your case is 'apktool' all itself

apktool is without a doubt the EASIEST thing made to use in the world and it does what you need with no issues and no googling why this wont do that... it just all works man lol

you need 3 simple files :D (aapt.exe, apktool.bat, apktool.jar) place those 3 files in a folder, name it "apk" now place that folder on ROOT of your C/drive, now open up your terminal/cmd prompt and get yourself to your 'apk' directory..

usually consists of pressing 'cd..' to 'change directory' ie:

C:/users/johnblaze>

so now you type 'cd..' which will bring you up 1 directory, so now you will see

C:/users>

type 'cd..' once more and now you will be at ROOT od C/drive

C:/>

now that your at ROOT of c/drive, get to apk folder directory

'cd apk'

so now you should see

C:/apk>

ok now that was the hardest part lol using apktool is the easy part.. there are a few lines you should get familiar with.. once you type them once or twice you wont forget lol

first is how to install the framework (needed for systemui & etc..)

place the framework-res.apk from "Stock ZVD Rom" inside the 'apk' folder you created earlier, now go to your cmd prompt and get to apk directory,
type this:

apktool if framework-res.apk

there, you never have to do that again.. ever lol!! unless you get a different device to play with later on..

thats how easy it is to set up apktool... it sounds difficult from reading but its rediculously easy and will save you many many headaches man i promise!!

so basically all you need now is the cmd to decompile and recompile..

to decompile you type: apktool d (name of apk) (name of new folder your creating for decompiled apk)ie:

apktool d framework-res.apk fw1

to build you type: apktool b (name of decompiled apk folder) (name of new apk) ie:

apktool b fw1 framework-res-new.apk


that is all the info you need... o and to answer your question, are you using a modified apk? try replacing the drawable-hdpi folder from it with the 'stock version' of that apk
 
Errrrrrrrrrrrrrr I still get an error when trying to recompile. but only if I change anything


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Adam>cd..

C:\Users>cd..

C:\>cd apk

C:\apk>apktool d framework-res.apk fw1
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

C:\apk>apktool b fw1 framework-res-new.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'cannot_exec_omadm' has no default translation in C:\apk\f
w1\res; found: ko
I: Building apk file...

C:\apk>apktool b fw1 framework-res-new.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'cannot_exec_omadm' has no default translation in C:\apk\f
w1\res; found: ko
C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Adam\AppData\Local\Temp\AP
KTOOL753657850919988115.tmp, -x, -S, C:\apk\fw1\res, -M, C:\apk\fw1\AndroidManif
est.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
at brut.androlib.Androlib.buildResources(Androlib.java:249)
at brut.androlib.Androlib.build(Androlib.java:172)
at brut.androlib.Androlib.build(Androlib.java:155)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Adam\AppData\Local\Temp\APKTOOL753657850919988115.tmp, -x, -S, C:\apk\fw1\r
es, -M, C:\apk\fw1\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more

C:\apk>
 
Errrrrrrrrrrrrrr I still get an error when trying to recompile. but only if I change anything


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Adam>cd..

C:\Users>cd..

C:\>cd apk

C:\apk>apktool d framework-res.apk fw1
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

C:\apk>apktool b fw1 framework-res-new.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'cannot_exec_omadm' has no default translation in C:\apk\f
w1\res; found: ko
I: Building apk file...

C:\apk>apktool b fw1 framework-res-new.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'cannot_exec_omadm' has no default translation in C:\apk\f
w1\res; found: ko
C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Adam\AppData\Local\Temp\AP
KTOOL753657850919988115.tmp, -x, -S, C:\apk\fw1\res, -M, C:\apk\fw1\AndroidManif
est.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
at brut.androlib.Androlib.buildResources(Androlib.java:249)
at brut.androlib.Androlib.build(Androlib.java:172)
at brut.androlib.Androlib.build(Androlib.java:155)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Adam\AppData\Local\Temp\APKTOOL753657850919988115.tmp, -x, -S, C:\apk\fw1\r
es, -M, C:\apk\fw1\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more

C:\apk>

this is why:

C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').


instead of trying to use a pre-set value just use the hex code instead.. transparent is just #00000000 dark transparent is #80000000 so open your styles.xml and find where that specific error is then replave this '@color/background_transparent' with #80000000

'those aapt and ko errors are normanl and will not hurt anything!!, but when your done your not flashing this built apk.. you need to open it with 7zip and pull out the resources.arsc file and res folder, push them into the original apk and use that for the rom :D
 
this is why:

C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').


instead of trying to use a pre-set value just use the hex code instead.. transparent is just #00000000 dark transparent is #80000000 so open your styles.xml and find where that specific error is then replave this '@color/background_transparent' with #80000000

'those aapt and ko errors are normanl and will not hurt anything!!, but when your done your not flashing this built apk.. you need to open it with 7zip and pull out the resources.arsc file and res folder, push them into the original apk and use that for the rom :D


That last sentence almost sent me to my grave until I finally understood it. Damn resources file.
 
this is why:

C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').


instead of trying to use a pre-set value just use the hex code instead.. transparent is just #00000000 dark transparent is #80000000 so open your styles.xml and find where that specific error is then replave this '@color/background_transparent' with #80000000

'those aapt and ko errors are normanl and will not hurt anything!!, but when your done your not flashing this built apk.. you need to open it with 7zip and pull out the resources.arsc file and res folder, push them into the original apk and use that for the rom :D


Ahhh okay okay. The steps I found online for changing all the black backgrounds (in settings, etc) to any image you want had it in the steps to just write "transparent"
 
this is why:

C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').


instead of trying to use a pre-set value just use the hex code instead.. transparent is just #00000000 dark transparent is #80000000 so open your styles.xml and find where that specific error is then replave this '@color/background_transparent' with #80000000

'those aapt and ko errors are normanl and will not hurt anything!!, but when your done your not flashing this built apk.. you need to open it with 7zip and pull out the resources.arsc file and res folder, push them into the original apk and use that for the rom :D
o and i think i know why it didn't work.. instead of it saying '@color/background_transparent' i think it needs to be '@android:color/background_transparent' :D
 
Ahhh okay okay. The steps I found online for changing all the black backgrounds (in settings, etc) to any image you want had it in the steps to just write "transparent"
well yeah you can do that but the guide fails to mention you need to add that as a string in the colors.xml list and stuff lol
 
A quick tip i like when using apktool is just to nav to the folder hold down shift and right click then click open command prompt here from the menu. It saves from having to do those 'cd..' lines.
 
A quick tip i like when using apktool is just to nav to the folder hold down shift and right click then click open command prompt here from the menu. It saves from having to do those 'cd..' lines.
haha dude i was actually curious if there was a way to do that but didn't know how to word it correctly for google haha thanks bro that actually is a huge time saver!!

omg i just tested it too and literally almost came in my pants lol i wish i knew this months ago lolol
 
this is why:

C:\apk\fw1\res\values\styles.xml:40: error: Error: No resource found that matche
s the given name (at 'colorBackground' with value '@color/background_transparent
').


instead of trying to use a pre-set value just use the hex code instead.. transparent is just #00000000 dark transparent is #80000000 so open your styles.xml and find where that specific error is then replave this '@color/background_transparent' with #80000000

'those aapt and ko errors are normanl and will not hurt anything!!, but when your done your not flashing this built apk.. you need to open it with 7zip and pull out the resources.arsc file and res folder, push them into the original apk and use that for the rom :D

k how do I resigned the apk? I'm trying to do mms.apk
 
haha dude i was actually curious if there was a way to do that but didn't know how to word it correctly for google haha thanks bro that actually is a huge time saver!!

omg i just tested it too and literally almost came in my pants lol i wish i knew this months ago lolol


=p:: all you had to do was ask! LoL
 
k how do I resigned the apk? I'm trying to do mms.apk


Open both your edited apk and the original one in 7zip and copy META-INF and androidmanifest.xml from the original to your new one. Also if for whatever reason classes.dex isnt in your new one youll need that too.
 
k how do I resigned the apk? I'm trying to do mms.apk
you dont! :D you open your new apk with 7zip and pull out the resources.arsc, classes.dex(incase you made changes in smali folders) and 'res' folder copy them to your desktop

now grab the old original copy of mms.apk and open with 7zip, push all the files from desktop into the old one and your all set! so your using the old apk with your new changes pushed into it via 7zip :D keeping the original signature
 
Back
Top Bottom