All you need is root and Tasker.
If you don't know what Tasker is, shame on you :P
These are the commands you will need to choose from, depending on the modes you want to add as toggles. You can add any or all of them.
Essentially, these commands are all you need. You can run these from terminal and they'll change the display mode. But to get them to work from quick toggles requires a little bit more work.
Adaptive display echo "4" > /sys/devices/svc/OCTA/mdnie/mode AMOLED Photo echo "1" > /sys/devices/svc/OCTA/mdnie/mode Basic echo "2" > /sys/devices/svc/OCTA/mdnie/mode AMOLED Cinema echo "0" > /sys/devices/svc/OCTA/mdnie/mode
- Open Tasker, go to the TASKS tab and click the New Task button (+).
- In the small window that pops up, give the task a meaningful name. Call it whatever display mode this one is going to be. (Basic, Photo, Adaptive etc)
- In the next window, click the New Action button (+).
- Click Code > then click Run Shell
- In the Command Field, enter the command for whichever display mode you want from the 4 listed above.
So for Adaptive, you would enter echo "4" > /sys/devices/svc/OCTA/mdnie/mode
- Tick the "Use Root" option.
- Press the back button to save this action and return to your task.
Once you've picked the icon, press the back button again, to take you back to the TASKS page. You should now see your newly added Task with the icon you chose over on the right hand side.
Now repeat this process for any other Display Modes you wish to add as quick toggles. Once this is done, there's just a couple of extra steps left.
In Tasker, open the main menu and open Preferences. Open the ACTION tab. At the top you'll see Quick Settings Tasks. This is where you can assign 3 of your Tasker Tasks to Quick Toggles.
So tap on the magnifying glass next to each one, and you'll find your Display Mode toggles are listed there. Pick the one(s) you want to add as Quick Toggles. What this does is actually add them as physical toggles in Android.
Close Tasker settings, open up the Android Quick Toggles/notification shade, press the 3 dot menu button, choose button order, and in among the spare toggles in the bottom, should be your new Display Mode toggles. Simply drag them up into the area where you want them to appear, and your're done!
(I have extra ones as I have another app (AutoNotification) which adds a lot more custom ones)
The first time you tap on one, your root app should prompt you to provide Tasker with root access. If not, you may have to grant Tasker root permission manually.
I've tried to make this easy to follow, but if you get stuck of have any issues, let me know and I'll be happy to help