So basically I'm creating a Wireless Weight Scale using a esp. I have built a android app that pulls the data from esp and displays and logs into a local database.
Problem I'm facing is that the wifi does not stay connected in my android device as it does not have access to the internet.
I have tried using multiple devices from various manufactures. In some there is a way to turn of "WiFi Assitant" or "Smart WiFi" but even with those turned off, It automatically switches to a network with active internet access or mobile data.
I have tried to forcefully connect to the esp ssid from inside my app but as most of the apis are depreceated on android 10 onwards, that does'nt work either.
Is there anything that can be done in this matter or do I have to switch to bluetooth.
Based on my understanding of Android Monitor, an Android device needs to be connected to the machine that is running Android Studio in order to profile CPU/memory/GPU usage. Are there any methods that allow profiling an app without connecting it to the PC? For example, writing the debug info that is generated for Android Monitor in a file and process the file later?
My goal is to gather debugging information without connecting the Android device to a PC (either via a USB cable or over the network).
Your initial work with a device usually needs to be over USB. However, after that point, you can switch using adb over the network, using adb connect. Once you have adb connected over the network, everything works just as if you had connected it via USB, including full Android Studio access.
Bear in mind that:
Some devices do not need the initial USB connection, as they are designed to work with adb over the network "out of the box" (e.g., Fire TV)
I think that older devices may not support this, for some value of "older"
You cannot monitor it without an active debugging connection. That being said, debugging connection isn't limited to USB. You need some kind of connection, and that connection can be USB, but it can also be over the internet(refer How can I connect to Android with ADB over TCP?).
Some devices don't support this, some have a setting for it in developer settings, and using root you don't need a connection. For devices that support adb over the internet, but aren't rooted or have the setting in developer settings, you need to have a usb connection initially.
Is there any way of accessing an android tablet through ADB without debug mode being enabled on the device? I'm locked out of an android tablet, trying to get back into it; there is no password reset and factory reset procedures aren't working. Debug is disabled on the device, and I can't get in to turn it on, so ADB can't find the device (at least as I understand it)
It is not possible to access the device through adb without enable the debugging mode .
I am using Android Studio for development.
I have a remote Android-powered device which I access using ADB over TCPIP. This device has a firewall so I need to enable specific ports for my need during development. I have enabled port 5555 so that ADB is able to connect there, but I don't find information which port is the Screen Capture using. At the moment when I press the button in Android Studio to get Screen Capture from the device, it opens a progress bar and never stops "loading".
I stop it by disconnecting ADB from command line.
I cannot connect over USB to this device so I don't know if it has even a restriction for providing capture (I read there is such restriction for some phones).
So, let me start off by saying that I am 'relatively' familiar and comfortable with making Android apps and using both LogCat and DDMS to debug.
That being said, I'm encountering more of a logistical issue than anything else right now - I am making a locative app, where the GPS is fuelling and controlling other methods in my Activity, and after a while, it is crashing.
Now, because it is locative, I am walking around to test it, in order to receive different GPS locations. Because of this, I am not connected to my computer at the time that it crashes, so have no way (that I know of) to read the stack trace, etc.
In my particular instance, I am navigating through a series of activities, and finally reach the penultimate screen in my app, and while I am running the application in my studio, it runs indefinitely without issue. It is only when I take the device outside that it crashes...
I am wondering if anyone has any tips or tricks with this issue - I'm sure give the prevalence of locative apps, it must have come up, but I cant seem to find the right search terms. It could be as simple as saving the LogCat to file, and/or the stackTrace, but I'm not sure that's the answer...
Thanks in advance.
If I got you right, this is what you are looking for:
https://play.google.com/store/apps/details?id=org.jtb.alogcat&hl=de
Edit: Also there are many more apps like this. You can just browse around in Google Play Store
You can debug the app without rooting your android, unlike the other responses. start off by plugging the android into your computer, then run adb devices to make sure the device is there. Then, run tcpip 5555 to change the android to tcp mode, which will allow debugging over wifi. Disconnect the android from the computer, and connect to it by typing adb 192.168.x.xxx, replacing the x's with your android's IP address. It should connect with no issues, as long as port 5555 is open, and both the android and your computer is on the same wifi.
Simple: Wireless ADB
One of the reason that I choose to run CyanogenMod on my testing devices is that it is a stripped down version of Android that has some additional developer tools, one of those being the ability to access the wireless portion of the ADB system.
As you are probably unaware, you are able to establish an ADB connection to your device over WiFi, however, if running a stock ROM, this requires root access, as it can be potentially harmful to your device, as Wireless ADB will work even over your cellular network, meaning that you could potentially receive apps from other insert carrier here's devices.
If you wish to run WirelessADB, here is a Play Store app that will help you to enable the feature on your device. Requires ROOT
It is as simple as connecting your device to your local WiFi network, (same one the development computer is connected to), enable Wireless ADB, and then running the following command on your computer:
adb connect 192.168.1.101
Replacing 192.168.1.101 with the IP address of your android device.
By establishing this connection, you can run everything just as you would if the device was plugged in via USB Cable.
I recommend ACRA (Application Crash Reports for Android ). It allows you to send crash reports to a number of different destinations. See https://github.com/ACRA/acra/wiki/BasicSetup