1This package helps creating accounts with DPM.ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED / DISALLOWED.
2
3
4Note: AccountCheckHostSideTest should pass even with a pre-existing ALLOWED account.  Meaning, even
5after you followed the below steps to add an ALLOWED account, AccountCheckHostSideTest should
6still pass.
7
8- Build
9$ mmma -j cts/hostsidetests/devicepolicy/app/AccountCheck/Tester/
10
11- Install
12$ adb install  -r -g  ${ANDROID_PRODUCT_OUT}/data/app/CtsAccountCheckAuthAppTester/CtsAccountCheckAuthAppTester.apk
13
14
15- Add an account with DEVICE_OR_PROFILE_OWNER_ALLOWED.
16adb shell am startservice -a add_account \
17    --esa features android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED \
18    com.android.cts.devicepolicy.accountcheck.tester/.TestAuthenticator
19
20- Add an account with DEVICE_OR_PROFILE_OWNER_DISALLOWED.
21adb shell am startservice -a add_account \
22    --esa features android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED \
23    com.android.cts.devicepolicy.accountcheck.tester/.TestAuthenticator
24
25- Verify
26$ dumpsys-account
27User UserInfo{0:Owner:13}:
28  Accounts: 1
29    Account {name=8894956487610:android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED, type=com.android.cts.devicepolicy.authcheck.tester}
30
31
32