# ADB Configuration script

# ADB Config

## Check logs using logcat

- Find name of app
- filter with the name

```shell
$ pm list packages | grep -i seed
package:com.stevesoltys.seedvault
$ logcat -e seedvault
# or use a simple grep
logcat | grep 'vault'
```


```shell
# This is specific to SeedVault (https://github.com/seedvault-app/seedvault/blob/android15/logcat-verbose.sh)
set -ex

adb shell setprop log.tag.BackupManagerService VERBOSE
adb shell setprop log.tag.BackupManagerConstants VERBOSE
adb shell setprop log.tag.BackupTransportManager VERBOSE
adb shell setprop log.tag.KeyValueBackupJob VERBOSE
adb shell setprop log.tag.KeyValueBackupTask VERBOSE
adb shell setprop log.tag.TransportClient VERBOSE
adb shell setprop log.tag.BackupAgent VERBOSE
adb shell setprop log.tag.PMBA VERBOSE
```

## Navigate through the slots

To flash permanently, first switch/select any slot you want or it will **automatically flashed to the active slot**.

```shell
# Check current active slot
adb shell getprop ro.boot.slot_suffix
fastboot getvar current-slot

# Switching slots
fastboot set_active other  //switch to inactive slot
fastboot set_active (a or b)  //switch to specified slot
```

## Check current slot and baseband version

```sh
adb shell getprop | grep -Ei '(gsm.*baseband|slot_suffix)'
```

## Have both slots (A/B) with same verity/verification configuration

```sh
fastboot flash vbmeta --disable-verity --disable-verification --slot=all vbmeta.img
```

## Secure phone (to review)

```sh
#!/bin/bash
adb root
adb remount
adb pull /system/build.prop .
sed -i "s/ro.secure=0/ro.secure=1/" build.prop
sed -i "s/ro.debuggable=1/ro.debuggable=0/" build.prop
adb push build.prop /system/build.prop
rm build.prop
```