Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 1 of 1
  1. Thread Author  Thread Author    #1  

    Default /cache/recovery/command: open failed: EACCESS (permission denied) - missing permission after update

    Hi everyone,

    I already searched in the Internet an answer to my problem, but unfortunately I have not found a solution for my issue. I even wrote in this case on the official forum, Unfortunately, the moderators could not cope with this problem. Below I describe the problem, hoping that someone had a similar problem and knows the solution.

    I made an application that works fine on Android 4.1, which is why I reject the problems associated with the lack of "something".
    For now, it seems that in newer versions of android is a bug, because after updating to Android 4.3+ (API 18+) my app shows the message:
    /cache/recovery/command: open failed: EACCESS (permission denied)
    My application is an system application, so the file '*.apk' was put in directory '/system/app/'
    together with a suitable file access permissions (chmod), so that the 'context.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM' is equal 1.

    Because the application uses the method 'RecoverySystem.installPackage(...)' I added permissions:
    Code:
    <uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
    <uses-permission android:name="android.permission.REBOOT" />
    <uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    More than the required minimum, because among others my application uses the method 'RecoverySystem.verifyPackage(...)'
    Also, this method had problems after updating to Android 4.3+, but these problems have been solved after adding one of (or all) permissions:
    Code:
    <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    NOTE:
    For testing I added to manifest file also all the possible permissions that are available, but this does not solve the problem.


    Once again, I would like to emphasize that the application works correctly until an update to android 4.3+.
    After the update there is an error with the message:
    /cache/recovery/command: open failed: EACCESS (permission denied)
    This error occurs when call the method 'RecoverySystem.installPackage(...)'.

    ('FileWriter command = new FileWriter(COMMAND_FILE);' where 'COMMAND_FILE' == '/cache/recovery/command')

    I'm not sure, but I think that one of the possible reasons may be bug in the 'bootable/recovery/recovery.c', but I can not find any confirmation.


    If anyone can help, I'd be grateful.


    P.S. To avoid mess in the Internet, do not post with texts like "use Google", "already it was - I've seen it somewhere - but can not remember where", "I have the same problem / also not working for me", and other posts which do not help solve the problem.

Similar Threads

  1. Replies: 27
    Last Post: 05-01-2014, 07:48 PM
  2. Wrong apps in 'open using' box
    By api7342 in forum Android 4.1 / 4.2 / 4.3 Jelly Bean
    Replies: 3
    Last Post: 04-25-2014, 10:18 AM
  3. Problem Updating
    By Chukklz9413 in forum HTC One
    Replies: 1
    Last Post: 04-25-2014, 07:47 AM
  4. How to use Chrome Browser and open up video in Samsung video app
    By Cdemikols in forum T-Mobile Samsung Galaxy Note 3
    Replies: 1
    Last Post: 04-25-2014, 06:44 AM
  5. Update unavailable
    By x3nii in forum Samsung Galaxy S II
    Replies: 1
    Last Post: 04-25-2014, 06:09 AM

Posting Permissions