Skip to content
Commit 1186eb3f authored by Edward Savage-Jones's avatar Edward Savage-Jones
Browse files

Block the upgrade of persistent apps

Currently when upgrading a persistent app the persistent flag will
be silently stripped from the newly installed app, resulting in
inconsitent app behaviour.

Persistent apps by definiton should not be possible to upgrade via
adb or any 3rd party installer. This commit adds a check which will
fail the upgrade of an app marked as persistent.

Bug: 66889554
Test: Manual
      - Create an app with the persistent flag set to true,
        push to /system/priv-app and reboot
      - Increment the app versionCode, build and install using
        adb install -r
      The attempted adb install should fail with:
      INSTALL_FAILED_INVALID_APK
Change-Id: Iaa00addcfbbb2adba319bea96b37e8bfb6e11372
parent 3c03d5bd
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