-
Notifications
You must be signed in to change notification settings - Fork 68
/
root-stick.cmd
4339 lines (3376 loc) · 114 KB
/
root-stick.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@echo off
:reset
title Amazon FireStick Multi Rooting Downgrade and Hacking Script [esc0rtd3w]
mode con lines=47
color 0e
set pathBin="%~dp0bin"
set pathScripts="%~dp0scripts"
set pathScriptsConfig="%~dp0config\scripts"
set tempHost=%temp%
:: Config Menu UI
set configMain="%~dp0config\menu.ini"
set iniRead="%pathScriptsConfig%\ini-read.cmd"
set iniWrite="%pathScriptsConfig%\ini-write.cmd"
:: App EXE Paths
set _color="%~dp0bin\cocolor.exe"
set sleep="%~dp0bin\wait.exe"
set msgbox="%~dp0bin\msgbox.exe"
set extractRAR="%~dp0bin\rar.exe" -y x
set teamviewer="%~dp0bin\teamviewer.exe"
set virtualRouterCMD="%~dp0bin\virtualrouter.exe"
set virtualRouterGUI="%~dp0bin\virtualrouter-gui.exe"
set kingrootAPK="%~dp0rooting\montoya\king\kingroot.apk"
set kingrootAPKAlt1="%~dp0rooting\montoya\king\kingroot-alt1.apk"
set kingrootAPKAlt2="%~dp0rooting\montoya\king\kingroot-alt2.apk"
set kingrootPC="%~dp0rooting\montoya\king\kingroot-pc.exe"
set kingrootPCAlt1="%~dp0rooting\montoya\king\kingroot-alt1.exe"
set kingrootPCAlt2="%~dp0rooting\montoya\king\kingroot-alt2.exe"
:: Screencap Paths
set capDevice=/sdcard/cap.png
set capHost="%temp%\cap.png"
:: ADB Main Commands
set adb="%~dp0bin\adb.exe"
set adbKill=%adb% kill-server
set adbStart="%adb% start-server
set adbWait=%adb% wait-for-device
:: ADB Common Commands
set install=%adb% install
set installOverwrite=%adb% install -r -t -d
set uninstall=%adb% uninstall
set push=%adb% push
set pull=%adb% pull
set shell=%adb% shell
set adbwait=%adb% wait-for-device
set kill=%shell% am kill
:: Must use double quotes after process/package for Super Kill
set killSuper=%shell% "su -c am kill
:: Must use double quotes after process/package for Super Kill
set rmSuper=%shell% "su -c rm
:: ADB Touch/Mouse/Keyboard Actions
set tap=%adb% shell input tap
set swipe=%shell% input swipe
set key=%shell% input keyevent
set swipeUp=%shell% input swipe 200 900 200 300
set keyEnter=%shell% input keyevent 66
set keyOk=%shell% input keyevent 23
set keyTab=%shell% input keyevent 61
set keyArrowUp=%shell% input keyevent 19
set keyArrowDown=%shell% input keyevent 20
set keyArrowLeft=%shell% input keyevent 21
set keyArrowRight=%shell% input keyevent 22
set keyBack=%shell% input keyevent 3
set keyHome=%shell% input keyevent 4
:: Android Common Commands
set amStart=%shell% am start -a android.intent.action.MAIN -n
set amStartRoot=%shell% su -c am start -a android.intent.action.MAIN -n
set amStartView=%shell% am start -a android.intent.action.VIEW -n
set amStartViewRoot=%shell% su -c am start -a android.intent.action.VIEW -n
set mountRW=%shell% "su -c mount -o rw,remount /system"
set mountRO=%shell% "su -c mount -o ro,remount /system"
set mountRW_TWRP=%shell% "mount -o rw,remount /system"
set mountRO_TWRP=%shell% "mount -o ro,remount /system"
set mountRW_TWRP_tank=%shell% "mount -o rw /system"
set mountRO_TWRP_tank=%shell% "mount -o ro /system"
:: CMD Shell Commands
set runShellNoTerminateAndWait=cmd /k
set runShellNoTerminate=start cmd /k
set runShellWaitNoTerminate=start /wait cmd /k
set runShellTerminateAndWait=cmd /c
set runShellTerminate=start cmd /c
set runShellWaitTerminate=start /wait cmd /c
:: Common Scripts
set checkRoot=call "%~dp0scripts\misc\check-root.cmd"
:: Android Paths
set sdcard=sdcard
::set sdcard=external_sd
::set sdcard=extSdCard
set bootAnimationPath=%~dp0custom\bootanimation
set buildDotProp=/system/build.prop
:: Common Amazon Variables
set fireOsVersion=0.0.0.0
set fireOsDevice=none
:: Flags
set bloatAction=disable
set twrpActive=0
set doNothing=0
set choice=2
set waitTime=5
set ssViewer=0
set doBlockAdsWithMenuOption=0
set doAcceptSuAfterRequest=0
set appName=0
set rebootAfterClearCache=0
set rebootAfterBloatRemovalChoice=0
set dgNoRoot=0
set checkKitKat=0
set rootable=0
set rootableText=NOT EXPLOITABLE
set firstCheck=0
set firstTimeRootAttempt=1
set rooted=0
set rootFromDG=1
set factoryReset=0
set cleanEntireSdCard=0
set doLaunchTWRPInstaller=1
set busyboxScriptInstall=0
set fullAutoMode=0
set fullAutoModeDG=0
set doFullAutoMode=0
set rootAfterInstall=0
set superSuReinstall=0
set installFireStopperSetting=0
set installTerminalSetting=0
set rebootAfterBloatRemoval=0
set restoreAmazonFiles=0
set adbServerAction=0
set checkFireOsInfoText=0
set unhideAllOTA=0
:: Amazon APK Patching Flags
set patchAllSystemAPKs=0
set patchPhotosAPK=0
set patchSettingsAPK=0
:: File Commands (Unix-Like)
set cp=xcopy /e /y
set cp2=xcopy /y
set cp3=xcopy /e /y /h /d /c /r /i
set cp4=xcopy /e /y /h /d /c /r /i /s
set copy=copy /y
set copyNoClobber=copy
set del=del /f /q
set rm=del /f /q
set rmsubNoForce=del /s /q
set rmsub=del /f /s /q
set rmdir=rd /s /q
set mkdir=md
set kill=taskkill /f /im
:: Common Amazon Commands (Montoya 5.2.1.1 and lower)
:: Settings -> Main
set showSettingsMain=%amStart% com.amazon.tv.launcher/.ui.SettingsActivity
set showSettingsMainNew=%amStart% com.amazon.device.settings/.SettingsProvider
:: Settings -> Display & Sounds
set showSettingsDisplay=%amStart% com.amazon.tv.settings/.tv.BuellerDisplayAndSoundsSettingsActivity
:: Settings -> Parental Controls
set showSettingsParental=%amStart% com.amazon.tv.parentalcontrols/.PCONSettingsActivity
:: Settings -> Controllers and Bluetooth Devices
set showSettingsControllers=%amStart% com.amazon.tv.settings/.tv.BuellerControllersSettingsActivity
:: Find Amazon Remote
set showControllersAmazonRemote=%shell% "su -c am start -a android.intent.action.MAIN -n com.amazon.tv.settings/.tv.devices.BuellerRemoteDiscoveryActivity"
:: Find Gamepad
set showControllersFindGamepad=%shell% "su -c am start -a android.intent.action.MAIN -n com.amazon.tv.settings/.tv.devices.BuellerGamepadDiscoveryActivity"
:: Find Bluetooth Device
::set showControllersFindBluetooth=%shell% "su -c am start -a android.intent.action.MAIN -n com.amazon.tv.settings/.tv.devices.BuellerInputDeviceDiscoveryActivity"
set showControllersFindBluetooth=%shell% com.amazon.tv.settings/.tv.devices.BuellerInputDeviceDiscoveryActivity
:: Settings -> Applications
set showSettingsApplications=%amStart% com.amazon.tv.settings/.tv.BuellerApplicationsSettingsActivity
set showSettingsApplicationsManage=%amStart% com.amazon.tv.settings/.tv.AllApplicationsSettingsActivity
:: Settings -> System
::set showSettingsSystemMain=%amStart% android.settings.SETTINGS
set showSettingsSystemMain=%amStart% com.amazon.tv.settings/.tv.BuellerSystemSettingsActivity
set showSettingsSystemDeveloper=%amStart% com.amazon.tv.settings/.tv.BuellerDevelopmentSettingsActivity
set showSettingsSystemFactoryReset=%amStart% com.amazon.tv.settings/.tv.FactoryResetActivity
set showSettingsSystemFactoryResetNew=%amStart% com.amazon.tv.settings/com.amazon.tv.settings.tv.FactoryResetActivity
set showSettingsSystemFactoryReset=%amStart% com.amazon.tv.settings.tv.FactoryResetService.masterClear
::set showSettingsSystemFactoryResetNow=%amStart% com.amazon.tv.settings/.tv.FactoryResetActivity
:: Settings -> System -> Network
set showSettingsSystemNetwork=%amStart% com.amazon.tv.settings/.wifi.BuellerNetworkSettingsActivity
:: Settings -> My Account
set showSettingsMyAccount=%amStart% com.amazon.tv.settings/.tv.BuellerAccountSettingsActivity
:: Misc Invokes
set showDeviceNotifications=%amStart% com.amazon.bueller.notification/com.amazon.bueller.notification.BuellerDeviceService
set deregisterAmazonAccount=%shell% am start -a com.amazon.tv.oobe/.DeregistrationActivity -n com.amazon.tv.oobe/.DeregistrationActivity
:: Misc Activities Found
set clearUserAppData=%amStart% com.amazon.tv.settings/.tv.BuellerClearUserApplicationDataActivity
set showAppFilter=%amStart% com.amazon.tv.settings/.tv.ApplicationsFilterActivity
set scanForWPS=%amStart% com.amazon.tv.settings/.wifi.BuellerWifiWpsSettingsActivity
set showHomeLongPressHUD=%amStart% com.amazon.tv.settings/.hud.HudActivity
set voicePromptOpen=%shell% am start -a com.amazon.intent.action.SEARCH -n com.amazon.vizzini/com.amazon.vizzini.vim.VIMOverlayActivity
set amazonLauncherHome=%shell% am start -a com.amazon.device.intent.category.LAUNCHER_MENU com.amazon.tv.launcher/.ui.HomeActivity
set amazonLauncherDeviceActivity=%shell% am start -a com.amazon.device.settings.action.DEVICE -n com.amazon.tv.settings/.tv.device.DeviceActivity
set launchScreenSaver=%amStart% com.amazon.bueller.photos/com.amazon.bueller.photos.daydream.ScreenSaverService
set appLauncher=%amStart% com.amazon.venezia/.grid.AppsGridLauncherActivity
set removeSuperSU=%uninstall% eu.chainfire.supersu
set firestopperUpdater=%amStart% de.belu.firestopper.tools.FireStarterUpdater
set test1=%shell% am start -a android.content.ContextWrapper.startService -n com.amazon.tv.launcher.Navigator.gotoMenu
set cleanPackages=%shell% "su -c dumpsys package"
set showFireTvRemotePin=%shell% am start -a com.amazon.storm.lightning.tutorial.authentication.SHOW -n com.amazon.storm.lightning.tutorial/.authentication.JpakePinActivity
:: com.amazon.bueller.photos/.activity.ElizaVideoPlaybackActivity
:: com.opera.mini.android/.Browser
::set suRequest=%amStart% com.android.internal.os.RuntimeInit uid 0
::set usbPowerWarning=Window{24f60778 u0 com.amazon.tv.settings/com.amazon.tv.settings.tv.BuellerAboutSettingsActivity
::set amazonLauncherDeviceActivityNew=%shell% am start -a com.amazon.device.settings.action.DEVICE -n com.amazon.tv.launcher/.ui.HomeActivity_vNext
:: android.content.ContextWrapper.startService
:: com.amazon.tv.settings.tv.accounts.AccountHelpers.startOOBEDeregistrationForFactoryReset
:: com.amazon.tv.settings.tv.FactoryResetService.deregisterAccount
:: com.amazon.tv.settings.tv.FactoryResetActivity.factoryReset
::set voicePromptOpen=%amStart% com.amazon.vizzini/.vim.VIMOverlayActivity
::RecoverySystemWrapper.smali
::DeviceSoftwareOTA_blocked\com\amazon\android\os
:: invoke-static {v1, v2}, Landroid/os/RecoverySystem;->installPackage(Landroid/content/Context;Ljava/io/File;)V
::ComradeActionHandler
::const-string v0, "^(com\\.amazon(?!\\.(webapps|rialto\\.cordova\\.webapp)\\.)|amazon|android|king|kingo|kingroot|kinguser|tencent).*"
:: Launch Different Apps
set launchFireStarter=%amStart% de.belu.firestopper/.gui.MainActivity
set launchFirePwnHome=%amStart% com.firepwn.home.montoya/.gui.MainActivity
set launchSuperSU=%amStart% com.koushikdutta.superuser/.MainActivity
set launchAceStream=%amStart% org.acestream/.player.gui.MainActivity
set launchSopCast=%amStart% org.sopcast.android/.SopCast
set launchNetflix=%amStart% com.netflix.mediaclient/.ui.launch.NetflixComLaunchActivity
set launchHulu=%amStart% com.hulu.livingroomplus/.MainActivity
set launchMobdro=%amStart% com.mobdro.android/.DashBoardActivity
set launchKodi=%amStart% org.xbmc.kodi/.Splash
set launchVLC=%amStart% org.videolan.vlc/.gui.tv.MainTvActivity
set launchPopcornTime=%amStart% dp.ws.popcorntime/se.popcorn_time.mobile.ui.MainActivity
set launchMovian=%amStart% com.lonelycoder.mediaplayer/.GLWActivity
set launchOperaMini=%amStart% com.opera.mini.android/.Browser
set launchRootExplorer=%amStart% com.speedsoftware.rootexplorer/.RootExplorer
set launchBusybox=%amStart% stericson.busybox/.Activity.MainActivity
set launchTerminal=%amStart% jackpal.androidterm/.Term
:: ===============5.2.6.3 Tank Settings START===============
:: Actions
set amStartAccessibility=%shell% am start -a com.amazon.device.settings.action.ACCESSIBILITY -n
set amStartApplications=%shell% am start -a com.amazon.device.settings.action.APPLICATIONS -n
set amStartApplicationDev=%shell% am start -a com.amazon.device.settings.action.APPLICATION_DEVELOPMENT_SETTINGS -n
set amStartApplicationsManage=%shell% am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n
set amStartApplicationsSettings=%shell% am start -a com.amazon.device.settings.action.APPLICATION_SETTINGS -n
set amStartControllers=%shell% am start -a com.amazon.device.settings.action.CONTROLLERS -n
set amStartDevice=%shell% am start -a com.amazon.device.settings.action.DEVICE -n
set amStartDiscoverInputDevice=%shell% am start -a com.amazon.device.settings.action.DISCOVER_INPUT_DEVICE -n
set amStartDisplaySounds=%shell% am start -a com.amazon.device.settings.action.DISPLAY_AND_SOUNDS -n
set amStartHelp=%shell% am start -a com.amazon.device.settings.action.HELP -n
set amStartHurley=%shell% am start -a com.amazon.device.settings.action.HURLEY -n
set amStartInputDevices=%shell% am start -a com.amazon.device.settings.action.INPUT_DEVICES -n
set amStartMyAccount=%shell% am start -a com.amazon.device.settings.action.MY_ACCOUNT -n
set amStartNetwork=%shell% am start -a com.amazon.device.settings.action.ADD_NETWORK -n
set amStartNotificationSetting=%shell% am start -a com.amazon.device.settings.action.NOTIFICATION_SETTING -n
set amStartPreferences=%shell% am start -a com.amazon.device.settings.action.PREFERENCES -n
set amStartShowHud=%shell% am start -a com.amazon.device.settings.action.SHOW_HUD -n
set amStartVideoSettings=%shell% am start -a com.amazon.device.settings.action.VIDEO_SETTINGS -n
:: Actions Root
set amStartAccessibilityRoot=%shell% su -c am start -a com.amazon.device.settings.action.ACCESSIBILITY -n
set amStartApplicationsRoot=%shell% su -c am start -a com.amazon.device.settings.action.APPLICATIONS -n
set amStartApplicationDevRoot=%shell% su -c am start -a com.amazon.device.settings.action.APPLICATION_DEVELOPMENT_SETTINGS -n
set amStartApplicationsManageRoot=%shell% su -c am start -a com.amazon.device.settings.action.MANAGE_APPLICATIONS -n
set amStartApplicationsSettingsRoot=%shell% su -c am start -a com.amazon.device.settings.action.APPLICATION_SETTINGS -n
set amStartControllersRoot=%shell% su -c am start -a com.amazon.device.settings.action.CONTROLLERS -n
set amStartDeviceRoot=%shell% su -c am start -a com.amazon.device.settings.action.DEVICE -n
set amStartDiscoverInputDeviceRoot=%shell% su -c am start -a com.amazon.device.settings.action.DISCOVER_INPUT_DEVICE -n
set amStartDisplaySoundsRoot=%shell% su -c am start -a com.amazon.device.settings.action.DISPLAY_AND_SOUNDS -n
set amStartHelpRoot=%shell% su -c am start -a com.amazon.device.settings.action.HELP -n
set amStartHurleyRoot=%shell% su -c am start -a com.amazon.device.settings.action.HURLEY -n
set amStartInputDevicesRoot=%shell% su -c am start -a com.amazon.device.settings.action.INPUT_DEVICES -n
set amStartMyAccountRoot=%shell% su -c am start -a com.amazon.device.settings.action.MY_ACCOUNT -n
set amStartNetworkRoot=%shell% su -c am start -a com.amazon.device.settings.action.ADD_NETWORK -n
set amStartNotificationSettingRoot=%shell% su -c am start -a com.amazon.device.settings.action.NOTIFICATION_SETTING -n
set amStartPreferencesRoot=%shell% su -c am start -a com.amazon.device.settings.action.PREFERENCES -n
set amStartShowHudRoot=%shell% su -c am start -a com.amazon.device.settings.action.SHOW_HUD -n
set amStartVideoSettingsRoot=%shell% su -c am start -a com.amazon.device.settings.action.VIDEO_SETTINGS -n
:: Activities
:: ===============5.2.6.3 Tank Settings START===============
set tankNotifications=%amStart% com.amazon.tv.notificationcenter/com.amazon.tv.notificationcenter.NotificationCenterActivity
set tankNetwork=%amStart% com.amazon.tv.settings/com.amazon.tv.settings.tv.network.NetworkActivity
set tankDisplaySounds=%amStartDisplaySoundsRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.display_sounds.DisplayAndSoundsActivity
set tankApplications=%amStartApplicationsManageRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
set tankControllersBT=%amStart% com.amazon.tv.settings/.tv.controllers_bluetooth_devices.ControllersAndBluetoothActivity
set tankAlexa=%amStart% com.amazon.vizzini/com.amazon.vizzini.setting.AlexaSettingActivity
set tankPreferences=%amStartPreferencesRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.preferences.PreferencesActivity
set tankDevice=%amStartDeviceRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.device.DeviceActivity
set tankAccessibility=%amStartAccessibilityRoot% com.amazon.tv.settings/.tv.accessibility.AccessibilityActivity
set tankHelp=%amStartHelpRoot% com.amazon.tv.csapp/com.amazon.tv.csapp.CSAppActivity
set tankMyAccount=%amStartMyAccountRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.my_account.MyAccountActivity
set tankNotifications5272=%amStart% com.amazon.tv.notificationcenter/.NotificationCenterActivity
set tankNetwork5272=%amStart% com.amazon.tv.settings.v2/.tv.network.NetworkActivity
set tankDisplaySounds5272=%amStartDisplaySoundsRoot% com.amazon.tv.settings.v2/.tv.display_sounds.DisplayAndSoundsActivity
set tankApplications5272=%amStartApplicationsManageRoot% com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
set tankEquipmentControl5272=%amStart% com.amazon.tv.devicecontrolsettings/.screens.main_menu.OzOobeSettingsActivity
set tankControllersBT5272=%amStart% com.amazon.tv.settings.v2/.tv.controllers_bluetooth_devices.ControllersAndBluetoothActivity
set tankAlexa5272=%amStart% com.amazon.vizzini/.setting.AlexaSettingActivity
set tankPreferences5272=%amStartPreferencesRoot% com.amazon.tv.settings.v2/.tv.preferences.PreferencesActivity
set tankDevice5272=%amStartDeviceRoot% com.amazon.tv.settings.v2/.tv.device.DeviceActivity
set tankAccessibility5272=%amStartAccessibilityRoot% com.amazon.tv.settings.v2/.tv.accessibility.AccessibilityActivity
set tankHelp5272=%amStartHelpRoot% com.amazon.tv.csapp/.CSAppActivity
set tankMyAccount5272=%amStartMyAccountRoot% com.amazon.tv.settings.v2/.tv.my_account.MyAccountActivity
:: Notifications
:: act com.amazon.tv.action.NOTIFICATION_CENTER
:: cmp com.amazon.tv.notificationcenter/.NotificationCenterActivity
:: Netowrk
:: act com.amazon.device.settings.action.ADD_NETWORK
:: cmp com.amazon.tv.settings.v2/.tv.network.NetworkActivity
:: Display and Sounds
:: act com.amazon.device.settings.action.DISPLAY_AND_SOUNDS
:: cmp com.amazon.tv.settings.v2/.tv.display_sounds.DisplayAndSoundsActivity
:: Applications Main
:: act com.amazon.device.settings.action.APPLICATIONS
:: cmp com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
:: Applications Manager
:: act com.amazon.device.settings.action.APPLICATIONS
:: cmp com.amazon.tv.settings.v2/.tv.applications.ApplicationsActivity
:: Equipment Control
:: act com.amazon.tv.oobe.settings.ACTION.DEVICE_CONTROL
:: cmp com.amazon.tv.devicecontrolsettings/.screens.main_menu.OzOobeSettingsActivity
:: Bluetooth and Controllers
:: act com.amazon.device.settings.action.CONTROLLERS
:: cmp com.amazon.tv.settings.v2/.tv.controllers_bluetooth_devices.ControllersAndBluetoothActivity
:: Alexa
:: act amazon.intent.action.ALEXA_SETTING
:: cmp com.amazon.vizzini/.setting.AlexaSettingActivity
:: Preferences
:: act com.amazon.device.settings.action.PREFERENCES
:: cmp com.amazon.tv.settings.v2/.tv.preferences.PreferencesActivity
:: My Fire TV (My Device)
:: act com.amazon.device.settings.action.DEVICE
:: cmp com.amazon.tv.settings.v2/.tv.device.DeviceActivity
:: Accessibility
:: act com.amazon.device.settings.action.ACCESSIBILITY
:: cmp com.amazon.tv.settings.v2/.tv.accessibility.AccessibilityActivity
:: Help
:: act com.amazon.device.settings.action.HELP
:: cmp com.amazon.tv.csapp/.CSAppActivity
:: My Account
:: act com.amazon.device.settings.action.MY_ACCOUNT
:: cmp com.amazon.tv.settings.v2/.tv.my_account.MyAccountActivity
:: ===============Tank Activities 5.2.7.2 END===============
:: ===============5.2.7.1 Mantis Settings START===============
set mantisNotifications=%amStart% com.amazon.tv.notificationcenter/com.amazon.tv.notificationcenter.NotificationCenterActivity
set mantisNetwork=%amStart% com.amazon.tv.settings/com.amazon.tv.settings.tv.network.NetworkActivity
set mantisDisplaySounds=%amStartDisplaySoundsRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.display_sounds.DisplayAndSoundsActivity
set mantisApplications=%amStartApplicationsManageRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.applications.ApplicationsActivity
set mantisControllersBT=%amStart% com.amazon.tv.settings/.tv.controllers_bluetooth_devices.ControllersAndBluetoothActivity
set mantisAlexa=%amStart% com.amazon.vizzini/com.amazon.vizzini.setting.AlexaSettingActivity
set mantisPreferences=%amStartPreferencesRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.preferences.PreferencesActivity
set mantisDevice=%amStartDeviceRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.device.DeviceActivity
set mantisAccessibility=%amStartAccessibilityRoot% com.amazon.tv.settings/.tv.accessibility.AccessibilityActivity
set mantisHelp=%amStartHelpRoot% com.amazon.tv.csapp/com.amazon.tv.csapp.CSAppActivity
set mantisMyAccount=%amStartMyAccountRoot% com.amazon.tv.settings/com.amazon.tv.settings.tv.my_account.MyAccountActivity
:: ===============Tank Activities 5.2.7.2 END===============
:: Downgrade Version Options
set dgVersion=5.0.5
::set dgVersion=5.0.5.1
::set dgVersion=5.2.1.0
:: Initial Device Check
set writeFreeMemFireStick=%shell% "cat proc/meminfo | grep MemAvailable>/sdcard/freeMemory.txt"
set pullFreeMemFireStick=%pull% /sdcard/freeMemory.txt %temp%
::set showFreeMemFireStick=%runShellTerminate% notepad.exe "%temp%\freeMemory.txt"
::set /p readFreeMemFireStick=<"%temp%\freeMemory.txt"
set writeFreeStorageDataFireStick=%shell% "df /data/ | grep G>/sdcard/freeStorageData.txt"
set pullFreeStorageDataFireStick=%pull% /sdcard/freeStorageData.txt %temp%
set writeFreeStorageSystemFireStick=%shell% "df /system/ | grep M>/sdcard/freeStorageSystem.txt"
set pullFreeStorageSystemFireStick=%pull% /sdcard/freeStorageSystem.txt %temp%
:: Default SU Types (kingroot / supersu)
set suType=kingroot
::set suType=supersu
:: Recovery Commands
set forceRecoveryBoot=%shell% "su -c echo 0>/cache/bootmenu_recovery"
:: Setting Default Available Boot Animation Colors
:: Montoya / Tank
set bootAnimationBlue="%~dp0bootanimation\montoya-tank\stock-blue\bootanimation.zip"
set bootAnimationGreen="%~dp0bootanimation\montoya-tank\stock-green\bootanimation.zip"
set bootAnimationOriginal="%~dp0bootanimation\montoya-tank\stock-original\bootanimation.zip"
set bootAnimationPink="%~dp0bootanimation\montoya-tank\stock-pink\bootanimation.zip"
set bootAnimationPurple="%~dp0bootanimation\montoya-tank\stock-purple\bootanimation.zip"
set bootAnimationRed="%~dp0bootanimation\montoya-tank\stock-red\bootanimation.zip"
set bootAnimationYellow="%~dp0bootanimation\montoya-tank\stock-yellow\bootanimation.zip"
set bootAnimationLineageOS="%~dp0bootanimation\montoya-tank\stock-lineageos\bootanimation.zip"
:: Mantis
set bootAnimationMantisBlue="%~dp0bootanimation\mantis\stock-blue\bootanimation.zip"
set bootAnimationLiteMantisBlue="%~dp0bootanimation\mantis\stock-lite-blue\bootanimation.zip"
set bootAnimationMantisGreen="%~dp0bootanimation\mantis\stock-green\bootanimation.zip"
set bootAnimationMantisOriginal="%~dp0bootanimation\mantis\stock-original\bootanimation.zip"
set bootAnimationMantisPink="%~dp0bootanimation\mantis\stock-pink\bootanimation.zip"
set bootAnimationMantisPurple="%~dp0bootanimation\mantis\stock-purple\bootanimation.zip"
set bootAnimationMantisRed="%~dp0bootanimation\mantis\stock-red\bootanimation.zip"
set bootAnimationMantisYellow="%~dp0bootanimation\mantis\stock-yellow\bootanimation.zip"
set bootAnimationMantisLineageOS="%~dp0bootanimation\mantis\stock-lineageos\bootanimation.zip"
:: Busybox Commands
::arp -a -v -i wlan0
:: Set Default Return Value
set returnTo=menu
set dgchoice=m
:menu
%adbKill%
%_color% 0e
cls
::if %checkFireOsInfoText%==0 echo Getting Storage and Memory Info From Device....
::if %checkFireOsInfoText%==1 echo Getting FireOS Version From Device....
::if %checkFireOsInfoText%==1 set checkFireOsInfoText=0
echo Getting Storage and Memory Info From Device....
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
%_color% 0b
echo Visit My GitHub Page To See All of My Other Projects:
echo.
::echo https://github.com/esc0rtd3w/firestick-loader/
echo https://github.com/esc0rtd3w/
echo.
echo.
%_color% 0e
echo.
echo.
del /f /s /q "%temp%\freeMemory.txt">nul
del /f /s /q "%temp%\freeStorageData.txt">nul
del /f /s /q "%temp%\freeStorageSystem.txt">nul
:: Get Memory Available From FireStick
%writeFreeMemFireStick%>nul
%pullFreeMemFireStick%>nul
for /f "tokens=2 delims= " %%f in ('type "%temp%\freeMemory.txt"') do set readFreeMemFireStick=%%f
:: Get Storage Space Available From FireStick
%writeFreeStorageDataFireStick%>nul
%pullFreeStorageDataFireStick%>nul
for /f "tokens=4 delims= " %%f in ('type "%temp%\freeStorageData.txt"') do set readStorageDataFireStick=%%f
%writeFreeStorageSystemFireStick%>nul
%pullFreeStorageSystemFireStick%>nul
for /f "tokens=4 delims= " %%f in ('type "%temp%\freeStorageSystem.txt"') do set readStorageSystemFireStick=%%f
%adb% shell "rm /sdcard/freeMemory.txt"
%adb% shell "rm /sdcard/freeStorageData.txt"
%adb% shell "rm /sdcard/freeStorageSystem.txt"
cls
%_color% 0e
echo Checking Root Status On Device....
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
%_color% 0b
echo Visit My GitHub Page To See All of My Other Projects:
echo.
::echo https://github.com/esc0rtd3w/firestick-loader/
echo https://github.com/esc0rtd3w/
echo.
echo.
%_color% 0e
echo.
echo.
:: Check Root Status On Device
::%checkRoot%
:: Clean Before Checking
if exist "%temp%\rootAccess.txt" del /f /q "%temp%\rootAccess.txt"
%push% "%pathScripts%\check-root.sh" /data/local/tmp/
%shell% "chmod 777 /data/local/tmp/check-root.sh"
%shell% "sh /data/local/tmp/check-root.sh"
%pull% /%sdcard%/rootAccess.txt "%temp%"
for /f "tokens=* delims=*" %%r in ('type "%temp%\rootAccess.txt"') do set rootStatus=%%r
%sleep% 2
:: Remove Temp File On SD Card
%shell% "rm /%sdcard%/rootAccess.txt"
set /p rooted=<"%temp%\rootAccess.txt"
:: Remove Temp File
if exist "%temp%\rootAccess.txt" del /f /q "%temp%\rootAccess.txt"
:: Check FireOS Version
::if %firstCheck%==0 goto checkCanRoot
set firstCheck=1
set checkFireOsInfoText=1
%_color% 0e
cls
echo Getting FireOS Version From Device....
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
%_color% 0b
echo Visit My GitHub Page To See All of My Other Projects:
echo.
::echo https://github.com/esc0rtd3w/firestick-loader/
echo https://github.com/esc0rtd3w/
echo.
echo.
%_color% 0e
echo.
echo.
:: Get FireOS Info
%shell% "cat /system/build.prop | grep ro.build.version.name>/sdcard/fireos-version.txt"
%pull% /sdcard/fireos-version.txt "%temp%"
:: Get FireOS Info
%shell% "cat /system/build.prop | grep ro.product.device=>/sdcard/fireos-device.txt"
%pull% /sdcard/fireos-device.txt "%temp%"
for /f "tokens=3 delims= " %%f in ('type "%temp%\fireos-version.txt"') do set fireOsVersion=%%f
for /f "tokens=2 delims==" %%f in ('type "%temp%\fireos-device.txt"') do set fireOsDevice=%%f
%sleep% 1
%shell% "rm /sdcard/fireos-version.txt"
%shell% "rm /sdcard/fireos-device.txt"
if %fireOsVersion%==0.0.0.0 (
set rootable=0
set rootableColor=0c
set rootableText=INVALID
)
if %fireOsVersion%==5.0.0 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.2.1 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.2.2 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.3 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.3.1 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.3.2 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.3.3 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.4 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.5 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.0.5.1 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion%==5.2.1.0 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
if %fireOsVersion% gtr 5.2.1.0 (
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE VIA HARDWARE
)
:: Check For Pre-FireOS Builds (4.2.2 KitKat)
if %fireOsVersion%==0.0.0.0 (
%shell% "cat /system/build.prop | grep JDQ39 | grep ro.build.id>/sdcard/fireos-version.txt"
%pull% /sdcard/fireos-version.txt "%temp%"
)
:: If KitKat 4.4.2 Build The Next Line Will Trigger
if %fireOsVersion%==0.0.0.0 for /f "tokens=2 delims=^=" %%f in ('type "%temp%\fireos-version.txt"') do set checkKitKat=%%f
:: Set Proper Text ONLY If Pre-FireOS Build
if %checkKitKat%==JDQ39 (
set fireOsVersion=4.2.2
set rootable=1
set rootableColor=0a
set rootableText=EXPLOITABLE
)
:: If version is still 0.0.0.0 then maybe we are in TWRP Recovery
if %fireOsVersion%==0.0.0.0 (
%shell% "cat /system/build.prop | grep JDQ39 | grep ro.build.id>/sdcard/fireos-version.txt"
%pull% /sdcard/fireos-version.txt "%temp%"
)
del /f /s /q "%temp%\fireos-version.txt"
del /f /s /q "%temp%\fireos-device.txt"
%adbKill%
cls
%_color% 0e
echo Checking OTA Recommendations For Version %fireOsVersion%....
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
%_color% 0b
echo Visit My GitHub Page To See All of My Other Projects:
echo.
::echo https://github.com/esc0rtd3w/firestick-loader/
echo https://github.com/esc0rtd3w/
echo.
echo.
%_color% 0e
echo.
echo.
:: Set MessageBox Text To Display
if %fireOsDevice%==montoya (
if %fireOsVersion%==4.2.2 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nThis is a KitKat Build and Precedes FireOS.\n\nThis Build May Be Rootable and Is Still In Testing." "FirePwn Loader"
)
if %fireOsVersion%==5.0.0 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.2.1 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.2.2 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.3 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.3.1 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.3.2 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.3.3 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.4 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to ROOT and then update to version 5.0.5" "FirePwn Loader"
)
if %fireOsVersion%==5.0.5 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to:\n\n- Root Device\n- Install Busybox\n- Disable and Remove All Amazon Bloat\n- Block Ads Using Modified HOSTS File\n- Replace or Modify Boot Animation *OPTIONAL*\n- Remove Root Access *OPTIONAL*\n\n\n*** THIS IS CURRENTLY THE RECOMMENDED VERSION TO USE ***" "FirePwn Loader"
)
if %fireOsVersion%==5.0.5.1 (
%msgbox% "This device has version %fireOsVersion% installed.\nThere will probably be mixed results trying to root this version!\n\nIt is recommended updating to version 5.2.1.0 for rooting.\n\n\nAmazon OTA Updates are incremental.\n\nThe available version under SETTINGS - ABOUT should be 5.2.1.0.\n\n\n*** DO NOT UPDATE IF AVAILABLE VERSION IS 5.2.1.1 OR HIGHER ***" "FirePwn Loader"
)
if %fireOsVersion%==5.2.1.0 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\nIt is recommended to:\n\n- Disable Amazon OTA Updates\n- Root Device\n- Downgrade To Version 5.0.5.\n\n\nThe Update Loop Protection Script and Block OTA Virtual WiFi Hotspot Will Run After This Dialog Is Closed!\n\n\n* IF THE DEVICE UPDATES, IT MAY NOT BE EXPLOITABLE!\n\n*** YOU HAVE BEEN WARNED ***" "FirePwn Loader"
%runShellNoTerminate% "%pathScripts%\misc\update-protection-loop.cmd"
%runShellTerminate% %virtualRouterGUI%
)
if %fireOsVersion% gtr 5.2.1.0 (
%msgbox% "This device has version %fireOsVersion% installed.\n\n\n*** THIS VERSION IS CURRENTLY EXPLOITABLE VIA HARDWARE ONLY ***" "FirePwn Loader"
)
)
if %fireOsDevice%==tank (
%msgbox% "The detected device is [%fireOsDevice%] and has version %fireOsVersion% installed.\n\nThis menu is meant for Montoya device, but Tank can use some options" "FirePwn Loader"
)
if %fireOsDevice%==mantis (
%msgbox% "The detected device is [%fireOsDevice%] and has version %fireOsVersion% installed.\n\nThis menu is meant for Montoya device, but Mantis can use some options" "FirePwn Loader"
)
if %fireOsDevice%==sheldon (
%msgbox% "The detected device is [%fireOsDevice%] and has version %fireOsVersion% installed.\n\nThis menu is meant for Montoya device, but Sheldon can use some options" "FirePwn Loader"
)
:: Begin Main Menu
cls
:: Change Colors To Match Exploitable Status
%_color% 0e
if %rootable%==0 %_color% %rootableColor%
if %rootable%==1 %_color% %rootableColor%
:: If Rooted Set New Text
if %rooted%==1 (
set rootableText=ROOTED
)
:: Check for blank device
if %fireOsDevice%==none (
%msgbox% "Your device is not being detected.\n\nPlease confirm you have authorized ADB connection on device and retry!" "FirePwn Loader"
goto end
)
echo *** Device is %fireOsDevice% on version %fireOsVersion% and is %rootableText% ***
echo.
echo.
%_color% 0b
echo [Free Memory: %readFreeMemFireStick%KB] [Free Space (/data/): %readStorageDataFireStick% (/system/): %readStorageSystemFireStick%]
echo.
echo.
echo.
%_color% 0e
if %fireOsDevice%==montoya (
echo Press Y To Use Full Automatic Mode [also use YD to include downgrade]
echo.
echo Press I to install kingroot [also use IR to install and root]
echo.
echo Press R to root [also use R1 to Skip Wait or R2 to Skip Wait/Swipe]
echo.
echo Press T to install TWRP and pre-rooted rom [thanks to rbox] [TR copy rom]
echo.
echo Press G to install Google Play Store [WIP] [*root required*]
echo.
echo Press D to downgrade firmware [also use DN for no root method *see tweaks*]
echo.
echo Press U to unroot [kingroot binary and apk removal]
echo.
echo.
)
echo Press B to install busybox [also use BA to use auto scripting method]
echo.
echo Press A to disable Amazon Bloatware [also use AR to remove or ARA w/adblock]
echo.
echo Press C to clear all caches on device [also use CR to reboot after]
echo.
echo Press K to clean kodi data [also use KS to clean entire sd card]
echo.
if %fireOsDevice%==montoya echo Press F to factory reset [also use FR for root reset to save config files]
if %fireOsDevice%==montoya echo.
echo.
echo Press W to run fixes, tweaks, and misc options
echo.
echo Press Z to directly invoke Amazon Settings menu items [ZT Tank / ZM Mantis]
echo.
echo.
echo Press X to exit [also use XR to reload main menu]
echo.
echo.
echo Make a choice and press ENTER....
echo.
set /p dgchoice=
if %dgchoice%==AB goto antiBrick
if %dgchoice%==Ab goto antiBrick
if %dgchoice%==aB goto antiBrick
if %dgchoice%==ab goto antiBrick
if %dgchoice%==G %runShellTerminate% "extras-install-play-store.cmd"
if %dgchoice%==g %runShellTerminate% "extras-install-play-store.cmd"
if %dgchoice%==B goto busybox
if %dgchoice%==b goto busybox
if %dgchoice%==BA set busyboxScriptInstall=1&&goto busybox
if %dgchoice%==Ba set busyboxScriptInstall=1&&goto busybox
if %dgchoice%==bA set busyboxScriptInstall=1&&goto busybox
if %dgchoice%==ba set busyboxScriptInstall=1&&goto busybox
if %dgchoice%==W goto fixesMenu
if %dgchoice%==w goto fixesMenu
if %dgchoice%==U goto unrootKing
if %dgchoice%==u goto unrootKing
if %dgchoice%==I goto installRoot
if %dgchoice%==i goto installRoot
if %dgchoice%==IR set rootAfterInstall=1&&goto installRoot
if %dgchoice%==Ir set rootAfterInstall=1&&goto installRoot
if %dgchoice%==iR set rootAfterInstall=1&&goto installRoot
if %dgchoice%==ir set rootAfterInstall=1&&goto installRoot
if %dgchoice%==D goto downgrade
if %dgchoice%==d goto downgrade
if %dgchoice%==DN set dgNoRoot=1&&goto downgrade
if %dgchoice%==Dn set dgNoRoot=1&&goto downgrade
if %dgchoice%==dN set dgNoRoot=1&&goto downgrade
if %dgchoice%==dn set dgNoRoot=1&&goto downgrade
if %dgchoice%==R goto root
if %dgchoice%==r goto root
if %dgchoice%==R1 goto root1
if %dgchoice%==r1 goto root1
if %dgchoice%==R2 goto root2
if %dgchoice%==r2 goto root2
if %dgchoice%==S goto doSU
if %dgchoice%==s goto doSU
if %dgchoice%==T goto doTWRP
if %dgchoice%==t goto doTWRP
if %dgchoice%==TR goto onlyRom
if %dgchoice%==Tr goto onlyRom
if %dgchoice%==tR goto onlyRom
if %dgchoice%==tr goto onlyRom
if %dgchoice%==TM goto adbMouse
if %dgchoice%==Tm goto adbMouse
if %dgchoice%==TM goto adbMouse
if %dgchoice%==tM goto adbMouse
if %dgchoice%==SA set doAcceptSuAfterRequest=1&&goto doSU
if %dgchoice%==Sa set doAcceptSuAfterRequest=1&&goto doSU
if %dgchoice%==sa set doAcceptSuAfterRequest=1&&goto doSU
if %dgchoice%==sA set doAcceptSuAfterRequest=1&&goto doSU
if %dgchoice%==A set bloatAction=disable&&goto bloatDisable
if %dgchoice%==a set bloatAction=disable&&goto bloatDisable
if %dgchoice%==AR goto removeBloat
if %dgchoice%==Ar goto removeBloat
if %dgchoice%==ar goto removeBloat
if %dgchoice%==aR goto removeBloat
if %dgchoice%==ARA set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==ara set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==ARa set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==arA set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==Ara set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==aRA set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==aRa set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==ArA set doBlockAdsWithMenuOption=1&&goto removeBloat
if %dgchoice%==E goto bloatEnable
if %dgchoice%==e goto bloatEnable
if %dgchoice%==C goto clearCaches
if %dgchoice%==c goto clearCaches
if %dgchoice%==K goto cleanSD
if %dgchoice%==k goto cleanSD
if %dgchoice%==KS set cleanEntireSdCard=1&&goto cleanSD
if %dgchoice%==Ks set cleanEntireSdCard=1&&goto cleanSD
if %dgchoice%==kS set cleanEntireSdCard=1&&goto cleanSD
if %dgchoice%==ks set cleanEntireSdCard=1&&goto cleanSD
if %dgchoice%==CR set rebootAfterClearCache=1&&goto clearCaches
if %dgchoice%==Cr set rebootAfterClearCache=1&&goto clearCaches
if %dgchoice%==cr set rebootAfterClearCache=1&&goto clearCaches
if %dgchoice%==cR set rebootAfterClearCache=1&&goto clearCaches
if %dgchoice%==P goto superSU
if %dgchoice%==p goto superSU
if %dgchoice%==Z goto invoke
if %dgchoice%==z goto invoke
if %dgchoice%==Z goto invoke
if %dgchoice%==ZT goto invokeTank
if %dgchoice%==Zt goto invokeTank
if %dgchoice%==zt goto invokeTank
if %dgchoice%==zT goto invokeTank
if %dgchoice%==ZM goto invokeMantis
if %dgchoice%==Zm goto invokeMantis
if %dgchoice%==zm goto invokeMantis
if %dgchoice%==zM goto invokeMantis
if %dgchoice%==F set factoryReset=1&&goto fReset
if %dgchoice%==f set factoryReset=1&&goto fReset
if %dgchoice%==FR set factoryReset=2&&goto fReset
if %dgchoice%==Fr set factoryReset=2&&goto fReset
if %dgchoice%==fr set factoryReset=2&&goto fReset
if %dgchoice%==fR set factoryReset=2&&goto fReset
if %dgchoice%==Y goto fullAuto
if %dgchoice%==y goto fullAuto
if %dgchoice%==YD set fullAutoModeDG=1&&goto fullAuto
if %dgchoice%==Yd set fullAutoModeDG=1&&goto fullAuto
if %dgchoice%==yd set fullAutoModeDG=1&&goto fullAuto
if %dgchoice%==yD set fullAutoModeDG=1&&goto fullAuto
if %dgchoice%==X goto end
if %dgchoice%==x goto end
if %dgchoice%==XR goto menu
if %dgchoice%==Xr goto menu
if %dgchoice%==xr goto menu
if %dgchoice%==xR goto menu
if %dgchoice%==M goto menu
if %dgchoice%==m goto menu
:: Fix Amazon Android Remote App (Only if loaded from 20160802 and earlier builds)
::if %dgchoice%==V goto fixRemote
::if %dgchoice%==v goto fixRemote
goto menu
:invoke
%_color% 0e