latest
This commit is contained in:
Binary file not shown.
@@ -904,7 +904,8 @@ export class AdbClientService {
|
|||||||
}
|
}
|
||||||
installLocalObb(filepath: string, dontCatchError = false, cb = null, number?: number, total?: number, task?, name?: string) {
|
installLocalObb(filepath: string, dontCatchError = false, cb = null, number?: number, total?: number, task?, name?: string) {
|
||||||
let filename = this.appService.path.basename(filepath);
|
let filename = this.appService.path.basename(filepath);
|
||||||
let packageId = filename.match(/main.[0-9]{1,}.([a-z]{1,}.[A-z]{1,}.[A-z]{1,}).obb/)[1];
|
let packageId = filename.match(/main.[0-9]{1,}.([A-z0-9.]{1,}).obb/)[1];
|
||||||
|
console.log(packageId);
|
||||||
const showTotal = number && total ? '(' + number + '/' + total + ') ' : '';
|
const showTotal = number && total ? '(' + number + '/' + total + ') ' : '';
|
||||||
if (!task) this.spinnerService.showLoader();
|
if (!task) this.spinnerService.showLoader();
|
||||||
let p = this.runAdbCommand('adb push "' + filepath + '" /sdcard/Android/obb/' + packageId + '/' + filename);
|
let p = this.runAdbCommand('adb push "' + filepath + '" /sdcard/Android/obb/' + packageId + '/' + filename);
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ export class ElectronService {
|
|||||||
|
|
||||||
setupIPC() {
|
setupIPC() {
|
||||||
this.appService.electron.ipcRenderer.on('pre-open-url', (event, data) => {
|
this.appService.electron.ipcRenderer.on('pre-open-url', (event, data) => {
|
||||||
|
console.log('here', data);
|
||||||
this.spinnerService.showLoader();
|
this.spinnerService.showLoader();
|
||||||
this.spinnerService.setMessage('Do you want to install this file?<br><br>' + data.name);
|
this.spinnerService.setMessage('Do you want to install this file?<br><br>' + data.name);
|
||||||
this.spinnerService.setupConfirm().then(() => {
|
this.spinnerService.setupConfirm().then(() => {
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
.breadcrumb-wrapper{
|
.breadcrumb-wrapper{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 200px;
|
top: 165px;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
z-index: 1;
|
||||||
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drag-indicator{
|
.drag-indicator{
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
<div *ngIf="isConnected()">
|
<div *ngIf="isConnected()" class="top-bar">
|
||||||
<br><br><br>
|
|
||||||
<nav class="pink lighten-2 breadcrumb-wrapper ">
|
<nav class="pink lighten-2 breadcrumb-wrapper ">
|
||||||
<div class="nav-wrapper container">
|
<div class="nav-wrapper container">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<a *ngFor="let breadcrumb of breadcrumbs" href="javascript:void(0)" class="breadcrumb"
|
<a *ngFor="let breadcrumb of breadcrumbs; let i = index" href="javascript:void(0)" class="breadcrumb"
|
||||||
(click)="open('/'+breadcrumb.path)">{{breadcrumb.name}}</a>
|
(click)="open('/'+breadcrumb.path)">{{breadcrumb.name}}<span *ngIf="i === breadcrumbs.length-1 && folderSize"> ({{folderSize}})</span> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container files-section">
|
||||||
<div *ngIf="!isConnected()">
|
<div *ngIf="!isConnected()">
|
||||||
<h4
|
<h4
|
||||||
[ngClass]="{'text-dark-theme':appService.currentTheme === 'dark','text-light-theme':appService.currentTheme === 'light'}">
|
[ngClass]="{'text-dark-theme':appService.currentTheme === 'dark','text-light-theme':appService.currentTheme === 'light'}">
|
||||||
@@ -54,12 +53,13 @@
|
|||||||
class="btn-floating blue"><i class="material-icons">folder</i></a></li>
|
class="btn-floating blue"><i class="material-icons">folder</i></a></li>
|
||||||
<li mz-tooltip position="left" tooltip="Open current save location" (click)="openSaveLocation()"><a
|
<li mz-tooltip position="left" tooltip="Open current save location" (click)="openSaveLocation()"><a
|
||||||
class="btn-floating yellow darken-2"><i class="material-icons">folder</i></a></li>
|
class="btn-floating yellow darken-2"><i class="material-icons">folder</i></a></li>
|
||||||
<li *ngIf="selectedFiles.length > 0" mz-tooltip position="left" tooltip="Delete selected items"
|
|
||||||
(click)="filesToBeDeleted = selectedFiles; confirmModal.openModal()"><a class="btn-floating red darken-2"><i
|
|
||||||
class="material-icons">delete</i></a></li>
|
|
||||||
<li *ngIf="quickSaveSupported()" mz-tooltip position="left" tooltip="Save screenshots and recordings"
|
<li *ngIf="quickSaveSupported()" mz-tooltip position="left" tooltip="Save screenshots and recordings"
|
||||||
(click)="downloadMediaModal.openModal()"><a class="btn-floating green"><i class="material-icons">get_app</i></a>
|
(click)="downloadMediaModal.openModal()"><a class="btn-floating green"><i class="material-icons">get_app</i></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li *ngIf="selectedFiles.length > 0" class="divider"></li>
|
||||||
|
<li *ngIf="selectedFiles.length > 0" mz-tooltip position="left" tooltip="Delete selected items"
|
||||||
|
(click)="filesToBeDeleted = selectedFiles; confirmModal.openModal()"><a class="btn-floating red darken-2"><i
|
||||||
|
class="material-icons">delete</i></a></li>
|
||||||
<li *ngIf="selectedFiles.length > 0" mz-tooltip position="left" tooltip="Save selected items to computer"
|
<li *ngIf="selectedFiles.length > 0" mz-tooltip position="left" tooltip="Save selected items to computer"
|
||||||
(click)="filesToBeSaved = selectedFiles; filesModal.openModal()">
|
(click)="filesToBeSaved = selectedFiles; filesModal.openModal()">
|
||||||
<a class="btn-floating orange"><i class="material-icons">get_app</i></a>
|
<a class="btn-floating orange"><i class="material-icons">get_app</i></a>
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<h5><em>WARNING: This cannot be undone!!</em></h5>
|
WARNING: This cannot be undone!!
|
||||||
</mz-modal-content>
|
</mz-modal-content>
|
||||||
<mz-modal-footer>
|
<mz-modal-footer>
|
||||||
<button mz-button [flat]="true" mz-modal-close>Close</button>
|
<button mz-button [flat]="true" mz-modal-close>Close</button>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export class FilesComponent implements OnInit {
|
|||||||
isOpen: boolean = false;
|
isOpen: boolean = false;
|
||||||
currentPath: string;
|
currentPath: string;
|
||||||
folderName: string;
|
folderName: string;
|
||||||
|
folderSize: string;
|
||||||
currentFile: FileFolderListing;
|
currentFile: FileFolderListing;
|
||||||
quickSaveModels: string[] = ['Quest', 'Go'];
|
quickSaveModels: string[] = ['Quest', 'Go'];
|
||||||
constructor(
|
constructor(
|
||||||
@@ -296,11 +297,10 @@ export class FilesComponent implements OnInit {
|
|||||||
this.breadcrumbs.push({ path, name });
|
this.breadcrumbs.push({ path, name });
|
||||||
}
|
}
|
||||||
open(path: string) {
|
open(path: string) {
|
||||||
//this.spinnerService.showLoader();
|
|
||||||
//this.spinnerService.setMessage('Loading files...');
|
|
||||||
this.currentPath = path;
|
this.currentPath = path;
|
||||||
this.breadcrumbs = [];
|
this.breadcrumbs = [];
|
||||||
this.selectedFiles.length = 0;
|
this.selectedFiles.length = 0;
|
||||||
|
this.files.length = 0;
|
||||||
this.getCrumb(
|
this.getCrumb(
|
||||||
this.currentPath
|
this.currentPath
|
||||||
.split('/')
|
.split('/')
|
||||||
@@ -318,7 +318,6 @@ export class FilesComponent implements OnInit {
|
|||||||
return textA < textB ? -1 : textA > textB ? 1 : 0;
|
return textA < textB ? -1 : textA > textB ? 1 : 0;
|
||||||
});
|
});
|
||||||
this.files = this.files.filter(d => d.icon === 'folder').concat(this.files.filter(d => d.icon !== 'folder'));
|
this.files = this.files.filter(d => d.icon === 'folder').concat(this.files.filter(d => d.icon !== 'folder'));
|
||||||
//this.spinnerService.hideLoader();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
openSaveLocation() {
|
openSaveLocation() {
|
||||||
@@ -326,6 +325,16 @@ export class FilesComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
async readdir(path: String) {
|
async readdir(path: String) {
|
||||||
let dirContents: FileFolderListing[];
|
let dirContents: FileFolderListing[];
|
||||||
|
let isRoot = ['/sdcard/', 'sdcard', 'sdcard/', '/sdcard'].indexOf(path) > -1;
|
||||||
|
if (isRoot) {
|
||||||
|
this.folderSize = null;
|
||||||
|
} else {
|
||||||
|
this.folderSize = await this.adbService.adbCommand('shell', {
|
||||||
|
serial: this.adbService.deviceSerial,
|
||||||
|
command: 'du -sh "' + path + '"',
|
||||||
|
});
|
||||||
|
this.folderSize = this.folderSize.split('\t')[0];
|
||||||
|
}
|
||||||
await this.adbService.adbCommand('readdir', { serial: this.adbService.deviceSerial, path }).then(files => {
|
await this.adbService.adbCommand('readdir', { serial: this.adbService.deviceSerial, path }).then(files => {
|
||||||
dirContents = files.map(file => {
|
dirContents = files.map(file => {
|
||||||
const name = file.name;
|
const name = file.name;
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
<!--<div class="logo no-outline" (click)="webService.webView.loadURL('http://localhost:4201');" routerLink="webview"></div>-->
|
<!--<div class="logo no-outline" (click)="webService.webView.loadURL('http://localhost:4201');" routerLink="webview"></div>-->
|
||||||
<!--<div class="header-title" #header><img src="assets/images/logo-textual.png" class="responsive-img"/></div>-->
|
<!--<div class="header-title" #header><img src="assets/images/logo-textual.png" class="responsive-img"/></div>-->
|
||||||
<!--<div class="apk-install">Drag and drop your APK/OBB files <br>over this message to install!</div>-->
|
<!--<div class="apk-install">Drag and drop your APK/OBB files <br>over this message to install!</div>-->
|
||||||
<div class="apk-install" *ngIf="appService.isFilesOpen">Manage the files on your headset.<br>Drag and drop to move
|
<!--<div class="apk-install" *ngIf="appService.isFilesOpen">Manage the files on your headset.<br>Drag and drop to move-->
|
||||||
files onto your headset.</div>
|
<!--files onto your headset.</div>-->
|
||||||
<div class="apk-install" *ngIf="appService.isPackagesOpen">Manage the apps on your headset.<br>Click Show All to
|
<div class="apk-install" *ngIf="appService.isPackagesOpen">Manage the apps on your headset.<br>Click Show All to
|
||||||
see all apps including system apps.</div>
|
see all apps including system apps.</div>
|
||||||
<div class="apk-install" *ngIf="appService.isSettingsOpen">Manage settings on your headset.</div>
|
<div class="apk-install" *ngIf="appService.isSettingsOpen">Manage settings on your headset.</div>
|
||||||
@@ -353,6 +353,7 @@
|
|||||||
<mz-modal #logcatModal [fixedFooter]="true" [options]="{dismissible: false}">
|
<mz-modal #logcatModal [fixedFooter]="true" [options]="{dismissible: false}">
|
||||||
<mz-modal-header>
|
<mz-modal-header>
|
||||||
<button mz-button class="right" [flat]="true" mz-modal-close (click)="stopLogcat(); currentLogCat.length = 0; isStarted = false;">Stop & Close</button>
|
<button mz-button class="right" [flat]="true" mz-modal-close (click)="stopLogcat(); currentLogCat.length = 0; isStarted = false;">Stop & Close</button>
|
||||||
|
<button mz-button class="right" [flat]="true" (click)="stopLogcat(); currentLogCat.length = 0; isStarted = false;">Stop Only</button>
|
||||||
<h4>ADB Logcat</h4>
|
<h4>ADB Logcat</h4>
|
||||||
</mz-modal-header>
|
</mz-modal-header>
|
||||||
<mz-modal-content>
|
<mz-modal-content>
|
||||||
@@ -574,7 +575,7 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12" *ngIf="osPlatform === 'linux'">
|
<div class="col s12" *ngIf="osPlatform === 'linux'">
|
||||||
TO use ScrCpy on Linux you will need to install snap package manager with <span class="chip">sudo snap install scrcpy</span>
|
To use ScrCpy on Linux you will need to install snap package manager with <span class="chip">sudo snap install scrcpy</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mz-modal-content>
|
</mz-modal-content>
|
||||||
|
|||||||
@@ -57,6 +57,25 @@
|
|||||||
</span><br>
|
</span><br>
|
||||||
<div *ngIf="currentPackage.package.name" class="small-text">{{currentPackage.package.packageName}}</div>
|
<div *ngIf="currentPackage.package.name" class="small-text">{{currentPackage.package.packageName}}</div>
|
||||||
<div *ngIf="currentPackage.versionCode" class="small-text">Version: {{currentPackage.versionCode}}</div><br><br>
|
<div *ngIf="currentPackage.versionCode" class="small-text">Version: {{currentPackage.versionCode}}</div><br><br>
|
||||||
|
|
||||||
|
<h4>Game Data Backups</h4>
|
||||||
|
Backup data files from your SD Card for this app/game.<br><br>
|
||||||
|
<a class="waves-effect waves-light btn backup-this-package"
|
||||||
|
(click)="backupData(currentPackage.package.packageName)">Backup Game Data</a><br><br>
|
||||||
|
<div class="row" *ngFor="let backup of dataBackups">
|
||||||
|
<div class="col s3 m2 l1">
|
||||||
|
<div class="chip cursor restore-backup tooltipped" data-position="right" data-tooltip="Restore this backup"
|
||||||
|
(click)="restoreBackup(showBackupFileName(backup))">
|
||||||
|
<i class="material-icons">sync</i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col s6 s10 l11">
|
||||||
|
<div class="chip">
|
||||||
|
<span class="backup-name">{{showBackupFileName(backup)}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
<h4>APK Backups</h4>
|
<h4>APK Backups</h4>
|
||||||
Backup your APK file from your device.<br><br>
|
Backup your APK file from your device.<br><br>
|
||||||
<a class="waves-effect waves-light btn backup-this-package margin-right"
|
<a class="waves-effect waves-light btn backup-this-package margin-right"
|
||||||
@@ -77,24 +96,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br><br>
|
<br><br>
|
||||||
<h4>Game Data Backups</h4>
|
|
||||||
Backup data files from your SD Card for this app/game.<br><br>
|
|
||||||
<a class="waves-effect waves-light btn backup-this-package"
|
|
||||||
(click)="backupData(currentPackage.package.packageName)">Backup Game Data</a><br><br>
|
|
||||||
<div class="row" *ngFor="let backup of dataBackups">
|
|
||||||
<div class="col s1">
|
|
||||||
<div class="chip cursor restore-backup tooltipped" data-position="right" data-tooltip="Restore this backup"
|
|
||||||
(click)="restoreBackup(showBackupFileName(backup))">
|
|
||||||
<i class="material-icons">sync</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col s11">
|
|
||||||
<div class="chip">
|
|
||||||
<span class="backup-name">{{showBackupFileName(backup)}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br><br>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col s5">
|
<div class="col s5">
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export interface ProcessTask {
|
|||||||
failed?: boolean;
|
failed?: boolean;
|
||||||
succeeded?: boolean;
|
succeeded?: boolean;
|
||||||
cancelled?: boolean;
|
cancelled?: boolean;
|
||||||
|
reported?: boolean;
|
||||||
resolve: (task: ProcessTask) => Promise<void>;
|
resolve: (task: ProcessTask) => Promise<void>;
|
||||||
}
|
}
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@@ -105,7 +106,8 @@ export class ProcessBucketService {
|
|||||||
});
|
});
|
||||||
this.tasks = this.tasks.filter(t => t !== task);
|
this.tasks = this.tasks.filter(t => t !== task);
|
||||||
} else {
|
} else {
|
||||||
let failed = this.tasks.filter(t => t.failed);
|
let failed = this.tasks.filter(t => t.failed && !t.reported);
|
||||||
|
failed.forEach(f => (f.reported = true));
|
||||||
this.failed_length = failed.length;
|
this.failed_length = failed.length;
|
||||||
let hasFailed = !!this.failed_length;
|
let hasFailed = !!this.failed_length;
|
||||||
if (this.is_running) {
|
if (this.is_running) {
|
||||||
|
|||||||
+11
-4
@@ -13,12 +13,14 @@ const request = require('request');
|
|||||||
const progress = require('request-progress');
|
const progress = require('request-progress');
|
||||||
const Readable = require('stream').Readable;
|
const Readable = require('stream').Readable;
|
||||||
import { SetPropertiesCommand } from './setproperties';
|
import { SetPropertiesCommand } from './setproperties';
|
||||||
|
let has_port = process.argv.indexOf('--port');
|
||||||
|
let valid_port = has_port > -1 && process.argv[has_port + 1] && Number.isInteger(Number(process.argv[has_port + 1]));
|
||||||
class ADB {
|
class ADB {
|
||||||
client;
|
client;
|
||||||
_logcat;
|
_logcat;
|
||||||
setupAdb(adbPath, cb, ecb) {
|
setupAdb(adbPath, cb, ecb) {
|
||||||
if (this.client) return;
|
if (this.client) return;
|
||||||
|
let port = valid_port ? Number(process.argv[has_port + 1]) : process.env.ANDROID_ADB_SERVER_PORT || 5037;
|
||||||
this.client = adb.createClient({
|
this.client = adb.createClient({
|
||||||
bin: adbPath,
|
bin: adbPath,
|
||||||
});
|
});
|
||||||
@@ -427,7 +429,10 @@ function createWindow() {
|
|||||||
|
|
||||||
mainWindow.webContents.session.on('will-download', (_evt, item, _webContents) => {
|
mainWindow.webContents.session.on('will-download', (_evt, item, _webContents) => {
|
||||||
let url = item.getURL();
|
let url = item.getURL();
|
||||||
|
let urls = item.getURLChain();
|
||||||
|
let name = item.getFilename();
|
||||||
let etx = path.extname(url.split('?')[0]).toLowerCase();
|
let etx = path.extname(url.split('?')[0]).toLowerCase();
|
||||||
|
let etx2 = urls.length ? path.extname(urls[0].split('?')[0]).toLowerCase() : etx;
|
||||||
if (~url.indexOf('https://beatsaver.com/cdn')) {
|
if (~url.indexOf('https://beatsaver.com/cdn')) {
|
||||||
// beat saber mods /songs
|
// beat saber mods /songs
|
||||||
mainWindow.webContents.send('open-url', 'sidequest://bsaber/#' + url);
|
mainWindow.webContents.send('open-url', 'sidequest://bsaber/#' + url);
|
||||||
@@ -440,12 +445,14 @@ function createWindow() {
|
|||||||
} else if (etx === '.audica') {
|
} else if (etx === '.audica') {
|
||||||
// audica custom song format
|
// audica custom song format
|
||||||
mainWindow.webContents.send('open-url', 'sidequest://audica/#' + url);
|
mainWindow.webContents.send('open-url', 'sidequest://audica/#' + url);
|
||||||
} else if (etx === '.apk') {
|
} else if (etx === '.apk' || etx2 === '.apk') {
|
||||||
// any file ending with apk.
|
// any file ending with apk.
|
||||||
mainWindow.webContents.send('pre-open-url', url);
|
mainWindow.webContents.send('pre-open-url', { url, name });
|
||||||
|
BrowserWindow.getAllWindows()
|
||||||
|
.filter(b => b !== mainWindow)
|
||||||
|
.forEach(b => b.close());
|
||||||
} else if (~url.indexOf('ssl.hwcdn.net/') || ~url.indexOf('patreonusercontent.com/')) {
|
} else if (~url.indexOf('ssl.hwcdn.net/') || ~url.indexOf('patreonusercontent.com/')) {
|
||||||
//itch.io & patreon
|
//itch.io & patreon
|
||||||
let name = item.getFilename();
|
|
||||||
mainWindow.webContents.send('pre-open-url', { url, name });
|
mainWindow.webContents.send('pre-open-url', { url, name });
|
||||||
BrowserWindow.getAllWindows()
|
BrowserWindow.getAllWindows()
|
||||||
.filter(b => b !== mainWindow)
|
.filter(b => b !== mainWindow)
|
||||||
|
|||||||
Reference in New Issue
Block a user