Hi..
I use Android on BBB (Image provider : TI)
I wanna add a poweroff app. but there is no poweroff or shutdown command on TI Image.
how can i install that command or is there another command?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi..
I use Android on BBB (Image provider : TI)
I wanna add a poweroff app. but there is no poweroff or shutdown command on TI Image.
how can i install that command or is there another command?
Hello,
In C, the command to shutdown a Linux kernel is: "reboot(RB_POWER_OFF)" - this has been tested on a BBB.
As you can see on this link, the power off sequence is initiated by "ShutdownThread.shutdown()": kobablog.wordpress.com/.../shutdown-sequence-of-android
If you want to implement this in your Java application, this example should work (we have not tested it): alvinalexander.com/.../ShutdownActivity.java.shtml
Thanks for your answer.
i have no java compiler. so i can't test what you linked.
but i have run many shutdown apps on gapps, but these app always said "it's not rooted".
doesn't BBB rooted? also, all supersu apps didn't work.
Hello,
For some reason, the default "su" binary doesn't allow to be used by applications.
First, we will make a copy of it to be safe:
$ adb shell "mv /system/xbin/su /system/xbin/su.backup"
Now, download the latest version of the SuperSU installable ZIP here: download.chainfire.eu/supersu
Open the zip and extract two files:
- common/Superuser.apk
- armv7/su
Install the SuperSU application:
$ adb install Superuser.apk
Install the su binary and fix its permissions:
$ adb push su /system/xbin
$ adb shell "chown 0:0 /system/xbin/su"
$ adb shell "chmod 6755 /system/xbin/su"
Now the applications requesting root will work, providing you allow them with SuperSU.