pelya / debian-noroot

Debian running on Android, without rooting your phone
https://play.google.com/store/apps/details?id=com.cuntubuntu
376 stars 70 forks source link

libhybris cant access open gles #7

Open meepingsnesroms opened 8 years ago

meepingsnesroms commented 8 years ago

Could you please declare for opengles, and every other feature and permission android has in your manifest as used but not required so that libhybris can use all the avalible hardware.

This is not an error with libhybris i compiled it and ran test_sensors and test_gps and they both worked but test_vibrator failed and all test_GL binarys crash printing "Aborted" in the console with no information (most likely a failed gralloc() or cant aquire egl context)

pelya commented 8 years ago

OpenGL will not work in Debian noroot, with libhybris or not.

On Sun, Nov 29, 2015 at 1:04 AM, meepingsnesroms notifications@github.com wrote:

Could you please declare for opengles, and every other feature and permission android has in your manifest as used but not required so that libhybris can use all the avalible hardware.

This is not an error with libhybris i compiled it and ran test_sensors and test_gps and they both worked but test_vibrator failed and all test_GL binarys crash printing "Aborted" in the console with no information (most likely a failed gralloc() or cant aquire egl context)

— Reply to this email directly or view it on GitHub https://github.com/pelya/debian-noroot/issues/7.

meepingsnesroms commented 8 years ago

Why not libhybris loads androids opengles library then glshim converts opengl calls to opengles calls and sends them to a fake libGLESv1_CM.so that uses libhybris to relay the command to android then to the hardware.

Linux app > (glshim)libGL.so > (fake)libGLESv1_CM.so > libhybris > (android/real)libGLESv1_CM.so > Android Kernel > hardware

Yes it would be slighty slower from the redirections but it should work.(and even if it dosent adding the permissions wouldent hurt anything.)

pelya commented 8 years ago

The problem is libhybris must work within an Android app context, when it will try to create a window to output GL, it will fail, because it does not have root access or whatever it needs for that.

Debian noroot already uses GLES for video output, there is no specific permission to use GLES. On Nov 30, 2015 10:36 PM, "meepingsnesroms" notifications@github.com wrote:

Why not libhybris loads androids opengles library then glshim converts opengl calls to opengles calls and sends them to a fake libGLESv1_CM.so that uses libhybris to relay the command to android then to the hardware.

Linux app > (glshim)libGL.so > (fake)libGLESv1_CM.so > libhybris > (android/real)libGLESv1_CM.so > Android Kernel > hardware

Yes it would be slighty slower from the redirections but it should work.(and even if it dosent adding the permissions wouldent hurt anything.)

— Reply to this email directly or view it on GitHub https://github.com/pelya/debian-noroot/issues/7#issuecomment-160753982.

meepingsnesroms commented 8 years ago

I will look in the libhybris source code. (Please dont close this thread,marking it as not a bug is fine but i need somewhere to post my findings.)

meepingsnesroms commented 8 years ago

After converting to a full chroot and using mesa opengles 1 & 2 with dri and glshim for pc open gl it works but when run in the app instead of with chroot i get "Segmentation fault" I know this is not your fault ,its because writing directly to gpu memory requires root access.(since this is useing mesa dri not libhybris + host gles drivers)

I coluent get libhybris to work (probably because it dosent support glx(since android has no libglx.so librarys) and opengl under xwindows requires it.)

Thank you for trying to help and if you ever find a way to do opengles or open gl (with or without glshim) without root i am willing to help.

SnowNF commented 4 years ago

@meepingsnesroms Hi How to use libhybris on Android phone with chroot,or how do you build it?(I can't build it) I am happy to receive your reply.