Reputation: 94
I have a question, as I can run executables compiled in ndk without being root user, have compiled an application native with ndk created the executable, but that function should instead to cd /system/bin and give it the permissions with chmod, but these actions require root access, I can run my native application without being a root user because some mobile phones do not have root that is my question and thanks for responding.
Upvotes: 2
Views: 1881
Reputation: 10326
Yes, Android allows you to create native executables and run them - and you can create entire Apps that are purely native.
Creating native apps or executables does not reduce the security of Android (which is what I think you're asking) because those executables are run using the same sandboxing protections that ordinary Java-based Apps have.
The /system partition (like lots of areas in Android) is protected. Your native executable will not be permitted to copy files, alter permissions or anything else in these areas. There's nothing you can do on non-rooted phones to change that, but you can run programs stored in /system/bin for example - those programs will run with the same limited privileges as your own executable.
If your executable needs to change anything in the /system partition, you will require root access.
Upvotes: 1