How to see the trace/log in a JellyBean device - android

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.

Related

Getting app logs off of a Samsung Galaxy S6

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.

mk808b plus Android TV dongle not present as device in device manager, can't use for development

I recently bought an android tv box (dongle) model mk808b plus which some of you might be familiar with. What I want to do is use it for development, I want to program on it using adb, Android Studio.
The problem I am facing and its not the first of its kind, I get this with all the media boxes that I tried, they dont work as adb devices at all, I dont get any device in my device manager when I connect them on the usb (not even an unknown one). I tried reflashing the android, I put cyanogen mod on it, but to no avail, it still happens. Another thing is, if I put my device in Recovery Mode it does detect an unknown device in my control panel, but never after I boot up my android os.
Now before you say I didnt enable Developer Options Usb Debugging or I didnt put my device as MTP device, I did. I checked these and the cables im using are fine.
I dont have any problem with my Nexus 5 or S5 for the matter, just when I try these android boxes that come up with these tv like custom roms.
If you guys have any idea, I'll be happy to read, I did not find anything related to this on the internet.
PS: Why not use my Nexus 5 or S5? because the app im developing is for these boxes, so testing some of the features such as hdmi connectivity etc etc is very useful to me.
Thank you,
Andi
Unfortunately I couldn't do anything, maybe it's because of the custom ROM on it, but I did find an alternative, I'm using adb on tcp ip, it seems to work after I rooted my device, still no usb adb interface.

App does not show up in the installed application list of the Sony smartwatch2 app

I have some problems with SmartWatch2:
Sony Xperia Z1:
Accessory Version:1.0.B.0.60;
Host Application Version:1.0.12;
Smart connect: 5.4.8.
Verizon Samsung galaxy note 2:
Smart connect: 5.4.8.
My two apps do not show up in the installed application list in Sony Smart Connect. I really don't know what to do!
Does anyone have problems like this and solved it?
Many thanks.
Update:
I use "Sony add-on SDK 2.0" and SmartExtensionAPI, SmartExtensionUtils from this pack as linked libraries in my apps. Also "Sony add-on SDK 2.0" marked as a target platform for apps.
Update 2:
Another user with SmartWatch 2 write me that my app didn't listed on his phone smart connect app list.
I assume that you have tried the extension yourself on real HW and it works for you? Couple things you can tell them to try:
Uninstall the extension and reinstall it.
Unpair the bluetooth connection to SW2 and re-pair it.
Make sure:
Your SmartWatch2 extension gives the correct dimensions about itself
(i.e. the dimensions of the SmartWatch2 screen)
Your application maps correctly those dimensions, and transfers the control to your
extension
That was in case your extension never appeared on the SmartWatch2 screen. If it did, but does no more, restarting your phone normally helps. In more difficult cases, uninstall the SmartWatch2 app from your phone (it will be reinstalled once you pair your SmartWatch2 again).
I have a similarly problem but related to the development process. I'm working on a control extension app for SW2, and I was able to compile the code and see the app on the SmartConnect Installed Apps and then test it in the real device (i.e. SmartWatch 2).
After a couple of iterations on Edit code > Compile > Test, the app stops to show on the SmartConnect App list and on the SmartWatch 2 too.
I don't understand why this happens and its not clear what is the solution for this. Rebooting, uninstall, etc. Its like a random try&error solution, and leads to o much time lost on getting the app running again.
Sony SDK Team should give one word on this...

Why would Android 2.2 reboot after install of an .apk file?

I am getting reports from beta testers that after installing my .apk file their device is rebooting. After reboot the application operates as normal. Reboot after installation is not part of the desired/expected behavior, and itself sounds like a security breach.
Can anyone speculate as to why Android might reboot after an .apk install?
UPDATE:
One of the devices was an LG Ally, the other was a Samsung Galaxy Note
Are your Beta users using a rooted device? Do they have some kind of security app like "Lookout" installed on their device?
I'd suggest that you make your app create a trace log on the sdcard, that you'd get your beta tester to email to you.
Of course, this debugging process would be easier if someone loaned you the same model of the device your beta user is using.
No matter what your app should never be able to crash the operating system. A lot of this can depend on the device and manufacturer. For example, I noticed that when using a certain app to stream music on 2.3.x on the Droid X, the device would sometimes restart. I could not fix this issue myself but instead had to wait until a fix was provided by Motorola (which it eventually was). I would see if you can find a common occurrence on certain devices or manufacturers then do some researching on their reported bugs page. Also, what type of application is this (game/media/utility?)

How to debug when application works fine in emulator but fails in actual phones?

How can i debug when application works without error in emulator but force closes while doing SQLite operations on some screens?
Connect your phone to your dev machine
Make sure the emulator is not running
Open a command prompt and run adb logcat
Use application on your phone and trigger the error
Review the resulting stack trace in the logcat output
You can also view the logcat output in Eclipse via the debug or DDMS perspective.
You should connect the phone to your development machine and look at Logcat (or use the debugger) to see what is going on in the stack trace. You can also install an app (like CatLog) on the phone to view the log.
You just connect you phone and use debugger. When it is open just choose your phone...you can use and logcat too...
Everyone else commented about the technical tools available, so I'll try to explain the process we have with our app. Our app is pretty widely used, so we have a bunch of different devices to consider.
Create a beta group. There are a lot of devices, and it's impossible to test on all of them yourself unless your company has very deep pockets and you have a lot of time to test. Get a group of users together who are ok with things breaking, and ask them to beta test.
Look at what's different. This one seems obvious, but it's surprising how often this trips us up. If an app isn't working on certain devices, what's different about those devices? We once had a bug that only occurred when the app was in landscape mode, so we saw it mostly on devices that default to landscape mode. When you're trying to find the cause of a bug, ask yourself what the difference is between the scenario where the app doesn't work and the scenario where the app does work.
Use the tech available. Sometimes, the last two don't catch all the problems. Sometimes, you get a weird edge case. We had 2.3 devices that didn't implement a deprecated method-- even though the method was deprecated in 3.0. For whatever reason, they didn't implement the method and left us without its replacement, so we had to use a backwards compatibility package. But the only reason this came to light was because we got access to the logcat reports from users who experienced the bug. Moral of the story: manufacturers do weird stuff.
You're not going to be able to catch everything. There are just too many subtle and non-sensical differences. But (especially with beta testing) you should be able to catch 99.99% of the problems before they happen.

Categories

Resources