Visual Studio 2015, android "run-as" command failed

In the environments: Windows 10 (home, pro), visual studio 2015 (community, professional) all combine.

Run visual studio 2015 update 1, the new project, the Native-Activity (Android) app, so make your own Android app by default. Build a solution and start debugging. Then the following error message appears:

Error message .

Unable to start debugging. The Android run-as command failed. The package 'com.Android1' is unknown.

I googled but cannot find how to solve. What did I miss? How to set up the environment or fix something?

+9
c ++ android debugging cross-platform visual-studio
Mar 09 '16 at 13:48
source share
3 answers

The solution to this is that you have to strengthen your device and fix the file resolution. You can try to follow the prompt in the prompt (especially if rooting is not an option), but in some cases only the root can solve the problem.

Once you have connected your device, open the adb shell and run the following:

su mount -o remount,rw /system chmod 4750 /system/bin/run-as mount -o remount,ro /system 

This is a fix for setuid permissions, so that the execution process as a process is granted access based on the owner of the file (i.e. root).

+1
Nov 19 '16 at 1:14
source share

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.

+1
Apr 05 '17 at 22:34 on
source share

Download it down from Samsung, kies. You will see the ability to boot the smart switch. Click the link in the previous answer ...

0
09 Oct '17 at 11:22 on
source share



All Articles