I have some user properties/tags that I want to test in real-time in the firebase console. I have have all the piping set up correctly as I do see tags from builds uploaded hours later.
I have read that the command adb shell setprop debug.firebase.analytics.app <package_name> should take care of that but it doesn't seem to be working for me.
Steps I have taken:
Ran build via Android Studio
Opened terminal in Android Studio and ran adb shell setprop debug.firebase.analytics.app com.x.y.android.qa.debug (Where x and y are my app identifiers, qa is the flavor and debug for debug build)
I still see no devices available in my Firebase DebugView dashboard.
Am I missing a step? Do I need to build and deploy app from the command line?
Thanks,
Otterman
What you've done should be perfectly enough. Simple build and deploy through Android Studio will do.
It might be helpful to enable Firebase logs (see this answer):
adb shell setprop log.tag.FA VERBOSE
Then in Android Monitor, filter logs for Firebase
Also make sure your device has Internet access. I know it's silly, but it was my case ;)
Related
I need to debug the tracking events and parameters for an app, but as I am a marketer I do not have access to the project or any skills in development. However, I have the DEV version of the APK and managed to open it in Android Studio and connect my Android device through adb to see something in logcat.
Unfortunately, this does not help as I actually was hoping to see data in the DebugView of Firebase (or GA4), but both tools still tell me that "No Device found".
I walked through this article https://firebase.google.com/docs/analytics/debugview, but the situation remains the same.
Can somebody help me how to see app interactions in the DebugView. I appreciate any help on the requirements and setup of my testing environment.
Best regards,
Manuel
note : install adb if you don't have it installed on system.
Its very easy to use just open up a terminal or command window & add this with your device connected to system.
adb shell setprop debug.firebase.analytics.app com.example.app
that's it now you can open up your app & debug view will show your device with all the events etc, after you're done simple use this command to stop the debugView
adb shell setprop debug.firebase.analytics.app .none.
Pretty much what the title says.
Whenever I try to debug an app using my Macbook Pro M1, even though adb is installed and running, I can't get Firebase to recognize my device (I need to see the events).
But when I debug on my Windows laptop, it works. What can be wrong here? Help!
I simply used adb -d shell setprop debug.firebase.analytics.app <my_app> and problem solved.
The -d made the difference.
I found the following command in the Firebase docs:
adb shell setprop debug.firebase.analytics.app com.securitycentery
This will enable Firebase debug events for my app, and they will get shown in the Debug View of Firebase console.
And this is a nice way to debug an app, so I thought I'd use the same tool to add debug functionality to my app. I decided to setprop something and then access this property from my app.
However when I do setprop, it fails:
adb shell setprop someprop xyz
setprop: failed to set property 'someprop' to 'xyz'
Why is that? Do I have to declare my properties to be able to set them? If so, how is this done?
My phone is not rooted. The Firebase setprop command works without any extra setup. I want the same for my properties.
There are only small subset of prefixes that can be set without rooting device. I don't remember exactly all list, but "debug.someprop" should work.
I'm trying to connect the device to DebugView. but, do not connected.
I referenced the DebugView document.
All I know is what is stated in this document.
Is there any other reason not to connect?
I simulated the following.
Open the terminal. and entered a command.
adb devices
adb shell setprop debug.firebase.analytics.app com.example.myapp
start the app(com.example.myapp).
Check [Firebase -> Analytics -> DebugVIew]
If my question is not clear, talk to me please.
Looks like there is a problem with Firebase DebugView. It doesn't work on me either.
I tried following steps and its working for me
Run your app in debug mode
Goto Developer Options -> Select debug app -> Select
You will see your device listed in Firebase DebugView
Make Sure your device and Laptop (While Making Connections with Firebase i.e. hitting command in CMD) is on same connection.
I am facing this issue, as VPN is connected in my device, but not on laptop.
When I connect VPN on laptop also. Device gets connected to Firebase debug view.
Steps to connect device
Connect your device with laptop. Make sure your device Developer options should enable. And USB debugging on.
Open CMD. Hit "adb devices". A list of devices will come
If you get adb is not internal and external command.
Then First Go to adb
How to Go to adb
Check path of SDK manager in your computer. (You can check it from android Studio=> Tools => SDK manager => Copy Path)
Lets say path is C:\Users\ABC\AppData\Local\Android\Sdk
Go to this path on CMD
Then write cd platform-tools
Now write adb, it will work fine
adb shell setprop debug.firebase.analytics.app [your_app_package_name]
What will be your app package name
If you are not using any build variant
Copy package name from manifest file. Under application tag
If you are using build variant
Copy applicationId from your build.gradle file
Lets say:
Your applicationId is: com.abc.myApp
And you are using two build variant
develop
production
Then command will be:
For develop build variant:
adb shell setprop debug.firebase.analytics.app com.abc.myApp.develop
For production build variant:
adb shell setprop debug.firebase.analytics.app com.abc.myApp.production
The latest update to Google Play Services 7.3 makes GA's Logger interface deprecated, and thus we cannot control the logging level from inside our app anymore.
This interface is deprecated.
Logger interface is deprecated. Use adb shell setprop log.tag.GAv4 DEBUG to enable debug logging for Google Analytics.
We used to have different settings per build type, using Logger.setLogLevel() (the guide seems to be outdated): verbose for debug and error for release, so that our tracking information is available only to us during development.
Now with latest update, anyone who can run
adb shell setprop log.tag.GAv4 VERBOSE
will be able to see what we are sending to Google Analytics, or anyone can see what everyone else is logging (those who use 7.3).
Is there any way to avoid this?
In the Google Analytics changelog page you can see that GA Version 4.5 is the version which is included in Google Play Services 7.3 (May 1, 2015)
https://developers.google.com/analytics/devguides/changelog
You can change the default Logger to a custom implementation:
Custom implementations of Logger can also be used:
// Provide a custom logger.
GoogleAnalytics.getInstance(this).setLogger(new CustomLogger());
See: https://developers.google.com/analytics/devguides/collection/android/v4/advanced
According to documentation use adb shell setprop log.tag.GAv4 DEBUG in android studio terminal but make sure you connect one device only then enter adb logcat -v time -s GAv4 in terminal to start track logger
Logger
Google Analytics will log to logcat under the GAv4 tag using the
Android Log system. By default only ERROR, WARN and INFO levels are
enabled. To enable DEBUG level run the following adb command on your
device or emulator:
adb shell setprop log.tag.GAv4 DEBUG To see only Google Analytics
messages from logcat use the following command:
adb logcat -v time -s GAv4
reference
https://developers.google.com/analytics/devguides/collection/android/v4/advanced#logger