souramoo / Needle

Android framework injection made easy
GNU General Public License v3.0
100 stars 28 forks source link

Not working on Android 7.1 (CM 14.1) #36

Closed Nutomic closed 8 years ago

Nutomic commented 8 years ago

Tried to apply latest master to Cyanogenmod 14.1 running on an LG G4. Output:

 *** Selected device LGH81539e3a2ee
 *** Device detected! proceeding...
 *** Working dir: /tmp/tmpJJWFep
 *** Rooting adbd...
remount succeeded
 *** Pulling framework from device...
 *** Disassembling framework...
Exception in thread "main" org.jf.dexlib2.dexbacked.DexBackedDexFile$NotADexFile: Invalid magic value: 64 65 78 0a 30 33 37 00
        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.loadDexFiles(DexFileFactory.java:109)
        at org.jf.dexlib2.DexFileFactory.loadDexFiles(DexFileFactory.java:81)
        at org.jf.baksmali.main.main(main.java:259)
Traceback (most recent call last):
  File "patch.py", line 67, in <module>
    subprocess.check_call(["java", "-jar", os.path.join(SCRIPT_DIR, "tools", "baksmali.jar"), "framework.jar", "-o", "classes", "-ls"])
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['java', '-jar', '/home/felix/software/Needle/tools/baksmali.jar', 'framework.jar', '-o', 'classes', '-ls']' returned non-zero exit status 1

Happy to help.

ale5000-git commented 8 years ago

Duplicate of #35.

PS: Tingle shouldn't have this problem, in case you need it now.

Nutomic commented 8 years ago

Sorry I didn't notice that issue, because there is no mention of Android 7.

Thanks for mentioning Tingle, didn't know that. For some reason, Tingle did a bootloop (or at least a really slow boot), but after rebooting again it worked fine.

ale5000-git commented 8 years ago

A slow boot (only the first reboot after patching) is normal since it has to rebuild the cache, just wait until it finish.