Enable sRGB mode on custom ROM without support - OnePlus 3T Questions & Answers

Hello,
I am running the official RR 6 with the latest Magisk 16.
I've searched the forums and that thread, but I don't think sRGB is supported yet.
In the past (I think it was on Cyanogenmod 13 on my Oneplus 3) there was a way to edit a settings file and get sRGB mode to be forced. The difference was, sRGB was actually supported, the setting just wouldn't stick (it would revert after short time).
I am wondering if there is a similar way, or a Magisk module that I've missed, to enable/force sRGB mode on this ROM?
If that doesn't work, the ROM does support calibration with sliders for green, red, blue, and allows for custom color temperature. I've been toying with this to get close to the original sRGB color mode, but I can't get it right. If it's possible to simulate (get close to) sRGB with these settings, does anyone know what the settings should be?
Thanks!

Look up /sys/devices/virtual/graphics/fb0 and check if there are sRGB/Adobe_RGB/DCI_P3 files. If there is at least one, you can switch color palette with echo 1 to this file. The settings won't stick after a reboot, but a Magisk module can be created to set this value to 1 on system boot.

przemcio510 said:
Look up /sys/devices/virtual/graphics/fb0 and check if there are sRGB/Adobe_RGB/DCI_P3 files. If there is at least one, you can switch color palette with echo 1 to this file. The settings won't stick after a reboot, but a Magisk module can be created to set this value to 1 on system boot.
Click to expand...
Click to collapse
Thanks!
I found this (for the oneplus 5) and adjusted it for the 3T.
Awesome to have sRGB working!

Could you please share it?

Hammerhand.17 said:
Could you please share it?
Click to expand...
Click to collapse
I can't, not on XDA because I don't have enough posts or status or whatever.
Unzip that module, find the file post-fs-data.sh and edit it with the following line in place of the one present:
echo 1 > /sys/devices/virtual/graphics/fb0/srgb
Zip it up and install it with Magisk. Make sure the zipfile does not use full paths, but relative paths or Magisk won't detect it as a module.

droidvark said:
I can't, not on XDA because I don't have enough posts or status or whatever.
Unzip that module, find the file post-fs-data.sh and edit it with the following line in place of the one present:
echo 1 > /sys/devices/virtual/graphics/fb0/srgb
Zip it up and install it with Magisk. Make sure the zipfile does not use full paths, but relative paths or Magisk won't detect it as a module.
Click to expand...
Click to collapse
Ok, I will try. Thanks.

Just in case anyone else stumbles upon this thread and wants it, I created a module for it.
https://github.com/Codecasaurus/Magisk-sRGB-for-OP3T

Related

A question regarding Magisk and global settings changes

A few months ago, I upgraded to my phone to 7.1, and for some reason, my carrier disables tethering on my plan for this version. I did some poking around and found this article, which provided the fix. Namely:
setprop net.tethering.noprovisioning=true
settings put global tether_dun_required 0
The next issue I encountered was that these settings would be reverted any time I updated my ROM. Enter Magisk and stangri's tethering module, which addresses the first half of that issue flawlessly. I am, however, left with the second half of the puzzle that needs to be fixed after each flash.
I've tried placing a few simple lines in services.sh to perform a quick check to see what that setting's value is and adjust it as needed, I've tried putting scripts in various places to run on boot, and I've tried anything else I can think of, but it seems I'm not savvy enough to solve this particular problem on my own. So, I turn to you for suggestions. Can I either systemlessly set the value "tether_dun_required" to 0 via a Magisk module or use a Magisk module to place a script that'll run on boot and check the value? If it's even possible, can I get a hint on how it would be done? Thanks in advance.
You should be able to use the General Purpose Boot Scripts that @topjohnwu talks about here: https://forum.xda-developers.com/showpost.php?p=70897029&postcount=12.
Didgeridoohan said:
You should be able to use the General Purpose Boot Scripts that @topjohnwu talks about here: https://forum.xda-developers.com/showpost.php?p=70897029&postcount=12.
Click to expand...
Click to collapse
Hmm, yeah that has potential, but I suspect I'd run into the same problem I've encountered when putting the script into a module. Namely, it doesn't run. Maybe I'm missing something? For testing purposes, I've been keeping it to a single line with the actual command (settings put global tether_dun_required 0), but it doesn't actually do anything.

How to edit build prop with magisk?

As title says i want to edit build prop, any modules or something?
@topjohnwu is currently implementing this into Magisk Manager. As for now you can use:
Code:
/data/magisk/resetprop build.prop.item value
loserskater said:
@topjohnwu is currently implementing this into Magisk Manager. As for now you can use:
Code:
/data/magisk/resetprop build.prop.item value
Click to expand...
Click to collapse
Ok im lost not sure how to do that? I need to make a module?
You can either make a module or a script that you put in /magisk/.core/post-fs-data.d. More details in the All-In-One wiki (stickied thread).
And as stated above, in upcoming versions you'll be able to change prop values in a GUI in the Magisk Manager. It's on the to-do list, but of course there's no ETA.
Didgeridoohan said:
You can either make a module or a script that you put in /magisk/.core/post-fs-data.d. More details in the All-In-One wiki (stickied thread).
And as stated above, in upcoming versions you'll be able to change prop values in a GUI in the Magisk Manager. It's on the to-do list, but of course there's no ETA.
Click to expand...
Click to collapse
Thanks, if i use magisk hide it will hide this too right?
Cheers
I added this:
/data/magisk/resetprop ro.product.model "Pixel XL"
/data/magisk/resetprop ro.opa.eligible_device true
/data/magisk/resetprop ro.product.brand "google"
/data/magisk/resetprop ro.product.manufacturer "Google"
In the post fs data of another module so i basically hacked in the build prop, but magisk hide fails (doesn't fail when i don't mess with the build prop)
metrize said:
I added this:
/data/magisk/resetprop ro.product.model "Pixel XL"
/data/magisk/resetprop ro.opa.eligible_device true
/data/magisk/resetprop ro.product.brand "google"
/data/magisk/resetprop ro.product.manufacturer "Google"
In the post fs data of another module so i basically hacked in the build prop, but magisk hide fails (doesn't fail when i don't mess with the build prop)
Click to expand...
Click to collapse
There's a module for activating Google assistant in the repo already. Have you tried that?
Didgeridoohan said:
There's a module for activating Google assistant in the repo already. Have you tried that?
Click to expand...
Click to collapse
I'm more interested in changing the device so that it thinks it's a pixel. It fails safetynet even with magisk hide when i do this though
metrize said:
I'm more interested in changing the device so that it thinks it's a pixel. It fails safetynet even with magisk hide when i do this though
Click to expand...
Click to collapse
Why?
I'm not sure about the details, but if your device doesn't match a profile Google have on their servers you won't get a CTS profile match. That might be why...
Can you pass basic integrity with the mods you made?
Didgeridoohan said:
Why?
I'm not sure about the details, but if your device doesn't match a profile Google have on their servers you won't get a CTS profile match. That might be why...
Can you pass basic integrity with the mods you made?
Click to expand...
Click to collapse
it's for google photos unlimited original backup (only on pixels)
Without the mods i did above I can pass safetynet and everything fine
With the mods nothing psses not even basic integrity.
Can build.prop be reset with magisk hide or is that functionality not possible on android?
If it could reset build.prop to the original build.prop then I would pass safetynet, but I'm not sure if magisk can do this? @topjohnwu maybe might know?
metrize said:
it's for google photos unlimited original backup (only on pixels)
Without the mods i did above I can pass safetynet and everything fine
With the mods nothing psses not even basic integrity.
Can build.prop be reset with magisk hide or is that functionality not possible on android?
If it could reset build.prop to the original build.prop then I would pass safetynet, but I'm not sure if magisk can do this? @topjohnwu maybe might know?
Click to expand...
Click to collapse
It's possible... You can edit the enable and disable files in /magisk/.core/magiskhide/ to do what you want.
Didgeridoohan said:
There's a module for activating Google assistant in the repo already. Have you tried that?
Click to expand...
Click to collapse
Didgeridoohan said:
It's possible... You can edit the enable and disable files in /magisk/.core/magiskhide/ to do what you want.
Click to expand...
Click to collapse
Thanks this seems promising, however i don't understand the syntax. If you have time could you tell me what to add with the build prop changes i wanted earlier in the thread. Thanks a lot for all the help
metrize said:
Thanks this seems promising, however i don't understand the syntax. If you have time could you tell me what to add with the build prop changes i wanted earlier in the thread. Thanks a lot for all the help
Click to expand...
Click to collapse
Look at how ro.debuggable, ro.secure and the other ro props are handled in the enable file. Match what you want to do to those and then add similar code with your other desired changes in the disable file.
It should be as simple as copying, pasting and changing variable names and props to match your desired setup.
Didgeridoohan said:
Look at how ro.debuggable, ro.secure and the other ro props are handled in the enable file. Match what you want to do to those and then add similar code with your other desired changes in the disable file.
It should be as simple as copying, pasting and changing variable names and props to match your desired setup.
Click to expand...
Click to collapse
Am I right in assuming when magisk hide is disabled the build prop will be changed back to the pixel one?
thanks
ok it's working just going to do the disable one
Okay, when I did the enable magiskhide and changed it, it passes safetynet but then when I changed the dsiable magiskhide file it fails safetynet now even when i enable magiskhide.. weird
core only works though with changes to both enable and disable so now im muffed
Dammit... Now you piqued my curiosity.
I'm heading to bed (shoulda done that 3 hours ago), but if you post your enable and disable files I'm sure someone can take a look at it. If not, I'm around again after a few hours of z and some breakfast.
Attached enable and disable.
(Renamed it to txt file otherwise wouldn't let it upload)
For the module it's just a system.prop module with the following lines;
# This file will be read by resetprop
# Example: Change dpi
# ro.sf.lcd_density=320
ro.product.model=Pixel
ro.product.brand=google
ro.product.manufacturer=Google
When I go core only mode, enable magisk hide then disable (to get the build prop change) then enable magisk hide again it works though. So I think it's something with the module that makes it fail
metrize said:
When I go core only mode, enable magisk hide then disable (to get the build prop change) then enable magisk hide again it works though. So I think it's something with the module that makes it fail
Click to expand...
Click to collapse
How about without the module installed and Core only mode disable?
Since you seem to have a working setup with the enable/disable scripts I'd consider just using those. You could even set up automation with Tasker or a similar app. Use the following code in a Run Shell action:
Code:
sh /magisk/.core/magiskhide/enable
And the same for the disable script.

Best SELinux mode changer module? (or why were they all removed from Magisk repo?)

Hey all, I use SELinuxModeChanger apk to set Permissive mode when my device (Xperia Z5Compact) starts.
I would like to use a Magisk module to do it instead. What is the best module (simple, light on resources) to do so?
I just need the device to start in Permissive mode and that's pretty much it.
I notice all the modules that do this were removed from Magisk repo.. why is that, stability issues?
Thanks.
Because it just takes a very simple boot script, something that a Magisk module is a bit of overkill for. To keep the Magisk repo somewhat uncluttered (it's still quite messy), the decision was made to remove all modules that were just too simple.
Why do you want to change to a Magisk module? It'll do the exact same thing as your app... If you really want to skip the app, just put the following inside a file (you can name it whatever, say "selinux", doesn't even need an extension), place it in /data/adb/service.d, give it execution permission and that's it:
Code:
#!/system/bin/sh
setenforce 0
That'll change to permissive at each boot. You could do the same with an app like Tasker, etc...
Very helpful if I need to do it manually, thank you very much!
I just found this module : https://forum.xda-developers.com/apps/magisk/selinux-mode-inverter-t3775271
which I think will do the trick nicely (I like to be able to enable or disable the feature easily from within Magisk).
Didgeridoohan said:
Because it just takes a very simple boot script, something that a Magisk module is a bit of overkill for. To keep the Magisk repo somewhat uncluttered (it's still quite messy), the decision was made to remove all modules that were just too simple.
Why do you want to change to a Magisk module? It'll do the exact same thing as your app... If you really want to skip the app, just put the following inside a file (you can name it whatever, say "selinux", doesn't even need an extension), place it in /data/adb/service.d, give it execution permission and that's it:
That'll change to permissive at each boot. You could do the same with an app like Tasker, etc...
Click to expand...
Click to collapse
Nice idea, I'm using it and loving it, thanks for the info.
Thanks for the ROM. Its very stable and smooth. But i faced with one issue after last update
Any gcam is crashing except for the stock(6.2) on Pixel Experience ROM (last update10.0)I tried different cases like clean cache, removed Google photo, install other gcam mods, change SElinux. Nothing helped me. Has anyone encountered anything like this? Any solution?

[Request] OxygenOS Swap Disabler

I was noticing some weird slowdowns on my OnePlus 6 and with a little research I found out that in the last 6 months of releases, OxygenOS keeps a ~2GB swap file and actively uses it. Even if the Smart Boost option is off! More info here: https://forums.androidcentral.com/oneplus-6-6t/949148-open-betas-14-6-oneplus-6-6t.html
Basically in order to de-activate swap we need to add two lines to build.prop. This works successfully on my OnePlus 6, the swap file disappeared and the slowdowns are gone; but I cannot make a module because my only PC has blown it's PSU
persist.vendor.sys.memplus.enable=false
ro.vendor.qti.config.swap=false
Click to expand...
Click to collapse
There's absolutely no need to make a module for something that simple. A couple of options:
Make a boot script (in /data/adb/service.d or /data/adb/post-fs-data.d, start with service.d and if that doesn't work try post-fs-data.d) that uses the resetprop tool. Should look something like this:
Code:
#!/system/bin/sh
resetprop persist.vendor.sys.memplus.enable false
resetprop ro.vendor.qti.config.swap false
Don't forget to make the file executable.
Or, you can use MagiskHide Props Config (shameless plug disclaimer).
Thank you, added the script in service.d, put execute permissions and it works perfectly. I totally forgot Magisk could use bootscripts
Instantly noticed how the interface is way smoother without swap.
I tried MagiskHidePropsConfig before but even after installing everything it needed it still didn't work ("those props don't exist" or something along those lines). Probably too specialized for me to understand.
Glad you got things working. And thank you for the feedback...
That message in the module ui is simply information (if a prop does exist it'll show the current prop value). If you had entered the new value it would have updated the module scripts with your new prop and prompted you to reboot. I'll make sure to make that clearer for the next release...

[Module] How to configure a Module? I'd like to configure Foxy boot

I am a new user in a root universe, two weeks, so maybe my question can be very newbie. I installed foxy boot successfully, but the scale got too big for my device. So, I read the documentation at github "Magisk-Modules-Repo>foxy-boot", but I don't know where and how to set the parameters.
Configuration
Foxy Boot uses black background color and white foreground color by default. The font scale is dependent on display DPI. These values can be changed using the following system properties:
foxy.boot.scale — scale factor, can take integer values from 1 to 9
foxy.boot.background *— background color in hex format (e.g. #000000)
foxy.boot.foreground *— foreground color in hex format (e.g. #ffffff)
foxy.boot.source *— message source (kmsg for the kernel ring buffer or logd for Android log)
These properties can be changed using init shell script. For instance, you can create foxy-boot.sh in /sbin/.magisk/img/.core/post-fs-data.d (don't forget to make it executable via chmod a+x) with the following commands:
resetprop 'foxy.boot.scale' 2
resetprop 'foxy.boot.background' '#ffffff'
resetprop 'foxy.boot.foreground' '#000000'
resetprop 'foxy.boot.source' 'logd'
Click to expand...
Click to collapse
I sought by "foxy" and "scale" in a file explorer app but it didn't find them.
I am installing this module because my phone get a bootlooping after a I had installed Edxposed, even awaiting over 1 hour. Therefore I want to try again observing boot logs. My cellphone is a Doogee F7. I am Brazilian, sorry for any language mistake.
I did it, but I don't know if I managed correctly
First of all, sorry for wrong tag ([Module]). I continued searching more, and discovered the magisk guide on topjohnwu GitHub. So in the "boot-scripts" section I found more explications.
This was the solution:
- I discovered where to create a "foxy-boot" file:
data/adb/post-fs-data.d
Click to expand...
Click to collapse
- And there I set the parameters and it worked as I wanted it.
So, that's it, I resolved my question, but I don't know if the solution was good. If somebody aware me I will appreciate it. Thanks!
Hi I wonder could you help me get foxy-boot working. I'm not a devloper so I dont really understand the documentation. I created the file called foxy-boot.sh in data/adb/post-fs-data.d, I pasted the text:
resetprop 'foxy.boot.scale' 2
resetprop 'foxy.boot.background' '#ffffff'
resetprop 'foxy.boot.foreground' '#000000'
resetprop 'foxy.boot.source' 'logd'
into that file and then chmod it r, w, x for user group and other. Then rebooted but nothing happened, my phone booted with the normal animation, logo etc. What am I doing wrong?

Categories

Resources