Quantcast
Channel: xda-developers - Android Themes
Viewing all articles
Browse latest Browse all 4090

[guide][kk][aosp] replace progress dialog to pacbusydialog

$
0
0
PICTURE WILL EXPLAIN ALL THIS GUIDE :D



REQUIREMENTS:
1. FRAMEWORK-RES.APK
2. ANDROID.POLICY.JAR
3. FRAMEWORK.JAR
4. DOWNLOAD ATTACHMENT FILE

STEP 1: FRAMEWORK-RES.APK
1. decompile your framework-res.apk
2. download attachment file , exstract it and merge to your decompiled folder
3. open values/ids.xml and add this line below

Code:

<item type="id" name="busy_dlg_animation">false</item>
    <item type="id" name="busy_dlg_title">false</item>

4. save and recompile your framework-res.apk
5. decompile the newly recompiled framework-res.apk and go to values/public.xml. open it and leave it, but keep it open (we need this later)



STEP 2: FRAMEWORK.JAR
1. decompile your framework.jar
2. download attachment, exstract it and merge to your decompiled folder
3. open BusyDialog.smali file
4. search for this and change it with the IDS you got earlier

Code:

0x103006f -> <public type="style" name="Theme.Holo.Dialog" id="0xxxxxxxxx" />
0x10900cb -> <public type="layout" name="busy_dlg" id="0xxxxxxxxx" />
0x1020395 -> <public type="id" name="busy_dlg_title" id="0xxxxxxxxx" />
0x1020394 -> <public type="id" name="busy_dlg_animation" id="0xxxxxxxxx" />

5. save it and compile



STEP 3: ANDROID.POLICY.JAR
1. decompile your android.policy.jar
2. download attachment, exstract it and merge to your decompiled folder
3. open PhoneWindowManager.smali
4. delete the red line and replace with the blue

Code:

# instance fields
.
.
.
.field mBootMsgDialog:Landroid/app/ProgressDialog;
.field mBootMsgDialog:Landroid/app/BusyDialog;

5. search again for mBootMsgDialog and replace

Code:

mBootMsgDialog:Landroid/app/ProgressDialog;

with

mBootMsgDialog:Landroid/app/BusyDialog;

6. find this method .method public showBootMessage(Ljava/lang/CharSequence;Z)V and replace all inside the method with

Code:

.method public showBootMessage(Ljava/lang/CharSequence;Z)V
    .registers 5
    .parameter "msg"
    .parameter "always"

    .prologue
    .line 6033
    iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHeadless:Z

    if-eqz v0, :cond_5

    .line 6071
    :goto_4
    return-void

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

    new-instance v1, Lcom/android/internal/policy/impl/PhoneWindowManager$68;

    invoke-direct {v1, p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager$68;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;Ljava/lang/CharSequence;Z)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_4
.end method

7. find again .method public hideBootMessages()V and replace the method with

Code:

.method public hideBootMessages()V
    .registers 3

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

    new-instance v1, Lcom/android/internal/policy/impl/PhoneWindowManager$69;

    invoke-direct {v1, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$69;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 6083
    return-void
.end method

8. find the red line and add the blue code

Code:

.method public setRotationLw(I)V
.
.
.
.end method


.method public setPackageName(Ljava/lang/String;)V
    .registers 2
    .parameter "pkgName"

    .prologue
    .line 6018
    if-nez p1, :cond_4

    .line 6019
    const-string p1, "dasar.kamu.jomblo.tukang.copy.paste"

    .line 6021
    :cond_4
    sput-object p1, Lcom/android/internal/policy/impl/PhoneWindowManager;->currentPackageName:Ljava/lang/String;

    .line 6022
    return-void
.end method

9. open PhoneWindowManager$68.smali, search for this and change it with the IDS you got in your own public.xml

Code:

<public type="string" name="android_upgrading_starting_apps" id="0x1040412" />
    <public type="string" name="android_upgrading_title" id="0x1040410" />
    <public type="style" name="Theme.Translucent.NoTitleBar" id="0x1030010" />

10. save all and then compile
11. all steps are done. and then flash all the file ;)



NB:
1. ALWAYS DO NANDROID BACKUP BEFORE MOD YOUR OWN ROM
2. BACKUP BACKUP BACKUP!!!!
3. IF YOU HAVE AN ERROR, PLEASE ATTACH THE LOG FILE
4. THIS IS SHOULD BE WORK ON ALL KITKAT ROM WITH AOSP BASED ROM (MTK/CM/ETC)

CREDIT:
PAC-Man ROM

Attached Files
File Type: rar BusyDialog.rar - [Click for QR Code] (41.3 KB)

Viewing all articles
Browse latest Browse all 4090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>