Run-as: failed to install features: operation not allowed

on android 6.0.1 I get this error when trying to use run-as.

⋊> ~ adb shell 14:29:01 shell@trlte:/ $ run-as org.ligi.passandroid run-as: Could not set capabilities: Operation not permitted 

I really like the run-as command - is there a way to make it work with 6.0.1?

+38
android adb
May 24 '16 at 12:31
source share
7 answers

If you have a SAMSUNG device, do not worry - SAMSUNG interrupted the run-as by resetting the setuid flag (so that when run-as cannot switch to another person).

Also, do not try to try the Smart Switch workaround to “reinitialize the device”, it will not work until SAMSUNG fixes it in the firmware (therefore it is worth updating it to the latest version).

To access the application data, use another method, for example, adb backup :

 adb backup -f data.ab <my.package> dd if=data.ab bs=24 skip=1 | openssl zlib -d > data.tar 

Instead of dd you can use the abe tool, which can also write .ab files.

+49
Oct 29 '17 at 19:45
source share

The solution for me was the -autolaunch option in the Debugger configuration of the project in the Options field.

I am using Delphi 10.2 with S7 Edge Android 7

+3
Nov 06 '17 at 15:03
source share

Unlike the other answer here, I also tried to use the smart switch and hard drive, but unfortunately this approach did not work for me (took an extra hour to try this approach). Besides the fact that this does not work, it can create an additional problem "samsung account: session expired" - a problem that can only be fixed if you have access rights to your device.

I myself used the instructions from here: https://www.youtube.com/watch?v=Sy4FWLHxGYs

and then from here: https://www.tomsguide.com/us/samsung-galaxy-s6-guide,review-2856-3.html

to get root access to your device, and after that launch - how can I do it with the additional command "su -c", as for the root user. The whole team will look like this:

su -c run-as org.ligi.passandroid

WARNING Gaining root access to your device will most likely void your device’s warranty if you have everything.

In addition, I wanted to be able to debug my application inside the Samsung Galaxy S6, so I changed the components of Visual Studio, here you can find additional instructions:

https://issuetracker.google.com/issues/37093233#comment53

If you have an Android device based on Android, I already reported this error for Samsung, but I could not get a timeline if and when they fix this problem at all. If you have another Android device, it makes sense to report this problem to the manufacturer.

+1
Oct 08 '17 at 11:30
source share
Answer to

@RustyX helped me in part. zlib did not work on my Mac. So I had to use Android Backup Extractor to convert the .ab file to the .tar file. You can download it here .

For complete step-by-step instructions, see here .

0
Jan 03 '18 at 12:07
source share

In Visual Studio, application properties, Android options, changing the debugger from C ++ to .Net (Xamarin), apparently fixed the problem for a mixed C ++ / C # application.

0
Jun 06 '18 at 9:03
source share

I previously posted an answer here that was deleted, perhaps because it was a link to another stackoverflow question, referencing the answer I gave there, instead of containing the full answer.

By canceling its contents here, https://stackoverflow.com/a/2128778/

I had a very similar problem on the Samsung Galaxy S6 Edge, trying to start debugging on VS2015, I have another error, much less details than on the attached screenshot:

run-as: failed to install features: operation not allowed

Based on the contents of the attached screenshot above, I tried to “initialize” / factory the device reset using Samsung Smart Switch and it actually fixed the “run-as” problem that I had.

This is the only solution that worked and did not include rooting the device, so I believe that it should be publicly available. Of course, people trying to do this should keep in mind that factory reset means that data will be lost unless it is supported. The same Samsung software helps with backing up your data.

-one
Jul 03 '17 at 8:41
source share

I worked with Delphi 10.1 berlin. I was presented with the same problem, and I decided to configure the SDK for the previous version. I used the Android SDK 25.2.5.32bit and was downgraded to the Android SDK 24.3.3 32 bit. For settings:

Tools-> Environment Settings → SDK Manager

Then add the required SDK, in this case the Android SDK 24.3.3 32 bit.

-one
Jan 16 '19 at 20:15
source share



All Articles