Apktool compile error - Android Q&A, Help & Troubleshooting

When i want to compile ill get an error, i have install framework and the newest java jdk version.
I trying to compile Whatsapp.apk. Pls i need help
Code
--------------------------------------------------------------------------
|za 04-03-2017 -- 20:38:48,21|
--------------------------------------------------------------------------
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Could Not Find C:\Users\Jarno\Desktop\ApkEditor2.2.0\place-apk-here-for-modding\../place-apk-here-for-modding/signedWhatsapp.apk
Could Not Find C:\Users\Jarno\Desktop\ApkEditor2.2.0\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedWhatsapp.apk
Exception in thread "main" java.lang.NullPointerException
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:58)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:516)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:267)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:108)
at brut.apktool.Main.cmdDecode(Main.java:163)
at brut.apktool.Main.main(Main.java:81)
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
Press any key to continue . . .

Related

[Q] Decompiling Swype.apk (3.25.xx)

Is anyone else getting the following error when decompiling the newest Swype beta?
This is from apktool 1.4.1:
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
Could Not Find C:\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/signedSwype.apk
Could Not Find C:\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSwype.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f090001 bool/set_help_dialog_font, config=-v13
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Click to expand...
Click to collapse
Any ideas why I'm getting this?
have the same problem, but also no idea why its happening. any help would be greatly appreciated.
Probably because you guys are using version 7 of java and not version 6 (at least the OP is).
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
yareally said:
Probably because you guys are using version 7 of java and not version 6 (at least the OP is).
Click to expand...
Click to collapse
I originally was using Java 6 and was getting the same errors, so I installed version 7.
Thanks for your speculation...
bump
anyone??
same issue here!
Propably it's because of some missing resource type that is present in swype, but is not recognized by apktool...
However... the only missing res type I see is tvdpi...
Or, maybe it's because of those xml-v9 and similar folders... dunno.

[Q] APKtool problem

So Im porting miui v5 and has a liitle problem with apktool. It cant compile framework.jar. I need answer fast because bootable version is almost done.
[email protected]:/home/ja/patchrom/live# make fullota
>>> build out/framework.jar...
/home/ja/patchrom/tools/add_miui_smail.sh >/dev/null out/framework_miui out/framework
/home/ja/patchrom/tools/apktool --quiet b out/framework out/framework.jar
Exception in thread "main" org.jf.dexlib.Util.ExceptionWithContext: method index is too large.
at org.jf.dexlib.Util.ExceptionWithContext.withContex t(ExceptionWithContext.java:54)
at org.jf.dexlib.Item.addExceptionContext(Item.java:1 77)
at org.jf.dexlib.Item.writeTo(Item.java:120)
at org.jf.dexlib.Section.writeTo(Section.java:119)
at org.jf.dexlib.DexFile.writeTo(DexFile.java:716)
at brut.androlib.src.DexFileBuilder.getAsByteArray(De xFileBuilder.java:75)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBu ilder.java:58)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:52)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:257)
at brut.androlib.Androlib.buildSources(Androlib.java: 214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: java.lang.RuntimeException: method index is too large.
at org.jf.dexlib.Code.Format.Instruction35c.writeInst ruction(Instruction35c.java:102)
at org.jf.dexlib.Code.Instruction.write(Instruction.j ava:57)
at org.jf.dexlib.CodeItem.writeItem(CodeItem.java:258 )
at org.jf.dexlib.Item.writeTo(Item.java:117)
... 12 more
code_item @0x1b0f20 (Lcom/google/android/util/AbstractMessageParser$Token$Type;->values()[Lcom/google/android/util/AbstractMessageParser$Token$Type
make: *** [out/framework.jar] Błąd 1
And as you probably see working on ubuntu 12.04
I have the same problem running ubuntu 12.04 (32 bit)
It would be really good if someone come up to an answer

Cannot sign any apk in Ubuntu..

Hey guys, i just installed Ubuntu in a VirtualBox, everything is great but i cannot figure out why i can't sign any apks.. here is the error that is generated.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/crypto/EncryptedPrivateKeyInfo
at com.android.signapk.SignApk.decryptPrivateKey(SignApk.java:124)
at com.android.signapk.SignApk.readPrivateKey(SignApk.java:154)
at com.android.signapk.SignApk.main(SignApk.java:436)
Caused by: java.lang.ClassNotFoundException: javax.crypto.EncryptedPrivateKeyInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 3 more
I have java version 1.7.0_21 installed.

Apk Compilation Error - Error log included

I decompile an apk (an ordinary TSF Shell theme) without any problem but when it comes to recompiling. Its always the same error. Trying this for a week with apktool, tickle my android and with apk multi tool. When I send my decompiled files to my friends they can compile it but on my computer at home or at work I get the same error forever. I have Windows 7 Ultimate 64 bit installed. You can see installed java version on the code.
Please somebody say something about this or Im gonna loose my mind.
Code:
|16.05.2013 -- 23:22:52,12|
--------------------------------------------------------------------------
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
I: Checking whether sources has changed...
I: Smaling...
[14,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNT¦ME
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: C:\APK-Multi-Tool-Stable-RELEASE\projects\unsignedcom.jenizaro.theme.marinethe
mehd.apk\smali\android\annotation\SuppressLint.smali
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:36)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:256)
at brut.androlib.Androlib.buildSources(Androlib.java:217)
at brut.androlib.Androlib.build(Androlib.java:208)
at brut.androlib.Androlib.build(Androlib.java:177)
at brut.apktool.Main.cmdBuild(Main.java:237)
at brut.apktool.Main.main(Main.java:79)
Devam etmek için bir tuşa basın . . .
A Solution ?
did you find a solution for this problem ? i Have the same !
meanwhile, if you change your langage settings to En/US it works for me, but i can't do that for my project, i need multi-language support...

New to coding and struggling please help.

Hi Guys
Im really new to this. OK so i have a 3rd party apk i need to modify for personal use. I am trying to use apk multi tool CLI version.
i have
Java 2 Runtime Environment SE v1.41_07 ( installed on pc already)
Java 8 UPdate 121
Java 8 update 131
Java SDK Kit 8 update 131
ANdroid sutdio with Android SDK
Phone is galaxy s7 edge with Android 7.0, USB debugging is enabled in developer options.
I get to the point in multi tool where i can pull the framework-res.apk from the phone, but when i try to install with "apktool if framework-res.apk" i get this error..
C:\APK-Multi-Tool-Stable-RELEASE\other>apktool if framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:611)
at brut.androlib.Androlib.installFramework(Androlib.java:469)
at brut.apktool.Main.cmdInstallFramework(Main.java:260)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:43)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
0)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 5 more
I have no idea what to do now. help please.. thank you
Matt
OK it seems i was using an old apktool.jar file. I am now using apktool_2.2.2.jar... I have managed to decompile the apk and modified what i need to, but when i try and compil i get this message
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
Press any key to continue . . .
It seems to be refering to a missing apktool.yml but the file is there and readable buy notepad++ so the decompile worked ok
resolved

Categories

Resources