Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,137 Members 49,476 Now Online
XDA Developers Android and Mobile Development Forum

[13.05.2011][2.2+] CF3D :: NightMode v1.1 [BETA][ROOT][OpenGL ES 2.0+]

Tip us?
 
Chainfire
Old
(Last edited by Chainfire; 19th May 2011 at 10:40 PM.)
#1  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,932
Posts: 9,083
Join Date: Oct 2007

 
DONATE TO ME
Default [13.05.2011][2.2+] CF3D :: NightMode v1.1 [BETA][ROOT][OpenGL ES 2.0+]

THIS APP HAS BEEN SUPERCEDED BY "Chainfire3D": http://forum.xda-developers.com/show....php?t=1087427

It contains all the functionality present in NightMode and more.

.
.
.
.
.
.

DO NOT INSTALL ON HONEYCOMB (yet)

YOU WILL READ THE ENTIRE POST. YES YOU WILL. EVEN YOU, SUPERCURIO !

About
NightMode itself is an implementation of Jeff Sharkey's excellent power-saving and night-vision-preserving idea for surfaceflinger effects. Really, you should read that link.

The red mode is great in darkness as it does a good job preserving night-vision, for me the power-saving is secondary (power-saving is on OLED screens only)

Unlike Jeff's original article, NightMode is NOT based on surfaceflinger (or other) source modifications, the same effect (more or less) is achieved by using a proxy driver I call CF3D. NightMode serves as the first test of this driver, which will ultimately try to make games run on your device that normally do not.

If you are running CM, you have a similar option already in your settings (which uses the surfaceflinger method).

CF3D driver
The CF3D driver used in the app is a proof-of-concept proxy driver I'm building. It's ultimate purpose is to serve as a compatibility layer and to implement some extra features. Or in normal people English: make stuff work that doesn't, and add some cool.

CF3D is dangerous
The installation of the CF3D driver is not without risk. So far it has worked for everyone who has tried to install it, but you should definitely make a CWM backup before trying!

Successful tests of CF3D
- HTC Hero (not supported by this APK)
- HTC HD2 (MDJ on NAND, Adreno200)
- Samsung Galaxy S (2.3.3, PowerVR SGX540)
- Samsung Galaxy Tab 7" (2.3.3, PowerVR SGX540)
- Samsung Galaxy SII (2.3.3, Mali-400 MP)
- Motorola Atrix 4G (2.2.1 ?, Tegra2)
- Motorola Droid 2 (?, PowerVR SGX530)
- LG Optimus 2X (2.3.4, Tegra2)

More about NightMode !
The featureset is nowhere near what I wanted to release for this beta, but I ran into a lot of snags, and it's simply time to put it out there. For example, what I really wanted is automatic night mode in the dark. However after some testing it became obvious that the light sensors in the phones I used are simply not good enough to accomplish this. So there goes that feature For some reason, they appear to be unable to distinguish between house lighting at night, and pitch black

So the feature set has become really simple: you select which night mode color you want, and whether it should be on or off.

For your convenience, there is also the option to create a shortcut on your home screen to toggle night mode on and off. You can either create it by pressing the button in the app, or: tap-and-hold on the home screen -> shortcuts -> Toggle NightMode.

Requirements
NightMode requires:
- OpenGL ES 2.0 (every 1ghz+ phone has this)
- SuperUser / Root
- Writable /system (it will try to remount system as read/write when needed, but the changes need to stick between reboots)
- S-OFF ??
- Having root access from recovery is a big plus to solve problems if you run into them

Installation
If you have CWM or another recovery-based backup system, make a backup before proceeding !

Install the APK as you would any other. Open the program, and press the "Install" item under the "CF3D driver" heading. This will attempt to install the CF3D driver and reboot your device.

Please make sure you have USB debugging enabled, so you can logcat and potentionally fix problems manually in case of a no-boot.

When installation fails and your device doesn't boot
- If you can achieve root access through ADB shell while booting or in recovery, the fix is usually easy, just execute the /system/lib/cf3d_uninstall.sh script as root.
- Otherwise, if you have CWM, do an advanced restore of the /system partition
- If all else fails, reflash the /system partition or the entire firmware

Uninstallation
Open the app, and select "Uninstall" (if available), then uninstall the APK like you would any other.

Thanks!
Though the app itself may not be very interesting, feedback on devices it does and doesn't work on is most welcome (please include logcats of the boot process), just for the sake of progress with the CF3D proxy driver.

Screenshots / Video
Screenshots are attached below. Here is the video:



Download
Use the Thanks! button if you like it!

DOWNLOAD REMOVED, THIS APP HAS BEEN SUPERCEDED BY "Chainfire3D": http://forum.xda-developers.com/show....php?t=1087427 (441 original downloads)
Attached Thumbnails
Click image for larger version

Name:	screenshot-app-normal.png
Views:	772
Size:	53.5 KB
ID:	594425   Click image for larger version

Name:	screenshot-app-red.png
Views:	772
Size:	40.0 KB
ID:	594426   Click image for larger version

Name:	screenshot-home-green.jpg
Views:	765
Size:	57.3 KB
ID:	594427   Click image for larger version

Name:	screenshot-home-amber.jpg
Views:	738
Size:	62.2 KB
ID:	594428  
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
The Following 22 Users Say Thank You to Chainfire For This Useful Post: [ Click to Expand ]
 
TheDeadCPU
Old
#2  
TheDeadCPU's Avatar
Retired Senior Moderator
Thanks Meter 683
Posts: 2,014
Join Date: Jun 2009
Location: ლ(ಠ益ಠლ) Y U WANT MY LOCATION?
*plants eyes onto screen*

*F5*
*F5*
*F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F 5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F 5F5F5F5F5F5F5F5F5F5F5*
Follow me on twitter?
Please only PM on very urgent matter. All other PMs will be ignored.
 
Chainfire
Old
#3  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,932
Posts: 9,083
Join Date: Oct 2007

 
DONATE TO ME
That sure was the longest edit in history... got sidetracked by other stuff
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
The Following User Says Thank You to Chainfire For This Useful Post: [ Click to Expand ]
 
supercurio
Old
#4  
supercurio's Avatar
Senior Recognized Developer
Thanks Meter 5,072
Posts: 3,529
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Quote:
Originally Posted by Chainfire View Post
DO NOT ATTEMPT TO USE THIS RIGHT NOW UNLESS YOU ARE EXPERT LEVEL AND/OR WILLING TO REFLASH YOUR FIRMWARE !

YOU WILL READ THE ENTIRE POST. YES YOU WILL. EVEN YOU, SUPERCURIO !
Guilty
Thanks to the entire reading session that was well worth it I understood it was not at all a Ripoff of the color effects that are in CyanogenMod, not even related.

Actually the concept is super powerful and I'm already flooded by ideas of new stuff possible with this approach.
Fantastic stuff Chainfire.
 
Chainfire
Old
#5  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,932
Posts: 9,083
Join Date: Oct 2007

 
DONATE TO ME
Short video added: http://www.youtube.com/watch?v=okKArBstjwA
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
The Following User Says Thank You to Chainfire For This Useful Post: [ Click to Expand ]
 
jug6ernaut
Old
#6  
jug6ernaut's Avatar
Retired Moderator / Recognized Developer
Thanks Meter 458
Posts: 2,533
Join Date: Jun 2006
Location: San Antonio, Tx
I really have been waiting for something like this since i got my first android device. Absolutely awesome.

Atrix.

-Active-
- Nexus5 -
- Nexus7.2 -

-Retired-
- Xperia Z2 - LG G2 - Xperia ZL - Samsung Note2 - Samsung Note1 - GalaxyNexus - Motorola Atrix - NexusOne - LG Expo - HTC TouchPro2 - HTC Kaiser - HTC Wizard -
- Nexus7 - HP Touchpad - Motorola Xoom -

"You can lead a fool to knowledge, but you can not make them think."
 
Chainfire
Old
#7  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,932
Posts: 9,083
Join Date: Oct 2007

 
DONATE TO ME
Heehee, updated to v1.1 already... seems I left some debug code in there that disabled PowerVR textures
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
 
jjwa
Old
#8  
Senior Member
Thanks Meter 10
Posts: 220
Join Date: Jun 2010
Location: Enschede
This sounds really cool . But all the technical stories behind it are completely unclear to me (because I am simply a user, not a maker, so I didn't really delve into this kind of stuff (yet?)).

The thing that matters to me is the battery saving part. Is the amount of battery saving (roughly) the same between these different methods (CF3D/CM7/surfaceflinger)?

And being sufficiently scared by your CF3D is dangerous warnings: did you receive any reports yet from SGS i9000 2.2.1 Users? (Or maybe even more specific, JS8 or Doc rom users, if you think that matters anything.)

I will keep my eye on this, quite interesting .
 
Broomfundel
Old
#9  
Member
Thanks Meter 11
Posts: 94
Join Date: May 2010
Tried and tested on Rooted UK Galaxy S2

PDA:XWKE1
PHONE: XXKDJ
CSC:XEUKD1 (XEU)

Install, reboot, Night Mode, all went without a hitch and work as expected.

The Following User Says Thank You to Broomfundel For This Useful Post: [ Click to Expand ]
 
kamesen
Old
#10  
Member
Thanks Meter 13
Posts: 60
Join Date: Dec 2010
THIS IS AWESOME (have not tried)

THREAD CLOSED
Subscribe
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes