I pulled down boot.oat
from an API22 Android phone. It's Android 5.1 Lollipop which brought the change from Dalvik to ART and is a bit mistified.
As far as I understand, modifying boot.oat is not easy, and permanent, as this file is regenerated whenever a package installation is happening.
Now, I have a class which I need to modify (just a very tiny bit of it), which resides in framework.dex
which was the part of boot.oat
.
I have two questions:
- How can I repack
boot.oat
? Taking into account that I haven't touchboot.art
? - How can I make my change in
boot.oat
permanent? It's very well possible that I will install some new packages onto this system later, which will (might?) ruin my modification.
Thanks!
boot.oat
is regenerated when a package is installed? I would have assumed that it is only regenerated after a system update has been installed.boot.oat
might only be replaced during system update, which is unlikely for these old devices. Can you help me on Q1 please?boot.oat
(framework.dex). I need to modify a class inframework.dex
, and put it back toboot.oat
. But I've various information on rewriting header hash, or CRC or whatever.