Exec format error
Closed this issue · 2 comments
supaplex@hydrogen:~/usr/src/apk2java-linux$ ./apk2java.py d hello_world.apk
Downloading external tool... -> /home/supaplex/usr/src/apk2java-linux/apk2java/tool/
Progress: 100.01% - 8.7 MB/8.7 MB
Running: cp hello_world.apk /home/supaplex/usr/src/apk2java-linux/hello_world-new.apk
** Extract, fix resource files **
Running: /home/supaplex/usr/src/apk2java-linux/apk2java/tool/apktool_200rc3.jar d hello_world.apk -o /home/supaplex/usr/src/apk2java-linux/hello_world -f
Traceback (most recent call last):
File "./apk2java.py", line 213, in
main()
File "./apk2java.py", line 185, in main
apktool(options.smali)
File "./apk2java.py", line 85, in apktool
call(cmd)
File "./apk2java.py", line 14, in call
return subprocess.call(cmd, **kwargs)
File "/usr/lib/python3.5/subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
supaplex@hydrogen:~/usr/src/apk2java-linux$ java -jar /home/supaplex/usr/src/apk2java-linux/apk2java/tool/apktool_200rc3.jar d hello_world.apk -o /home/supaplex/usr/src/apk2java-linux/hello_world -f
I: Using Apktool 2.0.0-RC3 on hello_world.apk
I: Loading resource table...
W: Config flags size > 38. Exceeding bytes: 0x746E00000000000000000000000000000000.
W: Invalid config flags detected. Dropping resources: string-sr-ERR0
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/supaplex/apktool/framework/1.apk
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResStringValue cannot be cast to brut.androlib.res.data.value.ResAttr
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
I think it's a problem with apktool version is used being too obsolete