I'm looking for the best / friendliest way to reboot my rooted android 4.1.1 device. I found these solutions so far:
su -c "reboot"
- Causes problems with wifi after restart on my device... I read that this can cause a currupt file system in some cases... Doesn't work via ssh for me.toolbox reboot
- Same concerns here, but works via ssh.reboot -d 8 -f
- causes problems after restart e.g. some apps wont startbusybox killall system_server
- "Hot Reboot" (not really a system restart)start|stop
- Starts/stops Android Runtime (not really a system restart)
What is the device doing exactly when I'm pushing the (hardware) power button? I guess that's the most friendly way.
su -c "reboot"
runs thereboot
command, which is defined inreboot.c
.reboot.c
hasn't changed much over the years. It has always called sync() and then rebooted the device. Also, thanks to this commit, modern versions ofreboot.c
also unmount all filesystems. Android 4.1.1 includes the commit I mentioned, and so I don't see howsu -c "reboot"
on Android 4.1.1 could ever cause filesystem corruption.su -c 'am start -a android.intent.action.REBOOT'
) works for me on Android 4.1.2, and seems to me to be the best of the existing answers. If it works for you on Android 4.1.1, or if you're too busy to try it, please click the green checkmark in order to make it float to the top of the answer section.