LIEF icon indicating copy to clipboard operation
LIEF copied to clipboard

Android 12: OAT version 199 does not find DEX files

Open enovella opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. The OAT file version 199 does not detect DEX files inside the ELF file

Additional context

https://transfer.sh/wcqO6o/boot.img

[18:50 edu@xps boot] >  ipython3
Python 3.8.13 (default, Apr 19 2022, 00:53:22) 
Type 'copyright', 'credits' or 'license' for more information
IPython 8.1.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import lief

In [2]: oat = lief.parse("boot.oat")

In [3]: oat.header
Out[3]: <lief.OAT.Header at 0x7f145a215170>

In [4]: oat.header.nb_dex_files
Out[4]: 0

In [5]: for s in oat.dynamic_symbols:
   ...:   print(s)
   ...: 
                              NOTYPE    LOCAL     0         0         
oatdata                       OBJECT    GLOBAL    1000      aa000     
oatexec                       OBJECT    GLOBAL    ab000     0         
oatlastword                   OBJECT    GLOBAL    409d94    4         
oatbss                        OBJECT    GLOBAL    40a000    190       
oatbssmethods                 OBJECT    GLOBAL    40a000    190       
oatbssroots                   OBJECT    GLOBAL    40a190    348       
oatbsslastword                OBJECT    GLOBAL    40a4d4    4         
oatdex                        OBJECT    GLOBAL    40b000    0         
oatdexlastword                OBJECT    GLOBAL    4168e8    4         

In [6]: 

Didn't spend too much time on that, sorry

enovella avatar May 30 '22 16:05 enovella