3 ms·
> Starting in the next release of Android, some non-SDK methods and fields will be restricted so that you cannot access them -- either directly, via reflection,
by saagarjha 9y ago
> Starting in the next release of Android, some non-SDK methods and fields will be restricted so that you cannot access them -- either directly, via reflection, or JNI. If you try, you can see errors such as NoSuchFieldException or NoSuchMethodException.
Yes, how is this done? Using SecurityManager or something similar?
- pjmlp 9y agoI guess so. For NDK they are using a similar process. Any attempt to use on-device libraries not part of the official NDK APIs will terminate the application.
- kllrnohj 9y agoIn the runtime itself: https://android-review.googlesource.com/c/platform/art/+/580003/10 https://android-review.googlesource.com/c/platform/art/+/580... CL is abandoned but it appears to have just be split up into smaller changes, so that should still give a good idea of the approach being used.