Post Reply

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

OP wilfredcool007

7th March 2012, 11:15 AM   |  #11  
Member
Flag Mumbai
Thanks Meter: 50
 
77 posts
Join Date:Joined: Sep 2011
More
Thumbs up
Quote:
Originally Posted by vishwanathptl

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
7th March 2012, 11:39 AM   |  #12  
Aspire's Avatar
Senior Member
Flag Vancouver
Thanks Meter: 345
 
1,042 posts
Join Date:Joined: Dec 2011
Donate to Me
More
I think
Andro id had crt animation by default

Sent from my GT-S5670 using XDA
8th March 2012, 04:24 AM   |  #13  
Member
Flag Mumbai
Thanks Meter: 50
 
77 posts
Join Date:Joined: Sep 2011
More
Quote:
Originally Posted by Aspire

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
7th April 2012, 12:11 AM   |  #14  
Senior Member
Thanks Meter: 29
 
275 posts
Join Date:Joined: Sep 2010
How I can speed up this animation? Where is line responsible for animation runtime?
19th May 2012, 02:33 PM   |  #15  
bindassdost's Avatar
Senior Member
Flag delhi
Thanks Meter: 1,081
 
377 posts
Join Date:Joined: Jul 2011
More
Quote:
Originally Posted by wilfredcool007

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
Last edited by bindassdost; 21st May 2012 at 05:49 AM.
19th May 2012, 02:53 PM   |  #16  
wilfredcool007's Avatar
OP Recognized Contributor
Flag Chennai
Thanks Meter: 1,315
 
438 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Smile
Quote:
Originally Posted by bindassdost

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
The Following 2 Users Say Thank You to wilfredcool007 For This Useful Post: [ View ]
20th June 2012, 02:30 PM   |  #17  
pchandra's Avatar
Member
Thanks Meter: 41
 
39 posts
Join Date:Joined: May 2012
More
Question
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.
20th June 2012, 02:35 PM   |  #18  
wilfredcool007's Avatar
OP Recognized Contributor
Flag Chennai
Thanks Meter: 1,315
 
438 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Quote:
Originally Posted by pchandra

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
The Following 2 Users Say Thank You to wilfredcool007 For This Useful Post: [ View ]
20th June 2012, 02:39 PM   |  #19  
pchandra's Avatar
Member
Thanks Meter: 41
 
39 posts
Join Date:Joined: May 2012
More
Quote:
Originally Posted by wilfredcool007

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?
The Following User Says Thank You to pchandra For This Useful Post: [ View ]
20th June 2012, 02:52 PM   |  #20  
wilfredcool007's Avatar
OP Recognized Contributor
Flag Chennai
Thanks Meter: 1,315
 
438 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Wink
Quote:
Originally Posted by pchandra

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 )

The Following 2 Users Say Thank You to wilfredcool007 For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
crt animation, crt on, screen on animation
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes