Skip to main content

ADB Configuration script

ADB Config

Navigate through the slots

To flash permanently, first switch/select any slot you want or it will automatically flashed to the active slot.

# 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

adb shell getprop | grep -Ei '(gsm.*baseband|slot_suffix)'

Have both slots (A/B) with same verity/verification configuration

fastboot flash vbmeta --disable-verity --disable-verification --slot=all vbmeta.img

Secure phone (to review)

#!/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