fixed false positives with the install of OBB files

This commit is contained in:
Your Name
2020-08-17 13:31:49 +01:00
parent 52d6922713
commit 686efe0b92
6 changed files with 82 additions and 45 deletions
Binary file not shown.
+9 -8
View File
@@ -74,6 +74,9 @@ export class AdbClientService {
}; };
} }
runAdbCommand(adbCommandToRun) { runAdbCommand(adbCommandToRun) {
if (this.deviceStatus !== ConnectionStatus.CONNECTED) {
return Promise.reject('Adb command failed - No device connected!');
}
this.adbResponse = 'Loading...'; this.adbResponse = 'Loading...';
let command = adbCommandToRun.trim(); let command = adbCommandToRun.trim();
if (command.substr(0, 3).toLowerCase() === 'adb') { if (command.substr(0, 3).toLowerCase() === 'adb') {
@@ -83,6 +86,7 @@ export class AdbClientService {
this.appService.exec( this.appService.exec(
'"' + this.appService.path.join(this.adbPath, this.getAdbBinary()) + '" -s ' + this.deviceSerial + ' ' + command, '"' + this.appService.path.join(this.adbPath, this.getAdbBinary()) + '" -s ' + this.deviceSerial + ' ' + command,
function(err, stdout, stderr) { function(err, stdout, stderr) {
console.log(err, stdout, stderr);
if (err) { if (err) {
return reject(err); return reject(err);
} }
@@ -90,13 +94,9 @@ export class AdbClientService {
return resolve(stdout); return resolve(stdout);
} }
); );
}) }).then((resp: string) => {
.then((resp: string) => { this.adbResponse = resp.trim() || 'Command Completed.';
this.adbResponse = resp.trim() || 'Command Completed.'; });
})
.catch(e => {
this.statusService.showStatus(e, true);
});
} }
launchApp(packageName) { launchApp(packageName) {
return this.adbCommand('shell', { return this.adbCommand('shell', {
@@ -896,6 +896,7 @@ export class AdbClientService {
cb(); cb();
} }
p = p.then(() => { p = p.then(() => {
console.log('here');
if (task) { if (task) {
task.status = name + ' File transferred successfully! '; task.status = name + ' File transferred successfully! ';
} else { } else {
@@ -906,7 +907,7 @@ export class AdbClientService {
p = p.catch(e => { p = p.catch(e => {
if (task) { if (task) {
task.failed = true; task.failed = true;
task.status = name + ' Failed to transfer file!!'; task.status = name + ' - Failed to transfer file: ' + e.toString();
} else { } else {
this.spinnerService.hideLoader(); this.spinnerService.hideLoader();
this.statusService.showStatus(e.toString(), true); this.statusService.showStatus(e.toString(), true);
@@ -73,7 +73,7 @@
><i class="material-icons left">toc</i>Logcat</div><br> ><i class="material-icons left">toc</i>Logcat</div><br>
<ng-container *ngFor="let favourite of favourites.commandFavourites"> <ng-container *ngFor="let favourite of favourites.commandFavourites">
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate" <div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
(click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none';adbService.runAdbCommand(favourite.uri); adbModal.openModal()" (click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none';adbCommandToRun = favourite.uri; runAdbCommand(); adbModal.openModal()"
><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br> ><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br>
</ng-container> </ng-container>
</div> </div>
@@ -458,7 +458,7 @@
</div> </div>
<br> <br>
<ng-container *ngFor="let favourite of favourites.commandFavourites"> <ng-container *ngFor="let favourite of favourites.commandFavourites">
<span class="chip margin-right pointer" (click)="adbService.runAdbCommand(favourite.uri)"><img *ngIf="favourite.icon" src="{{favourite.icon}}"/>{{favourite.name}}</span> <span class="chip margin-right pointer" (click)="this.adbCommandToRun = favourite.uri; runAdbCommand()"><img *ngIf="favourite.icon" src="{{favourite.icon}}"/>{{favourite.name}}</span>
</ng-container> </ng-container>
<br><br> <br><br>
</mz-modal-content> </mz-modal-content>
@@ -152,7 +152,9 @@ export class HeaderComponent implements OnInit {
ngOnInit() {} ngOnInit() {}
runAdbCommand() { runAdbCommand() {
return this.adbService.runAdbCommand(this.adbCommandToRun); return this.adbService.runAdbCommand(this.adbCommandToRun).catch(e => {
this.statusService.showStatus(e, true);
});
} }
connectWifi() { connectWifi() {
this.adbCommandToRun = 'adb tcpip 5555'; this.adbCommandToRun = 'adb tcpip 5555';
@@ -164,7 +166,6 @@ export class HeaderComponent implements OnInit {
}, 5000); }, 5000);
}); });
} }
isConnected() { isConnected() {
return this.adbService.deviceStatus === ConnectionStatus.CONNECTED; return this.adbService.deviceStatus === ConnectionStatus.CONNECTED;
} }
+67 -32
View File
@@ -99,38 +99,57 @@ export class ToolsComponent implements OnInit {
value = 4; value = 4;
break; break;
} }
this.adbService.runAdbCommand('adb shell debug.oculus.foveation.level ' + value).then(() => { this.runAdbCommand('adb shell debug.oculus.foveation.level ' + value)
this.statusService.showStatus('Fixed Foveated Rendering set OK!!'); .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) { setGPU(gpu: GPU) {
let value = gpu === GPU._2 ? 2 : 4; let value = gpu === GPU._2 ? 2 : 4;
this.adbService this.runAdbCommand('adb shell setprop debug.oculus.cpuLevel ' + value)
.runAdbCommand('adb shell setprop debug.oculus.cpuLevel ' + value) .then(() => this.runAdbCommand('adb shell setprop debug.oculus.gpuLevel ' + value))
.then(() => this.adbService.runAdbCommand('adb shell setprop debug.oculus.gpuLevel ' + value))
.then(() => { .then(() => {
this.statusService.showStatus('CPU/GPU level set OK!!'); this.statusService.showStatus('CPU/GPU level set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
}); });
} }
setFullRate(fullRate: GU) { setFullRate(fullRate: GU) {
this.adbService.runAdbCommand('adb shell setprop debug.oculus.fullRateCapture ' + (fullRate === GU.ON ? 1 : 0)).then(() => { this.runAdbCommand('adb shell setprop debug.oculus.fullRateCapture ' + (fullRate === GU.ON ? 1 : 0))
this.statusService.showStatus('Full Rate Capture set OK!!'); .then(() => {
}); this.statusService.showStatus('Full Rate Capture set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
});
} }
setGuardian(guardian: GU) { setGuardian(guardian: GU) {
this.adbService.runAdbCommand('adb shell setprop debug.oculus.guardian_pause ' + (guardian === GU.ON ? 1 : 0)).then(() => { this.runAdbCommand('adb shell setprop debug.oculus.guardian_pause ' + (guardian === GU.ON ? 1 : 0))
this.statusService.showStatus('Guardian pause set OK!!'); .then(() => {
}); this.statusService.showStatus('Guardian pause set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
});
} }
setCa(ca: CA) { setCa(ca: CA) {
this.adbService this.runAdbCommand('adb shell setprop debug.oculus.forceChroma ' + (ca === CA.ON ? 1 : ca === CA.APP ? -1 : 0))
.runAdbCommand('adb shell setprop debug.oculus.forceChroma ' + (ca === CA.ON ? 1 : ca === CA.APP ? -1 : 0))
.then(() => { .then(() => {
this.statusService.showStatus('Chromatic Aberration set OK!!'); this.statusService.showStatus('Chromatic Aberration set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
}); });
} }
setSSO(sso: SSO) { setSSO(sso: SSO) {
let value: number = 0; let value = 0;
switch (sso) { switch (sso) {
case SSO._512: case SSO._512:
value = 512; value = 512;
@@ -158,11 +177,13 @@ export class ToolsComponent implements OnInit {
break; break;
} }
this.adbService this.runAdbCommand('adb shell setprop debug.oculus.textureWidth ' + value)
.runAdbCommand('adb shell setprop debug.oculus.textureWidth ' + value) .then(() => this.runAdbCommand('adb shell setprop debug.oculus.textureHeight ' + value))
.then(() => this.adbService.runAdbCommand('adb shell setprop debug.oculus.textureHeight ' + value))
.then(() => { .then(() => {
this.statusService.showStatus('Texture Resolution set OK!!'); this.statusService.showStatus('Texture Resolution set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
}); });
} }
setSVB(svb: SVB) { setSVB(svb: SVB) {
@@ -178,9 +199,13 @@ export class ToolsComponent implements OnInit {
value = 25000000; value = 25000000;
break; break;
} }
this.adbService.runAdbCommand('adb shell setprop debug.oculus.videoBitrate ' + value).then(() => { this.runAdbCommand('adb shell setprop debug.oculus.videoBitrate ' + value)
this.statusService.showStatus('Video Bitrate set OK!!'); .then(() => {
}); this.statusService.showStatus('Video Bitrate set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
});
} }
setCR(svr: CR) { setCR(svr: CR) {
let width: number = 1280; let width: number = 1280;
@@ -199,11 +224,13 @@ export class ToolsComponent implements OnInit {
height = 1080; height = 1080;
break; break;
} }
this.adbService this.runAdbCommand('adb shell setprop debug.oculus.capture.width ' + width)
.runAdbCommand('adb shell setprop debug.oculus.capture.width ' + width) .then(() => this.runAdbCommand('adb shell setprop debug.oculus.capture.height ' + height))
.then(() => this.adbService.runAdbCommand('adb shell setprop debug.oculus.capture.height ' + height))
.then(() => { .then(() => {
this.statusService.showStatus('Capture Resolution set OK!!'); this.statusService.showStatus('Capture Resolution set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
}); });
} }
setSVR(svr: SVR) { setSVR(svr: SVR) {
@@ -216,9 +243,13 @@ export class ToolsComponent implements OnInit {
value = 1536; value = 1536;
break; break;
} }
this.adbService.runAdbCommand('adb shell setprop debug.oculus.videoResolution ' + value).then(() => { this.runAdbCommand('adb shell setprop debug.oculus.videoResolution ' + value)
this.statusService.showStatus('Video Resolution set OK!!'); .then(() => {
}); this.statusService.showStatus('Video Resolution set OK!!');
})
.catch(e => {
this.statusService.showStatus(e, true);
});
} }
setPavlovPermission() { setPavlovPermission() {
return this.adbService return this.adbService
@@ -227,10 +258,14 @@ export class ToolsComponent implements OnInit {
.then(() => this.adbService.setPermission('com.vankrupt.pavlov', 'android.permission.WRITE_EXTERNAL_STORAGE')); .then(() => this.adbService.setPermission('com.vankrupt.pavlov', 'android.permission.WRITE_EXTERNAL_STORAGE'));
} }
setPavlovName() { setPavlovName() {
this.adbService.adbCommand('shell', { this.adbService
serial: this.adbService.deviceSerial, .adbCommand('shell', {
command: 'echo ' + this.pavlovName + ' > /sdcard/pavlov.name.txt', serial: this.adbService.deviceSerial,
}); command: 'echo ' + this.pavlovName + ' > /sdcard/pavlov.name.txt',
})
.catch(e => {
this.statusService.showStatus(e, true);
});
} }
pasteToDevice() { pasteToDevice() {
this._textToSend = this.textToSend.split(''); this._textToSend = this.textToSend.split('');
@@ -250,7 +285,7 @@ export class ToolsComponent implements OnInit {
} }
inputCharacters() { inputCharacters() {
let character = this._textToSend.shift(); 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) { if (this._textToSend.length) {
return this.inputCharacters(); return this.inputCharacters();
} }
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "SideQuest", "name": "SideQuest",
"productName": "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.", "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", "repository": "https://github.com/the-expanse/SideQuest.git",
"license": "UNLICENCED", "license": "UNLICENCED",