Appium: how to launch an application from an Android For Work profile

I need to run an application that is in a different work profile (Android For Work). If you install the application in a personal profile, I can run the application from a personal profile on the same device.

However, when I install the application only in the work profile, I cannot start the application through the adb command .

According to my understanding, google supports two different containers for personal and work profiles. I think the work profile has a different space, and adb has no access to this application and the work profile workspace.

I need to run the application through appium

If anyone has an answer to the above problem, answer. Thanks at Advance!

+6
source share
2 answers

Do you want to run the application on a different account? check this link: fooobar.com/questions/292278 / ... You can get a list of accounts using

adb shell pm list users

and if you work with an account, try

adb shell am start --user WORKING_ACCOUNT com.example.MainActivity
+3
source

Yes, there is a way to launch applications using Appium / Adb commands. Instead of appium, use adb commands to launch applications.

The application you used to register AndroidForWork must be in android: debuggable mode. Set debug mode to true and create apk.

Once the device is registered / configured to work in Android, get a list of users.

adb shell pm UserInfo {0: Drew: 13} UserInfo {10: : 30}

workprofile. 10 id. .

adb shell am start --user 10 -n "com.android.vending/com.google.android.finsky.activities.MainActivity"

. , .

-1

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


All Articles