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

8

13

Started emulator from Android Studio and it's Home button not working. When I press Home button, in logcat I can see

I/WindowManager: Not starting activity because user setup is in progress: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 (has extras) }

And same happens(same logcat) when keyboard shortcut(keyboard Home button) is used.

I restarted emulator and my machine several times, but no help.

The thing I want to achieve is killing my app by Home button Long Press

Emulator details:

Name: 2_7_QVGA_slider_API_23_L
CPU/ABI: ARM (armeabi-v7a)
Path: C:\Users\sh56000\.android\avd\2_7_QVGA_slider_API_23_L.avd

Target: Android 6.0 (API level 23)
Skin: 240x320
SD Card: 100M
Snapshot: no
hw.dPad: no
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: 2.7in QVGA slider
vm.heapSize: 16
skin.dynamic: yes
hw.device.manufacturer: Generic
hw.gps: yes
hw.audioInput: yes
hw.keyboard.lid: yes
hw.cpu.model: cortex-a8
tag.id: default
hw.camera.back: none
hw.mainKeys: yes
AvdId: 2_7_QVGA_slider_API_23_L
hw.camera.front: none
hw.lcd.density: 120
runtime.scalefactor: auto
avd.ini.displayname: 2.7 QVGA slider API 23 L
snapshot.present: no
hw.device.hash2: MD5:89d*************55e42054c413
hw.ramSize: 512
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Default
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: yes
disk.dataPartition.size: 200M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
Karafuto answered 24/3, 2016 at 7:16 Comment(0)
F
9

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 left top

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

adb shell am start -n com.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

Fuze answered 31/10, 2016 at 18:40 Comment(0)
S
2

If the above doesn't work, try:

adb shell settings --user 0 put secure user_setup_complete 1
adb shell settings --user 0 put secure tv_user_setup_complete 1
adb shell settings --user 0 put global device_provisioned 1

No reboot needed!

Scotopia answered 22/6, 2021 at 10:18 Comment(0)
W
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.

Warbler answered 5/6, 2016 at 11:25 Comment(0)
D
1

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).

Dactylo answered 12/2, 2017 at 22:59 Comment(0)
B
0

try restart the setup wizard if it can help

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

I have similar issue today on my Cyanogenmod 13. and re-run the wizard did the fix for me.

Bonham answered 12/4, 2016 at 17:43 Comment(1)
I got Activity class does not exist trying thatHelvetia
G
0

It might be a different situation but here is what helped. Wnen on Android Q, home button would not work, but when I dragged the ask google desktop widget up (don't ask me why I did that), this revealed the apps drawer. When here, home button does work by showing desktop.

Geotropism answered 31/5, 2020 at 15:57 Comment(0)
J
0

I had this issue with my Android emulator (Google Pixel 2). Wiping the data in the Android Studio AVD manager fixed it for me.

Jahveh answered 22/7, 2021 at 12:2 Comment(0)
L
0

Restarting the virtual device with a cold boot from AVD Manager fixed it for me.

Londonderry answered 7/12, 2021 at 22:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.