'Can I use adb to change the default launcher program?
I set one of the program as default launcher program and default setting program so I cannot change the default programs now, can I change the default programs from android-sdk\android-sdk\platform-tools\adb.exe or remote shell.
How can I do that?
And can I remove the defaults of program in Java code?
Solution 1:[1]
For system apps you can't uninstall, use pm disable as in
adb shell pm disable com.android.launcher
Solution 2:[2]
adb shell cmd package set-home-activity "package/activity"
adb reboot
Solution 3:[3]
The key is adb. Once you know the package name of the app you wish to clear data for, try:
adb shell pm clear package.name.of.app
It'll clear all data for the app, but I don't know of a way to only clear the defaults.
Solution 4:[4]
You can check and change the default sms app by using adb shell settings get secure sms_default_application and then use adb shell settings put secure sms_default_application <package name>. I'm not sure about the other default apps, but it's just a matter of finding it with adb shell settings list <secure/system/global>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | arne |
| Solution 2 | dljava |
| Solution 3 | Krylez |
| Solution 4 | Exosylver |
