Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ADB troubleshooting reference for wallet testing

A reference of adb commands used when testing digital wallets (EUDI Wallet, France Identité, and others) with the ewQwe Credential Verifier.

Note

adb is typically located at ~/Library/Android/sdk/platform-tools/adb on macOS when installed through Android Studio. Add it to your PATH for convenience.


Device and connection management

List connected devices

# List all connected devices and emulators
adb devices

# List only emulator devices
adb devices -e

# List only physical (USB) devices
adb devices -d

Restart the ADB server

adb kill-server
adb start-server

Use this when adb devices shows no devices even though an emulator is running or a device is connected through USB.

Connect to a specific device

# Use -s with the device serial for single-target commands
adb -s <device_serial> install app.apk

# Use -e for an emulator
adb -e install app.apk

# Use -d for a physical device (USB)
adb -d install app.apk

Install and manage APKs

Install an APK

# Basic install
adb install /path/to/your-app.apk

# Reinstall (overwrite the existing app, keep the data)
adb install -r /path/to/your-app.apk

# Install to an emulator
adb -e install /path/to/your-app.apk

# Install to a specific device
adb -s <device_serial> install /path/to/your-app.apk

Uninstall an app

adb uninstall <package_name>

# Example: EUDI Wallet
adb uninstall eu.europa.ec.euidiw

# Example: France Identité
adb uninstall fr.gouv.interieur.franceidentite

List installed packages

# List all packages
adb shell pm list packages

# Filter by keyword
adb shell pm list packages | grep -i eudi
adb shell pm list packages | grep -i france
adb shell pm list packages | grep -i identite

W3C Digital Credentials API provider registration

Check registered credential providers

# List all credential providers registered with Android CredentialManager
adb shell dumpsys credential

Interpretation:

  • Empty or missing output: no wallet has registered as a CredentialProviderService with the Android CredentialManager on this device.
  • Populated output: the wallets that implement a CredentialProviderService appear here. Look for entries under credential-services.

Important

Some wallets, including the EUDI Wallet, implement Annex C Sub-protocol B with an Activity intent filter on their MainActivity, for the actions androidx.credentials.registry.provider.action.GET_CREDENTIAL and androidx.identitycredentials.action.GET_CREDENTIALS, instead of a CredentialProviderService. This approach does not appear in dumpsys credential.

This Activity-based approach does not work with Chrome on Android 14 and later. Chrome delegates to the Android CredentialManager, which dispatches only to CredentialProviderService implementations, and never to Activities with intent filters. The Digital Credentials API request never reaches the wallet.


DNS and network configuration

Map demo.ewqwe.local to the host machine (emulator)

For the Android emulator, the host machine is reachable at 10.0.2.2. Map the demo domain inside the emulator:

adb root && adb shell "echo '10.0.2.2  demo.ewqwe.local' >> /etc/hosts"

Warning

This command requires adb root, which works only on an emulator or a rooted device. Start the emulator with -writable-system.

Verify the hosts file

adb shell cat /etc/hosts

Verify network connectivity from the emulator

# Ping the host machine from the emulator
adb shell ping 10.0.2.2

# Test DNS resolution inside the emulator
adb shell ping demo.ewqwe.local

Transfer files (CA certificates, APKs, and others)

Push files to the device

# Push a CA certificate to Downloads
adb push /path/to/ewqwe-ca.crt /sdcard/Downloads/ewqwe-ca.crt

Push a CA certificate to the system trust store (rooted emulator)

adb root
adb remount
adb push /path/to/ewqwe-ca.crt /system/etc/security/cacerts/ewqwe-ca.crt
adb reboot

Pull files from the device

adb pull /sdcard/Download/some-file.txt /local/path/

View wallet logs (logcat)

Filter by process ID (EUDI Wallet)

# Stream logs for the EUDI Wallet process only
adb logcat --pid=$(adb shell pidof eu.europa.ec.euidiw)

Filter by log tags

# Show only specific wallet log tags
adb logcat -s "OpenId4VpManager" "PresentationManager" "WalletCore"

Note

For France Identité, substitute the package name or the tags that France Identité uses.

Search the logs for wallet keywords

adb logcat | grep -iE "eudi|openid4vp|presentation|mdoc|wallet"
adb logcat | grep -iE "france|identite|annex_b|dcapi"

Clear logcat

adb logcat -c

System information and debugging

Check the Android version

adb shell getprop ro.build.version.release

Check whether WebView supports W3C Digital Credentials

# Check the Chrome version on the device
adb shell dumpsys package com.android.chrome | grep versionName

Grant permissions to a wallet app

adb shell pm grant <package_name> android.permission.BLUETOOTH
adb shell pm grant <package_name> android.permission.BLUETOOTH_ADMIN
# Open an openid4vp deep link on the device
adb shell am start -d "openid4vp://?client_id=..." -a android.intent.action.VIEW

# Open a generic URL
adb shell am start -d "https://example.com" -a android.intent.action.VIEW

Force-stop an app and clear its data

adb shell am force-stop <package_name>
adb shell pm clear <package_name>

Reboot the emulator or device

adb reboot

Test certificates

Inspect a certificate chain

openssl x509 -in your_fullchain.pem -noout -issuer
openssl x509 -in your_cert.pem -noout -subject -issuer

Download root CA certificates (for example, Let’s Encrypt)

curl -s https://letsencrypt.org/certs/isrgrootx1.pem -o isrg_root_x1.pem
curl -s https://letsencrypt.org/certs/isrg-root-x2.pem -o isrg_root_x2.pem

Android emulator commands

Cold boot

Use this when the emulator is unresponsive or has stale state. In Android Studio, open Device Manager, right-click the device, and select Cold Boot Now.

Enable the hardware keyboard

In the Android Studio emulator settings, enable “Hardware keyboard present” to use the keyboard of your computer.

Grant superuser (root)

adb root

Note

This works only on emulator images or rooted devices. It is required to modify /etc/hosts or the system-level CA certificates.

Remount the system partition as writable

adb remount

Note

This is required after adb root to push files to system partitions such as /system/etc/security/cacerts/.


Quick reference by use case

What you needCommand
See connected devicesadb devices
Install an APKadb install /path/to/app.apk
Force reinstalladb install -r /path/to/app.apk
Check W3C credential providersadb shell dumpsys credential
Map demo domain in emulatoradb root && adb shell "echo '10.0.2.2 demo.ewqwe.local' >> /etc/hosts"
Push CA cert to Downloadsadb push cert.crt /sdcard/Downloads/
Push CA cert to system storeadb root && adb remount && adb push cert.crt /system/etc/security/cacerts/
Stream wallet logsadb logcat --pid=$(adb shell pidof <package>)
Filter logcat by tagsadb logcat -s "Tag1" "Tag2"
Search logs for keywordsadb logcat | grep -iE "eudi|openid4vp"
Restart ADB serveradb kill-server && adb start-server
Check Android versionadb shell getprop ro.build.version.release
List installed packagesadb shell pm list packages | grep -i <keyword>
Open a deep linkadb shell am start -d "<url>" -a android.intent.action.VIEW
Force-stop an appadb shell am force-stop <package>
Clear app dataadb shell pm clear <package>
Reboot deviceadb reboot
Root the emulatoradb root
Remount system as writableadb remount

References