I do testing on app that I download from Jenkins as a .apk file. I have Android Studio and I have gotten as far as connecting my Samsung galaxy S6, setting it to debugging mode and I can see a bunch of device logs coming up at the bottom of my Android Studio screen.
What I cannot figure out is how to see the logs for the app I am testing. I have tried to filter the logs by using the app name. Do I need to filter the logs using a specific file name? Maybe the file used to install the app? Is there an easy way to get the app logs from my device that I am not seeing?
You need to ensure that:
This is the debug version of the app.
Proguard isn't set up to strip out certain logs.
ADB Integration is enabled.
Sometimes, you have cycle through the USB options (For example, my LG phone needed to be in PTP mode before Android Studio picked it up)
For obvious security reasons, most apps don't want the public to access their logs.
Related
Since a few days an installed app on my smartphone is crashing. Now I am wondering if there is a way to debug an app on my smartphone not created by me. I just have the apk file, not the actual code so I guess I'm not able to run it from android studio on my device. (The debuggable flag is not set so it is false if that is important). I know I can install the apk on emulator devices but the app is running on them without problems so I need to now the problem with my smartphone in particular.
Or maybe it's possible to get at least a log file with more information to the crash from my smartphone? I already found some apps that claimed they could do but that didn't work. Does anybody have a device to my situation?
I created a simple Xamarin ANDROID App. I set up my phone to development mode and deployed my app to the phone via USB.
The app continues to work on the phone as a regular app.
I then created a Xamarin MOBILE App which was more complex. I deployed it to my android phone via Visual Studio debug mode as with my previous app and it ran perfectly. But when I attempt to run the app directly from my phone, it won’t run. The first screen partially loads without anything on it and then disappears. My phone puts a message up saying that my app keeps stopping and would I like to close the app. I make use of a file placed in Assets. Might this be an issue when not debugging from the computer?
Might there be a difference between deploying a xamarin android app and a xamarin mobile app.
A minor thing is that it has added the name ‘.droid’ to the name of my app which I would like to get rid of.
I am new to deploying apps to a phone
I have solved it thanks to your helpful prompts.
I looked at the error logs and the error was ‘FATAL’ in a mono dll. This was indirectly helpful in that I knew it wasn’t the logic in my code.
I also made the discovery that running my app directly in the emulator also failed in the same manner as on my phone. I also ruled out that it might be an issue with transferring an asset -a file the my app uses- as I bypassed using the asset.
(Running my app via visual studio in both the emulator and my phone worked perfectly.)
I then decided to re-house my forms and classes in a new template as I suspected it was corruption in some xml configuration setting that didn’t bother Visual Studio. This worked great and the app now runs stand alone on the phone (and emulator).
I am trying to figure out the Android Wear APIs. I've imported the sample WatchFace app provided in the SDK. I've set up my phone AND Moto 360 physical watch for debugging. They both show up in adb devices, and I'm able to select both when running the application. I followed the instructions from here.
However, when I go to my phone (and check the android wear app) to find the watchfaces included in the sample app, they are nowhere to be found. If I check the watch, they are also nowhere to be found.
As a side issue, I had initially had Compatible = No, missing uses-feature watch, when trying to run on my 360. Notably, that permission was not in the manifest of the sample app, once I added it to the manifest, Compatible = Yes for the wearable module on my 360.
I am now going to try to make it work on the emulator to see if that's the issue.
Edit: Able to get it to work on emulator.
I have gotten it to work, but I'm not sure what was the issue for it not working. If you are seeing this problem, this is what I would do to make sure you're setup properly:
Ensure your watch is paired with your phone in Android Wear.
Ensure both watch and phone have debugging enabled.
You can follow the instructions here for how to setup bluetooth debugging. Make sure that your device shows up when you run adb devices.
If you have both a Wearable module and Mobile module, make sure that if they are not set up to be launched via a launcher, that your run configurations are set to "Do not launch activity."
Run your Mobile module on your device first.
Then run your Wearable module on your wearable (it should show up as a device if you did everything right).
Your app should show up on both the watch and the device now. You can push changes to one or the other from now on (depending on which one you modified, or both if necessary). If you run into issues, just run the mobile module first and then wearable module.
Note that even though compatibility may say "No, missing feature WATCH" for your mobile device (e.g. phone) when you run your Mobile module, it should still work!
I am testing an Android apk in my JellyBean tab (Its a relatively new one in the market, I cant get the drivers and their technical help is also quite useless).
The problem is :
I want to see the log/trace files.
LogCat or any other similar apps can't see the log in Jellybean.
I can't see my tab under adb devices.
The Power + Volume button pressing stops the tab.
Is there any way I can see the log, without rooting the device (I am fairly new to Android, and don't feel very confident doing so)
I can see a “Select debug app” and “Wait for debugger” menu in the tab. Can they be used to debug the application?
Is there any way I can see the log, without rooting the device
No, other than to get and install the ADB driver for your device from the manufacturer.
The version is 4.1.1, I think the developer mode is from 4.2
The change to READ_LOGS was introduced in Android 4.1 IIRC.
I am testing facebook Single-Sign-On application.
I am using android platform 2.2 and api level 8. I have similarly created emulator with the same configuration. It is working fine in emulator. But when i test it on actual device that is HTC Desire HD ver 2.2 froyo updated. It opens up a dialog with facebook as title and shows loading screen then disappears.
I am unable to understand the reason for such behavior.
Please help me on this.
Regards,
Pankaj
You need to get the debug on device working and see the error that appears in LogCat.You can find instructions oh how to use debug on device here
You can plug in your device using the usb cable (making sure usb debugging is on in the options).
then debug your application and you will see what the cause is in the debugging console.
I suspect tho your problem is to do with how you are transferring the apk file to the phone (it needs to be signed for facebook SSO to work and you need to have set the key correctly in your facebook app).
See here for more information:
http://www.juje.me/2011/04/export-the-signature-of-your-android-app-for-facebook-api-use/