Enable Firebase debug mode for Android apps
by Patrick Chong
- Install Android debug bridge: https://www.xda-developers.com/install-adb-windows-macos-linux/
- Enable USB debugging on phone (if not already done in step 1): https://developer.android.com/studio/command-line/adb#Enabling
- Connect your device to your laptop and make sure device shows up in ADB with running this command in the terminal:
adb devices
(if not already done in step 1) - If you don’t know the package name, search for it with the following command:
adb shell "pm list packages -f <search-term>"
Example
adb shell "pm list packages -f telegram"
# output from command
package:/data/app/org.telegram.messenger-bpV9sE5semiBisZel2YxUA==/base.apk=org.telegram.messenger
The package name is at the very end of the output(after base.apk=
). In this case, it’s org.telegram.messenger
- To enable Firebase debug mode, run this in the terminal:
adb shell setprop debug.firebase.analytics.app <insert package name>
Example
adb shell setprop debug.firebase.analytics.app org.telegram.messenger
setprop
itself doesn’t output anything, but you can check if the property is set correctly with:
adb shell getprop debug.firebase.analytics.app
Which should return org.telegram.messenger
if setprop
ran successfully.
- Congrats, you have successfully enabled Firebase Debug Mode on your device! You can now open the app you’re testing and check Firebase Analytics events sent by your device at the DebugView page on Firebase. If you don’t see any events after a few minutes, try restarting the app, that usually triggers the app to start sending debug events.
Note: Firebase Debug mode for iOS requires using XCode on a Mac, for more info see here: https://firebase.google.com/docs/analytics/debugview