Is there an adb shell command line interface for LineageOS recovery? Alternatively, which adb commands will work when booted into lineage recovery? I want to factory reset my device as part of an install script running on my desktop, and I can't find any documentation about which commands (if any) are supported. The only command I can find is a fastboot command; fastboot erase <partition>, however I would prefer to do it from recovery. My old device had TWRP recovery and that did have a command line interface which could be used from a shell running on the device.

  • is adb shell root?
    – alecxs
    Aug 17, 2021 at 15:51
  • @alecxs It can be yes! Aug 17, 2021 at 16:18

1 Answer 1


you can always use core utils

find /dev/block -iname userdata
blkid /dev/block/bootdevice/by-name/userdata
mkf2fs /dev/block/bootdevice/by-name/userdata

mkf2fs is for f2fs
mke2fs is for ext4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .