Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,786,139 Members 51,624 Now Online
XDA Developers Android and Mobile Development Forum

screen modi for sgs5 and Tasker widget

Tip us?
 
dan-linux
Old
(Last edited by dan-linux; 28th June 2014 at 07:02 PM.)
#1  
Junior Member - OP
Thanks Meter 2
Posts: 3
Join Date: Sep 2010
Default screen modi for sgs5 and Tasker widget

I found out how to switch between 4 screen modi.
It works on rooted devices and the commands can also be used with tasker.

Code:
echo "0" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "1" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "2" > /sys/devices/virtual/mdnie/mdnie/accessibility
echo "3" > /sys/devices/virtual/mdnie/mdnie/accessibility

0 : Normal Screen
1 : Inverted Colors
2 : Ultra Power Save Mode
3 : Screen off but not locked and touchscreen is still working


Mode 3 is particulary interesting if you want to record long videos while screen is off or if you want to listen to youtube music videos.

Here some commands to change colors (RED,GREEN, BLUE)

Code:
echo "255 0 0" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
echo "0 255 0" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
echo "0 0 255" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
An other way to turn off the Display is to set all colors to 0

Code:
echo "0 0 0" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
to return to normal screen type

Code:
echo "255 255 255" > /sys/devices/platform/kcal_ctrl.0/kcal;echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl
Maybe some of these commands can also used on other devices.
Have fun

I have attached a Tasker Profile and a toggle widget, so you can try it out.
The widget activates/deactivates the profile, and with the proximity sensor you can switch the screen mode.
Attached Files
File Type: zip black_screen.zip - [Click for QR Code] (1.2 KB, 22 views)
The Following 2 Users Say Thank You to dan-linux For This Useful Post: [ Click to Expand ]
 
Albe95
Old
#2  
Albe95's Avatar
Senior Member
Thanks Meter 1,698
Posts: 1,092
Join Date: Aug 2013
Location: Verona (Italy)
Interesting...on Galaxy S4 with UPSM code all color became white and black
The Following User Says Thank You to Albe95 For This Useful Post: [ Click to Expand ]
 
ktetreault14
Old
#3  
ktetreault14's Avatar
Senior Member
Thanks Meter 1,100
Posts: 2,737
Join Date: Feb 2012
Location: Largo

 
DONATE TO ME
Nice find!
 
PONKiE
Old
#4  
PONKiE's Avatar
Senior Member
Thanks Meter 30
Posts: 108
Join Date: Aug 2009
Location: Eindhoven

 
DONATE TO ME
Quote:
Originally Posted by Albe95 View Post
Interesting...on Galaxy S4 with UPSM code all color became white and black
This works for me too! Been looking for this for a while now...
I'm on SGS4 GE and the echo "2" code turns my screen black and white. Now I can finally complete my Tasker %Battlow profile the way I want
Great find!
PAC-man Rom by Vertigo@xda

"The Galaxy, in the palm of your hand..."

:: My android eats apples ::
 
:: model: Samsung Galaxy S4 (GT-i9505)
:: kernel: Stock (Cyanogen)
:: modem: i9505XXUBMF8


The Following User Says Thank You to PONKiE For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes