Netinfo Security ›› 2026, Vol. 26 ›› Issue (2): 263-273.doi: 10.3969/j.issn.1671-1122.2026.02.007

Previous Articles     Next Articles

A Compiler-Assisted odex File Rewriting Method

CHENG Long, XIE Mengfei, WU Hongtao, FU Jianming()   

  1. School of Cyber Science and Engineering, Wuhan University, Wuhan 430072, China
  • Received:2025-03-25 Online:2026-02-10 Published:2026-02-23

Abstract:

The mobile operating system translates application bytecode into machine code through pre-compilation and stores it in odex files to improve application startup and runtime efficiency. However, system framework updates invalidate these odex files, necessitating application recompilation and degrading user experience. One approach to avoid recompilation was to statically rewrite existing odex files, but existing static rewriting technologies paid little attention to odex files and the rewriting challenges posed by system environment changes. To address these issues, this paper proposed a compiler-assisted odex file rewriting method. During compilation, this method collected instruction information to guide precise static rewriting and adapt odex files to new system environments. This paper implemented a prototype system based on this method and evaluated it on 50 popular applications. The experimental results show that the method effectively rewrites odex files. The average time cost for rewriting is only 6.85% of the time required for recompilation.

Key words: mobile operating system application, compiler-assisted, binary rewriting, odex

CLC Number: