Lots of fixes....

This commit is contained in:
Nathanael Anderson
2024-03-28 18:58:00 -06:00
parent 112546c13b
commit 48a675b71e
10 changed files with 170 additions and 69 deletions
+40 -13
View File
@@ -57,7 +57,7 @@ export class AdbClientService {
devices: ADBDevice[];
displayDevices: ADBDevice[];
deviceName: string;
connectionCss: any;
connectionCss: string = "connection-status-unauthorized";
obbRegex = /[a-z]{4,5}.[0-9]{1,}.([A-z0-9.]{1,}).obb/;
freespace = {
available: '',
@@ -85,13 +85,25 @@ export class AdbClientService {
this.setConnectionCssClass();
}
setConnectionCssClass() {
this.connectionCss = {
'connection-status-connected': this.deviceStatus === ConnectionStatus.CONNECTED,
'connection-status-unauthorized': this.deviceStatus === ConnectionStatus.UNAUTHORIZED,
'connection-status-disconnected': this.deviceStatus === ConnectionStatus.DISCONNECTED,
'connection-status-too-many': this.deviceStatus === ConnectionStatus.LINUX_PERMS,
'connection-status-dev-mode': this.deviceStatus === ConnectionStatus.DEV_MODE,
};
switch ( this.deviceStatus ) {
case ConnectionStatus.CONNECTED:
this.connectionCss = 'connection-status-connected';
break;
case ConnectionStatus.UNAUTHORIZED:
this.connectionCss = 'connection-status-unauthorized';
break;
case ConnectionStatus.DISCONNECTED:
this.connectionCss = 'connection-status-disconnected';
break;
case ConnectionStatus.LINUX_PERMS:
this.connectionCss = 'connection-status-too-many';
break;
case ConnectionStatus.DEV_MODE:
this.connectionCss = 'connection-status-dev-mode';
break;
default:
this.connectionCss = 'connection-status-unauthorized';
}
}
diagBegin() {
@@ -147,13 +159,19 @@ export class AdbClientService {
command = command.substr(3);
}
return new Promise((resolve, reject) => {
const cmd = '"' + this.appService.path.join(this.adbPath, this.getAdbBinary()) + '" -s ' + this.deviceSerial + ' ' + command
this.appService.exec(
'"' + this.appService.path.join(this.adbPath, this.getAdbBinary()) + '" -s ' + this.deviceSerial + ' ' + command,
cmd,
function(err, stdout, stderr) {
if (err) {
return reject(err);
}
if (stderr) return reject(stderr);
if (stderr) {
// Monkey always reports the Args/Commands on stderr, so ignore it if that is all that it is...
if (cmd.indexOf("shell monkey -p") === -1 || stderr.indexOf("data=\"android.intent.category.LAUNCHER\"") !== stderr.length - 40) {
return reject(stderr);
}
}
return resolve(stdout);
}
);
@@ -246,13 +264,22 @@ export class AdbClientService {
((p.substr(0, 10) !== 'com.oculus' &&
p.substr(0, 11) !== 'com.android' &&
p.substr(0, 11) !== 'android.ext' &&
p.substr(0, 8) !== 'com.meta' &&
p !== 'android' &&
p.substr(0, 12) !== 'com.qualcomm' &&
p !== 'com.facebook.system' &&
p !== 'oculus.platform' &&
p !== 'com.svox.pico' &&
p !== 'org.codeaurora.bluetooth') ||
p === 'com.oculus.DogCorp')
p !== 'org.codeaurora.bluetooth' &&
p !== 'com.facebook.wearable.system.location.proxy' &&
p !== 'com.facebook.arvr.quillplayer' &&
p !== 'com.facebook.wearable.system.location.service' &&
p !== 'com.facebook.spatial_persistence_service' &&
p !== 'meta.skymap.service'
) ||
p === 'com.oculus.DogCorp' ||
p === 'com.meta.samples.crypticcabinet'
)
);
});
// if (this.devicePackages.indexOf('com.apkinstaller.ApkInstaller') > -1 ) {
@@ -338,7 +365,7 @@ export class AdbClientService {
}
this.displayDevices = this.devices;
})();
document.getElementById('connection-status').className = 'connection-status-' + status;
document.getElementById('connection-status').className = this.connectionCss;
switch (this.deviceStatus) {
case ConnectionStatus.LINUX_PERMS:
this.deviceStatusMessage = 'Warning: no permissions. ADB udev rules missing.';
@@ -115,7 +115,6 @@ export class HeaderBannerComponent implements OnInit {
// this.telemetry.telemetry({ event: 'install-sidequest-apk', installType: telemEvent, oldVersion });
this.isLoading = true;
try {
throw new Error('bypass_sdk_download');
await this.getLatestApk();
await this.downloadAPK();
} catch (e) {
@@ -132,7 +132,7 @@
arrow_drop_down
</i>
<div class="connection-status-outer left">
<div id="connection-status" class="connection-status-unauthorized"
<div id="connection-status" [class]="adbService.connectionCss"
data-position="bottom" [ngClass]="adbService.connectionCss" mTooltip [attr.data-tooltip]="adbService.lastErrorMessage||'Device connection status.'">
@@ -434,15 +434,16 @@
</div>
</div>
</ng-container>
<ng-container>
<h4 class="section-title">SideQuest Stuff </h4>
<div class="section-container card z-depth-2">
<h5 class="section-title">SideQuest Folders</h5>
<!-- <div class="divider header-divider-margin margin-bottom"></div> -->
<h4 class="description-section">
This changes the resolution of captured videos on the Quest
This allows you to open a folder in your file explorer.
</h4>
<div class="button-section">
@@ -16,6 +16,8 @@
<p>If you are still having trouble then please visit our support community on SideQuest.</p>
<div class="pure-material-button-contained extra-margin-bottom" (click)="appService.opn('https://sdq.st/support')">Open Support Community</div>
<br>
<ng-container *nfIf="false">
TODO: This site is no longer active -- find another way....
<p *ngIf="adb.diagnostics?.usb && adb.diagnostics.usb.log">If instructed to upload logs by a SideQuest support person, please click this button.</p>
<div *ngIf="adb.diagnostics?.usb && adb.diagnostics.usb.log" class="pure-material-button-contained extra-margin-bottom" (click)="uploadLogs();">{{'Upload Logs'}}</div>
<div *ngIf="link">
@@ -23,6 +25,7 @@
<h3>{{link}}</h3>
<div class="pure-material-button-contained button-margin-bottom" (click)="copyToClipboard()">Copy to Clipboard</div>
</div>
</ng-container>
<div id="thankYou">
<ng-container *ngIf="link">Thank you!</ng-container>
</div>
@@ -51,8 +51,7 @@ export class SetupGuideComponent implements OnInit {
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
.join('&');
try {
const ftch = (window as any).require('node-fetch');
const resp = await ftch('https://api.teknik.io/v1/Paste', {
const resp = await fetch('https://api.teknik.io/v1/Paste', {
body: formData,
method: 'POST',
headers: {
@@ -1,5 +1,5 @@
export const environment = {
production: false,
production: true,
header: {color: "sidetestvr", text: "Side Test VR"},
configuration: {
web_url: 'https://sidetestvr.com',