Checksum
See original GitHub issueHi All I modified the Test-DPC app and I’m trying to use QR-Code scan for device provisioning however “cound’t install admin app. checksum error etc” always shows. how to properly generate Checksum in Android Studio?
this is the command I used to generate checksum: cat TestDPC-normal-release.apk | openssl dgst -binary -sha256 | openssl base64 | tr ‘+/’ ‘-_’ | tr -d ‘=’
output: rkjgjgBW9Nii3NqyoyP_9spvmCwu8EIh18a6H0XKC6o
also everytime I generate a signed APK and install on device “the apk seems to be corrupted” error is shown. the app installation only works if installed directly from android-studio below is my build.gradle app level
`apply plugin: ‘com.android.application’
ext { /* Version code for next release, bump after a release is created. */ // 1 or more digits versionMajor = 5 // exactly 1 digit versionMinor = 0 // exactly 2 digits versionBuild = 01 }
android { compileSdkVersion ‘android-P’ defaultConfig { applicationId “com.afwsamples.testdpc” minSdkVersion 21 targetSdkVersion 27 versionName “${versionMajor}.${versionMinor}.${versionBuild}” multiDexEnabled true signingConfig signingConfigs.config } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ signingConfig signingConfigs.config proguardFile ‘/[path]/android-testdpc-master (2)/app/proguard-android.txt’ } } flavorDimensions “packageName” productFlavors { normal { dimension ‘packageName’ signingConfig signingConfigs.config } replica { dimension ‘packageName’ applicationIdSuffix “.replica” } } lintOptions { check ‘NewApi’ abortOnError true xmlReport false textReport true textOutput “stdout” } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } repositories { flatDir { dirs ‘libs’ } maven { url ‘https://maven.google.com’ } } // Enable lint checking in all build variants. applicationVariants.all { variant -> variant.outputs.each { output -> def lintTask = tasks[“lint${variant.name.capitalize()}”] output.assemble.dependsOn lintTask } } }
dependencies { implementation ‘com.android.support:multidex:1.0.1’ implementation ‘com.android.support:preference-v14:28.0.0-alpha1’ implementation ‘com.android.support:recyclerview-v7:28.0.0-alpha1’ implementation ‘com.android.support:support-v13:28.0.0-alpha1’ implementation ‘com.android.support.constraint:constraint-layout:1.0.2’ implementation(name: ‘setup-wizard-lib-platform-release’, ext: ‘aar’) implementation ‘org.bouncycastle:bcpkix-jdk15on:1.56’ implementation ‘org.bouncycastle:bcprov-jdk15on:1.56’ implementation ‘com.google.guava:guava:23.6-android’ implementation ‘com.android.support:design:28.0.0-alpha1’ implementation ‘commons-codec:commons-codec:1.11’ implementation ‘com.android.support:appcompat-v7:28.0.0-alpha1’ } `
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Try using a download location without TLS (i.e. https). If that works, check that your site is signed using a public CA that is shipped with Android and that your site is sending the entire certificate chain (bundle, intermediate/issuer) and not just the returned signed certificate from the public CA. Android may have the public CA’s root certificate, but not their intermediate/issuer certificate. Behavior is different from a PC’s browser.
Closing as question is now in #83