More bug fixes
This commit is contained in:
@@ -653,11 +653,10 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
deleteAfter?: boolean,
|
||||
name?: string
|
||||
) {
|
||||
console.log("Starting install of APK", filePath, isLocal, shouldUninstall, number, total, deleteAfter, name)
|
||||
// console.log("Starting install of APK", filePath, isLocal, shouldUninstall, number, total, deleteAfter, name)
|
||||
return this.processService.addItem(
|
||||
'apk_install',
|
||||
task => {
|
||||
console.log("Task APK", filePath, isLocal, shouldUninstall, number, total, deleteAfter, name)
|
||||
|
||||
if (this.deviceStatus !== ConnectionStatus.CONNECTED) {
|
||||
return Promise.reject(name + 'Apk install failed - No device connected!');
|
||||
@@ -666,7 +665,6 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
task.show_total = showTotal;
|
||||
task.app_name = name || '';
|
||||
task.status = name + showTotal + 'Installing Apk... ';
|
||||
console.log('Installing filePath', filePath, 'Name', name);
|
||||
return this.adbCommand('install', { serial: this.deviceSerial, path: filePath, isLocal: !!isLocal }, status => {
|
||||
if (status.percent && status.size && status.time) {
|
||||
task.status =
|
||||
@@ -682,17 +680,19 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
}
|
||||
})
|
||||
.then(r => {
|
||||
task.status = name + 'APK installed ok!!';
|
||||
if (deleteAfter) {
|
||||
this.appService.fs.unlink(filePath, err => {});
|
||||
}
|
||||
if (filePath.indexOf('com.weloveoculus.BMBF') > -1) {
|
||||
return this.beatonService.setBeatOnPermission(this);
|
||||
}
|
||||
if (filePath.indexOf('quest.side.vr') > -1) {
|
||||
if (filePath.indexOf('quest.side.vr') > -1 || filePath.toLowerCase().indexOf("/sidequestvr-") > -1) {
|
||||
return this.addVRPermissions();
|
||||
}
|
||||
})
|
||||
//console.log("APK Installed", filePath)
|
||||
}).then(() => {
|
||||
task.status = name + 'APK installed ok!!';
|
||||
})
|
||||
.catch(async e => {
|
||||
if (deleteAfter) {
|
||||
this.appService.fs.unlink(filePath, err => {});
|
||||
@@ -1283,8 +1283,16 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
}
|
||||
|
||||
private async addVRPermissions() {
|
||||
await this.adbCommand('shell "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"', { serial: this.deviceSerial });
|
||||
await this.adbCommand('shell "pm grant quest.side.vr android.permission.READ_LOGS"', { serial: this.deviceSerial });
|
||||
console.log("Adding VR Permissions");
|
||||
|
||||
await this.adbCommand('shell', {
|
||||
serial: this.deviceSerial,
|
||||
command: "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"
|
||||
});
|
||||
await this.adbCommand('shell', {
|
||||
command: "pm grant quest.side.vr android.permission.READ_LOGS",
|
||||
serial: this.deviceSerial });
|
||||
|
||||
try {
|
||||
const homedir = process.env.USERPROFILE || process.env.HOME;
|
||||
if (this.appService.fs.existsSync(homedir + '/.android/adbkey')) {
|
||||
@@ -1299,8 +1307,9 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
|
||||
if (rawCertificate && rawCertificate.length) {
|
||||
await this.adbCommand(
|
||||
[
|
||||
|
||||
'shell',
|
||||
{ command: [
|
||||
'am',
|
||||
'start',
|
||||
'-a',
|
||||
@@ -1310,7 +1319,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
'--es',
|
||||
'CERTIFICATE',
|
||||
rawCertificate,
|
||||
].join(' '), { serial: this.deviceSerial }
|
||||
].join(' '), serial: this.deviceSerial }
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1319,7 +1328,15 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
}
|
||||
|
||||
this.skipStatusUpdates = true;
|
||||
await this.adbCommand('tcpip 5555', { serial: this.deviceSerial });
|
||||
setTimeout(() => { this.skipStatusUpdates = false; }, 3000);
|
||||
await this.adbCommand('tcpip', {command: '5555', serial: this.deviceSerial });
|
||||
|
||||
await this.sleep(5000);
|
||||
this.skipStatusUpdates = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { LoadingSpinnerService } from './loading-spinner.service';
|
||||
import { StatusBarService } from './status-bar.service';
|
||||
import { WebviewService } from './webview.service';
|
||||
import { DragAndDropService } from './drag-and-drop.service';
|
||||
import { ElectronService } from './electron.service';
|
||||
import { AdbClientService } from './adb-client.service';
|
||||
import { environment } from '../environments/environment';
|
||||
|
||||
@@ -29,7 +28,6 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||
public appService: AppService,
|
||||
public webService: WebviewService,
|
||||
public dragService: DragAndDropService,
|
||||
private electronService: ElectronService
|
||||
) {
|
||||
this.devMode = isDevMode();
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export class HeaderBannerComponent implements OnInit {
|
||||
// the latest available version of the in-headset app
|
||||
private latestAppVersion: string | null = null;
|
||||
private appId: string | null = null;
|
||||
private addedPerms = false;
|
||||
constructor(public appService: AppService, public adb: AdbClientService) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -44,6 +45,12 @@ export class HeaderBannerComponent implements OnInit {
|
||||
this.isOutOfDate = true;
|
||||
return;
|
||||
}
|
||||
if (!this.addedPerms) {
|
||||
this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"', true).then(() => {
|
||||
this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.READ_LOGS"', true);
|
||||
});
|
||||
this.addedPerms = true;
|
||||
}
|
||||
}
|
||||
this.isOutOfDate = false;
|
||||
}
|
||||
@@ -116,6 +123,7 @@ export class HeaderBannerComponent implements OnInit {
|
||||
// this.toast.show('SideQuest installed to headset!');
|
||||
// this.showConfetti = true;
|
||||
this.adb.appVersionCode = await this.adb.getAppVersion(true);
|
||||
|
||||
await this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"', true);
|
||||
await this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.READ_LOGS"', true);
|
||||
try {
|
||||
|
||||
@@ -108,14 +108,14 @@ export class HeaderComponent implements OnInit {
|
||||
private router: Router
|
||||
) {
|
||||
this.osPlatform = this.appService.os.platform();
|
||||
console.log('Platform: ' + this.osPlatform);
|
||||
//console.log('Platform: ' + this.osPlatform);
|
||||
this.resetFavourites('browserFavourites');
|
||||
this.resetFavourites('fileFavourites');
|
||||
this.resetFavourites('commandFavourites');
|
||||
this.appService.headerComponent = this;
|
||||
this.headerClass = environment.header?.color || "";
|
||||
this.headerText = environment.header?.text || "";
|
||||
console.log('Header: ' + this.headerClass + ' ' + this.headerText);
|
||||
//console.log('Header: ' + this.headerClass + ' ' + this.headerText);
|
||||
}
|
||||
doBack() {
|
||||
if (
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
<span>Default - Quest 2</span>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<input name="textureSize" type="radio" value="1680-1760" [(ngModel)]="textureSize" (click)="setSSO(SSO._Quest3)"/>
|
||||
<span>Default - Quest 3</span>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<input name="textureSize" type="radio" value="512-563" [(ngModel)]="textureSize" (click)="setSSO(SSO._512)"/>
|
||||
|
||||
@@ -40,6 +40,7 @@ enum SSO {
|
||||
_Go,
|
||||
_Quest1,
|
||||
_Quest2,
|
||||
_Quest3,
|
||||
}
|
||||
enum CR {
|
||||
_480,
|
||||
@@ -430,6 +431,11 @@ export class HeadsetSettingsComponent implements OnInit {
|
||||
value = 1440;
|
||||
hvalue = 1584;
|
||||
break;
|
||||
case SSO._Quest3:
|
||||
value = 1680;
|
||||
hvalue = 1760;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
this.runAdbCommand('setprop debug.oculus.textureWidth ' + value)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppService } from './app.service';
|
||||
import { Notification, StatusBarComponent, StatusType } from './status-bar/status-bar.component';
|
||||
import { StatusBarComponent } from './status-bar/status-bar.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
||||
@@ -8,35 +8,28 @@
|
||||
color: white;
|
||||
width: 100%;
|
||||
}
|
||||
.status-bar-inner{
|
||||
padding: 10px;
|
||||
padding-left: 15px;
|
||||
padding-right: 80px;
|
||||
.status-bar-inner {
|
||||
padding: 10px 80px 10px 15px;
|
||||
}
|
||||
.status-bar-warning {
|
||||
background-color: #ff9800;
|
||||
}
|
||||
.status{
|
||||
.status {
|
||||
background-color: #E51253;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
bottom: -45px;
|
||||
bottom: 0;
|
||||
display: none;
|
||||
left: 0;
|
||||
color: white;
|
||||
width: 100%;
|
||||
transition: bottom 350ms;
|
||||
}
|
||||
.status-open{
|
||||
bottom: 0px;
|
||||
.status-open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$info-icon-background-color: rgba(114, 137, 218, 1);
|
||||
$success-icon-background-color: rgba(97, 185, 72, 1);
|
||||
$warning-icon-background-color: rgba(251, 176, 59, 1);
|
||||
@@ -77,7 +70,7 @@ $error-shadow-color: rgba(229, 18, 83, 0.4);
|
||||
|
||||
.sq-toast--top-right {
|
||||
bottom: -4px;
|
||||
right: 0px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.sq-toast__message {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { StatusBarService } from '../status-bar.service';
|
||||
import { animate, sequence, style, transition, trigger } from '@angular/animations';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user