• Announcements

    • PsychoI3oy

      Unsupported devices & future versions   09/03/16

      Unsupported devices posts outside the Device requests forum will be deleted without comment. Posts asking about/for future versions of CM will be locked and/or deleted.   We don't have a crystal ball; we don't know if someone will make CM $version for your deivce or if CM $version+1 will be made for your supported device.
Sign in to follow this  
Followers 0

run-as not working due to /data/data symlink

1 post in this topic


I'd like to report a bug with Cyanogen 7.1 RC1, which makes the "run-as" command unusable.

"run-as" can be used to run commands with the permissions of an installed package, and is e.g. required

when debugging with ndk-gdb (i.e., "run-as" is essential for development).

On CyanogenMod, "adb shell run-as org.example.app" fails with the message "run-as: Package 'org.example.app' has corrupt installation".

The reason "run-as" does not work on cyanogen mod is the fact that "run-as"

does have strict requirements about the permissions of the application data directory:

it checks whether the application data directory (and all subdirectories leading up to it)

is owned by the system user and system group, and whether it is a real directory. However, /data/data

is a symlink in cyanogen, which makes "run-as" fail.

I've worked around it by removing the symlink and moving the contents of /datadata into /data/data,

but wanted to make you aware of this issue so this can hopefully be fixed properly.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0