-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathQuestToolbox.bat
1304 lines (1045 loc) · 29.9 KB
/
QuestToolbox.bat
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
:: Developed By:
:: mitchv2020 and LordNikonUK
set version=v1.5.1
:::::::::::::::::::::
:::: FILE CHECKS ::::
:::::::::::::::::::::
if not exist ".\Requirements" goto noRequirements
if not exist ".\Requirements\curl.exe" (
set missingFile=curl.exe
goto missingFile
)
if not exist ".\Requirements\checkforupdates.bat" (
set missingFile=checkforupdates.bat
goto missingFile
)
if not exist ".\Requirements\list_of_ver_fromdate.txt" (
set missingFile=list_of_ver_fromdate.txt
goto missingFile
)
if not exist ".\Requirements\cmdmenusel.exe" (
set missingFile=cmdmenusel.exe
goto missingFile
)
if not exist ".\Requirements\adb.exe" (
set missingFile=adb.exe
goto missingFile
)
if not exist ".\Requirements\scrcpy.exe" (
set missingFile=scrcpy.exe
goto missingFile
)
if not exist ".\Requirements\ffmpeg.exe" (
set missingFile=ffmpeg.exe
goto missingFile
)
if not exist ".\Requirements\packages.bat" (
set missingFile=packages.bat
goto missingFile
)
if not exist ".\Requirements\wiredalvr.bat" (
set missingFile=wiredalvr.bat
goto missingFile
)
if not exist ".\Requirements\keepaliveReplay.bat" (
set missingFile=keepaliveReplay.bat
goto missingFile
)
if not exist ".\Requirements\AdbWinApi.dll" (
set missingFile=AdbWinApi.dll
goto missingFile
)
if not exist ".\Requirements\AdbWinUsbApi.dll" (
set missingFile=AdbWinUsbApi.dll
goto missingFile
)
if not exist ".\Requirements\avcodec-58.dll" (
set missingFile=avcodec-58.dll
goto missingFile
)
if not exist ".\Requirements\avformat-58.dll" (
set missingFile=avformat-58.dll
goto missingFile
)
if not exist ".\Requirements\avutil-56.dll" (
set missingFile=avutil-56.dll
goto missingFile
)
if not exist ".\Requirements\scrcpy-server" (
set missingFile=The scrcpy-server file
goto missingFile
)
if not exist ".\Requirements\SDL2.dll" (
set missingFile=SDL2.dll
goto missingFile
)
if not exist ".\Requirements\swresample-3.dll" (
set missingFile=swresample-3.dll
goto missingFile
)
if not exist ".\Requirements\swscale-5.dll" (
set missingFile=swscale-5.dll
goto missingFile
)
:continueSetup
:: Sets the window size
mode con: cols=72 lines=21
:: Checks for updates
cd requirements
echo Checking for updates...
call checkforupdates.bat
:MainMenu
cls
title Quest Toolbox
echo [7mQuest Toolbox[0m Version: [7m%version%[0m
echo ==========================================
echo Which would you like to do?
echo ==========================================
:: Options
cmdMenuSel f870 "Change Recording Res/FPS" "Stream Quest screen to PC" "Sideload an APK File" "Uninstall an App" "Keep Alive" "Enable Wired ALVR" "Change Refresh Rate" "Replay Tools" "Change Quest Resolution" "Update QuestToolbox" "ADB Options" "==========================================" "Developer Credits" "Special Thanks" "Help"
if "%errorlevel%"=="1" goto capture
if "%errorlevel%"=="2" goto mirrorScreen
if "%errorlevel%"=="3" goto sideloadPrompt
if "%errorlevel%"=="4" goto uninstallAPKPrompt
if "%errorlevel%"=="5" goto startkeepAlive
if "%errorlevel%"=="6" goto wiredALVR
if "%errorlevel%"=="7" goto refreshrate
if "%errorlevel%"=="8" goto replayTools
if "%errorlevel%"=="9" goto changeResPrompt
if "%errorlevel%"=="10" goto update
if "%errorlevel%"=="11" goto adbmenu
if "%errorlevel%"=="12" goto MainMenu
if "%errorlevel%"=="13" goto devcredits
if "%errorlevel%"=="14" goto specialThanks
if "%errorlevel%"=="15" goto Support
goto MainMenu
:capture
cls
echo [7mChange Recording Res/FPS[0m
echo ==========================================
echo Which capture commands do you want to run?
echo ==========================================
::Options
cmdMenuSel f870 "1920x1080 60fps (Widescreen)" "1280x1280 60fps (Square)" "1080x1920 60fps (Youtube Shorts)" "Custom res/fps" "==Back=="
if "%errorlevel%"=="1" goto wide
if "%errorlevel%"=="2" goto square
if "%errorlevel%"=="3" goto shorts
if "%errorlevel%"=="4" goto custom
if "%errorlevel%"=="5" goto MainMenu
goto capture
:wide
cls
adb shell setprop debug.oculus.capture.width 1920
adb shell setprop debug.oculus.capture.height 1080
adb shell setprop debug.oculus.capture.bitrate 10000000
adb shell setprop debug.oculus.foveation.level 0
adb shell setprop debug.oculus.capture.fps 60
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Changed Resolution and FPS!
pause
goto MainMenu
)
pause
goto MainMenu
:square
cls
adb shell setprop debug.oculus.capture.width 1280
adb shell setprop debug.oculus.capture.height 1280
adb shell setprop debug.oculus.capture.bitrate 10000000
adb shell setprop debug.oculus.foveation.level 0
adb shell setprop debug.oculus.capture.fps 60
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Changed Resolution and FPS!
pause
goto MainMenu
)
pause
goto MainMenu
:shorts
cls
adb shell setprop debug.oculus.capture.width 1080
adb shell setprop debug.oculus.capture.height 1920
adb shell setprop debug.oculus.capture.bitrate 10000000
adb shell setprop debug.oculus.foveation.level 0
adb shell setprop debug.oculus.capture.fps 60
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Changed Resolution and FPS!
pause
goto MainMenu
)
pause
goto MainMenu
:custom
cls
:: Clears all the variables
set width=
set height=
set fps=
:setWidth
cls
set /p width=Custom Width:
if "%width%"=="" (
cls
echo Please enter a width!
pause
goto setWidth
)
goto setHeight
:setHeight
cls
set /p height=Custom Height:
if "%height%"=="" (
cls
echo Please enter a height!
pause
goto setHeight
)
:setFPS
cls
echo [7mDue to oculus capping FPS, min is 30 and max is 90![0m
set /p fps=Custom FPS:
if "%fps%"=="" (
cls
echo Please enter a fps!
pause
goto setFPS
)
adb shell setprop debug.oculus.capture.width %width%
adb shell setprop debug.oculus.capture.height %height%
adb shell setprop debug.oculus.capture.bitrate 10000000
adb shell setprop debug.oculus.foveation.level 0
adb shell setprop debug.oculus.capture.fps %fps%
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Changed Resolution and FPS!
pause
goto MainMenu
)
pause
goto MainMenu
:mirrorScreen
cls
echo [7mStream Quest Screen[0m
echo ==========================================
echo Do you have a Quest 1 or 2?
echo ==========================================
::Options
cmdMenuSel f870 "Quest 1" "Quest 2" "==Back=="
if "%errorlevel%"=="1" goto Q1mirror
if "%errorlevel%"=="2" goto Q2mirror
if "%errorlevel%"=="3" goto MainMenu
:Q1mirror
cls
echo ==========================================
echo What FPS would you like the stream to be?
echo ==========================================
cmdMenuSel f870 "60 FPS" "30 FPS" "Custom" "==back=="
if "%errorlevel%"=="1" goto 60Q1
if "%errorlevel%"=="2" goto 30Q1
if "%errorlevel%"=="3" goto customQ2
if "%errorlevel%"=="4" goto mirrorScreen
:60Q1
:: Clears the FPS variable
set Q1streamFPS=
:: Sets the FPS of stream to 60
set Q1streamFPS=60
goto Q1bitrate
:30Q1
:: Clears the FPS variable
set Q1streamFPS=
:: Sets the FPS of stream to 30
set Q1streamFPS=30
goto Q1bitrate
:customQ1
cls
:: Clears the FPS variable
set Q1streamFPS=
:: Input for custom FPS
set /p Q1streamFPS=Custom FPS:
goto Q1bitrate
:Q1bitrate
cls
echo ==========================================
echo What bitrate would you like the stream to be (MB)?
echo ==========================================
:: Clears the Bitrate Variable
set Q1bitrate=
:: Input for bitrate of stream
set /p Q1bitrate=Answer:
if "%Q1bitrate%"=="" (
cls
echo Please enter a bitrate!
pause
goto Q1bitrate
)
goto Q1streaming
:Q1streaming
cls
echo Starting stream at %Q1streamFPS% FPS....
:: Starts a stream to the quest at a custom fps and bitrate with a crop set
scrcpy --max-fps %Q1streamFPS% --crop 1280:720:1500:350 --bit-rate %Q1bitrate%M
if "%errorlevel%"=="1" goto noDevices
pause
goto MainMenu
:Q2mirror
cls
echo ==========================================
echo What FPS would you like the stream to be?
echo ==========================================
::Options
cmdMenuSel f870 "60 FPS" "30 FPS" "Custom" "==back=="
if "%errorlevel%"=="1" goto 60Q2
if "%errorlevel%"=="2" goto 30Q2
if "%errorlevel%"=="3" goto customQ2
if "%errorlevel%"=="4" goto mirrorScreen
:60Q2
:: Clears the FPS variable
set Q2streamFPS=
:: Sets the FPS of stream to 60
set Q2streamFPS=60
goto Q2bitrate
:30Q2
:: Clears the FPS variable
set Q2streamFPS=
:: Sets the FPS of stream to 30
set Q2streamFPS=30
goto Q2bitrate
:customQ2
cls
:: Clears the FPS variable
set Q2streamFPS=
:: Input for custom FPS
set /p Q2StreamFPS=Custom FPS:
goto Q2bitrate
:Q2bitrate
cls
echo ==========================================
echo What bitrate would you like the stream to be (MB)?
echo ==========================================
:: Clears the Bitrate Variable
set Q2bitrate=
:: Input for bitrate of stream
set /p Q2bitrate=Answer:
if "%Q2bitrate%"=="" (
cls
echo Please enter a bitrate!
pause
goto Q2bitrate
)
goto Q2streaming
:Q2streaming
cls
echo Starting stream at %Q2streamFPS% FPS....
:: Starts a stream to the quest at a custom fps with a crop set
scrcpy --max-fps %Q2streamFPS% --crop 1600:900:2017:510 --bit-rate %Q2bitrate%M
if "%errorlevel%"=="1" goto noDevices
pause
goto MainMenu
:sideloadPrompt
cls
echo ==========================================
echo [7mDo you want to sideload an APK?[0m
echo ==========================================
:: Options
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto sideload
if "%errorlevel%"=="2" goto MainMenu
goto sideloadPrompt
:sideload
cls
echo ==========================================
echo Type in the directory of the file (including file name)
echo [7mMake sure that the file and directory does not have a space in it![0m
echo ==========================================
echo [7mType "exit" to cancel.[0m
:: Resets the APK directory selected
set APKdir=
:: Input
set /p APKdir=Answer:
if /I "%APKdir%"=="exit" goto MainMenu
if "%APKdir%"=="" goto sideloadIncorrect
cls
echo Sideloading APK.... Please wait
adb install %APKdir%
if "%errorlevel%"=="1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Sideloaded APK!
pause
goto MainMenu
)
pause
goto MainMenu
:sideloadIncorrect
cls
echo Please Enter a directory
pause
goto sideload
:uninstallAPKPrompt
cls
echo ==========================================
echo [7mAre you sure you want to uninstall an App?[0m
echo ==========================================
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto uninstallAPK
if "%errorlevel%"=="2" goto MainMenu
:uninstallAPK
cls
echo ==========================================
echo [7mA new window will open with all the apps installed.[0m
echo ==========================================
pause
start packages.bat
goto uninstalling
:uninstalling
cls
echo ==========================================
echo Please Enter the package name of
echo the app you would like to uninstall (Without the "package:")
echo ==========================================
echo [7mType "exit" to cancel.[0m
set APKuninst=
set /p APKuninst=Answer:
if "%APKuninst%"=="" goto wrongInputAPK
if /I "%APKuninst%"=="exit" goto MainMenu
cls
echo Uninstalling APK....
adb uninstall %APKuninst%
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
echo Successfully Uninstalled APK!
pause
goto MainMenu
)
pause
goto MainMenu
:wrongInputAPK
cls
echo Please enter a package name!
pause
goto uninstalling
:startkeepAlive
cls
echo Starting keepAlive.bat...
start keepAlive.bat
goto MainMenu
:wiredALVR
cls
echo ==========================================
echo [7mA new window will open, do NOT close it
echo otherwise wired ALVR will stop working.[0m
echo ==========================================
pause
echo Starting bat...
start wiredalvr.bat
goto MainMenu
:refreshrate
cls
echo [7mRefresh Rate[0m
echo ==========================================
echo Which Refresh Rate do you want to use?
echo ==========================================
::Options
cmdMenuSel f870 "60Hz" "72Hz" "90Hz (Quest 2 ONLY)" "120Hz (Quest 2 ONLY)" "==Back=="
if "%errorlevel%"=="1" goto 60
if "%errorlevel%"=="2" goto 72
if "%errorlevel%"=="3" goto 90
if "%errorlevel%"=="4" goto 120
if "%errorlevel%"=="5" goto MainMenu
goto refreshrate
:60
cls
echo Updating Refresh Rate...
adb shell setprop debug.oculus.refreshRate 60
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Applied Refresh Rate!
pause
goto MainMenu
)
pause
goto MainMenu
:72
cls
echo Updating Refresh Rate...
adb shell setprop debug.oculus.refreshRate 72
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Applied Refresh Rate!
pause
goto MainMenu
)
pause
goto MainMenu
:90
cls
echo Updating Refresh Rate...
adb shell setprop debug.oculus.refreshRate 90
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Applied Refresh Rate!
pause
goto MainMenu
)
pause
goto MainMenu
:120
cls
echo Updating Refresh Rate...
adb shell setprop debug.oculus.refreshRate 120
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Applied Refresh Rate!
pause
goto MainMenu
)
pause
goto MainMenu
:replayTools
cls
echo [7mReplay Tools[0m
echo ==========================================
echo Which would you like to do?
echo ==========================================
echo These options are for the Render release of
echo Replay mod for Beat Saber. (not publicly available yet)
echo ==========================================
cmdMenuSel f870 "Render files" "Remux Rendered Files (Must render first!)" "==Back=="
:: Options
if "%errorlevel%"=="1" goto keepaliveReplay
if "%errorlevel%"=="2" goto remux
if "%errorlevel%"=="3" goto MainMenu
:keepaliveReplay
cls
adb shell am broadcast -a com.oculus.vrpowermanager.prox_close
start keepaliveReplay.bat
cls
echo [41mPlease keep the keepAlive window open while rendering
echo to not corrupt the render![0m
echo ==========================================================
echo [7mPress enter once you have finished rendering the video
echo and the other batch window is closed![0m
pause
shell am broadcast -a com.oculus.vrpowermanager.automation_disable
goto replayTools
:remux
cls
echo [41mMake sure to render first and that both files are
echo not located on your quest but on your computer![0m
echo.
echo [7mType "exit" to cancel.[0m
echo.
set /p fileLoc=Enter file location of [7maudio.wav[0m and [7mvideo.h264[0m:
if "%fileLoc%"=="" (
cls
echo Please enter a Directory!
pause
goto remux
)
if /I "%fileLoc%"=="exit" goto replayTools
:fPerSec
cls
echo [41mMake sure to render first and that both files are
echo not located on your quest but on your computer![0m
echo.
echo [7mType "exit" to cancel.[0m
echo.
set /p framesPS=Please enter what FPS you would like it to be rendered at:
if "%framesPS%"=="" (
cls
echo Please enter a value!
pause
goto fPerSec
)
if /I "%framesPS%"=="exit" goto replayTools
cls
echo Converting [7maudio.wav[0m to [7maudio.ogg[0m
ffmpeg -hide_banner -loglevel error -i %fileLoc%/audio.wav -acodec libvorbis %fileloc%/audio.ogg
if "%errorlevel%"=="1" (
cls
echo [7maudio.wav[0m does not exist in the directory
echo you have entered! Please check the folder.
pause
goto remux
)
cls
echo Merging both [7mvideo.h264[0m and [7maudio.ogg[0m into [7moutput.mp4[0m. this could take a while.
ffmpeg -hide_banner -loglevel error -framerate %framesPS% -i %fileLoc%/video.h264 -i %fileLoc%/audio.ogg -c copy %fileLoc%/output.mp4
if "%errorlevel%"=="1" (
cls
echo [7mvideo.h264[0m does not exist in the directory
echo you have entered! Please check the folder.
pause
goto remux
)
cls
echo Check the [7moutput.mp4[0m file. Does the audio need to be synced?
cmdMenuSel f870 "Yes" "No"
:: Options
if "%errorlevel%"=="1" goto syncNeeded
if "%errorlevel%"=="2" (
set remuxedFile=output.mp4
goto RemuxFinished
)
:syncNeeded
cls
echo Fixing audio and video desync
ffmpeg -hide_banner -loglevel error -i %fileLoc%/output.mp4 -itsoffset -0.3 -i %fileLoc%/output.mp4 -vcodec copy -acodec copy -map 0:0 -map 1:1 %fileLoc%/finalVideo.mp4
if "%errorlevel%"=="1" (
cls
echo [7moutput.mp4[0m could not be found. Please try remuxing again.
pause
goto replayTools
)
del %fileLoc%/output.mp4
set remuxedFile=finalVideo.mp4
goto RemuxFinished
:RemuxFinished
cls
echo Finished remuxing audio and video. Open File?
cmdMenuSel f870 "Yes" "No"
:: Options
if "%errorlevel%"=="1" (
start %fileLoc%/%remuxedFile%
goto MainMenu
)
if "%errorlevel%"=="2" goto MainMenu
goto RemuxFinished
:changeResPrompt
cls
echo ==========================================
echo [7mChange Quest Resolution[0m
echo ==========================================
echo Default resolution is currently a bit broken. Use at your own risk
echo.
::Options
cmdMenuSel f870 "Default Resolution (1832x1920)" "Custom Resolution" "==Back=="
if "%errorlevel%"=="1" goto defaultRes
if "%errorlevel%"=="2" goto changeCustomRes
if "%errorlevel%"=="3" goto MainMenu
:defaultRes
cls
echo ==========================================
echo [7mAre you sure you want to change resolution?[0m
echo ==========================================
::Options
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto changingToDefault
if "%errorlevel%"=="2" goto MainMenu
:changingToDefault
cls
echo Changing Resolution...
adb shell setprop debug.oculus.textureHeight 1832
adb shell setprop debug.oculus.textureWidth 1920
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Changed Resolution!
pause
goto MainMenu
)
:changeCustomRes
cls
echo ==========================================
echo [7mAre you sure you want to change resolution?[0m
echo ==========================================
::Options
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto customRes
if "%errorlevel%"=="2" goto MainMenu
:customRes
set resHeight=
set resWidth=
:resHeight
cls
echo ==========================================
echo [7mBe careful because if you do something wrong it can break.[0m
echo If something does go wrong, a reboot usually fixes it.
echo ==========================================
echo [7mType "exit" to cancel.[0m
set /p resHeight=Custom Height:
if /I "%resHeight%"=="exit" goto MainMenu
if "%resHeight%"=="" (
cls
echo Please enter a Height!
pause
goto resHeight
)
:resWidth
cls
echo ==========================================
echo [7mBe careful because if you do something wrong it can break.[0m
echo If something does go wrong, a reboot usually fixes it.
echo ==========================================
echo [7mType "exit" to cancel.[0m
set /p resWidth=Custom Width:
if /I "%resWidth%"=="exit" goto MainMenu
if "%resWidth%"=="" (
cls
echo Please enter a Width!
pause
goto resWidth
)
cls
echo Changing resolution...
adb shell setprop debug.oculus.textureHeight %resHeight%
adb shell setprop debug.oculus.textureWidth %resWidth%
if "%errorlevel%"=="-1" goto noDevices
if "%errorlevel%"=="0" (
cls
echo Successfully Changed Resolution!
pause
goto MainMenu
)
pause
goto MainMenu
:update
cls
set update=yes
echo Checking for updates...
call checkforupdates.bat
goto MainMenu
:ADBMenu
cls
echo [7mADB Options[0m
echo ==========================================
echo Which would you like to do?
echo ==========================================
cmdMenuSel f870 "Setup Wireless ADB" "Disconnect Wireless ADB" "Custom ADB Command" "Sideload Firmware" "Download Firmware Files" "Disable Proximity Sensor" "==Back=="
:: Options
if "%errorlevel%"=="1" goto wirelesssetup
if "%errorlevel%"=="2" goto disconnect
if "%errorlevel%"=="3" goto customADB
if "%errorlevel%"=="4" goto firmwareConfirm
if "%errorlevel%"=="5" goto downloadFirmware
if "%errorlevel%"=="6" goto proximitySensorOptions
if "%errorlevel%"=="7" goto MainMenu
:wirelesssetup
cls
echo ==========================================
echo [7mDo you want to setup wireless adb?[0m
echo ==========================================
:: Options
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto wirelessIP
if "%errorlevel%"=="2" goto ADBMenu
goto wirelesssetup
:wirelessIP
cls
echo ==========================================
echo [41mPlease plug in your Quest / Quest 2![0m
echo ==========================================
echo [7mType "exit" to cancel.[0m
:: Resets the local ip
set localip=
:: Prompts for the local IP
set /p localip=Quest / Quest 2 local IP:
if /I "%localip%"=="exit" goto ADBMenu
if "%localip%"=="" goto IncorrectInputIP
cls
echo ==========================================
echo You set your Quest / Quest 2 local ip to [7m%localip%[0m. is that correct?
echo ==========================================
:: Options
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto connecting
if "%errorlevel%"=="2" goto wirelessIP
goto WirelessIP
:connecting
cls
:: Sets the quest up for wireless
adb tcpip 5555
if "%errorlevel%"=="1" goto noDevices
:: Connects to the quest wirelessly
adb connect %localip%:5555
pause
goto MainMenu
:IncorrectInputIP
cls
echo Please enter an IP
pause
goto wirelessIP
:customADB
cls
echo ==========================================
echo [41mMake sure you know what you are doing
echo before typing in adb commands.[0m
echo ==========================================
echo [7mType "[1mexit[0m[7m" to cancel.[0m
set adbCom=
set /p adbCom=adb
if /I "%adbCom%"=="exit" goto ADBMenu
if "%adbCom%"=="" (
cls
echo Please input a command.
pause
goto customADB
)
cls
echo Running ADB Command
echo ==========================================
adb %adbCom%
echo ==========================================
if "%errorlevel%"=="0" echo Successfully executed command.
pause
goto ADBMenu
:disconnect
cls
echo ==========================================
echo [7mDo you want to disconnect wireless ADB?[0m
echo ==========================================
cmdMenuSel f870 "Yes" "No"
if "%errorlevel%"=="1" goto disconnecting
if "%errorlevel%"=="2" goto ADBMenu
:disconnecting
cls
adb disconnect