How to use Firebase DebugView for App Tracking - android

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.

Related

DebugView in Firebase not displaying my device. I'm using MBP M1. It gets recognized when i debug on my Windows

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.

Track Logs of installed apk in android

Im new to android development. I want to track logs in the testing devices, i googled it and i'm confused pls guide which is the correct way.
1. Can Log4j be used and save the logs in device sd card?
2. Firebase Analytics can be used? Is that free to use or paid?
3. Or any other tracking solution?
Guide me which is the correct way to track the logs. Since my app is based on notifications it behaves abnormal randomly in different versions and im not able to track the log
For that, you can use Logcat Extreame app. You can view per-app logs in it.
setup:
if your device is rooted you don't need to do anything special to get logs.
For unrooted devices, grant read_logs permission by following these
steps:
1) install ADB (Android Debug Bridge) on your computer
2) connect your Android device to the computer
3) open shell (Linux,Mac) or command prompt (Windows) and run the following command "adb
shell pm grant scd.lcex android.permission.READ_LOGS"
Logcat Extreme is free and even free of ads
You can use this command:
adb shell logcat YOURLOGTAG:I *:S
you can use Log from android.util, example Log.i (YOURTAG, "Hello")

Android device does not connect to firebase DebugView

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

Enable Debug mode on your development device for Firebase

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 ;)

Debugging android device over the Internet

I am looking for a way to debug a device remotely over the Internet.
I am getting a lot of bug reports from my users which I can't even reproduce. It would be easy to solve them if I could debug the device over the Internet as if it were connected to my PC.
Is this possible?
I heard about debugging over wifi in local network, maybe there is similar way to achieve it over the Internet?
It is possible to setup Android device for debugging over Internet, however it requires USB connection to enable it or root access on the device. In addition to that you will have to setup port forwarding to device to accept incoming ADB connections from the the Internet. It hardly can help unless users of your app are developers with great desire to cooperate.
You can find detailed instructions here:
http://www.cleansoft.lv/debugging-android-applications-remotely/
Steps to Follow:
First In Android Settings Application go to About Device option.
Click 9 times on Build Number option, so that you can unlock Developer Options setting.
Now In you Setting's Application, you will have Developer Options enabled, go and click on it.
set following options on : Stay Awake, USB Debugging and if you have Internet Adb option in menu set that also enabled if not then dont worry continue the steps.
Now open your Android Studio and the application you want to run on the android device.
In Android Studio, at bottom click on Terminal tab, Terminal window opens.
Now through your terminal go to the directory where your Android SDK is stored
In SDK directory go to platform-tools directory.
Now if you list the files in the platform-tools you will see adb there.
Running following Commands.
as an example.
adb connect <ip-address-of-your-device>:5555
as an example:
adb connect 10.10.0.21:5555
The terminal should show something like below
adb server is out of date. killing...
*daemon started successfully*
connected to 10.10.0.21:5555
Now run shell command
adb shell
you will get the prompt something like this, i my case i used android x86 device for debugging.
shell#x86_64:/$
Now if you go to the task bar in the android studio and click on Run options and then Run'app' you will be able to see the device as your Deployment Target.
Hope it helps !
You can use Crashlytics in your app.. It helps you to get the detailed crash logs. Whenever an app crashes, it will send you the detailed crash report, from which you can figure out what is happening at the client side.
Get more info about adding crashlytics to the app from here.
Send this new app to the client so can have workaround:
You can also use adb via tcp ip:
adb connect ip:port
Use a remote access (teamviewer or droid apk) to enable debugging in android developer tools.
In the router where the android is connected remember to create port forwards to the android ip.
In your machine with adb installed do:
adb connect public_ip:port
After being connected, you can do:
adb logcat
or
adb shell
Or any adb command you want to.
try Debugging Firefox for Android over Wifi it's working with me
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_for_Android_over_Wifi

Categories

Resources