CyanogenMod 13 Nightly: SetupWizard has stopped working.

I have a OnePlus One and recently upgraded to CM 13 Nightly. After flashing the full version of the 6.0 Gapps listed on the CM wiki, an error that read “SetupWizard has stopped working” occurred in an infinite loop and prevented me from doing anything on the phone.

logcat reports this error:

12–01 15:51:06.145 7860 7860 E AndroidRuntime: FATAL EXCEPTION: main
12–01 15:51:06.145 7860 7860 E AndroidRuntime: Process:, PID: 7860
12–01 15:51:06.145 7860 7860 E AndroidRuntime: java.lang.RuntimeException: Unable to create application java.lang.SecurityException: addOnSubscriptionsChangedListener: Neither user 10002 nor current process has android.permission.READ_PHONE_STATE.

To fix this, run adb shell and enter:

pm grant android.permission.READ_PHONE_STATE

The process will stop crashing and you’ll be able to use your phone again. This is most likely a bug in the GApps package being distributed, since it’s supposed to flip the necessary permissions bits after installation.

28 thoughts on “CyanogenMod 13 Nightly: SetupWizard has stopped working.

  1. Thanks a lot! you saved my day 🙂
    (cm13 on Nexus 4 mako, nightly build with an infinite loop “setup wizard failed” until I applied your trick!)

  2. Thank you very much! You’ve saved my life… I’ve spent an afternoon to find a solution for this issue. If I hadn’t found your tutorial, I would throw my phone to observe it doing bungee jumping without the bungee cord. Thank you again!

  3. Pingback: Phone Flashing – Part 2 | Blender Fox

  4. Thanks for the help but when I tried to run the pm script, shows an “app_process: not found” message. I’ve managed to create the pm script, but I simply don’t know how to get the app_process binary.

    I found this thread, follow the maxpayne1989 steps to grant permission to the app on GUI and finally I can use my phone!:

    Thanks anyway, even if this didn’t work for me, was useful.

  5. Worked here — cm13, gapps6. Thank you! Much better than a factory reset 🙂

  6. Thanks a lot dear…. you are a life saver….. i wasted my whole evening trying to solve this error….
    good job…

  7. Thank you so much!!!
    This message was driving me mad and made my phone unusable.
    That solved it 🙂

  8. I’ve got the same issue. Running Cyanogenmod I can’t connect to the device, but I can connect when in Team Win Recovery. Unfortunately pm is not found:

    ~ # pm grant android.permission.READ_PHONE_STATE
    /sbin/sh: pm: not found

  9. Pingback: CyanogenMod 13 を nexus6p 焼いたら SetupWizard エラーで起動しない | weff

  10. Nice one, thanks. Also, if you don’t have ADB, just reboot into recovery and re-flash the ROM without wiping cache etc, this worked for me.

  11. This is actually a bug in the ROM and not in the GApps.
    The ROM is responsible for granting permissions, GApps can’t do that by itself. CM13 is a known troublemaker, because CM team refuses a patch to solve this.

  12. yup the error is due to gapps and not because of the rom….i m getting my setupwiz apk installed only after installing gapps..and the solution if any of the above step doesnt work……,
    1).flash stock rom in ur device(if ur system does not get mounted).
    2).use TWRP and not CWM.
    3).in TWRP under mount->select the system and press back.
    4).connect ur phone to pc.
    5).run adb and fastboot exe.
    6).run adb shell.
    7).pm grant android.permission.READ_PHONE_STATE(run this command).
    8).be sure that setup wiz exists in system->priv-app directory.
    9).reboot….this should work i guess.

Leave a Reply

Your email address will not be published. Required fields are marked *