fixed a regression in the file browser that broke mod uploads. fixed the checking apk stall to show the correct message. improved some messaging
This commit is contained in:
@@ -513,34 +513,23 @@ export class AdbClientService {
|
||||
}
|
||||
})
|
||||
.then(r => {
|
||||
task.status = name + 'APK file installed ok!!';
|
||||
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.toLowerCase().indexOf('sidequest.legends') > -1) {
|
||||
return this.setPermission('com.sidequest.legends', 'android.permission.RECORD_AUDIO');
|
||||
}
|
||||
if (filePath.toLowerCase().indexOf('pavlov') > -1) {
|
||||
return this.setPermission('com.vankrupt.pavlov', 'android.permission.RECORD_AUDIO')
|
||||
.then(() => this.setPermission('com.vankrupt.pavlov', 'android.permission.READ_EXTERNAL_STORAGE'))
|
||||
.then(() => this.setPermission('com.vankrupt.pavlov', 'android.permission.WRITE_EXTERNAL_STORAGE'))
|
||||
.then(() =>
|
||||
this.adbCommand('shell', {
|
||||
serial: this.deviceSerial,
|
||||
command: 'echo null > /sdcard/pavlov.name.txt',
|
||||
})
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch(async e => {
|
||||
if (deleteAfter) {
|
||||
this.appService.fs.unlink(filePath, err => {});
|
||||
}
|
||||
let er = e.message ? e.message : e.code ? e.code : e.reason ? e.reason : JSON.stringify(e);
|
||||
if (er.indexOf('INSTALL_FAILED_UPDATE_INCOMPATIBLE') > -1 && er.indexOf('com.oculus.environment.prod.')) {
|
||||
if (
|
||||
er.indexOf('INSTALL_FAILED_UPDATE_INCOMPATIBLE') > -1 &&
|
||||
er.indexOf('com.oculus.environment.prod.') > -1
|
||||
) {
|
||||
let match = er.match(/([A-Za-z]*[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*/gm);
|
||||
await this.adbCommand('uninstall', { serial: this.deviceSerial, packageName: match[0] });
|
||||
this.installAPK(filePath, isLocal, shouldUninstall, number, total, deleteAfter, name);
|
||||
@@ -647,7 +636,7 @@ export class AdbClientService {
|
||||
}
|
||||
async restoreDataBackup(packageName: string, folderName: string) {
|
||||
return this.processService.addItem('restore_files', async task => {
|
||||
task.status = 'Restoring Files...';
|
||||
task.status = 'Transferring Files...';
|
||||
let packageBackupPath = this.appService.path.join(this.appService.backupPath, packageName, 'data', folderName, 'files');
|
||||
if (this.appService.fs.existsSync(packageBackupPath)) {
|
||||
this.localFiles = [];
|
||||
@@ -665,7 +654,7 @@ export class AdbClientService {
|
||||
return this.uploadFile(this.localFiles.filter(f => f.__isFile), task);
|
||||
})
|
||||
.then(() => this.spinnerService.hideLoader())
|
||||
.then(() => (task.status = 'Restored game data backup OK!! ' + packageName + ' | ' + folderName));
|
||||
.then(() => (task.status = 'Files Transferred OK!! ' + packageName + ' | ' + folderName));
|
||||
}
|
||||
let obbBackupPath = this.appService.path.join(this.appService.backupPath, packageName, 'data', folderName, 'obb');
|
||||
if (this.appService.fs.existsSync(obbBackupPath)) {
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
<mz-modal-content>
|
||||
Please enter a folder name.
|
||||
<div class="input-field ">
|
||||
<input id="devicePaste" type="text" [(ngModel)]="folderName" autofocus (keyup)="autoReturn($event, makeFolder.bind(this))"/>
|
||||
<input id="devicePaste" type="text" [(ngModel)]="folderName" autofocus (keyup)="autoReturn($event, makeFolder.bind(this, true))"/>
|
||||
<label for="devicePaste">Folder Name</label>
|
||||
</div>
|
||||
</mz-modal-content>
|
||||
<mz-modal-footer>
|
||||
<button mz-button [flat]="true" mz-modal-close>Close</button>
|
||||
<button mz-button class="pink-button" mz-modal-close (click)="makeFolder()">Make Folder</button>
|
||||
<button mz-button class="pink-button" mz-modal-close (click)="makeFolder(true)">Make Folder</button>
|
||||
</mz-modal-footer>
|
||||
</mz-modal>
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ export class FilesComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.appService.setTitle('Headset Files');
|
||||
}
|
||||
async makeFolder() {
|
||||
async makeFolder(shouldOpen?: boolean) {
|
||||
if (
|
||||
!!~this.files
|
||||
.filter(f => f.icon === 'folder')
|
||||
@@ -65,7 +65,11 @@ export class FilesComponent implements OnInit {
|
||||
return this.statusService.showStatus('A folder already exists with that name!!', true);
|
||||
} else {
|
||||
await this.adbService.makeDirectory(this.appService.path.posix.join(this.currentPath, this.folderName)).then(r => {
|
||||
this.open(this.appService.path.posix.join(this.currentPath, this.folderName));
|
||||
if (shouldOpen) {
|
||||
this.open(this.appService.path.posix.join(this.currentPath, this.folderName));
|
||||
} else {
|
||||
this.open(this.currentPath);
|
||||
}
|
||||
this.folderName = '';
|
||||
});
|
||||
}
|
||||
@@ -173,7 +177,7 @@ export class FilesComponent implements OnInit {
|
||||
setTimeout(() => {
|
||||
this.open(this.currentPath);
|
||||
}, 1500);
|
||||
task.status = 'Upload complete!';
|
||||
task.status = 'Transfer complete!';
|
||||
})
|
||||
.catch(e => this.statusService.showStatus(e.toString(), true));
|
||||
});
|
||||
@@ -236,7 +240,7 @@ export class FilesComponent implements OnInit {
|
||||
return this.adbService
|
||||
.adbCommand('pull', { serial: this.adbService.deviceSerial, path, savePath }, stats => {
|
||||
task.status =
|
||||
'File downloading: ' +
|
||||
'File saving: ' +
|
||||
this.appService.path.basename(savePath) +
|
||||
' - ' +
|
||||
Math.round(stats.bytesTransferred / 1024 / 1024) +
|
||||
|
||||
Reference in New Issue
Block a user