[Galaxy Grand 2 Android Development] maxx35000:
@balliboxer ,

maybe i can help you on one thing if you whant to add emergency to power menu like this

decompil android.policy.jar

edit GlobalActions$4.smali

find this code

.method public showConditional()Z
.locals 5

.prologue
const/4 v2, 0x1

const/4 v1, 0x0

.line 759
const-string v3, "KOR"

const-string v4, ""

invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v3

if-eqz v3, :cond_1

.line 760
const-string v3, "ril.domesticOtaStart"

invoke-static {v3}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String;

move-result-object v0

.line 761
.local v0, "domesticOtaStart":Ljava/lang/String;
const-string v3, "true"

invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v3

if-eqz v3, :cond_1

.line 762
sget-boolean v2, Lcom/android/internal/policy/impl/GlobalActions;->SAFE_DEBUG:Z

if-eqz v2, :cond_0

.line 763
const-string v2, "GlobalActions"

const-string v3, "EmergencyMode is disable on OTA mode"

invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

.line 791
.end local v0 # "domesticOtaStart":Ljava/lang/String;
:cond_0
:goto_0
return v1

.line 769
:cond_1
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mStrCSCFeatureGlobalActionItems:Ljava/lang/String;
invoke-static {}, Lcom/android/internal/policy/impl/GlobalActions;->access$800()Ljava/lang/String;

move-result-object v3

const-string v4, "Emergency"

invoke-virtual {v3, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

move-result v3

if-ne v3, v2, :cond_2

move v1, v2

.line 771
goto :goto_0

.line 772
:cond_2
# getter for: Lcom/android/internal/policy/impl/GlobalActions;->mStrCSCFeatureGlobalActionItems:Ljava/lang/String;
invoke-static {}, Lcom/android/internal/policy/impl/GlobalActions;->access$800()Ljava/lang/String;

move-result-object v3

const-string v4, ""

invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v3

if-ne v3, v2, :cond_0

goto :goto_0
.end method

and replace all by this

.method public showConditional()Z
.locals 5

.prologue
const/4 v0, 0x1

return v0
.end method

also have to remove data network mode

edit GlobalActions$2.smali

.method public showConditional()Z
.locals 7

.prologue
const/4 v2, 0x[COLOR="Red"]1[/COLOR]

const/4 v3, 0x[COLOR="Red"]0[/COLOR]

replace with

.method public showConditional()Z
.locals 7

.prologue
const/4 v2, 0x[COLOR="Lime"]0[/COLOR]

const/4 v3, 0x[COLOR="Lime"]1[/COLOR]

recompil androidpolicy.jar and flash it to your rom

i see on this picture wrong title on emegency mode easy to change it to correct title

decompil EmergencyModeService.apk

edit EmergencyChoiceDialog.smali

find this

.method public updateView()V
.locals 4

.prologue
.line 133
iget-object v2, p0, Lcom/sec/android/emergencymode/dialog/EmergencyChoiceDialog;->mContext:Landroid/content/Context;

invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v2

const v3, 0x[COLOR="Red"]1040910[/COLOR]

to find the right value open public.xml in framwork.res and find

<public type="string" name="global_actions_toggle_longlife_mode" id="0x0[COLOR="Lime"]1040ade[/COLOR]" />

so change value to

[CODE].method public updateView()V
.locals 4

.prologue
.line 133
iget-object v2, p0, Lcom/sec/android/emergencymode/dialog/EmergencyChoiceDialog;->mContext:Landroid/content/Context;

invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v2

const v3, 0x[COLOR="Lime"]1040ade[/COLOR]

edit EmergencyConfirmDialog.smali

.line 41
const/4 v0, 0x0

invoke-virtual {p0, v0}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

.line 42
if-eqz p2, :cond_0

const v0, 0x[COLOR="Red"]1040911[/COLOR]

same way in framework.res public.xml

find

<public type="string" name="global_actions_toggle_longlife_mode_enable" id="0x0[COLOR="Lime"]1040adf[/COLOR]" />

.line 41
const/4 v0, 0x0

invoke-virtual {p0, v0}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

.line 42
if-eqz p2, :cond_0

const v0, 0x[COLOR="Lime"]1040adf[/COLOR]

in the same file

.line 49
return-void

.line 42
:cond_0
const v0, 0x[COLOR="Red"]1040912[/COLOR]

goto :goto_0
.end method

public.xml

<public type="string" name="global_actions_toggle_longlife_mode_disable" id="0x0[COLOR="Lime"]1040ae0[/COLOR]" />

.line 49
return-void

.line 42
:cond_0
const v0, 0x[COLOR="Lime"]1040ae0[/COLOR]

goto :goto_0
.end method

and the last

same file again

.line 65
:goto_0
iget-object v1, p0, Lcom/sec/android/emergencymode/dialog/EmergencyConfirmDialog;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v1

const v2, 0x[COLOR="Red"]1110012[/COLOR]

public.xml

<public type="bool" name="config_sf_slowBlur" id="0x01110011" />

.line 65
:goto_0
iget-object v1, p0, Lcom/sec/android/emergencymode/dialog/EmergencyConfirmDialog;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v1

const v2, 0x[COLOR="Lime"]1110011[/COLOR]

i made a flashable package with this also add fix for weather on lockscreen be carrefull i didn't tried it cause i have not this rom make backup before flashing

View attachment 3293677

if someone can tell me if it work :fingers-crossed:

hope that will be hellpfull :fingers-crossed: