Since we don't have TWRP yet for our 8T, having ADB enabled on the stock recovery can be really helpful if you are unlocked and rooted.
For example, removing problematic magisk modules.
I tried to install the EdExposed module and ended with a boot loop. To get back I had to flash the stock boot.img again and reconfigure all my modules again.
Having ADB enabled in OOS recovery will let us delete the problematic module at /data/adb/modules without having to delete the working modules.
Credit goes to @s3axel for the Post in Oneplus 8 forums
Quoting the procedure to create the modified recovery.img :
To find your model and build:
KB2000 / KB05?? - Chinese Variant
KB2001 / KB05DA - Indian Variant
KB2003 / KB05BA - EU Variant
KB2005 / KB05AA - International Variant thanks to @card13
KB2007 / KB05CB - T-Mobile Variant
For example, removing problematic magisk modules.
I tried to install the EdExposed module and ended with a boot loop. To get back I had to flash the stock boot.img again and reconfigure all my modules again.
Having ADB enabled in OOS recovery will let us delete the problematic module at /data/adb/modules without having to delete the working modules.
Credit goes to @s3axel for the Post in Oneplus 8 forums
Quoting the procedure to create the modified recovery.img :
Installation Procedure:Description of the method to modify recovery by yourself:
Prerequisites:
- Android Image Kitchen (credit to osm0sis for providing this tool)
- the original recovery image file (henceforth called "recovery.img"). You can extract this yourself from an update zip file by unpacking "payload.bin" and then use a tool like payload_dumper (credit to vm03 for providing this) to extract the recovery.img file
Now do the following:
- unpack image with Image Kitchen --> this will create a "ramdisk" and a "Split_img" directory with the unpacked content within
- navigate into the "ramdisk" folder and use a text editor (on windows preferably Notepad++) to edit the file "prop.default"
- look for entry "ro.adb.secure" and change entry value from "1" to "0". Note this entry can occur multiple times (I noticed twice), change each --> this will prevent adb from asking for authorization (the recovery does not provide such a dialogue)
- look for entry "ro.debuggable" and change this from "0" to "1" --> this actually enables ADB
- look for entry "ro.secure" and change this from "1" to "0" --> may be unnecessary but I wanted to avoid brick in case a modified recovery would result in such a behavior
- save textfile
- repack the image with Android Image Kitchen and voila:
- you have a new modified recovery image you can flash
Pre-patched files for the lazy (upto 11.0.4.5):Prerequisites:
- Oneplus 8T
- unlocked bootloader
- access to fastboot on the phone
- adb and fastboot
Installation:
Reboot the phone to fastboot, then flash the recovery from fastboot with the command
(with <filename> being the name of the recovery in the format of "recovery.img" you wish to flash)Code:fastboot flash recovery <filename>
Uninstall:
Same as installation, but flash the original stock recovery instead.
Usage:
Boot up recovery, enter the encryption key if the file system is encrypted. Then connect the phone to a PC and you are ready to go with adb. E.g. by usingto open a shell and access the file system. Magisk modules are located in /data/adb/modules, deleting the corresponding directory there will remove the module in question.Code:adb shell
Step-by-step this would be:
to change to the Magisk modules directoryCode:cd /data/adb/modules
to list the content of this directory, each module has its own directory, usually with a well-recognizable nameCode:ls
to delete the directory in question. Tip: in console TAB-autocomplete worksCode:rm -r <directory>
Notes of caution:
Credits: Thanks to osm0sis for Android kitchen and all great developers for the Oneplus devices.
- ADB security is disabled as I could not get the recovery to allow for authorizing a connected computer. As a consequence, any computer connected is automatically authorized in ADB, although with an encrypted filesystem at least no data is accessible without the key.
- with direct ADB access to your file system you can easily wreck you phone requiring a factory reset or even reinstallation of the OS from fastboot - please be careful about what you are doing
To find your model and build:
Code:
adb shell getprop ro.product.model
KB2001
adb shell getprop ro.build.version.ota
OnePlus8TOxygen_15.I.16_GLO_0160_2010150110
KB2001 / KB05DA - Indian Variant
KB2003 / KB05BA - EU Variant
KB2005 / KB05AA - International Variant thanks to @card13
KB2007 / KB05CB - T-Mobile Variant
¯\_(ツ)_/¯
Code:
❯ adb devices
List of devices attached
75317573 recovery
❯ adb shell
# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 3648448 40396 3608052 2% /
tmpfs 3837328 1160 3836168 1% /dev
tmpfs 3837328 0 3837328 0% /mnt
tmpfs 3837328 0 3837328 0% /apex
tmpfs 3837328 4 3837324 1% /linkerconfig
tmpfs 3837328 24 3837304 1% /tmp
/dev/block/sda11 491464 140484 350980 29% /mnt/vendor/op2
/dev/block/sda20 11760 164 11596 2% /metadata
/dev/block/dm-3 1516540 1511956 4584 100% /vendor
/dev/block/sda2 27632 10452 17180 38% /mnt/vendor/persist
/dev/block/dm-7 110397292 6627020 103770272 7% /data
Last edited: