[Galaxy Note 3 Themes and Apps] karkasss:
How to edit your services.jar

classes.dex part

1.AOD brightness control

com\android\server\display\DisplayPowerController.smali

For this smali edit, follow the below instruction.

http://xdaforums.com/showthread.php?p=69653504

But only different string for "eragon_brightness" instead of "aod_brightness"

Because, AODsettings.apk file was aligned with this string "eragon_brightness" already.

2. AOD Touch & Bluelight filter

com\android\server\power\PowerManagerService$BinderService.smali

1)Go to the

.method public setDozeOverrideFromAod(IIILandroid/os/IBinder;)V

2)Search

const-string v0, "PowerManagerService"

2)Add below line

invoke-static {p2}, Lcom/samsung/android/aod/AODTouchDaemon;->call(I)V

like this.

const/16 v0, 0xff
if-le p3, v0, :cond_2d
:cond_2c
const/4 p3, -0x1
:cond_2d
[COLOR="Blue"]invoke-static {p2}, Lcom/samsung/android/aod/AODTouchDaemon;->call(I)V[/COLOR]
const-string v0, "PowerManagerService"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;->()V

com\samsung\android\mdnie\MdnieManagerService.smali

1)Search

.field private mDisplayOn:Z

2)Add below line

.field private mDaemon:Lcom/samsung/android/bluelightfilter/KPPDaemon;

like this

.field private final mContext:Landroid/content/Context;
.field private mCurtainModeIsRunning:Z
[COLOR="blue"].field private mDaemon:Lcom/samsung/android/bluelightfilter/KPPDaemon;[/COLOR]
.field private mDisplayOn:Z
.field private mEbookScenarioEnabled:Z

3)Search

const-string/jumbo v2, "lcd_curtain" or "lcd_curtain"

4)Add below line

invoke-virtual {p0}, Lcom/samsung/android/mdnie/MdnieManagerService;->addFilter()V

like this

:cond_fa
invoke-direct {p0}, Lcom/samsung/android/mdnie/MdnieManagerService;->setting_is_changed()V
[COLOR="blue"]invoke-virtual {p0}, Lcom/samsung/android/mdnie/MdnieManagerService;->addFilter()V[/COLOR]
return-void
:cond_101
const-string/jumbo v2, "lcd_curtain"

5)Search

# virtual methods

6)Add blue lines

# virtual methods
[COLOR="blue"].method public addFilter()V
.locals 2

new-instance v0, Lnxteam/craftingmod/bluelightfilter/KPPDaemon;

iget-object v1, p0, Lcom/samsung/android/mdnie/MdnieManagerService;->mContext:Landroid/content/Context;

invoke-direct {v0, v1}, Lnxteam/craftingmod/bluelightfilter/KPPDaemon;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/samsung/android/mdnie/MdnieManagerService;->mDaemon:Lnxteam/craftingmod/bluelightfilter/KPPDaemon;

return-void
.end method[/COLOR]
.method public getContentMode()I

7)Search

.method public setmDNIeEmergencyMode(Z)Z

See the above lines.

8)Replaced Red lines by Blue lines

const-string v2, "/sys/class/mdnie/mdnie/accessibility"
if-eqz p1, :cond_4a
[COLOR="red"] const/4 v1, 0x6[/COLOR]
:cond_4a
[COLOR="Red"] invoke-static {v2, v1, p2}, Lcom/samsung/android/mdnie/MdnieManagerService;->sysfsWrite_CB_HBM(Ljava/lang/String;I[I)Z[/COLOR]
move-result v1
goto :goto_44
.end method

const-string v2, "/sys/class/mdnie/mdnie/accessibility"
if-eqz p1, :cond_4a
[COLOR="blue"] const/4 v1, 0x2[/COLOR]
:cond_4a
[COLOR="Blue"] invoke-static {v2, v1, p2}, Lcom/samsung/android/mdnie/MdnieManagerService;->sysfsWrite_CB(Ljava/lang/String;I[I)Z[/COLOR]
move-result v1
goto :goto_44
.end method

classes2.dex part

1)Add below smali to /root folder

https://drive.google.com/open?id=0ByMmvUc7IhtmY3JBNzJJUUNMMUE

Important

Don't forget add below permissions to your updater-script

set_perm(0, 2000, 0755, "/system/bin/kppd");

set_perm(0, 2000, 0666, "/data/bluelight/filter.cfg");

set_perm(0, 2000, 0666, "/data/bluelight/kppd.cfg");