In my computer, I can find the java security file under the following path:
jre/lib/security/java.security
Where does android store this file in Android 4.1 and above ? & Is it only accessible by rooted device?
==== UPDATE ====
In general, I need to know where does android maintain the list of security providers(e.g. AndroidOpenSSL, HarmonyJSSE, etc). I guess there should be a system file maintaining the list of those providers(like the file jre/lib/security/java.security in my computer).
Where is that file located? I know I can use Security class to get the list, but I need to know the location of the file in Android.
(The reason why I want to know the location of that file in android is that I would like to change the order of the providers.)
Android 6.0 does not use that file, and I doubt that prior versions of Android do either.
There must be a list of security providers. This list does not have to be maintained in a text file.
If you read the source code to
java.security.Securityfor Android 6.0.1 r16, you will see that there are two possible sources of the provider list:The
security.propertiestext baked into the libcore JAR as a JAR resourceA hard-coded roster in the
Securitysource code, if for some reasonsecurity.propertiescannot be loadedNote that older versions of Android may differ here, and device manufacturers/custom ROM developers may alter this further.
At best, on a rooted device, you could try to hack a replacement
security.propertiesinto that JAR.