Yuk Ngeblog, berbagi pengetahuan itu ngga rugi Kok! malah dapat pahala:)
ini adalah contoh systemUI yang belum ada reboot recovery nya https://www.box.com/s/dfdu4n53h65inhposg5kcara compile dan decompile bisa dilihat dari tutorial mastah zdune disini http://www.facebook.com/groups/XRay.Indonesia/doc/444413798929864/
untuk aplikasi decompile-compilenya udah ane mirror disini https://www.box.com/s/03mq50puyfr4fhgfo874 (karena di site aslinya kemarin ga bisa dibuka alias error)
setelah decompile
cari arrays.xml di AndroidAppsEditor\Applications\Temp\SystemUI.apk-Decompiled\res\values\
buka pakai notepad++ dan tambahi yang di bold
http://tinypaste.net/PSSkB3qU
@string/reboot @string/reboot_recovery now recovery
2. cari RebootButton$2.smali di AndroidAppsEditor\Applications\Temp\SystemUI.apk-Decompiled\smali\com\lidroid\systemui\quickpanel
buka pakai notepad++ dan tambahi yang di bold
http://tinypaste.net/kUJaTlMB
.class Lcom/lidroid/systemui/quickpanel/RebootButton$2; .super Ljava/lang/Object; .source "RebootButton.java" # interfaces .implements Landroid/content/DialogInterface$OnClickListener; # annotations .annotation system Ldalvik/annotation/EnclosingMethod; value = Lcom/lidroid/systemui/quickpanel/RebootButton;->reboot()V .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x0 name = null .end annotation # instance fields .field final synthetic this$0:Lcom/lidroid/systemui/quickpanel/RebootButton; .field final synthetic val$context:Landroid/content/Context; # direct methods .method constructor (Lcom/lidroid/systemui/quickpanel/RebootButton;Landroid/content/Context;)V .locals 0 .parameter .parameter .prologue .line 40 iput-object p1, p0, Lcom/lidroid/systemui/quickpanel/RebootButton$2;->this$0:Lcom/lidroid/systemui/quickpanel/RebootButton; iput-object p2, p0, Lcom/lidroid/systemui/quickpanel/RebootButton$2;->val$context:Landroid/content/Context; invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method
.method private rebootRecovery(Ljava/lang/String;)V .locals 2 .parameter "stringParam" .prologue .line 92 const-string v1, "recovery" invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_0 .line 96 :try_start_0 new-instance v0, Ljava/io/File; const-string v1, "/cache/recovery/boot" invoke-direct {v0, v1}, Ljava/io/File;->(Ljava/lang/String;)V .line 97 .local v0, bootFile:Ljava/io/File; invoke-virtual {v0}, Ljava/io/File;->exists()Z move-result v1 if-nez v1, :cond_0 .line 99 invoke-virtual {v0}, Ljava/io/File;->createNewFile()Z :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 .line 109 .end local v0 #bootFile:Ljava/io/File; :cond_0 :goto_0 return-void .line 105 :catch_0 move-exception v1 goto :goto_0 .end method
# virtual methods .method public onClick(Landroid/content/DialogInterface;I)V .locals 3 .parameter "dialog" .parameter "which" .prologue .line 42 iget-object v1, p0, Lcom/lidroid/systemui/quickpanel/RebootButton$2;->val$context:Landroid/content/Context; const-string v2, "power" invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/os/PowerManager; .line 43 .local v0, pm:Landroid/os/PowerManager; iget-object v1, p0, Lcom/lidroid/systemui/quickpanel/RebootButton$2;->this$0:Lcom/lidroid/systemui/quickpanel/RebootButton; #getter for: Lcom/lidroid/systemui/quickpanel/RebootButton;->action:Ljava/lang/String; invoke-static {v1}, Lcom/lidroid/systemui/quickpanel/RebootButton;->access$000(Lcom/lidroid/systemui/quickpanel/RebootButton;)Ljava/lang/String; move-result-object v1 invoke-direct {p0, v1}, Lcom/lidroid/systemui/quickpanel/RebootButton$2;->rebootRecovery(Ljava/lang/String;)V invoke-virtual {v0, v1}, Landroid/os/PowerManager;->reboot(Ljava/lang/String;)V .line 44 return-void .end method
3. cari RebootButton$1.smali masih di AndroidAppsEditor\Applications\Temp\SystemUI.apk-Decompiled\smali\com\lidroid\systemui\quickpanel
cari dan ganti yang di bold
http://tinypaste.net/jEC0i5pF
# virtual methods .method public onClick(Landroid/content/DialogInterface;I)V .locals 3 .parameter "dialog" .parameter "which" .prologue .line 35 iget-object v1, p0, Lcom/lidroid/systemui/quickpanel/RebootButton$1;->val$context:Landroid/content/Context; invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object v1 const v2, 0x7f0f0005
Sumber :