Disconnecting an Android device - want "ShutdownThread-> shutdown ()" not "su reboot -p"
A few questions about disabling the Android embedded device have answers saying that you should run "reboot -p" in the "su" shell. However, this answer suggests that the reboot is quite low and dirty and does not require sufficient cleaning before pulling out the plug. Use is recommended instead android.internal.app.ShutdownThread.shutdown(). Looking at the code , I see that it does a whole bunch of things for the household that I would like to have, and also has a convenient βconfirmβ parameter that seems to allow you to disconnect without asking for confirmation, which is nice.
My question is, what properties does the application have for calling ShutdownThread.shutdown()? Does a specific permission be required that can be installed if the device is installed on a root basis or it must be signed using the firmware key or something else?