• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Getting different logs when the same app has been run two times

Hi everyone,
I have a doubt w.r.t the log generation of an app (from logcat command-line tool).

Consider the following scenario: I have an apk that I ran two times (everytime, there is the fresh installation of the same apk) and have fetched the logs (from the logcat) for this app when the app has been run for the first 15 seconds (without any involvement of user activity).
I observed that logs generated for both the runs on the same device are different. Why the logs generated (in logcat) are different when the same apk (the same code) has been run two times in the same device? (Even if I run the same app on rebooting, then also the logs coming are different)
Run1Logs and Run2Logs (You can find the logs of an app when ran for two times)

My intution is that may be both the runs of the same apps are not happening in the same environment.
I have the following queries which I would like to know your views:
  • How to run the same app two times in the same environment in the Android device? If not same, then what are the things which we can try so that we are reaching close to getting similar environment?
  • How to know which tags are coming from Android SDK and which tags are coming from the Android App's developer code?
Thanks a lot for helping in my research journey.



Reply all


Reply to author


Forward
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones