how to get ADMIN_SIGNATURE_CHECKSUM or ADMIN_PACKAGE_CHECKSUM of my apk?

727 Views Asked by At

I'm trying to device owner enrollment via QrCode with the example provided by google of Testdpc so I downloaded the APK from the link provided on his repository link and set it on my ISS windows machine then I'm trying to get the CHECKSUM to put it on my Qr-Code json

{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME":"com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM":"MS4-Pz8gP0VDPy0-P2I-Pz4NClE-Pz80Pz8rPz9zfD8-DQo=",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION":"http://192.168.1.224/TestDPC_8001.apk"

}

I tried the different solutions on the internet V2 V1 but it always returns a different ADMIN_SIGNATURE_CHECKSUM from the ones that are provided in google repository link

so any solution to extract the exact PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM? or extract PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM because it can replace PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM

1

There are 1 best solutions below

0
On

Instructions:

  1. Download and install strawberry-perl on your operating system. For windows operating system you can download from here.
  2. Now open command prompt.
  3. Run command >> cd C:\Program Files (x86)\Java\jdk1.8.0_131\bin (path of your java jdk bin directory)
  4. Now run command >> keytool -list -printcert -jarfile YOUR_APK_FILE_PATH | perl -nle "print $& if m{(?<=SHA256:) .*}" | xxd -r -p | openssl base64 | tr -- '+' '-_'


Follow this instructions correctly and you will get the correct checksum of your apk file. You can try testing checksum for the TestDPC apk file.