[Galaxy S6 General] edzamber:
No.

You have to modify all .methods as in guide but only add ScreenRecorder parts (don't add Screenshot parts)

So its like this :

open services.jar/com/android/server/policy/GlobalActions.smali

search this line

.field private static final GLOBAL_ACTION_KEY_RESTART:Ljava/lang/String; = "restart"

after it add this

.field private static final GLOBAL_ACTION_KEY_SCREENREC:Ljava/lang/String; = "screenrec"

now search for it:

field private mRingerModeReceiver:Landroid/content/BroadcastReceiver;

add this line after it

.field mScreenRec:Lcom/android/server/policy/GlobalActions$SinglePressAction;

.field private mScreenshot:Lcom/android/server/policy/GlobalActions$SinglePressAction;

search for this method :

.method static synthetic access$5000()Z

add this method after method of synthetic access$5000()Z

.method static synthetic access$5001(Lcom/android/server/policy/GlobalActions;)V
.registers 1

invoke-direct {p0}, Lcom/android/server/policy/GlobalActions;->toggleScreenRecord()V

return-void
.end method

Search for this method

.method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;

And add this blue lines on method and change red lines to your public id:

....
.....
.....

[COLOR=blue] new-instance v4, Lcom/android/server/policy/GlobalActions$98;[/COLOR]

[COLOR=red] const v5, 0x1080bb3[/COLOR] # <public type="drawable" name="tw_ic_lock_screenrec" id="0x01080bb3" />

[COLOR=red]const v6, 0x1040c75[/COLOR] # <public type="string" name="screenrec" id="0x01040c75" />

[COLOR=blue]move-object/from16 v0, p0

invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$98;-><init>(Lcom/android/server/policy/GlobalActions;II)V

move-object/from16 v0, p0

iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mScreenRec:Lcom/android/server/policy/GlobalActions$SinglePressAction;

new-instance v4, Ljava/util/ArrayList;

invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V[/COLOR]

ok now add this blue lines too.

[COLOR=blue]invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z

const/16 v4, 0x100

invoke-direct/range {p0 .. p0}, Lcom/android/server/policy/GlobalActions;->getBugReportAction()Lcom/android/server/policy/GlobalActions$Action;

move-result-object v5

move-object/from16 v0, p0

iget-object v6, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

const/4 v7, 0x1

move-object/from16 v0, p0

invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions
$Action;Ljava/util/ArrayList;Z)Z

const/16 v4, 0x400

move-object/from16 v0, p0

iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mScreenRec:Lcom/android/server/policy/GlobalActions$SinglePressAction;

move-object/from16 v0, p0

iget-object v6, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

const/4 v7, 0x1

move-object/from16 v0, p0

invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions
$Action;Ljava/util/ArrayList;Z)Z [/COLOR]

const-string v4, "content://com.sec.knox.provider2/KnoxCustomManagerService1"

const-string/jumbo v5, "getSealedPowerDialogOptionMode"

move-object/from16 v0, p0

invoke-direct {v0, v4, v5}, Lcom/android/server/policy/GlobalActions;->isIntEDM(Ljava/lang/String;Ljava/lang/String;)I

Now add this blue lines too but read careffully and remember red line will be different for you and change red line for your line...

[COLOR=blue]

:cond_2cc
const-string/jumbo v4, "emergencymode"

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

move-result v4

if-eqz v4, :cond_2e2 # change it to :cond_316

move-object/from16 v0, p0

iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

move-object/from16 v0, p0

iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;

invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]

[COLOR=red] goto/16 :goto_241 [/COLOR]

[COLOR=blue][COLOR=red]#Change to your line! [/COLOR] [/COLOR]

# It will be different for you on s6edge it was goto/16 :goto_6 on note 5 goto/16 :goto_7 so just change all red lines to your ...

[COLOR=blue]if-eqz v4, :cond_316

move-object/from16 v0, p0

iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

move-object/from16 v0, p0

iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mScreenshot:Lcom/android/server/policy/GlobalActions$SinglePressAction;

invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]

[COLOR=red]goto :goto_241 [/COLOR] #Change to your line!

[COLOR=blue]:cond_316
const-string/jumbo v4, "screenrec"

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

move-result v4

if-eqz v4, :cond_317

move-object/from16 v0, p0

iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;

move-object/from16 v0, p0

iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mScreenRec:Lcom/android/server/policy/GlobalActions$SinglePressAction;

invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]

[COLOR=red]goto :goto_241 [/COLOR]#change it to your line.

[COLOR=red]:cond_2e2 [/COLOR] # change it to :cond_317
const-string/jumbo v4, "silent"

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

Note: if u can't find this lines

:cond_2cc

const-string/jumbo v4, "emergencymode" then search for :cond_13

const-string/jumbo v4, "emergencymode" i am sure all experienced users will find it for sure.

Add this method to the end of smali file

.method private toggleScreenRecord()V
.registers 3

new-instance v0, Landroid/content/Intent;

const-string v1, "com.cyngn.ACTION_START_SCREENCAST"

invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

iget-object v1, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

const-string v2, "android.permission.CAPTURE_SECURE_VIDEO_OUTPUT"

invoke-virtual {v1, v0, v2}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;Ljava/lang/String;)V

return-void
.end method