[Guide] Enable CRT ON Animation On GB ROM
[Guide] Enable CRT ON Animation On GB ROM - Hallo sobat Jogja Android Blog, Pada Artikel yang sobat baca kali ini dengan judul [Guide] Enable CRT ON Animation On GB ROM, kami telah mempersiapkan artikel ini dengan baik untuk sobat baca dan ambil informasi didalamnya. Mudah-mudahan isi postingan [Guide] Enable CRT ON Animation On GB ROM yang kami tulis ini dapat sobat Jogja Android Blog pahami. Baiklah, selamat membaca sambil menikmati kopi.
Hey guys….
I’m back with a new guide
Here we go
First use baksmali tool and decompile services.jar and u would find a folder called classout
now navigate to classout\com\android\server
Now open up “PowerManagerService.smali”
search for these two lines
Code:
.field static final ANIM_STEPS:I = 0xf
.field static final AUTOBRIGHTNESS_ANIM_STEPS:I = 0x3c
Code:
.field static final ANIM_STEPS:I = 0xa
.field static final AUTOBRIGHTNESS_ANIM_STEPS:I = 0xf
Code:
invoke-static {v2, v3, v0}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 2556
const/16 v2, 0xff
goto :goto_e
.end method
Code:
.method static synthetic getContextZZ(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
.registers 2
.parameter "x0"
.prologue
iget-object v0, p0, Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
return-object v0
.end method
Now Search For
Code:
invoke-static {v0, v1}, Lcom/android/server/PowerManagerService;->access$4700(Lcom/android/server/PowerManagerService;I)I
.line 2295
:cond_2e
return-void
.end method
Code:
.method private getScreenAnimationMode(Landroid/content/Context;)I
.registers 7
.parameter "context"
.prologue
const v0, 0x0
const v3, 0x1
const v4, 0x10
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "config_beam_screen_on"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_22
const v0, 0x1
:goto_18
const-string v2, "config_beam_screen_off"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_21
add-int/2addr v0, v4
:cond_21
return v0
:cond_22
const v0, 0x0
goto :goto_18
.end method
Code:
.method public run()V
.registers 10
.prologue
const/4 v8, 0x0
Code:
.line 2078
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->getContextZZ(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v4
invoke-direct {p0, v4}, Lcom/android/server/PowerManagerService$BrightnessState;->getScreenAnimationMode(Landroid/content/Context;)I
move-result v4
if-nez v4, :cond_3b
There r alot of codes to be changed hence i would post the unmodded and the modded file(CHANGES WOULD BE IN BOLD) so it would be easy for u to find the difference
Unmodded File:
Code:
iget-boolean v4, v4, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z
if-eqz v4, :cond_2f
.line 2299
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList;
move-result-object v4
monitor-enter v4
.line 2300
:try_start_e
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
.line 2301
.local v2, now:J
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v5}, Lcom/android/server/PowerManagerService;->access$4800(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v5
invoke-virtual {v5}, Lcom/android/server/PowerManagerService$BrightnessState;->stepLocked()Z
move-result v1
.line 2302
.local v1, more:Z
if-eqz v1, :cond_2a
.line 2303
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v5}, Lcom/android/server/PowerManagerService;->access$1800(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v5
const-wide/16 v6, 0x10
add-long/2addr v6, v2
invoke-virtual {v5, p0, v6, v7}, Landroid/os/Handler;->postAtTime(Ljava/lang/Runnable;J)Z
.line 2305
:cond_2a
monitor-exit v4
.line 2320
.end local v1 #more:Z
.end local v2 #now:J
:goto_2b
return-void
.line 2305
:catchall_2c
move-exception v5
monitor-exit v4
:try_end_2e
.catchall {:try_start_e .. :try_end_2e} :catchall_2c
throw v5
.line 2307
:cond_2f
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList;
move-result-object v4
monitor-enter v4
.line 2309
:try_start_36
iget-boolean v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->animating:Z
if-eqz v5, :cond_5f
iget v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->targetValue:I
if-nez v5, :cond_5f
const/4 v5, 0x1
move v0, v5
.line 2310
.local v0, animate:Z
:goto_40
if-eqz v0, :cond_51
.line 2313
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v6}, Lcom/android/server/PowerManagerService;->access$4600(Lcom/android/server/PowerManagerService;)I
move-result v6
const/4 v7, 0x4
if-ne v6, v7, :cond_61
move v6, v8
:goto_4e
invoke-static {v5, v6}, Lcom/android/server/PowerManagerService;->access$4900(Lcom/android/server/PowerManagerService;I)V
.line 2317
:cond_51
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v5}, Lcom/android/server/PowerManagerService;->access$4800(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v5
invoke-virtual {v5}, Lcom/android/server/PowerManagerService$BrightnessState;->jumpToTargetLocked()V
.line 2318
monitor-exit v4
goto :goto_2b
.end local v0 #animate:Z
:catchall_5c
move-exception v5
monitor-exit v4
:try_end_5e
.catchall {:try_start_36 .. :try_end_5e} :catchall_5c
throw v5
:cond_5f
move v0, v8
.line 2309
goto :goto_40
.line 2313
.restart local v0 #animate:Z
:cond_61
:try_start_61
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v6}, Lcom/android/server/PowerManagerService;->access$1700(Lcom/android/server/PowerManagerService;)I
:try_end_66
.catchall {:try_start_61 .. :try_end_66} :catchall_5c
move-result v6
goto :goto_4e
Code:
iget-boolean v4, v4, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z
if-eqz v4, :cond_3b
.line 2079
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList;
move-result-object v4
monitor-enter v4
.line 2080
:try_start_1a
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
.line 2081
.local v2, now:J
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v5}, Lcom/android/server/PowerManagerService;->access$4800(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v5
invoke-virtual {v5}, Lcom/android/server/PowerManagerService$BrightnessState;->stepLocked()Z
move-result v1
.line 2082
.local v1, more:Z
if-eqz v1, :cond_36
.line 2083
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v5}, Lcom/android/server/PowerManagerService;->access$1800(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v5
const-wide/16 v6, 0x10
add-long/2addr v6, v2
invoke-virtual {v5, p0, v6, v7}, Landroid/os/Handler;->postAtTime(Ljava/lang/Runnable;J)Z
.line 2085
:cond_36
monitor-exit v4
.line 2100
.end local v1 #more:Z
.end local v2 #now:J
:goto_37
return-void
.line 2085
:catchall_38
move-exception v5
monitor-exit v4
:try_end_3a
.catchall {:try_start_1a .. :try_end_3a} :catchall_38
throw v5
.line 2087
:cond_3b
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$500(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$LockList;
move-result-object v4
monitor-enter v4
.line 2089
:try_start_42
iget-boolean v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->animating:Z
if-eqz v5, :cond_6b
iget v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->targetValue:I
if-nez v5, :cond_6b
const/4 v5, 0x1
move v0, v5
.line 2090
.local v0, animate:Z
:goto_4c
if-eqz v0, :cond_5d
.line 2093
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v6}, Lcom/android/server/PowerManagerService;->access$4600(Lcom/android/server/PowerManagerService;)I
move-result v6
const/4 v7, 0x4
if-ne v6, v7, :cond_6d
move v6, v8
:goto_5a
invoke-static {v5, v6}, Lcom/android/server/PowerManagerService;->access$4900(Lcom/android/server/PowerManagerService;I)V
.line 2097
:cond_5d
iget-object v5, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v5}, Lcom/android/server/PowerManagerService;->access$4800(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v5
invoke-virtual {v5}, Lcom/android/server/PowerManagerService$BrightnessState;->jumpToTargetLocked()V
.line 2098
monitor-exit v4
goto :goto_37
.end local v0 #animate:Z
:catchall_68
move-exception v5
monitor-exit v4
:try_end_6a
.catchall {:try_start_42 .. :try_end_6a} :catchall_68
throw v5
:cond_6b
move v0, v8
.line 2089
goto :goto_4c
.line 2093
.restart local v0 #animate:Z
:cond_6d
:try_start_6d
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v6}, Lcom/android/server/PowerManagerService;->access$1700(Lcom/android/server/PowerManagerService;)I
:try_end_72
.catchall {:try_start_6d .. :try_end_72} :catchall_68
move-result v6
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v6}, Lcom/android/server/PowerManagerService;->getContextZZ(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v6
invoke-direct {p0, v6}, Lcom/android/server/PowerManagerService$BrightnessState;->getScreenAnimationMode(Landroid/content/Context;)I
move-result v6
goto :goto_5a
Replace the classes.dex in ur services'jar with the newly created classes.dex
Code:
Note:
Make changes in the line numbers (ex:.line 2098,.line2083) according to the order the lines organized in ur smali
Vishwanath Patil
Whitehawkx
http://forum.xda-developers.com/showthread.php?t=1533255
Demikian Artikel dengan judul [Guide] Enable CRT ON Animation On GB ROM
Mudah-mudahan bisa memberi manfaat untuk sobat Jogja Android Blog semua. Baiklah, sampai jumpa di postingan artikel lainnya.
Sobat Jogja Android Blog sekarang membaca artikel [Guide] Enable CRT ON Animation On GB ROM dengan alamat link https://jogjandroidz.blogspot.com/2014/11/guide-enable-crt-on-animation-on-gb-rom.html
0 Response to "[Guide] Enable CRT ON Animation On GB ROM"
Post a Comment