Skip to content

Instantly share code, notes, and snippets.

Last active November 3, 2022 08:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save timrijckaert/5bc52f14cf2d382a8c87cf0f1e77237e to your computer and use it in GitHub Desktop.
Some commands useful for debugging deeplinking

Check signature of an APK

keytool -printcert -jarfile file.apk

The SHA256 is the interesting one and need for the assetlink.json

Reverify assetlink

adb shell pm verify-app-links --re-verify

Manuamly trigger a deeplink

adb shell am start -W -a android.intent.action.VIEW -d "\&code_verifier=0987654321"

Add an <intent-filter> on the app/src/debug/AndroidManifest.xml DebugActivity for the env you want to test

Be aware in order for the assetlink.json to resolve after installation the domain you want to test needs to be publicly accessible.

We are going to use PILOT for this env as it is public

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="https" />
        android:pathPattern="/mobile/.*" />

Install the build variant you want, preferably on a real device

After installation check following command

adb shell dumpsys package d

Find the package name you are interested in.
Eg Fortis Debug:

Check underneath the section App verification status: if the output resembles

Status:  always : 200000018

Status always indicates the app will always handle the domain by opening the app.

Status:  ask

Status indicates the app will show an chooser at the bottom of the screen.
Auto verification failed basically.

‼️ The deeplink needs to be publically accessable.

Google App Signing If your app is signed by Google you don't have the SHA256.

You can find the SHA256 from Google's key in the Play Store.

Google Play Console > Setup > App Integrity > Digital Asset Links JSON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment