Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 20e0c50f authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Jeff Sharkey
Browse files

Offer force-dex-opt when running as root.

Recently we removed the PackageManager inotify triggers, meaning the
only supported ways of installing apps were:

-- adb install -r Foo.apk
-- adb shell stop && adb sync && adb shell start

Iterating on most system apps (like Settings) can use the first
approach, but it doesn't work for "persistent" processes like
SystemUI.  (ActivityManager is very particular about how it deals
with persistent apps, and it always sticks with the first
ApplicationInfo found at boot.)

So to enable rapid iteration on persistent apps, we now offer the
one missing piece of forcing a dexopt with a new pm force-dex-opt
command only available to -eng or -userdebug builds.  Typical use
for iterating on persistent apps now looks like this:

$ mmm frameworks/base/packages/SystemUI/ && adb sync &&
    adb shell pm force-dex-opt com.android.systemui &&
    adb shell kill `pid systemui`

Yay!

Change-Id: I0ae2467f1d7cda56c70ba20953cd25fa8ee766ff
parent a753f4c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment