a few bug fixes and improved on the adb logcat interface
This commit is contained in:
@@ -26,7 +26,7 @@ import { ColorPickerModule } from 'ngx-color-picker';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { CurrentTasksComponent } from './current-tasks/current-tasks.component';
|
||||
import { CurrentTaskItemComponent } from './current-task-item/current-task-item.component';
|
||||
|
||||
import { VirtualScrollerModule } from 'ngx-virtual-scroller';
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
@@ -59,6 +59,7 @@ import { CurrentTaskItemComponent } from './current-task-item/current-task-item.
|
||||
MzCheckboxModule,
|
||||
ColorPickerModule,
|
||||
BrowserAnimationsModule,
|
||||
VirtualScrollerModule,
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent],
|
||||
|
||||
@@ -52,11 +52,18 @@ export class DragAndDropService {
|
||||
let file = e.dataTransfer.files[i] as any;
|
||||
let filepath = file.path;
|
||||
if (['.apk', '.obb'].includes(this.appService.path.extname(filepath))) {
|
||||
if (this.appService.path.extname(filepath) === '.apk') {
|
||||
await this.adbService.installAPK(filepath, true);
|
||||
} else {
|
||||
await this.adbService.installLocalObb(filepath);
|
||||
this.adbService.savePath = this.appService.path.dirname(filepath);
|
||||
let install = this.adbService.installMultiFile(filepath);
|
||||
if (install) {
|
||||
await install.catch(_e => {
|
||||
this.statusService.showStatus(_e.toString(), true);
|
||||
});
|
||||
}
|
||||
// if (this.appService.path.extname(filepath) === '.apk') {
|
||||
// await this.adbService.installAPK(filepath, true);
|
||||
// } else {
|
||||
// await this.adbService.installLocalObb(filepath);
|
||||
// }
|
||||
} else {
|
||||
this.statusService.showStatus('Unrecognised File: ' + filepath, true);
|
||||
}
|
||||
|
||||
@@ -67,10 +67,18 @@
|
||||
height: 90px;
|
||||
position:absolute;
|
||||
top: 55px;
|
||||
left: 20px;
|
||||
left: 3.5em;
|
||||
transition: 0.35s;
|
||||
}
|
||||
virtual-scroller{
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.child-item{
|
||||
min-height: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
#nav-mobile{
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
@@ -353,27 +353,35 @@
|
||||
|
||||
<mz-modal #logcatModal [fixedFooter]="true" [options]="{dismissible: false}">
|
||||
<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" (click)="stopLogcat(); isStarted = false;">Stop Only</button>
|
||||
<button mz-button class="right red" mz-modal-close (click)="stopLogcat(); currentLogCat.length = 0; isStarted = false;">Close</button>
|
||||
<button mz-button class="right red margin-right" (click)="stopLogcat(); isStarted = false;">Stop</button>
|
||||
<button mz-button class="right margin-right" *ngIf="!saveLogcatPath" (click)="selectLogcatOutput();">Pick Output Folder</button>
|
||||
<button mz-button class="right red margin-right" *ngIf="saveLogcatPath" (click)="cancelLogcatOutput();">Cancel Output</button>
|
||||
<h4>ADB Logcat</h4>
|
||||
</mz-modal-header>
|
||||
<mz-modal-content>
|
||||
Select your options and click start to begin receiving logcat messages.
|
||||
<br><br>
|
||||
<div class="truncate">{{saveLogcatPath ? 'Saving to: ' + appService.path.join(saveLogcatPath,'logcat.log') : ''}}
|
||||
|
||||
<button mz-button class="red small-button margin-left" *ngIf="saveLogcatPath" (click)="clearLogcatFile();">Clear File</button>
|
||||
</div>
|
||||
<br>
|
||||
<div class="button-section">
|
||||
<div class="code logcat-block">
|
||||
<div *ngIf="!currentLogCat.length">
|
||||
{{isStarted ? 'Waiting for messages...' : 'Click start to begin streaming logcat messages.'}}
|
||||
</div>
|
||||
<div *ngFor="let logcat of currentLogCat">
|
||||
<div class="row no-margin">
|
||||
<div class="col s2 logcat-smaller green-text no-padding">{{logcat.date}}: {{priorities[logcat.priority]}}</div>
|
||||
<div class="col s2 logcat-smaller purple-text no-padding">{{logcat.tid}}/{{logcat.pid}} {{logcat.tag}} </div>
|
||||
<div class="col s8 logcat-small no-padding"
|
||||
[ngClass]="{'red-text': logcat.priority === 6, 'orange-text': logcat.priority === 5}" [innerHTML]="logcat.message">
|
||||
<!-- <virtual-scroller #scroll [items]="currentLogCat">-->
|
||||
<div class="child-item" *ngFor="let logcat of currentLogCat">
|
||||
<div class="row no-margin">
|
||||
<div class="col s2 logcat-smaller green-text no-padding">{{logcat.date}}: {{priorities[logcat.priority]}}</div>
|
||||
<div class="col s2 logcat-smaller purple-text no-padding">{{logcat.tid}}/{{logcat.pid}} {{logcat.tag}} </div>
|
||||
<div class="col s8 logcat-small no-padding"
|
||||
[ngClass]="{'red-text': logcat.priority === 6, 'orange-text': logcat.priority === 5}" [innerHTML]="logcat.message">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </virtual-scroller>-->
|
||||
</div>
|
||||
</div>
|
||||
</mz-modal-content>
|
||||
@@ -412,7 +420,8 @@
|
||||
<img class="right margin-left" src="assets/images/bigman.gif" style="width: 430px"/>
|
||||
WARNING: We have stopped this install because it may may harm your device.
|
||||
<br><br>
|
||||
If you continue with the install you risk the following:<br><br>
|
||||
If you think this has happened in error, please contact us on Discord with a link to the apk file.<br><br>
|
||||
We have protected you from:<br><br>
|
||||
- Causing physical damage to your headset.<br>
|
||||
- Having your personal information stolen ( including tracking your movments in VR )<br>
|
||||
- Being banned from the Oculus platform.<br>
|
||||
|
||||
@@ -44,6 +44,7 @@ export class HeaderComponent implements OnInit {
|
||||
replaceText: ReplaceText[] = [];
|
||||
adbCommandToRun: string;
|
||||
osPlatform: string;
|
||||
saveLogcatPath: string;
|
||||
favourites: {
|
||||
browserFavourites: FavouriteItem[];
|
||||
fileFavourites: FavouriteItem[];
|
||||
@@ -192,16 +193,62 @@ export class HeaderComponent implements OnInit {
|
||||
if (this.logcatSearch) {
|
||||
if (!!~stats.message.indexOf(this.logcatSearch) || !!~stats.tag.indexOf(this.logcatSearch)) {
|
||||
this.currentLogCat.unshift(stats);
|
||||
this.attemptToSaveLogcat(stats);
|
||||
}
|
||||
} else {
|
||||
this.currentLogCat.unshift(stats);
|
||||
this.attemptToSaveLogcat(stats);
|
||||
}
|
||||
if (this.currentLogCat.length > 200) {
|
||||
this.currentLogCat.length = 200;
|
||||
if (this.currentLogCat.length > 4000) {
|
||||
this.currentLogCat.length = 4000;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
cancelLogcatOutput() {
|
||||
this.saveLogcatPath = null;
|
||||
}
|
||||
selectLogcatOutput() {
|
||||
this.appService.electron.remote.dialog.showOpenDialog(
|
||||
{
|
||||
properties: ['openDirectory'],
|
||||
defaultPath: this.adbService.savePath,
|
||||
},
|
||||
files => {
|
||||
files.forEach(filepath => {
|
||||
this.saveLogcatPath = filepath;
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
clearLogcatFile() {
|
||||
if (this.saveLogcatPath) {
|
||||
if (this.appService.fs.existsSync(this.saveLogcatPath)) {
|
||||
this.appService.fs.writeFile(this.appService.path.join(this.saveLogcatPath, 'logcat.log'), '', () => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
attemptToSaveLogcat(logcat) {
|
||||
if (this.saveLogcatPath) {
|
||||
if (this.appService.fs.existsSync(this.saveLogcatPath)) {
|
||||
this.appService.fs.appendFile(
|
||||
this.appService.path.join(this.saveLogcatPath, 'logcat.log'),
|
||||
logcat.date +
|
||||
':' +
|
||||
this.priorities[logcat.priority] +
|
||||
logcat.tid +
|
||||
'/' +
|
||||
logcat.pid +
|
||||
' ' +
|
||||
logcat.tag +
|
||||
'\n' +
|
||||
logcat.message +
|
||||
'\n',
|
||||
() => {}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stopLogcat() {
|
||||
this.adbService.adbCommand('endLogcat');
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<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>
|
||||
Backup data files from your SD Card for this app/game. This will attempt to save game data and OBB files for the game from the SD Card and not the internal storage. Does not work for all games.<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">
|
||||
@@ -79,9 +79,7 @@
|
||||
<h4>APK Backups</h4>
|
||||
Backup your APK file from your device.<br><br>
|
||||
<a class="waves-effect waves-light btn backup-this-package margin-right"
|
||||
(click)="backupApk(currentPackage.package.packageName)">Backup APK File</a>
|
||||
<a class="waves-effect waves-light btn"
|
||||
(click)="appService.openFolder(folder.APP_BACKUP,currentPackage.package.packageName)">Open Backups</a><br><br>
|
||||
(click)="backupApk(currentPackage.package.packageName)">Backup APK File</a><br><br>
|
||||
<div class="row" *ngFor="let backup of backups">
|
||||
<div class="col s3">
|
||||
<div class="chip cursor restore-backup tooltipped" data-position="right" data-tooltip="Restore this backup"
|
||||
@@ -104,8 +102,10 @@
|
||||
<a class="waves-effect waves-light btn orange " (click)="forceClose()">Force Close App</a><br><br>
|
||||
<a class="waves-effect waves-light btn orange " (click)="clearData()">Clear App Data</a><br><br>
|
||||
<a class="waves-effect waves-light btn red " (click)="uninstallApk()">Uninstall App</a><br><br>
|
||||
<a class="waves-effect waves-light btn"
|
||||
(click)="appService.openFolder(folder.APP_BACKUP,currentPackage.package.packageName)">Open Backups</a>
|
||||
|
||||
<br><br>
|
||||
<br><br><br><br>
|
||||
|
||||
|
||||
<h4>Permissions</h4>
|
||||
|
||||
Reference in New Issue
Block a user