diff --git a/build-electron/app.jsc b/build-electron/app.jsc
index 41bde04..ffd5d84 100644
Binary files a/build-electron/app.jsc and b/build-electron/app.jsc differ
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",