How Can I Run A Shell Script On Android Things Device At Boot With Root Permissions?
Solution 1:
Android (and therefore Android Things) does not allow applications to run as the root user for security reasons. If you need this feature for your production apps, feel free to add any comments regarding your use case to the existing feature request in place for this.
Regarding the things you already tried:
-installed an Android app in the /system/app folder with world executable perms
-installed an Android app in the /system/private-app folder with world executable perms
Apps installed in Android's /system
partition are allowed privileged access to various Android-level permissions, but this does not affect their Linux UIDs.
-created init.d with a executable shell script file (folder didn't exist before)
Android does not use the same init structure as other Linux distributions. Init instructions are located in various init.rc
files on the root file system. In general, again for security reasons, even the processes spawned from init are not allowed to run as root and are given isolated SE contexts to run in.
Post a Comment for "How Can I Run A Shell Script On Android Things Device At Boot With Root Permissions?"