2

I am unable to run a project on my Samsung device from Android Studio 3.4.1. Studio is giving me the following error message in a dialog box

Installation failed with message 'cmd package install-create -r -t -S 1686629' returns error 'Unknown failure: Security exception: Permission Denial: runInstallCreate from pm command asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
java.lang.SecurityException: Permission Denial: runInstallCreate from pm command asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.UserController.handleIncomingUser(UserController.java:1827)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:25069)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4848)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:2402)
at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:2408)

I tried the fix mentioned in the message, ie adding a permission in manifest file, but still the error is not going away while running.

Please note, the project is building without errors.

How do I fix this?

My System details

Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic

Android Studio Details

Android Studio 3.4.1 Build #AI-183.6156.11.34.5522156, built on May 1, 2019 JRE: 1.8.0_152-release-1343-b16-5323222 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.0-52-generic

mad_greasemonkey
  • 864
  • 2
  • 15
  • 32

1 Answers1

5

I had the same issue after upgrading a Galaxy Tab Active 2 to Android Pie (9.0).

The solution that worked for me:

  1. Uninstall the App
  2. Disable and Re-Enable Developer Options.
  3. Re-Enable USB Debugging (it didn't work after that step just yet)
  4. Reboot the tablet

Others reported success by adding the the INTERACT_ACROSS_USERS_FULL permission into the manifest.

If you're still stuck, other solutions steps regarding the same error message are available here: https://forum.unity.com/threads/android-permission-interact_across_users_full.536280/

Community
  • 1
  • 1
TomDK
  • 1,321
  • 11
  • 16