I had an expo based react-native app that worked perfectly when I had only personal profile on my phone. Lately I also connected "Work profile" on my Samsung S20 and now I can't develop my personal app.
I'm running a typical expo build:
"scripts": {
"android": "expo run:android",
I managed to recreate the problem somehow by running:
$ adb 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:14872 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3499
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2672)
and indeed - I have more users now:
Users:
UserInfo{0:MyUsername:c13} running
UserInfo{10:Work profile:1030} running
UserInfo{150:Secure Folder:10021030} running
then I found a fix for the
adb shell pm list packages --user 0
but I have no idea how can I provide this parameter to expo builds. Please advise.