Skip to content

Commit 4e9a7b1

Browse files
authored
Update README.md
Add image for QR code
1 parent 9168823 commit 4e9a7b1

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

README.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,54 @@ Test DPC is an app designed to help EMMs, ISVs, and OEMs to test their applicati
55

66
See the [documentation](https://developer.android.com/work/index.html) to learn more about Android in the enterprise.
77

8-
Getting Started
9-
---------------
8+
## Getting Started
109

1110
This sample uses the Bazel build system. To build this project, use the "bazel build testdpc" command.
1211

1312
This app can also be found [on the Play store](https://play.google.com/store/apps/details?id=com.afwsamples.testdpc).
1413

15-
Provisioning
16-
------------
14+
## Provisioning
1715

1816
You can find various kinds of provisioning methods [here](https://developers.google.com/android/work/prov-devices#Key_provisioning_differences_across_android_releases). Let's take a few of them as an example.
1917

20-
#### AFW# code provisioning (Device Owner M+)
18+
### AFW# code provisioning (Device Owner M+)
2119
1. Factory reset your device and tap the welcome screen in setup wizard 6 times.
2220
2. When prompted to sign in, enter **afw#testdpc**
2321
3. Follow onscreen instructions
2422

25-
#### QR code provisioning (Device Owner N+ only) ####
23+
### QR code provisioning (Device Owner N+ only)
2624
1. Factory reset your device and tap the welcome screen in setup wizard 6 times.
27-
2. On Android O or older, the setup wizard prompts the user to connect to the Internet so the setup wizard can download a QR code reader.
28-
3. Generate a QR code with the content:
25+
1. On Android O or older, the setup wizard prompts the user to connect to the Internet so the setup wizard can download a QR code reader.
26+
Android P and newer devices already have the QR code reader available.
27+
1. Generate a QR code with the content:
2928
```
3029
{
3130
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver",
3231
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "gJD2YwtOiWJHkSMkkIfLRlj-quNqG1fb6v100QmzM9w=",
3332
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://testdpc-latest-apk.appspot.com"
3433
}
3534
```
36-
6. Scan the QR code and follow onscreen instructions
35+
or use this pre-made QR code:
36+
![testdpc_provisioning](https://github.com/googlesamples/android-testdpc/assets/188886/a54b809f-cf58-433b-8cbe-f14cf3f00612)
37+
1. Scan the QR code and follow onscreen instructions
3738

38-
#### ADB command ####
39+
### ADB command
3940

40-
**Device Owner**
41+
#### Device Owner (DO)
4142

4243
* Run the `adb` command:
4344

4445
```console
4546
adb shell dpm set-device-owner com.afwsamples.testdpc/.DeviceAdminReceiver
4647
```
4748

48-
**Profile Owner**
49+
#### Profile Owner - Personal device (PO - BYOD)
4950

5051
* Create a managed profile by launching the “Set up TestDPC” app (if this app
5152
seems broken and you are in dark mode, switch to light mode)
5253
* Skip adding an account at the end of the flow
5354

54-
**COPE Profile Owner**
55+
#### Profile Owner - Corporate-owned device (PO - COPE)
5556

5657
* Create a managed profile by launching the “Set up TestDPC” app (if this app
5758
seems broken and you are in dark mode, switch to light mode)
@@ -62,7 +63,7 @@ You can find various kinds of provisioning methods [here](https://developers.goo
6263
adb shell dpm mark-profile-owner-on-organization-owned-device --user 10 com.afwsamples.testdpc/.DeviceAdminReceiver`
6364
```
6465

65-
## TestDPC as DM role holder
66+
#### TestDPC as DM role holder
6667

6768
TestDPC v9.0.5+ can be setup as Device Management Role Holder.
6869

@@ -76,8 +77,7 @@ TestDPC v9.0.5+ can be setup as Device Management Role Holder.
7677
Note: unlike DO/PO, this change is not persisted so TestDPC needs to be
7778
marked as role holder again if the device reboots.
7879

79-
Android Studio import
80-
---------------------
80+
## Android Studio import
8181

8282
To import this repository in Android Studio, you need to use the
8383
[Bazel for Android Studio](https://plugins.jetbrains.com/plugin/9185-bazel-for-android-studio)
@@ -96,28 +96,24 @@ Select "Bazel Command" as Configuration type and add `//:testdpc` as
9696
You can now run the project from inside Android Studio.
9797

9898

99-
Building with Bazel
100-
-------------------
99+
## Building with Bazel
101100

102101
The repository includes a `build.sh` script to build the application. The required
103102
[setupdesign library](https://android.googlesource.com/platform/external/setupdesign/+/refs/heads/main)
104103
is now imported and patched dynamically using the command line utility `ed`. This needs to be
105104
available on the path to successfully build the project.
106105

107-
Support
108-
-------
106+
## Support
109107

110108
If you've found an error in this sample, please file an issue:
111109
https://github.com/googlesamples/android-testdpc/issues
112110

113111
Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.
114112

115-
License
116-
-------
113+
## License
117114

118115
Licensed under the Apache 2.0 license. See the LICENSE file for details.
119116

120-
How to make contributions?
121-
--------------------------
117+
## How to make contributions?
122118

123119
Please read and follow the steps in the CONTRIB file.

0 commit comments

Comments
 (0)