zhanwei / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
0 stars 1 forks source link

LG Encrypted APKs - liblgalmond.so #738

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.apktool if lge-res.apk
2.apktool if framework-res.apk
3.in resources folder rename 0.apk to 2.apk (fix error with resources)
4.compile apktool from source.
5. run this code:

 public static void main(String[] args) throws AndrolibException, IOException, DirectoryException {
        ApkDecoder decoder = new ApkDecoder();
        decoder.setApkFile(new File("C:\\Users\\Yoav\\Downloads\\android\\LGSystemUI.apk"));
        decoder.setApi(21);
        decoder.setOutDir(new File("C:\\Users\\Yoav\\Downloads\\android\\lgcover\\"));
        decoder.decode();
    }

What is the expected output? What do you see instead?
output:
Exception in thread "main" 
org.jf.dexlib2.dexbacked.DexBackedDexFile$NotADexFile: Invalid magic value: 01 
18 24 61 70 70 6c 69
    at org.jf.dexlib2.dexbacked.DexBackedDexFile.verifyMagicAndByteOrder(DexBackedDexFile.java:151)
    at org.jf.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.java:70)
    at org.jf.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.java:96)
    at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:84)
    at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:59)
    at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:94)
    at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:46)
    at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:91)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:126)
    at com.company.Main.main(Main.java:18)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

(full log - http://pastebin.com/TQzUJ4Hm )

What version of the product are you using? On what operating system?
Windows 8.1 64bit, compiled from source.

Please provide any additional information below.
LGCover.apk was pulled from my G3 D855 on 20E (5.0)

Original issue reported on code.google.com by yoav.g...@gmail.com on 26 Dec 2014 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
Confirmed.

Original comment by connor.tumbleson on 26 Dec 2014 at 12:33

GoogleCodeExporter commented 9 years ago
This LG dex file is encrypted.

As per jcase.

 > The libgalmond.so file decrypts it.

Not sure what to do at this point. Will talk to some others about whether 
support should be brought into this tool or require users to decrypt the dex 
file prior to use.

Original comment by connor.tumbleson on 13 Jan 2015 at 10:37

GoogleCodeExporter commented 9 years ago
Where is this file saved? 

Original comment by yoav.g...@gmail.com on 14 Jan 2015 at 5:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
http://forum.xda-developers.com/attachment.php?attachmentid=3186996&d=1425096420
Here is a link to libgalmond.so
What can I do to decrypt it?

Original comment by yoav.ste...@gmail.com on 28 Feb 2015 at 6:43

GoogleCodeExporter commented 9 years ago
I'm not aware of the decoding procedure for the encrypted files. Nor do I have 
time to figure it out.

If a tool/utility is created to handle this, we can link users to it. Apktool 
is not responsible for decoding encrypted apks.

Original comment by connor.tumbleson on 3 Mar 2015 at 3:49