[Samsung Galaxy S 5 Unified Development] rompnit:
It seems that no matter how many cool mods you put out there, a lot of folks continue to ask for CRT. So here's a 'How-To' based off of the Sprint NE5 4.4 release, but this should also work in other variants and/or Samsung devices.

We will be working with the services.jar, and some knowledge decompiling and/or baksmali is required.

Also note that the debug code has been removed; to do the same use the -b switch when decompiling with apktool.

apktool d -b services.jar

PART 1

To start:

Navigate and open

smali\com\android\server\power\DisplayPowerController.smali

ADD the lines in RED right at the top

.class final Lcom/android/server/power/DisplayPowerController;
.super Ljava/lang/Object;
.source "DisplayPowerController.java"

[COLOR="Red"]# interfaces
.implements Landroid/animation/Animator$AnimatorListener;[/COLOR]

# annotations

Search for and add the lines in RED

.field private mElectronBeamFadesConfig:Z

[COLOR="Red"].field private mElectronBeamOff:I[/COLOR]

.field private mElectronBeamOffAnimator:Landroid/animation/ObjectAnimator;

[COLOR="Red"].field private mElectronBeamOn:I[/COLOR]

.field private mElectronBeamOnAnimator:Landroid/animation/ObjectAnimator;

Next search for

.method private getDynamicAutoBrightnessHighHysteresis(F)F

And add the following method DIRECTLY ABOVE

.method static getBeamCfg(Ljava/lang/String;I)I
.locals 3

move v0, p1

invoke-static {p0}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

move-result-object v1

const-string v2, "none"

invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

move-result v2

if-eqz v2, :cond_0

const v0, 0x0

return v0

:cond_0
const-string v2, "crt"

invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

move-result v2

if-eqz v2, :cond_1

const v0, 0x1

return v0

:cond_1
const-string v2, "fade"

invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

move-result v2

if-eqz v2, :cond_2

const v0, 0x2

:cond_2
return v0
.end method

We will now be working in the following method so search for it next!

.method private initialize()V

Within the above referenced method, search for

iput-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

And add the line in RED

iput-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

[COLOR="Red"]const v4, 0x2[/COLOR]

iget-object v0, p0, Lcom/android/server/power/DisplayPowerController;->mPowerState:Lcom/android/server/power/DisplayPowerState;

Still working within the same method REPLACE

const-wide/16 v1, 0xc8

WITH

const-wide/16 v1, 0x190

# This changes the animation speed. Looks much better ;)

And yet still within this method, REPLACE these 2 lines

iget-object v1, p0, Lcom/android/server/power/DisplayPowerController;->mAnimatorListener:Landroid/animation/Animator$AnimatorListener;

invoke-virtual {v0, v1}, Landroid/animation/Animator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

WITH THE FOLLOWING # This step updated 08.03.14

invoke-virtual {v0, p0}, Landroid/animation/ObjectAnimator;->addListener(Landroid/animation/Animator$AnimatorListener;)V

const-string v2, "persist.sys.screen_off"

const v3, 0x1

invoke-static {v2, v3}, Lcom/android/server/power/DisplayPowerController;->getBeamCfg(Ljava/lang/String;I)I

move-result v4

iput v4, p0, Lcom/android/server/power/DisplayPowerController;->mElectronBeamOff:I

Finally ADD

nop

nop

DIRECTLY BELOW

return-void

That's it for this method!

Continue to Part 2 due to post length limitations