diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-06-09 21:42:22 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-06-09 21:42:22 -0700 |
commit | ab2340996a515ea0c437ad5bb1ea1fa88ab9edff (patch) | |
tree | 5a0fe9a3ade570643394908c989a2cd371268a40 /cmds/pm/src | |
parent | 4e83cc9fc15fa4795a41d4d8dfd2b00c1ad966fd (diff) | |
download | frameworks_base-ab2340996a515ea0c437ad5bb1ea1fa88ab9edff.zip frameworks_base-ab2340996a515ea0c437ad5bb1ea1fa88ab9edff.tar.gz frameworks_base-ab2340996a515ea0c437ad5bb1ea1fa88ab9edff.tar.bz2 |
Flags to select storage volume for app installs.
Remote callers can now provide the "--install-location" value from
the APK to help select a location, or they can explicitly force a
volume by UUID.
Bug: 21676789
Change-Id: Iefc92d770a851fc33e37edbf259fdb8df2b14ae5
Diffstat (limited to 'cmds/pm/src')
-rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index 1599459..1faf41b 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -1037,6 +1037,14 @@ public final class Pm { params.abiOverride = checkAbiArgument(nextOptionData()); } else if (opt.equals("--user")) { userId = Integer.parseInt(nextOptionData()); + } else if (opt.equals("--install-location")) { + params.installLocation = Integer.parseInt(nextOptionData()); + } else if (opt.equals("--force-uuid")) { + params.installFlags |= PackageManager.INSTALL_FORCE_VOLUME_UUID; + params.volumeUuid = nextOptionData(); + if ("internal".equals(params.volumeUuid)) { + params.volumeUuid = null; + } } else { throw new IllegalArgumentException("Unknown option " + opt); } @@ -1885,6 +1893,8 @@ public final class Pm { System.err.println(" pm dump PACKAGE"); System.err.println(" pm install [-lrtsfd] [-i PACKAGE] [--user USER_ID] [PATH]"); System.err.println(" pm install-create [-lrtsfdp] [-i PACKAGE] [-S BYTES]"); + System.err.println(" [--install-location 0/1/2]"); + System.err.println(" [--force-uuid internal|UUID]"); System.err.println(" pm install-write [-S BYTES] SESSION_ID SPLIT_NAME [PATH]"); System.err.println(" pm install-commit SESSION_ID"); System.err.println(" pm install-abandon SESSION_ID"); |