EDIT: This probably won't work, because SetupWizard.apk
doesn't have a launchable activity.
Although this question is almost a year old, others may still find this useful:
adb shell am start -n com.google.android.setupwizard/.SetupWizardActivity
I'm not sure why do you want to run the setup wizard on the next boot, though. If you want to give your device to a relative, why not do a factory reset, or if you want to keep the data on the device, just tell them to change things manually in the settings?
Anyway, if you're using a ROM with init.d
support (such as CyanogenMod), create a new file called 00Asetupwizard
with the following contents:
#!/system/bin/sh
adb shell am start -n com.google.android.setupwizard/.SetupWizardActivity
# "Self-destruct" to make sure the setup wizard is not reexecuted on subsequent boots.
# This may cause an issue if the device is rebooted before completing the setup wizard,
# but I don't know how to fix that.
rm -f /system/etc/init.d/00Asetupwizard
Then run the following commands on your computer, connected to your phone over USB:
% adb remount
% adb push 00Asetupwizard /system/etc/init.d/
% adb shell chmod 0755 /system/etc/init.d/00Asetupwizard
If adb remount
gives an error, try the following instead:
% adb push 00Asetupwizard /sdcard/
% adb shell
$ su
# mount -o remount,rw /system
# mv /sdcard/00Asetupwizard /system/etc/init.d/
# chmod 0755 /system/etc/init.d/00Asetupwizard
(In the above examples, %
indicates the shell prompt on your computer, to distinguish it from the ADB shell prompt.)