Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Appium : How to launch app from Android For Work work profile

I need to launch an app which is in different work profile (Android For Work). If install the app in personal profile then I am able to launch the app from the personal profile on the same device.

However, When I install the app only in the work profile then I am not able to launch the app through adb command.

As per my understanding, google keeps two different containers for personal and work profile. I think the work profile has different space and adb does not have any access to that app and workspace of work profile.

I need to launch the app through appium

If anyone has the answer to the above problem, please answer. Thanks in Advance !

like image 786
Vinod Avatar asked Apr 11 '17 11:04

Vinod


People also ask

How do I open apps in background Appium?

How to push app in background and launch from same screen in Appium with selenium Press home button from some specific screen. Put app in background. Open the app from same screen after some time interval.


1 Answers

Do you mean launching application on different user account ? check this link please : https://stackoverflow.com/a/24093533/5093606 You can get try to get list of accounts using

adb shell pm list users

and if you working account is there, try

adb shell am start --user WORKING_ACCOUNT com.example.MainActivity
like image 103
Andriy Antoniv Avatar answered Oct 21 '22 03:10

Andriy Antoniv