diff options
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 2 | ||||
-rw-r--r-- | cmds/pm/src/com/android/commands/pm/Pm.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index a79eb14..22fc1ad 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -393,7 +393,7 @@ public class Am { private void runStartService() throws Exception { Intent intent = makeIntent(); System.out.println("Starting service: " + intent); - ComponentName cn = mAm.startService(null, intent, intent.getType()); + ComponentName cn = mAm.startService(null, intent, intent.getType(), 0); if (cn == null) { System.err.println("Error: Not found; no service started."); } diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index b34fd05..32865a4 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -776,7 +776,7 @@ public final class Pm { } private void runInstall() { - int installFlags = 0; + int installFlags = PackageManager.INSTALL_ALL_USERS; String installerPackageName = null; String opt; @@ -811,6 +811,8 @@ public final class Pm { } else if (opt.equals("-f")) { // Override if -s option is specified. installFlags |= PackageManager.INSTALL_INTERNAL; + } else if (opt.equals("-d")) { + installFlags |= PackageManager.INSTALL_ALLOW_DOWNGRADE; } else if (opt.equals("--algo")) { algo = nextOptionData(); if (algo == null) { @@ -1105,7 +1107,7 @@ public final class Pm { String opt = nextOption(); if (opt != null && opt.equals("-k")) { - unInstallFlags = PackageManager.DONT_DELETE_DATA; + unInstallFlags = PackageManager.DELETE_KEEP_DATA; } String pkg = nextArg(); @@ -1525,6 +1527,7 @@ public final class Pm { System.err.println(" -i: specify the installer package name."); System.err.println(" -s: install package on sdcard."); System.err.println(" -f: install package on internal flash."); + System.err.println(" -d: allow version code downgrade."); System.err.println(""); System.err.println("pm uninstall: removes a package from the system. Options:"); System.err.println(" -k: keep the data and cache directories around after package removal."); |