Failed to start application - "Target device does not support run-as command

Running Android Studio on a Macbook for the first time, and I get this error. The program does not start on my device, I just get an error message.

In Android Studio, I get: "The target device does not support the run-as command, and when I connect it to Google, I get no results. I get the" Learn more "section, although it points to this link under the heading" About instant launch ": https://developer.android.com/studio/run/index.html?utm_medium=android-studio#instant-run .

Any suggestions would be highly appreciated.

+4
source share
2 answers

I recently upgraded to AS 2.2, and this message unexpectedly appeared today. Restarting Studio made this message disappear.

But the build seemed generally slow - so I used adb commands to stop and start the server, and now it seems that Instant Startup works better

adb kill-server
adb start-server

my phone is Moto G x1032 w lollipop

+3
source

I had the same problem after rooting my device and another answer did not resolve it. When I ran the adb run-as command in the terminal, I kept getting

    Could not set Capabilities: operation not permitted.

This is a permissions issue. You must change the permissions for the run-as file in the / system / bin folder. This resolved this for me (need root access):

    1. remount /system rw
    2. chmod 4750 /system/bin/run-as
    3. remount /system ro

When performing custom recovery:

    1. reboot to recovery
    2. find the mount system and check it (make sure 'mount system as read-only' is unchecked)
    3. open a terminal and type: adb shell
    4. type: chmod 4750 /system/bin/run-as
    5. uncheck the System mount and reboot! 

. 58373: https://code.google.com/p/android/issues/detail?id=58373

0

Source: https://habr.com/ru/post/1655372/


All Articles