Android 7中OAT文件的路径是什么?

时间:2017-09-13 15:57:22

标签: android

有一个类似的问题: What is the path of OAT file in Android 5.0

但Android 7,在同一条道路上:

/data/dalvik-cache/<ARCH>/

我无法找到用户安装的应用,但只能找到系统应用。

在哪里可以找到正常安装应用程序生成的燕麦文件?

1 个答案:

答案 0 :(得分:0)

我在以下位置找到了正常安装应用程序生成的燕麦文件:

/data/app/<PACKAGE_NAME>/oat/<ARCH>/base.odex

我确认这是一个运行的燕麦文件(在我的机器上,而不是在Android上)命令:

$ readelf -e base.odex 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 03 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - GNU
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          3928128 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         9
  Section header string table index: 8

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .rodata           PROGBITS        00001000 001000 34f000 00   A  0   0 4096
  [ 2] .text             PROGBITS        00350000 350000 06c3f4 00  AX  0   0 4096
  [ 3] .bss              NOBITS          003bd000 000000 034604 00   A  0   0 4096
  [ 4] .dynstr           STRTAB          003f2000 3bd000 00003d 00   A  0   0 4096
  [ 5] .dynsym           DYNSYM          003f2040 3bd040 000060 10   A  4   0  4
  [ 6] .hash             HASH            003f20a0 3bd0a0 000024 04   A  5   0  4
  [ 7] .dynamic          DYNAMIC         003f3000 3be000 000038 08   A  4   0 4096
  [ 8] .shstrtab         STRTAB          00000000 3bf000 00003d 00      0   0 4096
...

因为它包含 .rodata .text 标题,如下所述:http://newandroidbook.com/files/Andevcon-ART.pdf