简体   繁体   中英

Android NDK Native Permissions

How does Android OS handle permissions with native code running within an NDK compiled .apk? It seems to me that because the JNI is just calling upon native functions, the actual NATIVE portion of the code shouldn't be affected by Android permissions. For example, I am looking to develop an Android app (.apk) that writes a file under data/system. AOS already mounts data/system as RW so I've already been able to develop a native program that performs the write easily. My thinking is that when I implement this using the NDK, I will not have to set permissions to write to the directory because of the native implemenation. Is this assumption correct?

Thanks, David

My thinking is that when I implement this using the NDK, I will not have to set permissions to write to the directory because of the native implemenation. Is this assumption correct?

Absolutely not. Permissions affect everything in the process, no matter what programming language you choose to write in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM