How to enable the GA4/Firebase DebugView for Android apps
Want to know how to enable the GA4/Firebase DebugView for Android apps? Let’s take you through the process step-by-step!
1. Download and install Android Studio
You will need this to be installed even if the app is being developed in another framework or engine.
2. Connect the device via USB
Plug it in!
3. Find ADB (the “Android Debug Bridge” tool) using the Terminal
Part of this install includes a tool called ADB (for “Android Debug Bridge”). It will be installed to your Android –> SDK folder –> Platform Tools Folder (which I refer to as [path_to_adb] below.
To get to that folder in a terminal window, use the command:
Code language: CSS (css)
For me, this was:
4. Run ADB with the relevant parameters
This is achieved by typing the following in the terminal, with the command prompt being at the location of the ADB (as found above):
./adb shell setprop debug.firebase.analytics.app [package_name]
So if the [package_name] is com.my.app, you would use:
./adb shell setprop debug.firebase.analytics.app com.my.app
If you don’t know what the APK ID is, you can run ./adb shell ‘pm list packages -f’ and that will return a list of installed packages you can use to determine what the relevant package is.
5. Accept the connection on the device and verify
If the device hasn’t been verified, you may find running this command prompts a verification dialogue on the device.
If successful, you will be able to see the device listed by running the following: