Skip to content

Exception in thread: "Invalid magic value" #35

Description

@pabloportugues

When running needle on a rooted phone, I get the following exception:

*** Selected device 569e42f8
 *** Device detected! proceeding...
 *** Working dir: /var/folders/x2/3tcjr3p12cj5_y9v2k69smpm0000gn/T/tmpdtp8jbt3
 *** Rooting adbd...
adbd is already running as root
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/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['java', '-jar', '/Users/User/Desktop/Needle-master/tools/baksmali.jar', 'framework.jar', '-o', 'classes', '-ls']' returned non-zero exit status 1

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions