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?

Upvotes: 15

Views: 74529

Answers (5)

Exosylver
Exosylver

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

dljava
dljava

Reputation: 1856

adb shell cmd package set-home-activity "package/activity"

adb reboot

Upvotes: 14

arne
arne

Reputation: 291

For system apps you can't uninstall, use pm disable as in

adb shell pm disable com.android.launcher

Upvotes: 22

Krylez
Krylez

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

Mr.Me
Mr.Me

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:

  • adb shell
  • am start -a android.intent.action.MAIN

That way you will have a picker with all apps on your devices that listens to Main Action

  • Choose any home screen app you want . then go to settings and set it as default.

Upvotes: 22

Related Questions