From a0d77146ae4bee4be734d8c329a95821212c9388 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 23 Apr 2020 12:09:59 +0100 Subject: [PATCH] changed scrcpy path for adb on linux --- build-electron/app.jsc | Bin 63520 -> 63520 bytes desktop-app/src/app/adb-client.service.ts | 25 -------------- desktop-app/src/app/app.component.html | 8 +++-- desktop-app/src/app/app.component.ts | 31 +++++++++++++++--- desktop-app/src/app/app.service.ts | 4 +-- desktop-app/src/app/files/files.component.ts | 11 ++++--- .../src/app/tools/tools.component.html | 13 +++++++- desktop-app/src/app/tools/tools.component.ts | 13 ++++---- 8 files changed, 60 insertions(+), 45 deletions(-) diff --git a/build-electron/app.jsc b/build-electron/app.jsc index 8c2800b5e38c980a9af78f2306c8b679c850c0b2..a88bb5557b82a0bbb909cbfcbd557e50f3c54237 100644 GIT binary patch delta 4284 zcmY*c3tWt87jI@xvng7-eN(!;+SG_HqI6TbVwOr-?Y67TG*b)grk?Z7#)@FW>u2-u-;f@7Hvm=lsv*InQ~{d!8M=ydAx~ zjg*1WsQi}(4;u$I30olEDdgd%q3@t}$>1R@f^55tK0pOBC&Q^?d}tx~O9 z<(h3eZ+}1LDc-k2ON0h5& zY3VY}u<~Y`6KC)}S3ni4SpJd)5%;2HVyRe?DkIw~b6#1A(|8m$5IJb_F(^f>Nl+=( zS^~=HO*6t}JZjO2N`tj5h{q5?p~1Q-aV36+?O2wlb5p5Ek|z%bv8!nG2(d~P ztBe1KMPj7(+^m`ShDQMxj0SNmP_U+8UI_*QCA6?AS-^^qWQatyjEVpMG!XGz<1J0} zT8QF+VfM-I@OS;0p`w&6*H|&)ktSWD(K4q-;NfD)WR^!%YUI-4(D}N#k#&M8|Fu(r zNqj$OD>1OaJ$#DF5*Z(6rAVS^WD2Pc&Fo*4w6_Nz@?S&JIiVceKMCWkz|RcQAh&Mc z9V|AWAb7K@4W2d-z+&p`JG{lL#H}AF#&^t$@uz0(v|xmi3rQ(%J(zDqK~jJDc|2?+ zfX!8REAX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QdE+>~!i@z-QlvN4eKk$c=nE0*e-gPV=;CN|_d1hlT+@g)l)w+Dq%Di4sRuT&^f zbY~q2xMAJ+CKjXHuMANTbJUP7ll}Kz1m`wQP#q=Ks zf;eCkJRrdj4)#EiewZb`dq@a14nOtLOAfu}P&JRPuNupsma5e z5PjP82yQ4AQeoOFC9G#;1)RjnWHKfRX#J}$4;zXXLh1VvR%q}oWB%r!FOmKPyMO7KCS;#Vt zu9up5?-||ZgR_6#Psdc4abQ=`;SNl%3Ia%4&_$Z$??~-S3&-u=>!&?TLgV8q=xwD+$~5F6y#%5 z^%5{Qs;I-MHS=Ijy2u>EYW`;WUFkXuIUfT99j*=Z_vg7B7!(}$$I4m>c;1}&iWbxb zbD*lf58g3Y$I^;mG}Ak;^N$DrqBSKw!# z{20?N&jY#Vbq;;}au65tUp@7tU;KE32Xn5tzQij(jesOYHUWS7*#bfi?wyPee|87S zH&;%f?KKLL_D{^BgRiCPLo+w^J*;kx1#`2!FOd4h2R3OV9@COv_Hv=jMO}e|zly=l z_^KR5?a91W%RlIDHOF0UBLR= zUJ&N@xgY)J_TYGsJdj)AP>%=oRh@q~OF#@rQ>3vPl|oK7PSsVrN4WAa1{T#a(VVB12TQuyog@NxXC!tHP5bWEo7~z^;;mq#G z`&(HXq(mJZ$-AlUy+GHX3eKLy@0bZOXVwMdFTH_q=NrRM(E7;?*kE@a(C>)=nrD5n z4?lTg4R@*=^Xbed6ZC;QBAr9;>Oag>amV%|obzHXY?{9EQ#$Fz6b|%9-YUYZmqL*I m&e6~(U)ph~*3j)guwIbVheRw3BV&?AbGr{W($5DRIsXF}S8^Eu diff --git a/desktop-app/src/app/adb-client.service.ts b/desktop-app/src/app/adb-client.service.ts index 33ea70b..8de624c 100644 --- a/desktop-app/src/app/adb-client.service.ts +++ b/desktop-app/src/app/adb-client.service.ts @@ -399,31 +399,6 @@ export class AdbClientService { return 'adb'; } } - async downloadTools() { - let url = 'https://dl.google.com/android/repository/platform-tools-latest-'; - this.spinnerService.showLoader(); - let task = { status: 'Downloading/Extracting ADB...' }; - this.spinnerService.setMessage('', task); - return new Promise((resolve, reject) => { - this.appService - .downloadFile(url + 'windows.zip', url + 'linux.zip', url + 'darwin.zip', url => this.adbPath + '.zip', task) - .then(path => { - task.status = 'Extracting ADB...'; - this.appService.extract(path, { dir: this.appService.appData }, error => { - if (error) { - console.log(error); - reject(error); - } else { - this.appService.fs.unlink(path.toString(), err => { - if (err) return reject(err); - this.spinnerService.hideLoader(); - return resolve(); - }); - } - }); - }); - }).catch(e => console.log(e)); - } getFilenameDate() { return JSON.stringify(new Date()) .split('"') diff --git a/desktop-app/src/app/app.component.html b/desktop-app/src/app/app.component.html index 2dc448b..e95b231 100644 --- a/desktop-app/src/app/app.component.html +++ b/desktop-app/src/app/app.component.html @@ -5,7 +5,7 @@ - + @@ -15,9 +15,13 @@

Get Help

- We have a great community on discord and we have already faced most problems there. Please reach out on discord with the following error.

+ We have a great community on discord and we have already faced most problems there. Please check our FAQ for info on the following error.

{{helpStatus}} +
+
+
+


diff --git a/desktop-app/src/app/app.component.ts b/desktop-app/src/app/app.component.ts index 9a0741b..87ab539 100644 --- a/desktop-app/src/app/app.component.ts +++ b/desktop-app/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component, isDevMode, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, isDevMode, OnInit, ViewChild } from '@angular/core'; import { AppService } from './app.service'; import { LoadingSpinnerService } from './loading-spinner.service'; import { StatusBarService } from './status-bar.service'; @@ -11,11 +11,12 @@ import { AdbClientService } from './adb-client.service'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'], }) -export class AppComponent { +export class AppComponent implements OnInit, AfterViewInit { @ViewChild('spinner', { static: false }) spinner; @ViewChild('status', { static: false }) status; @ViewChild('webview', { static: false }) webview; helpStatus: string; + extraHelpStatus: string; devMode: boolean; constructor( private spinnerService: LoadingSpinnerService, @@ -31,7 +32,7 @@ export class AppComponent { ngOnInit() { this.adbService .setupAdb() - .then(() => this.appService.downloadScrCpyBinary()) + .then(() => this.appService.downloadScrCpyBinary(this.adbService)) .then(() => this.adbService.connectedStatus()) .then(() => { if (!localStorage.getItem('first_run')) { @@ -40,7 +41,6 @@ export class AppComponent { 'Thanks for downloading SideQuest! Please click "Setup" on the top menu to begin and then "Sign Up" to get app updates, remote installing and more!' ); } - this.dragService.setupDragAndDrop(this.webview.nativeElement); }); } @@ -49,4 +49,27 @@ export class AppComponent { this.statusService.setStatus(this.status); this.webService.setWebView(this.webview.nativeElement); } + setExterHelp() { + let uninstall_instructions = ` +
+
+
+ +
+
+ + SOLUTION: You may be able to resolve this issue by uninstalling the app first.

Click the apps icon at the top, then click the settings icon beside this app and finally click "Uninstall". You can then try to install this app again. +
+
+
+
`; + switch (true) { + case this.helpStatus.indexOf('INSTALL_FAILED_UPDATE_INCOMPATIBLE') > -1: + this.extraHelpStatus = uninstall_instructions; + break; + default: + this.extraHelpStatus = null; + break; + } + } } diff --git a/desktop-app/src/app/app.service.ts b/desktop-app/src/app/app.service.ts index 7180c4d..9cb6877 100644 --- a/desktop-app/src/app/app.service.ts +++ b/desktop-app/src/app/app.service.ts @@ -363,7 +363,7 @@ export class AppService { } } - downloadScrCpyBinary() { + downloadScrCpyBinary(adbClientService) { if (this.os.platform() === 'win32') { this.spinnerService.showLoader(); let task = { status: 'Downloading/Extracting ScrCpy...' }; @@ -399,7 +399,7 @@ export class AppService { }); }); } else { - this.scrcpyBinaryPath = 'scrcpy'; + this.scrcpyBinaryPath = ' ADB=' + adbClientService.adbPath + ' scrcpy'; } } deleteFolderRecursive(path) { diff --git a/desktop-app/src/app/files/files.component.ts b/desktop-app/src/app/files/files.component.ts index 86e38cd..238420c 100644 --- a/desktop-app/src/app/files/files.component.ts +++ b/desktop-app/src/app/files/files.component.ts @@ -152,19 +152,22 @@ export class FilesComponent implements OnInit { Math.round((stats.bytesTransferred / 1024 / 1024) * 100) / 100 + 'MB'; }) - .then(() => setTimeout(() => this.uploadFile(files, task), 500)); + .then(() => { + return new Promise(resolve => { + setTimeout(() => this.uploadFile(files, task).then(() => resolve()), 500); + }); + }); } uploadFilesFromList(files: string[]) { if (files !== undefined && files.length) { return this.processService.addItem('restore_files', async task => { task.status = 'Starting Upload to ' + this.currentPath; - this.uploadFile(files, task) + return this.uploadFile(files, task) .then(() => { setTimeout(() => { this.open(this.currentPath); - task.status = 'Upload complete! ' + this.currentPath; - this.statusService.showStatus('Files/Folders uploaded successfully!'); }, 1500); + task.status = 'Upload complete!'; }) .catch(e => this.statusService.showStatus(e.toString(), true)); }); diff --git a/desktop-app/src/app/tools/tools.component.html b/desktop-app/src/app/tools/tools.component.html index fbae355..d0508d2 100644 --- a/desktop-app/src/app/tools/tools.component.html +++ b/desktop-app/src/app/tools/tools.component.html @@ -68,7 +68,18 @@ (click)="setGuardian(GU.OFF)">OFF
- +
+ Full Rate Capture
+ This will enable/disable the full rate capture for videos recorded i.e. 60/72fps rather than 30fps. +
+
ON
+
OFF
+
Paste Text to your device
diff --git a/desktop-app/src/app/tools/tools.component.ts b/desktop-app/src/app/tools/tools.component.ts index 91b9bf8..7da7bfb 100644 --- a/desktop-app/src/app/tools/tools.component.ts +++ b/desktop-app/src/app/tools/tools.component.ts @@ -66,6 +66,7 @@ export class ToolsComponent implements OnInit { CA = CA; CR = CR; GPU = GPU; + FR = GU; pavlovName; constructor( public appService: AppService, @@ -111,6 +112,11 @@ export class ToolsComponent implements OnInit { this.statusService.showStatus('CPU/GPU level set OK!!'); }); } + setFullRate(fullRate: GU) { + this.adbService.runAdbCommand('adb shell setprop debug.oculus.fullRateCapture ' + (fullRate === GU.ON ? 1 : 0)).then(() => { + this.statusService.showStatus('Guardian pause set OK!!'); + }); + } setGuardian(guardian: GU) { this.adbService.runAdbCommand('adb shell setprop debug.oculus.guardian_pause ' + (guardian === GU.ON ? 1 : 0)).then(() => { this.statusService.showStatus('Guardian pause set OK!!'); @@ -250,11 +256,4 @@ export class ToolsComponent implements OnInit { } }); } - setHideNSFW() { - if (this.appService.hideNSFW) { - localStorage.setItem('hideNSFW', 'true'); - } else { - localStorage.removeItem('hideNSFW'); - } - } }