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

Status
Not open for further replies.
Search This thread

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
THIS APP HAS BEEN SUPERCEDED BY "Chainfire3D": http://xdaforums.com/showthread.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://xdaforums.com/showthread.php?t=1087427 (441 original downloads)
 

Attachments

  • screenshot-app-normal.png
    screenshot-app-normal.png
    53.5 KB · Views: 951
  • screenshot-app-red.png
    screenshot-app-red.png
    40 KB · Views: 944
  • screenshot-home-green.jpg
    screenshot-home-green.jpg
    57.3 KB · Views: 928
  • screenshot-home-amber.jpg
    screenshot-home-amber.jpg
    62.2 KB · Views: 895
Last edited:

TheDeadCPU

Retired Senior Moderator
Jun 22, 2009
1,945
690
30
ಠ_ಠ
*plants eyes onto screen*

*F5*
*F5*
*F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5*
 

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
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

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
Heehee, updated to v1.1 already... seems I left some debug code in there that disabled PowerVR textures :D
 

jjwa

Senior Member
Jun 24, 2010
220
10
38
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 :).
 

Chainfire

Moderator Emeritus / Senior Recognized Developer
Oct 2, 2007
11,452
87,862
www.chainfire.eu
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 :).

The amount of battery saving should be exactly the same. The battery saving is a property of OLED screens, when not all colors are used. OLED only sends power to pixels that aren't black (for example in red mode, green and blue pixels will remain black, thus not use any power). It has nothing to do with the method used to get there.

There have been no 2.2.1 reports yet, btw.
 
Last edited:

kiljacken

Retired Recognized Developer
Feb 20, 2010
1,076
257
27
Nykøbing Mars
It works perfectly on my Optimistic 2X :D
Great work dude!

EDIT: Btw, are you going to release the source at some point?

Sent from my Optimus 2X using XDA App
 
  • Like
Reactions: Chainfire

Headstrike85

Senior Member
Nov 22, 2010
195
36
Works perfectly on my sgs custom rom based on 2.3.3 jvh with touchwizz 4 and voodoo hack kernel. thank you sir !!!
 
Last edited:
  • Like
Reactions: Chainfire

Headstrike85

Senior Member
Nov 22, 2010
195
36
I find a cool bug lol, i was in yellow mode before i reboot in my red recovery mode, convert my partition in ext 4 with voodoo hack kernel, the boot was in lovely yellow lol. After that u just need to use toggle and all works fine when ur in touchwizz or others home . No incidence for future boot.

Edit : sorry my english is not terrible :-(, hope you understand what i would like to say. See ya
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    THIS APP HAS BEEN SUPERCEDED BY "Chainfire3D": http://xdaforums.com/showthread.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://xdaforums.com/showthread.php?t=1087427 (441 original downloads)
    1
    That sure was the longest edit in history... got sidetracked by other stuff :D
    1
    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.

    :)
    1
    It works perfectly on my Optimistic 2X :D
    Great work dude!

    EDIT: Btw, are you going to release the source at some point?

    Sent from my Optimus 2X using XDA App