jakev / dtfmods-core

Core content for Android device testing
Apache License 2.0
6 stars 2 forks source link

`oatdextract` support for 6.0 OAT files #62

Closed jakev closed 8 years ago

jakev commented 8 years ago
01:24:46 /DevTesting/api23/framework$ dtf oatdextract "framework/arm/boot.oat"
Traceback (most recent call last):
  File "/usr/local/bin/dtf", line 185, in <module>
    sys.exit(main())
  File "/usr/local/bin/dtf", line 175, in main
    rtn = pkg.launch_module(command_name, sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/dtf/packages.py", line 191, in launch_module
    return __launch_python_module(module_path, cmd, args)
  File "/usr/local/lib/python2.7/dist-packages/dtf/packages.py", line 98, in __launch_python_module
    return mod_inst.run(args)
  File "/usr/local/lib/python2.7/dist-packages/dtf/module.py", line 62, in run
    result = getattr(self, 'execute')(args)
  File "/home/analyst/.dtf/modules//oatdextract", line 151, in execute
    return self.process_oat(parsed_args)
  File "/home/analyst/.dtf/modules//oatdextract", line 116, in process_oat
    start = oatfile.carve_dex_header(oat_header_start, start)
  File "/home/analyst/.dtf/modules//oatdextract", line 289, in carve_dex_header
    dex_file_location_size = read_uint32(self.file_f, off)
  File "/home/analyst/.dtf/modules//oatdextract", line 48, in read_uint32
    return struct.unpack('I', file_f.read(4))[0]
struct.error: unpack requires a string argument of length 4
jakev commented 8 years ago

frameworkdb and sysappdb "oatextract" both fail because of this.

jakev commented 8 years ago

Fixed: https://github.com/jakev/dtfmods-core/commit/6a2ca694a9ba042b8aa093c5675b0c6a24bc3f72