[G2 Themes and Apps] pendroz:
3 Way Reboot Option Guide

All information, follow these instructions !

Why do you need ?

* Reboot : Normal Reboot

* Hot Boot : Closes every service and app and does a quick reboot = you don't see the LG reboot logo = it jumps straight to the bootanimation = this is very fast reboot.

* Recovery : Reboot into recovery mode.

Required tools

* Java

* SDK

* Notepad ++ ( Or another application )

* Deodexed Framework

* Winrar or 7Zip or Winzip

* Baksmali/Smali Manager

* Download the "Required files"

* Extract the "android.policy.jar" from your rom /system/framework/

PART 1

* Put the "\classout\com\android\internal\policy\impl\" into the extracted "Required files" folder.

* Open GlobalActions.smali with notepad++ and change the following lines after that close and save the changes.

- Required line

1125 .line 339
1126 iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
1127
1128 new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$3;
1129
1130 const v2, 0x202042c
1131
1132 const v3, 0x20b0013
1133
1134 invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
1135
1136 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

- New Line

1125 .line 339
1126 iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
1127
1128 new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
1129
1130 const v2, 0x202042c
1131
1132 const v3, 0x20b0013
1133
1134 invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
1135
1136 invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

PART 2

* Navigate to ....\classout\com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali

* Open GlobalActions$SinglePressAction.smaliwith notepad++ and add the following lines after that close and save the changes.

- Lines to add before line "# instance fields"

# static fields
.field protected static rebootMode:I

.field protected static final rebootOptions:[Ljava/lang/String;

-Lines to add after line "# direct methods"

.method static constructor <clinit>()V
.registers 3

const/4 v0, 0x3

new-array v0, v0, [Ljava/lang/String;

const/4 v1, 0x0

const-string v2, "Reboot"

aput-object v2, v0, v1

const/4 v1, 0x1

const-string v2, "Hot Boot"

aput-object v2, v0, v1

const/4 v1, 0x2

const-string v2, "Recovery"

aput-object v2, v0, v1

sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;

return-void
.end method

PART 3

Trick

* Open GlobalActions$99.smali with notepad++ and add the following lines after that close and save the changes.

Org line

const-string v2, "Restart Method"

Modified line

const-string v2, "Own Rom Name"

* Compile clasess.dex file ( Baksmali/Smali Tool )

* Open your "android.policy.jar" with winrar and drag the new "classes.dex" file into the "android.policy.jar"and replace the original "classes.dex".

* You can do this with a File explorer ( With root permissions or before you build your rom. )

Thanks [MENTION=3076446]kahvitahra[/MENTION] and [MENTION=3986004]civato[/MENTION] and [MENTION=2839458]_JKay_[/MENTION] and [MENTION=2941286]xdabbeb[/MENTION] original guide and Required files