Deploying a Qt application on virtual Android device - android

I am trying for several days to simply deploy a qt 5 application to an Android machine. I have done the following:1. Install AVD Manager and use a template device(NexusS, 343RAM, 480x800)2. Start the device with start->run->cmd-> "emulator-arm #NexusS", emulator start without a problem.3. Qt 5.1 creator->New Project->Qt quick2(built-in types)->3.1.Select build kit: Android for arm(gcc 4.7, Qt 5.1.1)4.In project settings says that mingw32-make is not found and I set it to the path that I found in qt(Qt5.1.1_Android_x86\Tools\mingw48_32\bin\mingw32-make.exe)
5.Build the app, it builds ok6.Run the app.(the NexusS device remained open)
In the application Output I get:
E/libEGL ( 848): called unimplemented OpenGL ES API
E/libEGL ( 848): called unimplemented OpenGL ES API
W/Qt ( 848): opengl\qopenglshaderprogram.cpp:319 (bool QOpenGLShaderPrivate::compile(QOpenGLShader*)): QOpenGLShader::compile(Vertex): failed"
W/Qt ( 848): opengl\qopenglshaderprogram.cpp:319 (bool QOpenGLShaderPrivate::compile(QOpenGLShader*)): QOpenGLShader::compile(Fragment): failed
E/libEGL ( 848): called unimplemented OpenGL ES API
......
And the NexusS emulator enters the application, for ~1 sec displays the name of the application and after that it displays a grey screen and remaines in the grey screen until i exit the app.
Any ideas?

Related

android gdb fails with "Remote target doesn't support qGetTIBAddr packet" error

My app runs fine but gdb fails to debug it with the following error
(gdb) target remote 127.0.0.1:8888
`target:/system/bin/app_process32' has disappeared; keeping its symbols.
Remote debugging using 127.0.0.1:8888
Remote target doesn't support qGetTIBAddr packet
I am on Windows 10 64 bit and using nox 32bit emulator.
The following message is displayed when gdbserver is started.
beyond1q:/system/bin # gdbserver :8888 --attach 3805
warning: Found custom handler for signal 39 (Unknown signal 39) preinstalled.
Some signal dispositions inherited from the environment (SIG_DFL/SIG_IGN)
won't be propagated to spawned programs.
what is the solution?

Android Virtual Device OpenGL ES Failed to Initialize

I have been repeatedly trying to get an Android Virtual Device working with Hardware Acceleration on my laptop with a GTX 1650 Ti. The Android Virtual Device works with Swiftshaeder (running with -gpu swiftshader_indirect) with huge lag and running very slowly, but whenever I run it with the gpu, it gives me an error that OpenGLES failed to inialize. My Graphics Card should support OpenGLES, but I can not get it working.
The Error Message:
init: Could not find wglGetExtensionsString! arbFound 0 listarbNull/empty 1 0 extFound 0 extNull/empty 1 0 remote 0
OpenGL Core Profile not supported.
getGLES2ExtensionString: Could not find GLES 2.x config!
Failed to obtain GLES 2.x extensions string!
Could not initialize emulated framebuffer
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
emulator: ERROR: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1. Make sure your GPU drivers are up to date.
2. Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
3. Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/issues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
crashhandler_die: fatal: OpenGLES emulation failed to initialize. Please consider the following troubleshooting steps:
1. Make sure your GPU drivers are up to date.
2. Erase and re-download the emulator ($ANDROID_SDK_ROOT/emulator).
3. Try software rendering: Go to Extended Controls > Settings > Advanced tab and change "OpenGL ES renderer (requires restart)" to "Swiftshader".
Or, run emulator from command line with "-gpu swiftshader_indirect". 4. Please file an issue to https://issuetracker.google.com/issues?q=componentid:192727 and provide your complete CPU/GPU info plus OS and display setup.
Note: I know similar questions have been asked, but every solution is saying use Software Encoding. That is not what I am looking for, as Hardware Encoding should work. Software Encoding has terrible performance, and with a dedicated Graphics Card, there should be no issue for hardware encoding, especially with one as modern as the GTX 1650 Ti.

Android Emulator is not working after update

Recently I updated my Android SDK and emulator. After that I'm not able to run the 'Hello world' program. While loading the emulator I am getting warnings and error like this.
OpenGL backend 'angle' without OpenGL ES 1.x library detected. Using GLESv2 only.
emulator: WARNING: encryption is off
TextureDraw: Could not create/link program: Failed to create D3D shaders.
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
audio: Failed to create voice `goldfish_audio'
qemu-system-i386.exe: warning: opening audio output failed
audio: Failed to create voice `goldfish_audio_in'
qemu-system-i386.exe: warning: opening audio input failed
audio: Failed to create voice `dac'
audio: Failed to create voice `adc'
draw: no program
draw: no program
.
.
.
ANGLE: egl::`anonymous-namespace'::CreateDisplayFromAttribs: make D3D display
ANGLE: D3D9: rx::Renderer9::generateConfigs
I tried lots of uninstall and update, downgrade of sdk, etc., but nothing is working and I'm not able to get the exact problem.
I have installed 2 SDK platforms:
Android 7.0
Android 4.2
My SDK tools are:
I had the same problem, the solution is to change "the amount of physical RAM" when you create a virtual device android... make 512 MB because your computer can't read a space (1.5 GB ) in RAM.
How to create a virtual device correctly to solve this problem?
First, open Android Studio, then click Tools > Android > AVD Manager.
Second, click Create virtual Device after choose a device (for example : nexus 4) and click Next and Select a system Image, then click Next.
Third, click Show Advanced Settings; scroll until you see "RAM" and change the value to a lower value, for example 512MB.

Android Emulator and OpenGL ES3: EGL_BAD_CONFIG

I am running an Android Virtual Device on my Ubuntu host.
It is using the CPU/ABI Intel Atom (x86) and I am using the host GPU.
The emulator is using a Kernel-based Virtual Machine.
This works splendidly as long as I use an OpenGL ES2 context.
If my app attempts to create an OpenGL ES3 context however, using...
const EGLint contextAttribs[] = {
EGL_CONTEXT_CLIENT_VERSION, 3,
EGL_NONE
};
context = eglCreateContext(display, config, NULL, contextAttribs);
...then I get an EGL_BAD_CONFIG error:
I/biplane ( 2839): EGL: vendor Android version 1.4 Android META-EGL
I/biplane ( 2839): EGL: client apis OpenGL_ES
I/biplane ( 2839): number of EGL configurations that match our preferred criteria: 1
I/biplane ( 2839): R8 G8 B8 A8 DEPTH24
E/EGL_emulation( 2839): tid 2852: eglCreateContext(919): error 0x3005 (EGL_BAD_CONFIG)
Requesting ES3 on a hardware mobile device, works well.
But when requesting it from the emulator, it fails.
The host machine is perfectly capable of doing OpenGL ES3.0, ES3.1 and ES3.2 as can be seen from glxinfo:
$ glxinfo | grep ES3
GL_ARB_ES2_compatibility, GL_ARB_ES3_1_compatibility,
GL_ARB_ES3_2_compatibility, GL_ARB_ES3_compatibility,
GL_NV_ES3_1_compatibility, GL_NV_bindless_multi_draw_indirect,
GL_ARB_ES2_compatibility, GL_ARB_ES3_1_compatibility,
GL_ARB_ES3_2_compatibility, GL_ARB_ES3_compatibility,
GL_NV_ES3_1_compatibility, GL_NV_bindless_multi_draw_indirect,
Is there a way to run OpenGL ES3 apps on an Android Virtual Device on top of kvm?
Running GLES3 apps in the emulator is supported in Android Studio 3.0 and higher.
At the time of writing, preview builds of this version are available.
See: https://android-developers.googleblog.com/2017/05/android-studio-3-0-canary1.html
After launching the emulator, you need to change a setting, and restart the emulator as depicted below.
Also, make sure your app requests an ES3 context, because the Android sample code gles3jni does not do so.
UPDATE jun 2018
In the latest Android Studio, I can no longer select OpenGL ES3.1, even though it is the same PC.
To make it work, I had to add a file to ~/.android/ directory.
cd ~/.android/
$ echo "GLESDynamicVersion = on" >> ~/.android/advancedFeatures.ini
Notice :
OpenGL SE should be opened in emulator > Setting > Advanced
Not in the ADB page.

SEandroid Boot Up Problems

I'm currently working on flashing SEandroid (security enhanced Android) onto a Nexus 7, but when I try to boot up, the Nexus 7 just flashes the Google screen and nothing else.
I successfully compiled the SEandroid Source code for both 4.2.1 and 4.1.2 and neither run on the Nexus.
Was wondering what some common errors could be for a device booting up, but the screen not showing anything?
I downloaded and compiled the code according to: http://selinuxproject.org/page/SEAndroid
I am using the tegra3_android_defconfig for my kernel and am using the full_grouper_userdebug.
Any help, even if not related to SEandroid would be helpful.
Here is an output from logcat:
--------- beginning of /dev/log/main
I/Netd ( 124): Netd 1.0 starting
W/InterfaceController( 124): Warning (Cannot load library: load_library(linker.cpp:745): library "/system/lib/libnetcmdiface.so" not found) while opening the net interface command library
I/installd( 130): installd firing up
I/DEBUG ( 125): debuggerd: Jun 12 2013 10:32:23
I/SurfaceFlinger( 126): SurfaceFlinger is starting
I/SurfaceFlinger( 126): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/libEGL ( 126): eglGetDisplay:121 error 300c (EGL_BAD_PARAMETER)
E/libEGL ( 126): eglInitialize:137 error 3008 (EGL_BAD_DISPLAY)
Thanks in advanced.
Rookie mistake. Forgot to add in Google's proprietary drivers for the Nexus 7.
Available here for who ever needs them!
https://developers.google.com/android/nexus/drivers
thanks all

Categories

Resources