How to fix ambient light sensor on a Treble GSI ROM? - General Questions and Answers

Hi!
I have installed Resurrection Remix 8.6.4 GSI on my SM-T590.
After a few hours of testing, seems like all the functions I need are working except one, the automatic brightness setting. The sensor (CM3323E) is detected in sensor testing apps, also they can read the light value. Automatic brightness icon shows up next to the brightness slider, but it doesn't do anything, no new logcat messages are produced when I tap the icon.
Also, I have issues with WiFi and Bluetooth quick setting toggles. If the status bar icon shape is set to circular, and I tap one of them, SystemUI crashes because of a Resources$NotFound exception. I think this isn't related to the brightness sensor, more like a ROM bug, but who knows.
Where should I start debugging? I'm relatively new to Android development.

UDPSendToFailed said:
Hi!
I have installed Resurrection Remix 8.6.4 GSI on my SM-T590.
After a few hours of testing, seems like all the functions I need are working except one, the automatic brightness setting. The sensor (CM3323E) is detected in sensor testing apps, also they can read the light value. Automatic brightness icon shows up next to the brightness slider, but it doesn't do anything, no new logcat messages are produced when I tap the icon.
Also, I have issues with WiFi and Bluetooth quick setting toggles. If the status bar icon shape is set to circular, and I tap one of them, SystemUI crashes because of a Resources$NotFound exception. I think this isn't related to the brightness sensor, more like a ROM bug, but who knows.
Where should I start debugging? I'm relatively new to Android development.
Click to expand...
Click to collapse
How dit u get gsi's to work on the sm-t590?
Tab a 10.5 right?

Mikxx said:
How dit u get gsi's to work on the sm-t590?
Tab a 10.5 right?
Click to expand...
Click to collapse
Yea, I have Tab A 10.5 (2018), SM-T590.
Basically I installed TWRP from here: [RECOVERY][ROM][ROOT][UNOFFICAL] TWRP 3.3.1-0 + Lineage [SM-T590/SM-T595/SM-T597] | XDA Developers Forums (xda-developers.com)
Then I just downloaded some GSIs and flashed them to see which one works, with some changes to the original post. I may create an updated guide for installing GSI ROMs using MrHomebrew's TWRP without having to mess with SD cards, etc, but you can follow the original guide to have a mostly working system.
You can download ROMs from here: Generic System Image (GSI) list · phhusson/treble_experimentations Wiki · GitHub
I'm still not sure about how that A-only / AB thing works, if you have updated to Android 10 on stock system, AB ROMs with A64 binder will run.

Related

[Request] Moto Display flashable zip for custom ROMs

Custom ROMs like CyanogenMod does not have Moto Display. Ambient Display is not bad, but Moto Display uses the sensors more efficiently. Also many people prefer Moto Display over Ambient Display. So it is a request to port the Official Moto Display app as a flashable zip, just like Moto Camera and Moto Gallery has been ported.
Pretty sure it has been tried and failed... it ties into the stock ROM's kernel and framework in ways the other apps do not in order to function, and they are not supported in 3rd party ROMs.
bin.sayantan said:
Custom ROMs like CyanogenMod does not have Moto Display. Ambient Display is not bad, but Moto Display uses the sensors more efficiently. Also many people prefer Moto Display over Ambient Display. So it is a request to port the Official Moto Display app as a flashable zip, just like Moto Camera and Moto Gallery has been ported.
Click to expand...
Click to collapse
The application in question has already been tried by me for those days in cm13, I tried a port that was unsuccessful because I needed to include your work in a kernel .... as I am without server I can not create kernels or roms, I'm really just helping in developments,
TIP:
Cm14.1 has its ambient display improved compared to cm13, I realized it!
Try to use and verify, after all, it may be that later the same will come to cm13.
EsromG5 said:
The application in question has already been tried by me for those days in cm13, I tried a port that was unsuccessful because I needed to include your work in a kernel .... as I am without server I can not create kernels or roms, I'm really just helping in developments,
TIP:
Cm14.1 has its ambient display improved compared to cm13, I realized it!
Try to use and verify, after all, it may be that later the same will come to cm13.
Click to expand...
Click to collapse
Send me the commit, i can build the kernel
HelpMeruth said:
Send me the commit, i can build the kernel
Click to expand...
Click to collapse
I'll check if I still have something in my github account, so I'll see step information right here for you.
I'am interested and would like to know , how ambient display works? Is it similar to the moto display? (it prevents to waking up the device?), because we can read:
"Moto Display has been engineered to show critical information even when you phone is asleep. Even though the display fades in and out to ensure you are notified of the important stuff, we use very little power (just a few percent of the total battery capacity)"
Thanks
pio80 said:
I'am interested and would like to know , how ambient display works? Is it similar to the moto display? (it prevents to waking up the device?), because we can read:
"Moto Display has been engineered to show critical information even when you phone is asleep. Even though the display fades in and out to ensure you are notified of the important stuff, we use very little power (just a few percent of the total battery capacity)"
Thanks
Click to expand...
Click to collapse
Display environment is the same as Moto Display, believe me, I use it here in cm14.1 and I did not see any big differences other than the bubble you slip, but everything notifies very well and works the same way.

How can I enable the Hardware Button and Double Tap to Wake on a GSI ROM?

I have the Resurrection Remix GSI installed and it's great for both features and battery life. However I am unable to get two things working.
1) The hardware button doesn't do anything when I press it and I don't see any options in the RR section of the Settings app.
- Is there a way that I can enable this for something like, opening a specific camera app (GCam, or maybe Google Assistant)?
2) It also doesn't have double tap to wait either
- Now, I remember there being a mod in some old Pixel Experience GSI thread in this forum to enable this feature. Sadly, but the mod itself has been removed since the developer ended up modding the feature into the ROM. So I was curious if anyone remembered how to enable this feature on a vanilla GSI.
Thank you to anyone who can help!

[DISCONTINUED - Use LOS official][UNOFFICIAL][20190706] LineageOS 16 Oneplus 7 Pro

Note: Since the patches essential for making this device work has been merged into LineageOS main repo, there is no need to maintain a separate unofficial build anymore. All fixes go to the official repository and you can expect the official LOS nightly builds to contain the most updated code. You can still use this thread for bug reports though. But bear in mind that some bugs that only appear on specific batches and cannot be reproduced on our devices are harder to fix.
Introduction
This is an UNOFFICIAL build of LineageOS for OnePlus 7 Pro (5G version NOT TESTED, probably won't work). While most features should be working, remember that this is a very early version and things could break, especially for a device as new as this one. I have literally just got hands on it last weekend and spent a few days fixing issues like the fingerprint scanner and motorized front camera. Please always flash with caution.
What's working
- All basic stuff like telephone, bluetooth, nfc, camera, volte, etc.
- Fingerprint scanner (works but with a few minor issues that doesn't affect using it)
- Front camera motor
- Light sensor (sort of, read below for information)
- 90hz screen (with some bugs described below)
Known Issues + TO-DOs
- When booting, the system will alert you of an "internal problem". This is completely fine, just ignore it for now no more internal problems since 20190629 because it comes with its own vendor image.
- Bluetooth audio not working sometimes. Fixed in 20190622
- Auto brightness doesn't work. Partially fixed in 20190622
- In some cases the phone will crash when playing audio. Seems to be problem of AudioFX. I'm looking into it. If you get stuck in recovery after the phone crashes, you can fix it by simply re-flashing anything. Even re-flashing Magisk will work. Fixed in 20190624
- Light sensor doesn't work exactly as it is in official ROM, causing some issues with auto brightness. This is due to the fact that the light sensor is located under the screen, and OnePlus seem to have some magic in their frameworks code to cancel the effect of the screen. For now, I did a very very dirty hack to make it at least work, but no magic is implemented. Expect some issues with this thing. If you find it annoying, I'd suggest disabling it at least for now.
- I have tried to implement an algorithm to correct the readings of the in-display ambient light sensor, but it is still very very funky especially in low-light environment. Fixed since 20190706
- Fingerprint scanning has some quirks here and there. Sometimes the screen goes entirely black except for the scanning area, sometimes the screen may flash a little bit while scanning (tried to reduce it since 20190629). On landscape mode it appears at the wrong place. (fixed since 20190629) But it at least works. I am working to figure out exactly how to make it perfect but it would take some time. (These were also bugs present on the OnePlus 6T / Xiaomi 9 implementation. I have tried to clean them up and fixed some of the issues that were present. At least the screen now doesn't dim like crazy as on OnePlus 6T / Xiaomi 9 implementation, because it dims the correct amount to make screen area other than the scanner circle to appear as bright or dark as it was before increasing the brightness for scanning. Also it works around the somewhat eye-straining Android brightness-changing animation by using a kernel interface provided by OnePlus, exactly as how they did this in their official ROM.)
(Note: if your fingerprint icon gets stuck on home screen, try the following steps: lock your phone, turn on the screen, swipe up for password/pattern unlock, then immediately press the back button, then use fingerprint to unlock. I'll try to get this fixed in the future.)
- Screen colors and refresh rate is a bit messed up when booting. If you find your screen laggy or strange, just turn it off and turn it back on. Fixed by a hack since 20190629, but expect a slight short blink when booting.
- No 48MP for camera. Kind of what you'd expect for these imx586 devices.
- This ROM doesn't come with its own vendor image yet. It needs to be flashed over OxygenOS to function properly. Comes with full vendor image since 20190629
- Importing keys to TEE does not work. Do not even try it, you may lose access to your data.
- SELinux is permissive.
How to flash
Use the TWRP recovery here https://forum.xda-developers.com/oneplus-7-pro/development/recovery-unofficial-twrp-recovery-t3931322
Since 20190629, you DO NOT need to flash OxygenOS before flashing this ROM anymore.
Note: this rom is only tested with firmware images from oxygen 9.5.5 for now. If you encounter any problem for things like mobile data, please try using firmware from 9.5.5 first.
This procedure is a bit tedious, but it's only because we are on an A/B system device.
1. Restart to bootloader, use `fastboot boot` to boot into the TWRP image
2. In TWRP, wipe data (better: format data)
3. Flash this LineageOS image (this installs it to the other slot)
4. Go to Reboot -> Bootloader (this will reboot to the other slot)
5. Again, use `fastboot boot` to boot into the TWRP image
6. Install OpenGAPPS / Magisk etc. (this installs to the current slot)
7. Reboot system
Downloads
20190706-1: https://mega.nz/#!LQxRhawQ!23i11FlIsO6LY35P1K3F1W0KRHGw8ozkUM66C3icdio
A lot of development has been going on this week due to luk1337, maintainer of official LineageOS for multiple devices, joining the party. Most of changes this week are either directly done by luk1337 or inspired by him.
- Corrected the calibration algorithm of the ambient light sensor. It works mostly fine now.
- Fixed support for in-display fingerprint sensor in Always-on Display mode.
- Fixed support for Wi-Fi Display
- Fixed LiveDisplay calibration / reading mode.
- Revamped the icon of in-display fingerprint scanner
- Fixed GNSS (GPS) support. Before this release, all the location information was network-based.
- Fixed NFC HCE.
- Added support for free-fall protection and manual-press warning for front-facing motorized camera.
- Fixed battery usage data.
History versions:
20190629-1: https://mega.nz/#!rRYRmIRY!4WW0FXYkWvu39t0LF-2RbRkl0aDfSbz_kjgZPotdLMQ
- Now comes with full vendor image, no need to flash OxygenOS vendor anymore.
- No more "internal problems" on boot anymore.
- Rebased the kernel
- Reduced screen blinking when fingerprint scanner is active (due to the rebased kernel)
- Hacked to make the screen work at 90Hz right after booting. No need to lock & unlock anymore (but expect a short blink while booting)
- Fixed double-tap-to-wake. Now the option in settings should be working.
- Fixed the position of fingerprint scanning circle when the screen is rotated.
- Tried to fix the ambient light sensor, but its behavior in an extremely low-light environment is still pretty funky. I hope maybe OnePlus can open-source their official algorithm to correct this thing...
20190624-1: https://mega.nz/#!nF4DwADT!xZ8tbrkCGtWL3A7DYIV_e6GfiprqGJXHEZLqufPCmmg
- Fixed crashes caused by playing audio
20190622-1: https://mega.nz/#!OMASTCZK!wXH7WdvVdAxqv7VjGzPwHy40Pk6cfghTGao-7u-PJQk
- Fixed bluetooth audio
- Added dash charging daemon
- Hacked to make the light sensor ( + auto brightness) at least work
20190621-1: https://mega.nz/#!rEglBKxS!OpA3tNSzlnpJ5pL8PW-x9Ax8Ee695GeIaDi4c-qcrw0
Stock Camera App
I have a modified version of the OxygenOS camera app here for use with LineageOS. It mostly works after a simple hack, however:
- No 48MP available. There must be some magic in official ROM on the frameworks side, and I doubt there is much to do about it
- Gallery integration does not work. Clicking on the gallery shortcut in camera will always say "no photos". You need to go to gallery app manually.
- Slow motion works but it will show a black screen when first started. Switching to another app and then back will fix it.
Remeber that I am not a professional camera modder at all. I have little knowledge in this field, and this is only a fallback solution given that nobody else has worked on modding the official camera of this device yet.
OnePlusCamera-guacamole-20190623: https://mega.nz/#!3YRWSKBR!lrRlslmenLXIBoUQQZnqydogKG4GZxmylX6rVHprHQs
Thanks
- LineageOS (obviously) and especially luk1337 (who maintains LOS for oneplus 6t also)
- OmniROM & phhusson (for their fingerprint scanner implementation as a basis, I cleaned it up a bit and abstracted device-specific logic from the somewhat messy frameworks implementation out to HAL. I think their original implementation for Xiaomi 9 / OnePlus 6T should have been done this way also.)
- All contributors to OnePlus 6T device tree of LOS & OmniROM (I took a good amount of code from there)
- HolyDragon guys (for their early work on the kernel)
- aviraxp
- Guaiyihu
XDA:DevDB Information
LineageOS for Oneplus 7 Pro, ROM for the OnePlus 7 Pro
Contributors
PeterCxy, ashwin4rc, holydragon
Source Code: https://github.com/PeterCxy/android_device_oneplus_guacamole
Kernel Code: https://github.com/PeterCxy/android_kernel_oneplus_sm8150
ROM OS Version: 9.x Pie
ROM Kernel: Linux 4.x
Based On: LineageOS
Version Information
Status: Beta
Created 2019-06-21
Last Updated 2019-06-21
Woohoo! Let the custom ROMs begin...
Let's begin the voyage.
+1 [emoji106]
Thank god for more rom development. I was starting to lose hope on this.
Thanks for this see piece of work.
My only question is atm why 9.5.5 if we have 9.5.8 already?
Thanks in advance #kudos
Gesendet von meinem GM1913 mit Tapatalk
Flashaholic said:
Thanks for this see piece of work.
My only question is atm why 9.5.5 if we have 9.5.8 already?
Thanks in advance #kudos
Gesendet von meinem GM1913 mit Tapatalk
Click to expand...
Click to collapse
+1
mcn1970 said:
+1
Click to expand...
Click to collapse
Flashed over 9.5.8 just fine. You will get vendor internal problem error tho
Any chance of it working on 1901 aka OnePlus 7? Should be working If the model check doesn't hardcode it to use on pro
Looks like on fps test I'm getting 90 although earlier I was getting 60 weird it bounces around like that lol also can't seem to get my Galaxy bids to connect or even get seen.
Edit. Also faceunlock seems to work pretty well also.
Flashaholic said:
Thanks for this see piece of work.
My only question is atm why 9.5.5 if we have 9.5.8 already?
Thanks in advance #kudos
Gesendet von meinem GM1913 mit Tapatalk
Click to expand...
Click to collapse
Simply because when I started it I didn't get 9.5.8. Didn't bother to update the blobs. But the rom should work ok on 9.5.8.
joemossjr said:
Looks like on fps test I'm getting 90 although earlier I was getting 60 weird it bounces around like that lol also can't seem to get my Galaxy bids to connect or even get seen.
Edit. Also faceunlock seems to work pretty well also.
Click to expand...
Click to collapse
Looks like there might be some problems with Bluetooth audio. Will look into it later.
PeterCxy said:
Looks like there might be some problems with Bluetooth audio. Will look into it later.
Click to expand...
Click to collapse
Also auto brightness seems to not work
Very nice! I hope in future build we might be able to choose between fhd+ and QHD resolution
Hopefully the Muppets repo will fork some, thanks for your work
Thanks for your work,I have already flash the img, and hope to find some bugs for you
How would it work if you don't have the EU version since 9.5.5 image is not the global version ?
xdamember143 said:
How would it work if you don't have the EU version since 9.5.5 image is not the global version ?
Click to expand...
Click to collapse
Use any one it doesn't matter
Nice to see here! Kudos
Running this baby
Only bugs
1. Bluetooth earphones won't connect to music but works with calls.
Really miss that 90ghz option, waiting for that to be added.

Redmi note 7 pro [unofficial] Oxygen OS 9.0 android 9 pie

Oxygen OS 9.0.9 Pie for redmi note 7 pro
Changelogs:
*dt2w fixed
*hotspot fixed
*fixed status bar aligement
*Added auto faceunlock for google faceunlock
*Add OPsoundprofile app
set volume on right side
*Fixed BT audio
*Ambient n LiftUP fixed
Known issue:
*OPfaceunlock
*WiFi display/Miracast
Download here: MOD EDIT: DL link removed
Try it and tell me the review about it to correct the bugs in it??
Thanks for this awesome rom.
Everything is working fine, battery backup is also quite good, getting around 6-7hrs SOT in normal usage (i dont play games, only COC). The best thing is only 3% standby drain in 9hrs.
Got 198k in antutu benchmark.
I don't know about heavy game performance (like PUBG, COD)
Is the port for Oxygen Is based on Android Q possible? Otherwise nice ROM, great work.
Encountered a bug.. device isn't restarting when choosing the restart option from power menu
Simply a black screen
Anyways this is a great rom
sidS6 said:
Encountered a bug.. device isn't restarting when choosing the restart option from power menu
Simply a black screen
Anyways this is a great rom
Click to expand...
Click to collapse
https://androidfilehost.com/?fid=4349826312261620352
Flash this via recovery
From video posted by Technobuzznet
Thread closed, posting others work without permission
strongst
Forum Moderator

CRDroid v316 GSI (Variant of AOSP-Phh-treble + CRDroid)

You're stuck on MIUI 12.5.4.0 and you cant flash a working custom recovery?
You're too lazy or too newbish to build your own?
Cant flash any Custom Rom?
Well you can just learn how to flash these TREBLE PHH Images, GSI-AOSP based images.
Here i show you how to flash CRDroid v316 . Its based on Android 11R
These images can be flashed with just fastbootd, and they work PERFECTLY, even better than many of the images i've tried here.
You wont have to face hardbricks ever again (specially when flashing MIUI), you can get rid of it once and for all, get rid of Xiaomi and all of its bloatware.
And you can always continue flashing these ROMS or other ROMS (If they're the same Android version or 1 version above). They have root by default most of them.
I made a guide showing how to flash this image.
Xiaomi Redmi 9A 9i 9AT 10A
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Supported Devices: Xiaomi Redmi 9A 9i 9AT 10A​
To flash
Basically you just need:
Stock Recovery
Bootloader Unlocked
vbmeta.img (you can also use the one that comes with your MIUI IMAGE)
ADB/Fastboot
An " arm32_binder64 " image (Also called A64 image) that is compatible with your Android Version. (For example This image of CRDroid crdrom-v316-220330-a64-bvZ.img.xz is compatible for us, its the one being used in the tutorial).
Patience
What works?
Everything works, there are bugs in Display Brightness and Headphones
VOLTE (UNTESTED)
What doesn't Work?
In some images, of A10 - A13, for somer eason, RIL , the Radio Interface Layer is dead, so SIM doesn't work, we need to build Images or somehow work-around it, or try various images, to see which ones work.
So far RIL works perfectly, sim card works in eremitein Images, you will find a link to these images posted on the guide.,
RIL/SIM works in the the CRDroid image i used, it was built/published by eremitein.
All credits go to these people.
Fixes​*Improve Wifi - Disable Wifi Power Saving
Important fix " In many Android 11 custom roms the Wifi in this phone becomes weaker, Less txpower, refresh 3 times max every 2 mins, has sometimes latency, range issues, this will improve it by 10-15%
Open Terminal Emulator
Turn your wifi on like a big man, use:
su
iw dev wlan0 set power_save off
(to check that your wifi powersaving has been turned off, use)
iw dev wlan0 get power_save
exit
exit
(To make this persistent between reboots, use an apk to launch scripts on boot)
*Improve Wlan0 TxPower
(In the future i will add how to change TxPower, lets be patient, im learning too, it seems possible though, i need it for pentesting, i discovered a way to use our precious monitor mode, but its my secret only, if someone teaches me how to improve txpower i will teach them to use monitor mode, we can trade)
*Fix headphone issues, if present, execute these lines on any Terminal Emulator then reboot.
su
setprop persist.sys.overlay.devinputjack true
*Fix brightness/display adjustment,
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
Please Report if the CRDroid Image works for you. And if you have the Time/Internet available feel free to download other Images from different developers and report if other Images work perfectly or not.
I for my part will stick to this rom for a looooong time, and wait until android 14-16 has released, maybe then i will meditate upon using another phone/rom (because it just works very well for me).
More information can be found here:
https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list/
Well, was stuck on MIUI 12.5.3.0 global, did not wanna test my luck flashing custom recoveries so tried this, so far good, only bug for my is bluetooth can t transmit data, connects ok but no data or music, so i use headphones and everything is ok, ,RIL is ok, don t use volte, auto brightness bug is more or less livable, haven t tested the fix in terminal yet, SOT more than 5hours in a no game scenario, more than 48 hours of charge from 100% to 13%, phone charges as expected, feels very snappy, using a Gcamgo and almost as good as miui cam, excellent work to eremitein.
cvmg333 said:
.... using a Gcamgo and almost as good as miui cam, excellent work to eremitein.
Click to expand...
Click to collapse
Thanks for this! Do you know if camera2 API is enabled in this ROM? By that, I mean do manual camera options like ISO, shutter speed options exist? You can check by installing camera apps like Open Camera.
Thanks.
MaverickNextDoor said:
Thanks for this! Do you know if camera2 API is enabled in this ROM? By that, I mean do manual camera options like ISO, shutter speed options exist? You can check by installing camera apps like Open Camera.
Thanks.
Click to expand...
Click to collapse
Hi, its not enabled by default, but it can be activated in crdroid settings, and yes Open Camera manual options are working.
cvmg333 said:
Hi, its not enabled by default, but it can be activated in crdroid settings, and yes Open Camera manual options are working.
Click to expand...
Click to collapse
Thanks so much!
Found glitch in this Rom, if i turn on lockscreen security by pattern, sudenly home key and recents key stop working, if i deactivate the lockscreen security feature, navbar buttons work as the should again.

Categories

Resources