[Q] Android 4.03 OpenGL ES 2.0 renderer GlError 1285 - Android Q&A, Help & Troubleshooting

I develop live wallpapers using Opengl ES 2.0 engine. My wallapapers run smooth on 2.x Android Devices , but in 4.03 i see some strange things. when app runs for first time everything goes fine.
But when screen orientation changes , or screen goes off and back on (that causes the renderer to call create surface again) renderer gives the glerror 1285. this error is Out of memory.
Screen is flickering and draws objects as they ara doublicated in different locations.
Any sugestions?

UPDATE
I noticed something weird
in preview mode , everything goes fine when i change orientation , and turn off and on screen , because glWallpaperService.glEngine.onsurfacedestroyed is triggered! in normal mode , this does'nt happen! even if i turn of the screen , the only void that triggers is onsurfaceChanged! but GLThread destroyes the surface both modes.
Whats the difference between normal and preview mode? and why preview mode triggers onsurfacedestroyed on every change?

Related

[Q] Rikomagic MK802II, portrait mode

Hello all,
this is my first post here so be gentle :cyclops:
I've bought Rikomagic MK802II with Android 4.0.4. with HDMI.
I want to rotate screen to portrait mode. I spent days trying to make it work but without success.
Device came without "Auto-rotation" option in settings. It is somehow locked to landscape rotation.
I tried to do:
1) Unpacked original IMG file, then unpacked system and changed build.prop.
- I've added "ro.sf.hwrotation=90" to build.prop file and flashed the device.
- after rebooting system stuck at loading screen
2) Again fresh start from original IMG file.
- changed "config_AllowAllRotation" from "false" to "true" in framework-res.apk
- packed all and flashed the device
- after reboot system running OK but still in landscape
3) Made file local.prop in /data/.
- In it I've added:
launcher.force_enable_rotation=true
qemu.sf.lcd_density=160
- nothing helped...
4) Changed settings.db.
- changed user_rotation from 3 to 0 (to 1 also)
- after rebooting screen is still in landscape but settings.db doesn't have anymore this row: user_rotation and 20 next rows too.
I also spot some AutoRotationController.smali file but I don't know is everything about it or?
How I testing portrait mode:
- Tried with Rotation locker application
- made my app which have orientation to portrait (tested it on my tablet and on my smartphone and in emulator and in all cases app is in portrait except on MK802II).
Does anyone know what is needed to be changed to get portrait rotation? No matter locked portrait rotation or Auto rotation enable. Just possibility to rotate screen to portrait.
Are there some parameters needed to be changed or some features to be added or something else?
Are there some group of parameters considering to screen rotate?
Any luck with the rotation? Same story on the mk802 fw.
Cheers,
Martijn
Still no luck. I didn't gave up but I need to learn more about android to better understand the problem about rotation and to to prevent/allow screen rotation. That is hard way for me but only because I didn't get any help on the forums and cannot find any blog on the net who have this there written down.
I'm guessing all your previous attempts to configure or manipulate the devices screen orientation are unsuccessful probably because all these system settings, configurations and used apps rely on a hardware feedback of sum sort.
Which probably is absent on these devices.
I don't believe an android stick as this comes with a gyroscopic sensor (hardware). Thus not able to supply or react to the correct information.
I don't think its impossible though, it just needs a more low-level programatically approach.
Good luck :good:
And please share your solution if you get it solved. I can imagine more people are facing this problem.
Semi - Solution
Hello,
I have been working with one of these devices recently and also needed to display something in Portrait mode.. Alas it's locked in to landscape.
Instead, I figured out a work around. I built an application that is landscape, but the internal objects are rotated 90 degrees. The app I am working on (and hope to have in the app store soon) is a web browser kiosk style app. This application design would allow you to display something in portrait mode even if the devices is locked to landscape. Added bonus, with the way I have it set up I am able to also set it to 180 degrees or 270 degrees (this is useful if the picture needs to be flipped on a projector lets say)
Just thought I'd share what I figured out so far. I'll post the link once I have the app ready for prime time.

[Q] Rotation Misfanction

Hi, my I9100 when the phone is set to auto-rotate, and is in landscape mode, it will not return into portrait mode. Not even if i set it to no auto-rotation. It runs KitKat (Beanstalk) and even if i manage to get it to portrait, the apps that were viewed in landscape will remain in landscape.
Every tme the only solution is to reboot.
Its defently not a hardware issue, but i have noticed while using apps that show the orientation of the phone such as Bubble level, that the phone doesnt detect when it is faced bottom side, up.
Please help

Fully rotate (home) screen 90 degrees

hello everyone,
I'm having a problem with the rotation of my android device and I was hoping if anyone could help me with this.
to give some backstory, I'm trying to create a magic mirror using a MK809 III B Quad-Core android stick, which uses android 4.4.2
the stick is used with a computer monitor (Samsung Syncmaster 205BW), but the monitor will be used vertically. (I'm using a HDMI>DVI-D adapter to connect the two)
because of this, I need to have the screen rotated 90 degrees in portrait mode, and android does allow you to change the rotation of the screen, but it doesn't do it well.
normally the rotation is set to landscape, but you've the option of setting the rotation of the screen, but if I set the rotation to 90 degrees, rather than actually rotating the screen with 90 degrees, it rather pushes a vertical screen in landscape mode, thus cutting off half of the screen.
so far I've tried apps such as Ultimate Rotation Control, but those do not actually rotate the screen, rather they just lock the rotation.
my question now is if anyone can help me with this problem, or tell me if it's even possible to do the thing I'm trying to do.
Any Luck?
I'm having the exact same problem with APQ8084 SOM running android 5.0.2 outputting to HDMI monitor (no accelerometer).
You would think this would be an easy problem to solve.
If I put my Winodws 10 Monitor in portrait mode, it correctly rotates screen 90 degrees end of story.
As Yusunoha mentioned, changing the user rotation in Android (via several methods):
1. using the "settings put system user_rotation 0/1/2/3"
2. modifying PhoneWindowManager.java to always return preferred rotation as "portrait"
3. Setting "persist.panel.orientation=90/270"
Does NOT result in screen rotating 90 degrees.
Instead I get a compressed portrait mode stuck inside my landscape orientation.
It's almost as if the accelerometer (which I don't have) is telling the OS to always orient towards it's perceived gravity.
Any tips rotating the entire Android Display experience (not on a per APK basis) would be wonderful.
Anyone have any ideas?
Yusunoha said:
hello everyone,
I'm having a problem with the rotation of my android device and I was hoping if anyone could help me with this.
to give some backstory, I'm trying to create a magic mirror using a MK809 III B Quad-Core android stick, which uses android 4.4.2
the stick is used with a computer monitor (Samsung Syncmaster 205BW), but the monitor will be used vertically. (I'm using a HDMI>DVI-D adapter to connect the two)
because of this, I need to have the screen rotated 90 degrees in portrait mode, and android does allow you to change the rotation of the screen, but it doesn't do it well.
normally the rotation is set to landscape, but you've the option of setting the rotation of the screen, but if I set the rotation to 90 degrees, rather than actually rotating the screen with 90 degrees, it rather pushes a vertical screen in landscape mode, thus cutting off half of the screen.
so far I've tried apps such as Ultimate Rotation Control, but those do not actually rotate the screen, rather they just lock the rotation.
my question now is if anyone can help me with this problem, or tell me if it's even possible to do the thing I'm trying to do.
Click to expand...
Click to collapse
Found any solution? Even with my rooted device and these settings it won't work. Also using usb c > hdmi > vga.

Resolution Problem

Hi.
Just tried playing with RemixOS on a media center pc that I have attached to my TV. At the moment this pc is running a regular linux distro, but I thought it could be interesting to see how Android would work for this purpose. Problem is that my TV is an older 1080p 46" that suffers from an old issue where a large part of the screen is placed behind the massive border on the frame. As such, when running at highest resolution, I loose parts of the screen on each side, top and bottom. I found that running 1366x768 fixes this issue.
RemixOS of cause, is running at 1920x1080 by default, just like any other OS that I have had attached. Difference is that I have no way to change this. I tried changing DPI via kernel boot arguments, but this did not work as it should. The calculations for DPI
Code:
sqrt(1366^2 + 768^2)/46
states that the DPI should be set at 35. But doing so makes everything 100 times smaller on the screen.
How can I get this TV working with RemixOS?

Tronsmart MXIII Plus 316k4 aspect ratio in portrait mode issue

I have device (RSH A400, not Tronsmart) which I loaded with Tronsmart 316k4 firmware. Almost everything works like it should with one exception - portrait oriented application.
When I try to run portrait oriented application (without any support for landscape) on this firmware, if I disallow application to change resolution from landscape to portrait, it runs in landscape with screen stretched to fill whole 1920x1080 and looks very bad and is literally unusable.
I have done some investigations (switching beetween different firmwares released in different times) and i now know that it is not portrait / landscape issue but aspect ratio issue. On older firmwares (as well on my factory firmware) if application needs to run in portrait mode (no alternative for landscape mode) but mode is locked to landscape and not changable, the device maintain proper aspect ratio by itself (screen height is set to 1080, width calculated and set to about 607.5, screen centered). It looks like app is working in portrait mode without rotating screen but in fact it is working in landscape with maintained aspect ratio.
I need to fix this. I gave 316k4 as example because it is quite popular firmware, but I had the same behaviour on Probox2 EX and few other, newer firmwares.
It can be some bad setting on kernel level, or something needs to be modified in build.prop or any other config file. I don't see any suspects in build.prop (checked the differences) so the change must be done somewhere else or this behaviour is nonfixable at all. I can't use portrait mode because screen is rotated for 90 degrees then and my monitor doesn't have pivot and rotating screen.
Do you guys know what to change in device configuration to fix this?

Categories

Resources