Skip to content

Instantly share code, notes, and snippets.

@pfn
Last active December 16, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfn/5414166 to your computer and use it in GitHub Desktop.
Save pfn/5414166 to your computer and use it in GitHub Desktop.
modify built-in app
Add LOCAL_DEX_PREOPT := false to Android.mk for App being built
make -j4 AppName
push resulting App.apk to device /sdcard/somewhere-temp
adb shell; cd to /sdcard/somewhere-temp
dexopt --zip 3 5 App.apk "v=a o=f" 5<>App.odex 3<App.apk
dd if=/system/app/App.odex of=App.odex bs=20 count=1 skip=52 seek=52 conv=notrunc
copy App.odex into /system/app (save original odex)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment