Android emulator(Android Studio) Home button not working and giving logcat - I/WindowManager: Not starting activity because user setup is in progress Android emulator(Android Studio) Home button not working and giving logcat - I/WindowManager: Not starting activity because user setup is in progress android android

Android emulator(Android Studio) Home button not working and giving logcat - I/WindowManager: Not starting activity because user setup is in progress


AFAIK, there are 3 solutions for this issue: (2 & 3 need adb drivers or terminal app)

  1. Switch to guest and come back

Settings->Users->Guest (or)

Swipe down the notification bar and click on profile icon on the lefttop

  1. Start the initial setup and complete it or skip it

adb shell am start -ncom.google.android.setupwizard/.SetupWizardActivity

  1. Give below command to mark that setup is done

adb shell

$ settings --user 0 put secure user_setup_complete 1


Had the same problem on my Nexus 9 (Android 6) after I did some "clean up" (deleting cache and app data). Seems I've "cleaned up" too much.

The command which fixed it for me:

adb shell am start -n com.google.android.setupwizard/.SetupWizardTestActivity

The Activity name is slightly different (changes in Android 6 I guess).I ran through the setup again (had to type in WIFI password again) and skipped the "restore apps" part. Afterwards everything worked fine again.


Cause

This general error caused by a missing configuration value (damaged main config). E.g.: This can be happen on a real phone too when the phone turned off suddenly by an unplugged battery.

In this case you can't reach the quick settings menu on some devices.

Fixing

  1. Enable the USB debugging on your phone, and connect to a PC
  2. Run Setup Wizard by adb and wait until it appears, but do nothing on your phone

    adb shell am start -n 'com.google.android.setupwizard/.SetupWizardActivity'

    If it's can't start, because there's missing intent, you should run this:

    adb shell am start -n 'com.google.android.setupwizard/.SetupWizardTestActivity'
  3. Set the setup complete flag:

    adb shell settings --user 0 put secure user_setup_complete 1
  4. Restart phone

    adb reboot

Done!

This method will not overwrite/cleanup the current settings (e.g. Wifi access points).