5,593,650 Members 39,320 Now Online
XDA Developers Android and Mobile Development Forum

[Guide] Enable CRT ON animation on GB ROM's :D

Tip us?
 
vaibhavpatil192
Old
#11  
Member
Thanks Meter 50
Posts: 77
Join Date: Sep 2011
Location: Mumbai
Quote:
Originally Posted by vishwanathptl View Post
Here is the modified file service.jar file. (CRT ON ENABLED).
This is built for KT2 and confirmed working. U can flash it right away.
Not tested on other firmware and feel free to try.... But dont forget to nandroid backup first if in case it dont work.

FLASH IN CWM RECOVERY....
Flashed it on Andro-ID3.3 and it worked
thanks sir
 
Aspire
Old
#12  
Aspire's Avatar
Senior Member
Thanks Meter 343
Posts: 1,047
Join Date: Dec 2011
Location: Vancouver

 
DONATE TO ME
I think
Andro id had crt animation by default

Sent from my GT-S5670 using XDA
Nexus 4 @ KRT16O

Samsung Galaxy Fit @ MusicMod

Search XDA Forums | You're invited to try Dropbox
 
vaibhavpatil192
Old
#13  
Member
Thanks Meter 50
Posts: 77
Join Date: Sep 2011
Location: Mumbai
Quote:
Originally Posted by Aspire View Post
I think
Andro id had crt animation by default

Sent from my GT-S5670 using XDA
Dude this is CRT-ON animation

ANDRO-ID had CRT-OFF
 
blaster44
Old
#14  
Senior Member
Thanks Meter 29
Posts: 266
Join Date: Sep 2010
How I can speed up this animation? Where is line responsible for animation runtime?
 
bindassdost
Old
(Last edited by bindassdost; 21st May 2012 at 05:49 AM.)
#15  
bindassdost's Avatar
Senior Member
Thanks Meter 638
Posts: 306
Join Date: Jul 2011
Location: delhi
Quote:
Originally Posted by wilfredcool007 View Post
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
And Replace With
Code:
.field static final ANIM_STEPS:I = 0xa
.field static final AUTOBRIGHTNESS_ANIM_STEPS:I = 0xf
Now Search For
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
And enter paste this code below “.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
Save the file and now open up “PowerManagerService$BrightnessState”

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
And paste the following code under “.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
Now Search For
Code:
.method public run()V
    .registers 10
    .prologue
    const/4 v8, 0x0
And paste this code below “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
Now Find " iget-boolean v4, v4, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z"
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 :P

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
Modded:
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
Save the file and using baksmali tool encrypt it back into classes.dex

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
Credits:
Vishwanath Patil
Whitehawkx
after trying many times i had solved many of mine prob
but now im unable to understand error
my phone stuck at boot
mine logcat+editedfiles are attached

My service.jar link is http://db.tt/7BfGFZXG

anybody please help
HATE PEOPLE WHO DONT PRESS THANKS

 
wilfredcool007
Old
#16  
wilfredcool007's Avatar
Recognized Contributor - OP
Thanks Meter 1304
Posts: 435
Join Date: Aug 2011
Location: Chennai

 
DONATE TO ME
Quote:
Originally Posted by bindassdost View Post
after trying many times i had solved many of mine prob
but now im unable to understand error
my phone stuck at boot
mine logcat+editedfiles are attached

anybody please help
Send me your services.jar ill try it out
Dont just say ,Press it

Try not to become a man of success...but a man of value




______________________________________________

Phone : Samsung Galaxy Fit ( S5670 )
Kernel version : 2.6.35.7
Baseband version : S5670DXKT7
ROM : Hyper_Droid_v3
The Following 2 Users Say Thank You to wilfredcool007 For This Useful Post: [ Click to Expand ]
 
pchandra
Old
#17  
pchandra's Avatar
Member
Thanks Meter 41
Posts: 39
Join Date: May 2012
how should i change the .line xxx so that it wont effect the whole file and does these lines effect the whole smali ? and i'm trying to use this guide to mod the htc explorer 2.3.5 stock rom.Does this work for this rom?

And will this give crt off also? as changing the value in bools.xml of framework-res.apk doesn't work in this rom.
HIT THANKS IF I HELPED.
 
wilfredcool007
Old
#18  
wilfredcool007's Avatar
Recognized Contributor - OP
Thanks Meter 1304
Posts: 435
Join Date: Aug 2011
Location: Chennai

 
DONATE TO ME
Quote:
Originally Posted by pchandra View Post
how should i change the .line xxx so that it wont effect the whole file and does these lines effect the whole smali ? and i'm trying to use this guide to mod the htc explorer 2.3.5 stock rom.Does this work for this rom?

And will this give crt off also? as changing the value in bools.xml of framework-res.apk doesn't work in this rom.
i dnt think tats gonna be a Problem.... if any problem exists make sure the line numbers r in ascending order.... :P

also.... ur android.policy and framework has to been patched already to get the CRT OFF workin... cause its already been patched to samsung ROM's

Sent from my GT-S5670 using XDA
Dont just say ,Press it

Try not to become a man of success...but a man of value




______________________________________________

Phone : Samsung Galaxy Fit ( S5670 )
Kernel version : 2.6.35.7
Baseband version : S5670DXKT7
ROM : Hyper_Droid_v3
The Following 2 Users Say Thank You to wilfredcool007 For This Useful Post: [ Click to Expand ]
 
pchandra
Old
#19  
pchandra's Avatar
Member
Thanks Meter 41
Posts: 39
Join Date: May 2012
Quote:
Originally Posted by wilfredcool007 View Post
i dnt think tats gonna be a Problem.... if any problem exists make sure the line numbers r in ascending order.... :P

also.... ur android.policy and framework has to been patched already to get the CRT OFF workin... cause its already been patched to samsung ROM's

Sent from my GT-S5670 using XDA
so these lines added to the services.jar trigger both the off and on animation?
HIT THANKS IF I HELPED.
The Following User Says Thank You to pchandra For This Useful Post: [ Click to Expand ]
 
wilfredcool007
Old
#20  
wilfredcool007's Avatar
Recognized Contributor - OP
Thanks Meter 1304
Posts: 435
Join Date: Aug 2011
Location: Chennai

 
DONATE TO ME
Quote:
Originally Posted by pchandra View Post
so these lines added to the services.jar trigger both the off and on animation?
Nop.. they only add an additional codec to enable CRT ON... But if u hav a deeper study at your file u would notice even how to enable CRT OFF ( If it isnt present in your ROM's source :P )
Dont just say ,Press it

Try not to become a man of success...but a man of value




______________________________________________

Phone : Samsung Galaxy Fit ( S5670 )
Kernel version : 2.6.35.7
Baseband version : S5670DXKT7
ROM : Hyper_Droid_v3

The Following 2 Users Say Thank You to wilfredcool007 For This Useful Post: [ Click to Expand ]
Tags
crt animation, crt on, screen on animation
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes