I'm trying to use the OpenGL ES Tracer, but it just doesn't collect any data. I get to the following screen, but the trace file stays emtpy:
I've tried it also with the OpenGLES20Complete example app from Google, to exclude that anything specific to my app is causing this problem, but it just doesn't work.
I'm following the documentation for the OpenGL ES Tracer, except that I'm using IntelliJ IDEA and start the Monitor tool from there. I'm using a Nexus 10 with Android 4.2, so it fulfills the minimum version requirements.
I now also managed to try it on a different device (a Samsung Galaxy i9000 on Cyanogenmod 10), and there the OpenGL tracing works. So there seems to be something specific to the hardware or the OS running on the Android device that disables or enables the tracing.
Are there any further steps or settings I have to take to make this work? What could be the reason why I can't collect any OpenGL traces?
I'd check the output in logcat to see if there is anything suspicious going on. Otherwise, you can try the following from the shell:
$ adb shell
$ am start --opengl-trace com.app.package/com.app.package.Activity
At this point you should see your app launched, but waiting for a connection from the host. You can then use the monitor tool, and in the trace connection dialog, just use the keyword system in lieu of the package name to connect to whatever is running.
Note that your app has to be debuggable.
I believe that it may be a regression with Jelly Bean 4.2.2. I had the same problem on my Galaxy Nexus and Nexus 7, and then I downgraded my Galaxy Nexus to Android 4.1.2 using fastboot and the stock Google ROM and the tracer was working again. I've opened a bug report here: https://code.google.com/p/android/issues/detail?id=53426
Go to the Developer Settings on the device and on the Enable OpenGL traces option select Logcat or Systrace.
Related
I am trying to learn android on a dell device having 4gb ram and intel pentium chipset. I am trying to run hello world app on a emulator but it actually take much time(more than 5 minutes) to start the process and at the end give error message "Error while waiting for device: Timed out after 300seconds waiting for emulator to come online". As far as testing on device is considered i find it fast and easy.
So my question is that possible to always test an app on real device and skipping the testing on an emulator.
Also suggest me some tips to make my android studio run faster.
.
Its always better to test on a real device. Its very fast especially when debugging. If your emulator is taking long to load imagine a situation where you are trying to debug and want to check the app's behaviour after each change in code. Just install the usb drivers and sdk tool that your device's api version is running on
Sure it is!
First of all, enable the developer mode in your device (if it's not enabled already). Info for doing this here.
Then just plug your device via USB and it will appear when you run your project in Android Studio.
NOTE: The first time you attempt to run the project, your phone will ask for permissions, make sure you allow it!
It will be good if we are testing the application in real device rather than emulator if you have the device. But we can't buy different density, different dimension, different android version devices for testing so for that purpose we need to use emulator.
To improve the speed of android emulator install HAXM in your system, it will speed up the emulators.
I am aware of Genymotion openGL error stack overflow question.
I am attempting to run Genymotion on a Windows 10 system, but the graphics adapter is Intel G45/G43 Express Chipset WDDM1.1 and the driver supplied does not support OpenGL and Intel appear to have no interest in delivering a driver that does for Windows 10. I understand that officially this combination is not supported.
But here's the thing: I can start a Genymotion VM fine from Virtual Box, and it appears to work (almost) perfectly, as far as I can tell.
Certainly I don't see any problem with the graphics.
This must be using some (probably Virtual Box provided) software implementation of OpenGL.
However, when I try to start the same phone VM from the Genymotion console, or from the Genymotion button inside Android Studio, I get the error dialog-box in the linked question above.
My question is: Why is Genymotion insisting that there is OpenGL support from the real physical display driver? And of course, if its for a quality reason only (ie: sub-optimal user experience otherwise) is there any way to disable this check?
The reason this matters is that Android Studio does not list the Virtual Box started phone VM as somewhere an application can be run upon. I suspect that when Genymotion runs a phone VM, they set up something that the Android Studio integration needs, that simply running from Virtual Box doesn't provide.
In addition, I can't circumvent the Android Studio integration by deploying to a phone VM using the gmtool device install file.apk command bundled with Genymotion because this is a paid license feature. As you can imagine I am somewhat reluctant to purchase such a license when I know I am running in an unsupported configuration.
Purchasing new hardware also isn't an option for me in the short term.
EDIT: The justification for this question has since evaporated. Although I can't deploy using Android Studio or gmtool.exe, I have managed to deploy by using the phone web browser to fetch the .apk file. The gotcha here is that the web server must supply a Content-Length header or the download will fail. So I now have a workable solution.
{{{ Andy
I'm part of the Genymotion team. That's an interesting question. The answer is: yes, we ask for OpenGL drivers for performance reasons. Without this, the whole Android rendering would be handle by the CPU (as soft rendering) which is not fast enough to allow a real usage of the devices, with a seamless user experience, particularly since 4.3. If you run a 4.2.2 image from VirtualBox, you'll see the UI inside the window but the rendering will be very laggy.
As you maybe already noticed, running the Genymotion devices from VirtualBox works only for images up to 4.2.2 (released 3 years ago). The other image will show only a console window. And to be honest, you should more consider it as a side effect than a real feature. This behaviour could disappear on a future release for any reason. And there is no way to disable this check.
As you mentioned, this configuration is really weird and exceptional. As far as I know, we don't plan to support these kind of configuration and I don't see any real viable solution to make it work properly.
Also, to explain the problem you encountered with Android Studio. When a Genymotion device start, it gets a local IP. This IP can be used to connect it to adb. Then it is possible to interact with the device like with any other Android device. This is the tools used by your IDE (and (m)any other tools communicating with Android devices.
Usually, the Genymotion app does this for you, by connecting the newly started device to adb. But you can do it yourself by running adb connect <DEVICE_IP>:5555. Just be careful because this connection could not be permanent and you should have to run this command regularly in some situations.
I hope this answer will help.
Cheers.
I developed my first Android app targeting KitKat ( 4-4-2) with minimum SDK being set to 4.1.2 (JellyBean)
Beside standards UI stuff, this apps is dealing with device sensors end using java multithreading ( standard way, no fancy stuff)
it's now running fine on Nexus5 (kitkat) and Wiko5 ( JellyBean ), however I sent the .apk to a friend for testing on Sony Xperia Z and it's crashing... he si going to send me the device for debugging over tehre...
as I am used to develop w iOS ( one platform, one constructor ) , I'd to know if there is anything to take care before developing for multiple Android devices... additional APIs , should I test locally all these platforms ?
on windows
try
adb logcat -v time > D:\log.txt
then open the log.txt by some editer like notepad++, search 'fatal' and lookup crash stack, you can find the reason app crashed. Or Please post it on, so we can help.
In an ideal world, the Xperia Z should be able to run the app as long as it has the required OS and the sensors your are trying to access. So this looks like something device specific(esp. since it works on your other jellybean device.).
So the way forward would be to look at the logcats.
Also, instead of waiting for the device to reach you, just ask for the logcats - the logs would be the best way to further debug this issue.
Ask your friend to connect the USB to a machine and do the following(assuming android sdk and platform tools are downloaded)
adb logcat
Better still - copy logs to a text file
adb logcat > log.txt
I recently bought a Moto X and was following the online instructions for setting it up to test my android code. I installed the USB drivers and got to the place where it tells me that the phone is unlockable. I quickly returned the phone at this point before activating it and subsequently porting my number over.
Can I test code on the Moto X specifically even if it is NOT bootloader unlockable? Is this the case for all android devices?
Unfortunately I don't know anyone that is a developer or even anyone that owns a Droid phone that I could experiment with.
You do not need to unlock bootloader to test your Android applications. Please refer to Using Hardware Devices for more information regarding setting up any Android device for testing. Following is the relevant part quoted for your information:
You can use any Android-powered device as an environment for running, debugging, and testing your applications. The tools included in the SDK make it easy to install and run your application on the device each time you compile.
This is a general answer, not specific to Moto X. I do not see any reason why it should not apply to Moto X.
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.