Programmatically shutdown of NanoPi M2


I got the SerialPortDemo running on Android 5.1.1 and so I was able to
acquire privileged access to some parts of the hardware through
friendlyarm-hardware library.

But now I need to programmatically shutdown and/or reboot the device. This
requires su (root) access. In some other threads was a hint that Kingroot
could be used to acquire root access but this doesn't seem to work with
NanoPi M2 and the current Android 5.1.1 build. I also tried several other
on-click root tools but without success.

I do not really understand why FriendlyARM does not provide an Android with
root access (like some other development platforms). But if this is strict
strategy, I could live with it, when I could at least get the option to
shutdown / reboot the device through friendlyarm-hardware lib.


Are you using your own compiled Android system? You want to
programmatically shutdown device from SerialPortDemo app or another app?

I want to shut down from a self developed app that is using the
friendlyarm-hardware library for serial communication based on the


eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number: 2 0 3 3