• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

OTA-UPDATE /cache/recovery/uncrypt_file (Permission denied)

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=u:eek:bject_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" />
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones