I'm looking forward to doing an OTA update through an application located as a platform and in the / system / priv-app directory on Android 9 when trying to apply the update. I receive the following error when entering recovery:
java.io.FileNotFoundException: /cache/recovery/uncrypt_file (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:308)
at java.io.FileOutputStream.
<init>(FileOutputStream.java:238)
at java.io.FileOutputStream.
<init>(FileOutputStream.java:180)
at java.io.FileWriter.<init>(FileWriter.java:90)
at android.os.RecoverySystem.installPackage(RecoverySystem.java:562)
at android.os.RecoverySystem.installPackage(RecoverySystem.java:518)
at java.lang.reflect.Method.invoke(Native Method)
type=1400 audit(0.0:102): avc: denied { read } for name="cache" dev="dm-0" ino=16 scontext=u:r:system_app:s0 tcontext=ubject_r:cache_file:s0 tclass=lnk_file permissive=0
I have the following permissions in the manifest of my application:
<uses-permission android:name="android.permission.DELETE_CACHE_FILESYSTEM" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
java.io.FileNotFoundException: /cache/recovery/uncrypt_file (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:308)
at java.io.FileOutputStream.
<init>(FileOutputStream.java:238)
at java.io.FileOutputStream.
<init>(FileOutputStream.java:180)
at java.io.FileWriter.<init>(FileWriter.java:90)
at android.os.RecoverySystem.installPackage(RecoverySystem.java:562)
at android.os.RecoverySystem.installPackage(RecoverySystem.java:518)
at java.lang.reflect.Method.invoke(Native Method)
type=1400 audit(0.0:102): avc: denied { read } for name="cache" dev="dm-0" ino=16 scontext=u:r:system_app:s0 tcontext=ubject_r:cache_file:s0 tclass=lnk_file permissive=0
I have the following permissions in the manifest of my application:
<uses-permission android:name="android.permission.DELETE_CACHE_FILESYSTEM" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />