Open luprochazka-cen63872 opened 2 days ago
@luprochazka-cen63872 Nope we have not made any changes. Also this error is coming during executing adb command, we don't do much
With device-farm disabled (clear Appium) or 9.0.1 is everything ok, but if I update device-farm the issue appears. Any idea what to check?
@luprochazka-cen63872 What is the output when you run the command from your terminal
adb -P 5037 -s RZCCCCCCCC shell pm list packages
@luprochazka-cen63872 What is the output when you run the command from your terminal
adb -P 5037 -s RZCCCCCCCC shell pm list packages
% adb -P 5037 -s RZCCCCCCCC shell pm list packages
Exception occurred while executing 'list': java.lang.SecurityException: Shell does not have permission to access user 10 com.android.server.am.ActivityManagerService.handleIncomingUser:15970 android.app.ActivityManager.handleIncomingUser:5152 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733 at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892) at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15970) at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5152) at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733) at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074) at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960) at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:800) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7136) at android.os.Binder.shellCommand(Binder.java:1104) at android.os.Binder.onTransact(Binder.java:914) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905) at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7120) at android.os.Binder.execTransactInternal(Binder.java:1380) at android.os.Binder.execTransact(Binder.java:1311)
but this works:
adb -P 5037 -s RZCW91QDTHJ shell pm list packages --user 0
package:com.sec.android.RilServiceModeApp package:com.samsung.oda.service package:com.google.android.overlay.modules.permissioncontroller.forframework ...
Describe the bug In versions higher than 9.0.1 I see the problem mentioned here https://github.com/appium/appium-uiautomator2-driver/issues/795 I have some restriction on devices because of our company MDM, but it worked with version 9.0.1. Did you make any changes which might have affected it?
`WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/cenXXXXX/Library/Android/sdk/platform-tools/adb -P 5037 -s RZCCCCCCCC shell pm list packages' exited with code 255'; Command output: Exception occurred while executing 'list': java.lang.SecurityException: Shell does not have permission to access user 10 com.android.server.am.ActivityManagerService.handleIncomingUser:15970 android.app.ActivityManager.handleIncomingUser:5152 com.android.server.pm.PackageManagerShellCommand.translateUserId:3733 at com.android.server.am.UserController.handleIncomingUser(UserController.java:2892) at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:15970) at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:5152) at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3733) at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:1074) at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:960) [ Message content over the limit has been removed. ] at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:237) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:7136) at android.os.Binder.shellCommand(Binder.java:1104) at android.os.Binder.onTransact(Binder.java:914) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4905) at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:7120) at android.os.Binder.execTransactInternal(Binder.java:1380) at android.os.Binder.execTransact(Binder.java:1311)
Environment