allwinner_a64/android/cts/hostsidetests/devicepolicy/app/AccountCheck/Tester
2018-08-08 17:00:29 +08:00
..
res upload android base code part4 2018-08-08 17:00:29 +08:00
src/com/android/cts/devicepolicy/accountcheck/tester upload android base code part4 2018-08-08 17:00:29 +08:00
Android.mk upload android base code part4 2018-08-08 17:00:29 +08:00
AndroidManifest.xml upload android base code part4 2018-08-08 17:00:29 +08:00
README.txt upload android base code part4 2018-08-08 17:00:29 +08:00

This package helps creating accounts with DPM.ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED / DISALLOWED.


Note: AccountCheckHostSideTest should pass even with a pre-existing ALLOWED account.  Meaning, even
after you followed the below steps to add an ALLOWED account, AccountCheckHostSideTest should
still pass.

- Build
$ mmma -j cts/hostsidetests/devicepolicy/app/AccountCheck/Tester/

- Install
$ adb install  -r -g  ${ANDROID_PRODUCT_OUT}/data/app/CtsAccountCheckAuthAppTester/CtsAccountCheckAuthAppTester.apk


- Add an account with DEVICE_OR_PROFILE_OWNER_ALLOWED.
adb shell am startservice -a add_account \
    --esa features android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED \
    com.android.cts.devicepolicy.accountcheck.tester/.TestAuthenticator

- Add an account with DEVICE_OR_PROFILE_OWNER_DISALLOWED.
adb shell am startservice -a add_account \
    --esa features android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED \
    com.android.cts.devicepolicy.accountcheck.tester/.TestAuthenticator

- Verify
$ dumpsys-account
User UserInfo{0:Owner:13}:
  Accounts: 1
    Account {name=8894956487610:android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED, type=com.android.cts.devicepolicy.authcheck.tester}