Apk Compilation Error - Error log included - Android Q&A, Help & Troubleshooting

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...

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.

Please help decompiling ICS APK :(

Please Help
I use windows 7 64-Bit.
I have installed
JDK 7 update 5 (64 Bit)
Android SDK
Java
But I can not decompile anything.
Using autoapktool, apktool, apkmanager, blabla.
I won't make a thread before I search on google. So many threads I follow the steps. But nothing.
Here are the errors when I try to unpack Gmail.apk:
1. I try to decompile with autoapktool2.0.4A, but it stuck on"I: Copying assets and libs..."
2. Errors when decompile with ApkManager5.0.2
Code:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
Could Not Find E:\Master\Android\PC tools\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/signedGmail.apk
Could Not Find E:\Master\Android\PC tools\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedGmail.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f090000 integer/dialog_animationDefaultStartOffset, 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)
3. When I use apkchanger to decompile, it does not have any errors, but when compile it :
Code:
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b22)
Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode, sharing)
I: Copying raw classes.dex file...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Ridho\apktool\framework\1-api15.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Could Not Find C:\Users\Ridho\Downloads\Compressed\Apk-Changer_alpha9\other\app\Gmail.conf
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.
Please help. I am getting sick with this thing.
No one?
Ridho1 said:
No one?
Click to expand...
Click to collapse
Try apk manager
Avilove.Cullen said:
Try apk manager
Click to expand...
Click to collapse
I have tried. As you can see, I have an error when recompile it.
Make sure u dont change any of the apk mamager files from the original foulder leave everythun you extracted together in the same foalder. If you continue having errors you might have to try diffrent versions of apk manager to get it to work.
Sent from my PC36100 using Xparent Blue Tapatalk 2
Ridho1 said:
I have tried. As you can see, I have an error when recompile it.
Click to expand...
Click to collapse
Have you installed the framework?
Avilove.Cullen said:
Have you installed the framework?
Click to expand...
Click to collapse
What framework?
Ridho1 said:
What framework?
Click to expand...
Click to collapse
system framework..
in apk manager . You will see a folder named "other",there open CMD and type "apktool if framework-res.apk"

[Q] AOSP 4.2.2: Cannot load 32-bit SWT libraries on 64-bit JVM

I am having problems running any AOSP commands after building. After makeing the source I do the following:
Code:
$ lunch full-eng
$ android
What happens:
Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:330)
at com.android.sdkmanager.Main.doAction(Main.java:318)
at com.android.sdkmanager.Main.run(Main.java:118)
at com.android.sdkmanager.Main.main(Main.java:101)
I can't seem to find any solution to this. I am attempting to build AOSP 4.2.2_r1.2b. I have built 4.0.4 before and not had this problem. I am running this version of java:
Code:
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)
Here is the command that the `android` bash file (`/media/android/source/sdk/sdkmanager/app/etc/android`) generates:
Code:
java \
-Xmx256M \
-classpath /media/android/source/out/host/linux-x86/framework/sdkmanager.jar:/media/android/source/out/host/linux-x86/framework/swtmenubar.jar:/media/android/source/prebuilts/tools/linux-x86_64/swt/swt.jar \
-Dcom.android.sdkmanager.toolsdir=/media/android/source/out/host/linux-x86/bin \
com.android.sdkmanager.Main
Note how it still selects the 64 bit version of SWT. I have also tried moving the swt.jar file to the front of the classpath flag but that changes nothing.
Any help/guidance would be much appreciated thanks.
Anybody? ):

Need Help Modifying and Recompiling Settings.APK

Hello there, as of late, I've been trying to exploit the Settings.APK on the HTC One M9 (specifically the verizon version, although the APKs are the same there is just a value on the device itself that is different which triggers the "block" on the APK), as you can see here:
http://forum.xda-developers.com/ver...verizon-enable-oem-lock-t3281994#post64568917
I've discovered that it is possible to patch/overwrite the existing Settings.APK with adb install -r -d (overwrite and downgrade), even a modified one I've worked on with APKTools (without root). However, I've run into several issues, mainly modifying the java code and getting it to recompile (with the APK Multi-Tool I'm using to compile "system APK files) WITH the apk.
What I mean to say is that when I place the java code in /src it will compile but I don't see the changes taking effect.
EDIT: Now when I try to compile I get an error.
Code:
Building Apk
I: Using Apktool 2.0.1-825476-SNAPSHOT
I: Checking whether sources has changed...
I: Building java sources...
"An Error Occurred, Please Check The Log (option 26)"
Press any key to continue . . .
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
A subdirectory or file modified-system-apk-files-here already exists.
Exception in thread "main" java.lang.UnsupportedOperationException: Not yet implemented
at brut.androlib.java.AndrolibJava.build(AndrolibJava.java:32)
at brut.androlib.Androlib.buildSourcesJava(Androlib.java:390)
at brut.androlib.Androlib.buildSources(Androlib.java:299)
at brut.androlib.Androlib.build(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
EDIT EDIT: Apparently I need the smali code instead. I'm going to try to convert java to smali and hopes this works. Fingers crossed!
APKTools is having an issue decompiling the resources in the first place,
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot\modified settings>java -jar apktool.jar d Settings.apk
I: Using Apktool 2.0.2 on Settings.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f100000 bool/config_allow_edit_carrier_enabled, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:223)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:191)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:159)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:544)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:65)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:197)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
which leaves me with a resources.arsc presumably containing many files I need. I've downloaded APKtoJava_RC2, and managed to decompile it into java code using that (and I'm not sure if the classes.dex matters), and modify the APK to where I can enable the OEM unlock feature, but I need to recompile it. I'm trying to recompile the thing, but I'm running into issues (I've tried putting the modified java in src and deleting the resources.arsc when compiling) when installing.
EDIT EDIT EDIT: I've just been trying to edit the SMALI code to let me access the OEM unlock, I guess it's going to be trial and error for me. :v
So, here's what I need to do, in all essentiality:
1. Decompile Settings.APK to the point where I can modify it.
2. Recompile Settings.APK with the same signature.
I'm not sure if this is possible (editing the java while keeping the same signature), but root is NOT an option.
If anyone is willing to give me some insight, I'd really appreciate it.
Ok, so I know how to modidy the .smali, everything would work fine, if not for this final step.
I'm getting [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION] when I extract the .smali files from the classes.dex, and then recompile the .smali files into my own classes.dex-- EVEN IF I DON'T MODIFY THE .SMALI files. There is either an issue with extraction or compilation (maybe both)-- and I've tried several programs, and several methods.
EDIT: http://leonjza.github.io/blog/2015/...re-into-android-reversing-and-smali-patching/
Shows me that it has something to do with the signature. I'll see what I can do.
EDIT EDIT: Further research shows http://www.herongyang.com/Android/Project-META-INF-Files-Digest-Signature-and-Certificate.html that I MIGHT have to somehow get the certificate to work with the modified file properly. God help me now. I assume I'm not the first person to run into the certificate roadblock. Must find a way.
For all the heavens I can't seem to find a way to edit the .dex file in a way that leaves the certificate intact-- I suppose this is why the system was developed in the first place. Back to square one again, I suppose. (Or to giving up and buying a XTC 2 Clip)

Apktool compile error

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 . . .

Categories

Resources