0

My device is a rooted one.

I know that for rebooting device we use shell command "su -c reboot". In some other posts I see people posting shutdown command as "su -c shutdown", but this does not work and also there is a permission called ACTION_SHUTDOWN but those permissions are used for system applications.

Is there any command which shut downs the device?

user1810931
  • 638
  • 2
  • 11
  • 33

1 Answers1

1
/**
 * Low-level function turn the device off immediately, without trying
 * to be clean.  Most people should use
 * {@link android.internal.app.ShutdownThread} for a clean shutdown.
 *
 * @deprecated
 * @hide
 */
@Deprecated
public static native void shutdown();

try using:

su reboot -p.

This works on some devices however it does not shutdown cleanly.

Brianjs
  • 2,079
  • 2
  • 20
  • 32
  • I was actually trying to execute "su rebbot -p" . It did not work for me, but when I execute the commands seperately as ( su , reboot -p) in different processes then it worked – user1810931 Mar 07 '13 at 15:56