From 686efe0b9260c5ec0d61d866c0972c41d6e8713a Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 26 Jun 2020 14:12:39 +0100 Subject: [PATCH] fixed false positives with the install of OBB files --- build-electron/app.jsc | Bin 65192 -> 65192 bytes desktop-app/src/app/adb-client.service.ts | 17 +-- .../src/app/header/header.component.html | 4 +- .../src/app/header/header.component.ts | 5 +- desktop-app/src/app/tools/tools.component.ts | 99 ++++++++++++------ package.json | 2 +- 6 files changed, 82 insertions(+), 45 deletions(-) diff --git a/build-electron/app.jsc b/build-electron/app.jsc index 41bde0423a5e32c348ac05dc29959317bf161584..ffd5d84b73d5d65702326ebb5d120137bdc01161 100644 GIT binary patch delta 4473 zcmYjU4P1;_7jI@xqb471$Q0^nwlXVy=|d_?pNL9PHq=fvQwM> z=jX<6$5sxtK11psp#keK#45QWR=Fz5o~xf*XShDXOv3|)NRp`I$(RVJ*`Z~u;SnX0 z6t!|uQmjNR{iK9h?-geoqQMZ^j9^8gQW8sK=gd)%^+qgz81t5{Rwqkh)LMioyLvYs zcW{M^x1sAt1OwnPKS^vfyMTbg`iJb;0rTQAKbh*|i14B%*9n|`_{=*dIW0-8WN-{` zTkq=#{J<4bGPT>hPZ%v?UQ)6$E?KHl5%+pGeyfkucoa4B!O9O`g5o8rs3c{wnt%kn z<0iO@M|~HWxqDCpB6?@}c(FsGE^zbx3Js4nMX8X<<30wlWy<_R8lEmgNRpDm+4z5& zBudhq%d+t;j{?`o-g!74C~zKMSd1P(iMh`T#hT^A86qZG%EbR)31oS`l>?9d9)da0 zJ6f?A|IqgLDKR=4saZxWQl&(z)Xc6C__oTjw;CQ1sglP^SEfi+YFArZGEXq6o{yfO zjPC|v$EVceVLnCWx9fjS29hW$sUns|GyZ4&@Am+F%I}AERb2``9OlbegBChU=>BbI zFz(TzAmZ@zcX(b$2$NOkL+~y$qgds869<`@^b@AbX`!x?3&~#F=iz_!%y_A{Jn*=l z5NwPedE-^RG7x?LO9GuTT&4{r$|KM5;a3y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LLb|7>*8OI{0mk$L+%ZfzQm(PLl zoUAguUTyBTM ziUelFu8>0Z@T zr}VeS%{f$2v%RxX9Xo6=(-#RDQCG57vyom|spLQ(vGW~#cA^RDUb%D^pFhbAk|(Rf z@Y1O%U^~UUFZQbvL8Gg(2uD|4f{_ufdHAL(0CI0MG^5|?yKumP`wEAinF@-a?T)BE z;|>`cz8#Lc&%B4Rf{pnH(4s~G>Eri4q8HbMa3Frl3!qP* z8_t2&{EX4~{Cpe?bjg~DGixbu7IV7k?|($HqDeWc3aTd|OulbEe27 zn0I*`lsZShz?+xd;pnErKhl<00=W=hp_)g}s;}q4+dJZTl-%fs_T26MIO?ViRChg> z;x{+PL#iqN8Lqi0hJpbL9@3>ZHKvdSxE-+gKPKAo;<3#ImWjnxtCx)>H@F{OdCakFl<% zS3GC|kcmf3#Ml<5-UmI{is>!Opu_TN2nrrgfFkj&y>!syHlJ{OzSZq|5iOMDq>`yneCUiB267n3TQW2mjSE z7@C4(yD_fR%6EAWeAUJl*kj08=gBS*4@-d#0@x+vn2m?;V*BuY2JG SaNY+IIG60tp_hFa&G{csq`|QO diff --git a/desktop-app/src/app/adb-client.service.ts b/desktop-app/src/app/adb-client.service.ts index 283ccf4..693e4aa 100644 --- a/desktop-app/src/app/adb-client.service.ts +++ b/desktop-app/src/app/adb-client.service.ts @@ -74,6 +74,9 @@ export class AdbClientService { }; } runAdbCommand(adbCommandToRun) { + if (this.deviceStatus !== ConnectionStatus.CONNECTED) { + return Promise.reject('Adb command failed - No device connected!'); + } this.adbResponse = 'Loading...'; let command = adbCommandToRun.trim(); if (command.substr(0, 3).toLowerCase() === 'adb') { @@ -83,6 +86,7 @@ export class AdbClientService { this.appService.exec( '"' + this.appService.path.join(this.adbPath, this.getAdbBinary()) + '" -s ' + this.deviceSerial + ' ' + command, function(err, stdout, stderr) { + console.log(err, stdout, stderr); if (err) { return reject(err); } @@ -90,13 +94,9 @@ export class AdbClientService { return resolve(stdout); } ); - }) - .then((resp: string) => { - this.adbResponse = resp.trim() || 'Command Completed.'; - }) - .catch(e => { - this.statusService.showStatus(e, true); - }); + }).then((resp: string) => { + this.adbResponse = resp.trim() || 'Command Completed.'; + }); } launchApp(packageName) { return this.adbCommand('shell', { @@ -896,6 +896,7 @@ export class AdbClientService { cb(); } p = p.then(() => { + console.log('here'); if (task) { task.status = name + ' File transferred successfully! '; } else { @@ -906,7 +907,7 @@ export class AdbClientService { p = p.catch(e => { if (task) { task.failed = true; - task.status = name + ' Failed to transfer file!!'; + task.status = name + ' - Failed to transfer file: ' + e.toString(); } else { this.spinnerService.hideLoader(); this.statusService.showStatus(e.toString(), true); diff --git a/desktop-app/src/app/header/header.component.html b/desktop-app/src/app/header/header.component.html index c8e9b5d..05c0819 100644 --- a/desktop-app/src/app/header/header.component.html +++ b/desktop-app/src/app/header/header.component.html @@ -73,7 +73,7 @@ >tocLogcat
{{favourite.name}}

@@ -458,7 +458,7 @@
- {{favourite.name}} + {{favourite.name}}

diff --git a/desktop-app/src/app/header/header.component.ts b/desktop-app/src/app/header/header.component.ts index 6645e67..0b98ee0 100644 --- a/desktop-app/src/app/header/header.component.ts +++ b/desktop-app/src/app/header/header.component.ts @@ -152,7 +152,9 @@ export class HeaderComponent implements OnInit { ngOnInit() {} runAdbCommand() { - return this.adbService.runAdbCommand(this.adbCommandToRun); + return this.adbService.runAdbCommand(this.adbCommandToRun).catch(e => { + this.statusService.showStatus(e, true); + }); } connectWifi() { this.adbCommandToRun = 'adb tcpip 5555'; @@ -164,7 +166,6 @@ export class HeaderComponent implements OnInit { }, 5000); }); } - isConnected() { return this.adbService.deviceStatus === ConnectionStatus.CONNECTED; } diff --git a/desktop-app/src/app/tools/tools.component.ts b/desktop-app/src/app/tools/tools.component.ts index d83980f..7ac23c2 100644 --- a/desktop-app/src/app/tools/tools.component.ts +++ b/desktop-app/src/app/tools/tools.component.ts @@ -99,38 +99,57 @@ export class ToolsComponent implements OnInit { value = 4; break; } - this.adbService.runAdbCommand('adb shell debug.oculus.foveation.level ' + value).then(() => { - this.statusService.showStatus('Fixed Foveated Rendering set OK!!'); - }); + this.runAdbCommand('adb shell debug.oculus.foveation.level ' + value) + .then(() => { + this.statusService.showStatus('Fixed Foveated Rendering set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); + }); + } + runAdbCommand(command: string) { + return this.adbService.runAdbCommand(command); } setGPU(gpu: GPU) { let value = gpu === GPU._2 ? 2 : 4; - this.adbService - .runAdbCommand('adb shell setprop debug.oculus.cpuLevel ' + value) - .then(() => this.adbService.runAdbCommand('adb shell setprop debug.oculus.gpuLevel ' + value)) + this.runAdbCommand('adb shell setprop debug.oculus.cpuLevel ' + value) + .then(() => this.runAdbCommand('adb shell setprop debug.oculus.gpuLevel ' + value)) .then(() => { this.statusService.showStatus('CPU/GPU level set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); }); } setFullRate(fullRate: GU) { - this.adbService.runAdbCommand('adb shell setprop debug.oculus.fullRateCapture ' + (fullRate === GU.ON ? 1 : 0)).then(() => { - this.statusService.showStatus('Full Rate Capture set OK!!'); - }); + this.runAdbCommand('adb shell setprop debug.oculus.fullRateCapture ' + (fullRate === GU.ON ? 1 : 0)) + .then(() => { + this.statusService.showStatus('Full Rate Capture set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); + }); } 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!!'); - }); + this.runAdbCommand('adb shell setprop debug.oculus.guardian_pause ' + (guardian === GU.ON ? 1 : 0)) + .then(() => { + this.statusService.showStatus('Guardian pause set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); + }); } setCa(ca: CA) { - this.adbService - .runAdbCommand('adb shell setprop debug.oculus.forceChroma ' + (ca === CA.ON ? 1 : ca === CA.APP ? -1 : 0)) + this.runAdbCommand('adb shell setprop debug.oculus.forceChroma ' + (ca === CA.ON ? 1 : ca === CA.APP ? -1 : 0)) .then(() => { this.statusService.showStatus('Chromatic Aberration set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); }); } setSSO(sso: SSO) { - let value: number = 0; + let value = 0; switch (sso) { case SSO._512: value = 512; @@ -158,11 +177,13 @@ export class ToolsComponent implements OnInit { break; } - this.adbService - .runAdbCommand('adb shell setprop debug.oculus.textureWidth ' + value) - .then(() => this.adbService.runAdbCommand('adb shell setprop debug.oculus.textureHeight ' + value)) + this.runAdbCommand('adb shell setprop debug.oculus.textureWidth ' + value) + .then(() => this.runAdbCommand('adb shell setprop debug.oculus.textureHeight ' + value)) .then(() => { this.statusService.showStatus('Texture Resolution set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); }); } setSVB(svb: SVB) { @@ -178,9 +199,13 @@ export class ToolsComponent implements OnInit { value = 25000000; break; } - this.adbService.runAdbCommand('adb shell setprop debug.oculus.videoBitrate ' + value).then(() => { - this.statusService.showStatus('Video Bitrate set OK!!'); - }); + this.runAdbCommand('adb shell setprop debug.oculus.videoBitrate ' + value) + .then(() => { + this.statusService.showStatus('Video Bitrate set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); + }); } setCR(svr: CR) { let width: number = 1280; @@ -199,11 +224,13 @@ export class ToolsComponent implements OnInit { height = 1080; break; } - this.adbService - .runAdbCommand('adb shell setprop debug.oculus.capture.width ' + width) - .then(() => this.adbService.runAdbCommand('adb shell setprop debug.oculus.capture.height ' + height)) + this.runAdbCommand('adb shell setprop debug.oculus.capture.width ' + width) + .then(() => this.runAdbCommand('adb shell setprop debug.oculus.capture.height ' + height)) .then(() => { this.statusService.showStatus('Capture Resolution set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); }); } setSVR(svr: SVR) { @@ -216,9 +243,13 @@ export class ToolsComponent implements OnInit { value = 1536; break; } - this.adbService.runAdbCommand('adb shell setprop debug.oculus.videoResolution ' + value).then(() => { - this.statusService.showStatus('Video Resolution set OK!!'); - }); + this.runAdbCommand('adb shell setprop debug.oculus.videoResolution ' + value) + .then(() => { + this.statusService.showStatus('Video Resolution set OK!!'); + }) + .catch(e => { + this.statusService.showStatus(e, true); + }); } setPavlovPermission() { return this.adbService @@ -227,10 +258,14 @@ export class ToolsComponent implements OnInit { .then(() => this.adbService.setPermission('com.vankrupt.pavlov', 'android.permission.WRITE_EXTERNAL_STORAGE')); } setPavlovName() { - this.adbService.adbCommand('shell', { - serial: this.adbService.deviceSerial, - command: 'echo ' + this.pavlovName + ' > /sdcard/pavlov.name.txt', - }); + this.adbService + .adbCommand('shell', { + serial: this.adbService.deviceSerial, + command: 'echo ' + this.pavlovName + ' > /sdcard/pavlov.name.txt', + }) + .catch(e => { + this.statusService.showStatus(e, true); + }); } pasteToDevice() { this._textToSend = this.textToSend.split(''); @@ -250,7 +285,7 @@ export class ToolsComponent implements OnInit { } inputCharacters() { let character = this._textToSend.shift(); - return this.adbService.runAdbCommand('adb shell input text "' + character + '"').then(() => { + return this.runAdbCommand('adb shell input text "' + character + '"').then(() => { if (this._textToSend.length) { return this.inputCharacters(); } diff --git a/package.json b/package.json index 4823e8a..31bac52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "SideQuest", "productName": "SideQuest", - "version": "0.10.9", + "version": "0.10.10", "description": "A open app store for mobile android based VR devices such as the Levovo Mirage, Oculus Go, Oculus Quest, Vive Focus.", "repository": "https://github.com/the-expanse/SideQuest.git", "license": "UNLICENCED",