Android: understanding reasons of device crash - android

The device I use for development process self-restarts once in a while. It happens when it is not in use - just lying quietly on the table not even connected to a computer.
I'm worried that this may (or may not - I don't know) be connected to my app problems.
Question: How can I get info on crash reasons after device restart? (Logcat can't get anything after restart).Thanks

Try to log to a file or rest web service.

Related

Android Devices Unable to Consume REST Service on Wifi

Hello there long time reader of Stack Overflow but first time poster,
I am a bit new to android development but we decided to build a Xamarin.Forms app which consumes our ASP.NET REST service. When running the app on an emulator on my computer, connected via ethernet, I am able to connect to the service. However, when running on a tablet or phone that is connected on our work wifi, the connection just hangs and times out.
Interesting enough, when the device is switched to mobile data it can connect to the endpoints again, and iPhones can connect to the endpoints on mobile data or wifi.
I'm curious what I'm missing here. Please let me know what you think or additional information I should include.
While this thread has been opened for some time, we have found our problem resolved: it was a mixture of our network support changing some settings on our routers (though I can unfortunately not remember what settings) and also our tablets do a system update.
I am not sure which of these factors was the cause of our success now but the issue is done. I just wanted to post this in case anyone else ran into something similar.

Log all user and network activities Android

I would like to create logfiles of the activities on my Android phone.
The goal is to be able to trace back any suspicious activities of apps and check if the phone's been hacked.
In this question someone suggested using a proxy server.
But using a proxy changes the ip used and a lot of services (i.e. Netflix) block mobile traffic coming from either server ip's or home ip's when making mobile requests.
The question is already 3.5 years old so maybe the options have changed.
As for the network traffic an option to setup a local proxy on the device itself with a possibility to set logging rules would work though.
How could you setup a local proxy on an Android device?
However this is only the first part as to find possible suspicious activities. But without logging the actual phone activities it will be difficult (or impossible) to actually find out which malicious code or app is doing this.
How can we log activities on Android?
I think when loggin all user activities like touch events etc. and all calls between apps would suffice.
Can this be done without rooting the device? And if not how would one do this on a rooted device?
I would prefer to have this device independent, but I use an Oneplus 6 with Oxygen OS.

Testing an android app for restart functionality

I am trying to develop an Android App that, though having an Activity, needs to run in the background as a service. The app needs to start up automatically after rebooting the phone/device.
My question is HOW to troubleshoot such requirements, since the LogCat gets disconnected when the phone is rebooted, even using "adb shell broadcast -am android.intent.action.BOOT_COMPLETED" on a connected phone. (Though possible on an emulator, I dont feel like it is able to properly replicate real-world scenarios). I would like to be able to see the Logcat messages after device restarts, thus allowing me to troubleshoot ANRs and app crashes during reboot.
Any pointers would be appreciated.
Based on this link, I understand the closest we can get to debugging reboot errors is to use
adb logcat -v time > <localfile>
or
adb bugreport
Both of these options may not be the cleanest ways to pinpoint the issue, but atleast something is better than nothing.

Retrieve adb logcat files from a client's device

I'm making an app for a client, and they are experiencing bugs that no one else can reproduce. They are not close to us, so I can't physically go to them and hook their device up to my laptop.
Is there a way that they can get hold of their logcat files without having to install adb on a machine first, i.e. can they email them straight from their device? I'm not sure how tech-savvy they are, and ideally I don't want to spend too much time telling them how to install adb if I can get the files some other way.
Obviously I'm looking to do it with their permission (and I'm expecting that installing adb is going to be the only way).
Edit: I should add that I'm using Corona SDK, so will not be able to access the logs from directly inside the app. Also, all devices are 4.1+ so the various log collector apps have not worked.
You can redirect the logcat to a file and send it by email using your app.
Check here how to save the logcat into a file.

Remote debugging of mobile web apps on real devices, without devices

I need to debug CSS on real mobile devices, but I don't have one...
I'am looking for a free or not service that will enable me to see and debug my markup remotely. Something like http://www.reflectorapp.com/ and wienre in one place.
There is a service called BrowserStack that should work for this.
https://saucelabs.com/ - "All platforms and any language." From the website "Breakpoints
- While tests are running, you'll have access to a live remote desktop session. You can manually take control of the VM (to, say, clear a popup that's blocking your test), or "breakpoint" the test to stop your test session and investigate a problem manually."

Categories

Resources