Proper CRT off animation GUIDE for Galaxy SIII and Moded file MIUI V5_4.1.17 Updated


Aw haha that's okay, it's not a must :) happy you have done it already so much times.
Take your time and enjoy the holidays and a happy new year!
Greetings from The Netherlands...
 
  • Like
Reactions: maxniper
Aw haha that's okay, it's not a must :) happy you have done it already so much times.
Take your time and enjoy the holidays and a happy new year!
Greetings from The Netherlands...
finded a PC wow, last upload before New Year ;)
Happy new year!
MIUI V5_3.12.27 Updated
 
To make CRT-OFF working, you need to decompile services.jar.
in file com\android\server\PowerManagerService$ScreenBrightnessAnimator.smalifind following code and modify it according to red colored part:
.line 2906

.end local v0 #delta:I

:cond_1

:goto_1

iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;

#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;

invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;

move-result-object v7

if-eqz p2, :cond_2xx

const/16 v9, 0xb

const/4 v10, 0x0

const v2, 0x10

invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;

move-result-object v9

invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_2xx

const/16 v9, 0xa


invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V


Here is workaround part.
decompile android.policy.jar.
in file com\android\internal\policy\impl\PhoneWindowManager.smali
Find following parts (black is original code) and modify according to red text:

Code:

.class public Lcom/android/internal/policy/impl/PhoneWindowManager;

.super Ljava/lang/Object;

.source "PhoneWindowManager.java"


# interfaces
.implements Landroid/view/WindowManagerPolicy;
.implements Ljava/lang/Runnable;

# annotations



Code:

.line 5411
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_1
:goto_2
and-int/lit8 v0, v19, 0x4

if-eqz v0, :cond_2xx

and-int/lit8 v19, v19, -0x5

move-object/from16 v0, p0

invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V

:cond_2xx

return v19



at the end of file add following code:

Code:

.method public sleepDelay()V
.locals 10

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;

const-wide v2, 0x64

check-cast p0, Ljava/lang/Runnable;

invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

return-void
.end method

.method public run()V
.locals 10

.prologue

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

const-string v1, "power"

invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/os/PowerManager;

invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

move-result-wide v2

const-wide/16 v6, 0x3e8

add-long/2addr v2, v6

invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V

return-void

.end method
 
  • Like
Reactions: SuperLoP and sonyz7
hi man, could you plez try and make for htc one miuiv5 , iv uploaded the files thankz, edit i managed to decompile services jar but could not not find screen brightness animator, maybe htc doit different
 

Attachments

  • miui.zip
    1.8 MB · Views: 248
Last edited: