PC. PC. - 24 days ago 5x
Android Question

Cannot read system files even after obtaining platform signature

I've build a custom android ROM. I've signed my application with platform signature and have added

in the manifest file. My app is granted all "signature" and "system" level permission but access to system files are not granted.

Log.w("PC", String.valueOf(checkCallingOrSelfPermission("android.permission.ACCESS_SURFACE_FLINGER")== PackageManager.PERMISSION_GRANTED)); // true
Log.w("PC", String.valueOf(checkCallingOrSelfPermission("android.permission.READ_FRAME_BUFFER")== PackageManager.PERMISSION_GRANTED)); // true
Log.w("PC", String.valueOf(checkCallingOrSelfPermission("android.permission.INJECT_EVENTS")== PackageManager.PERMISSION_GRANTED)); // true

Log.w("PC", String.valueOf(new File("/dev/graphics/fb0").canRead())); // false
Log.w("PC", String.valueOf(new File("/data/misc/wifi/wpa_supplicant.conf").canRead())); // false

permissions of the files are:

ls -l /dev/graphics/fb0
crw-rw---- root graphics 29, 0 2014-02-12 09:43 fb0

ls -l /data/misc/wifi/wpa_supplicant.conf
-rwxrwx--- wifi wifi 282 2014-02-11 19:04 wpa_supplicant.conf

Is there any way to get the access to these files?


I've found the solution to this. Along with the platform signature and android:sharedUserId="android.uid.system" you also need to add android:process="system" in the <application /> section of the manifest file.