Project-ARTist / ArtistGui

ARTist's deployment application, for code-injection on an Android device.
https://artist.cispa.saarland
Other
37 stars 12 forks source link

System instrumentation support #85

Open schrnz opened 6 years ago

schrnz commented 6 years ago

Until now, we either use ArtistGui to instrument apps, or we deploy ARTist as the system compiler in a custom AOSP build to instrument boot.oat/art(AOSP compile time), the systemserver and system apps (all at first boot). However, in order to support system instrumentation on regular ROMs without having to replace the system's compiler binary, ArtistGui needs to be extended so that it can re-compile these components as well.

Judging from the fact that dex2oat is compiling all those components anyway after each OTA upgrade, it should be possible for us to do so as well and then again use root to swap the original compiled version with our instrumented one. For non-apps, a subsequent reboot will be required, but this is on par with other systems such as XPosed.

schrnz commented 5 years ago

Btw the full commandline used during the initial compilation is stored in the oat header and can be obtained with oatdump --header-only --oat-file=/path/to/oat. Modifying this cmdline to incorporate our dex2oat version should be a good starting point