Created
August 29, 2017 14:54
-
-
Save Malinskiy/69de5743d60e0004ca60ec4e72e6c2a9 to your computer and use it in GitHub Desktop.
PackageManagerService.java#locationIsPrivileged
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static boolean locationIsPrivileged(File path) { | |
try { | |
final String privilegedAppDir = new File(Environment.getRootDirectory(), "priv-app") | |
.getCanonicalPath(); | |
return path.getCanonicalPath().startsWith(privilegedAppDir); | |
} catch (IOException e) { | |
Slog.e(TAG, "Unable to access code path " + path); | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment