From ab2340996a515ea0c437ad5bb1ea1fa88ab9edff Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 9 Jun 2015 21:42:22 -0700 Subject: 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 --- cmds/pm/src/com/android/commands/pm/Pm.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmds/pm') 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"); -- cgit v1.1