• 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:object_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" />
 
Could it be the code compilation methods of android?

Could be a corrupted download.. Are you Rooted, by chance? If so, that could be your problem. If not, You can always try:
- clear caches and redownload the ota,
- factory reset and try to take the ota before any sign-in.
 
If I am downloading the ota and install it by sideload for the verification
and this is correctly applied, but when it is downloaded from the normal process of the device it gives me that error in the recovery.
 
Back
Top Bottom