Reputation: 5839
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?
Upvotes: 15
Views: 74529
Reputation: 166
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>
Upvotes: 1
Reputation: 1856
adb shell cmd package set-home-activity "package/activity"
adb reboot
Upvotes: 14
Reputation: 291
For system apps you can't uninstall, use pm disable as in
adb shell pm disable com.android.launcher
Upvotes: 22
Reputation: 17820
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.
Upvotes: 2
Reputation: 9286
you can remove (Uninstall) the default program you set using ADB by doing this :
adb uninstall app.package ..... //for example (com.example.homeapp)
If you don't want to remove the app .. here is a quick hack to do it:
That way you will have a picker with all apps on your devices that listens to Main Action
Upvotes: 22