0% found this document useful (0 votes)
2K views2 pages

TWRP Commandline Guide

This document provides a guide to commands that can be run from the TWRP command line interface or via ADB on a connected host computer. It outlines commands for installing and wiping partitions, backing up and restoring partitions and data, mounting and remounting partitions, and rebooting or powering off the device. It also includes notes on decrypting the data partition using a password based on a pattern drawn on an on-screen numeric keypad.

Uploaded by

Shawn Carswell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views2 pages

TWRP Commandline Guide

This document provides a guide to commands that can be run from the TWRP command line interface or via ADB on a connected host computer. It outlines commands for installing and wiping partitions, backing up and restoring partitions and data, mounting and remounting partitions, and rebooting or powering off the device. It also includes notes on decrypting the data partition using a password based on a pattern drawn on an on-screen numeric keypad.

Uploaded by

Shawn Carswell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

TWRP Commandline Guide

Feb 7, 2018

CLIENT SIDE/SCRIPT
install FILENAME :
install FILENAME zip file.

wipe PARTITION :

format PARTITON, one by line:


cache,
system,
dalvik,
data.

backup PARTITIONS-TO-BACKUP [BACKUP-NAME] :

backup partition PARTITIONS-TO-BACKUP to [BACKUP-NAME]


PARTITIONS-TO-BACKUP, multiples selection allowed:
S: system,
D: data,
C: cache,
R: recovery,
B: boot,
A: and-sec,
E: sd-ext,
M: skip md5 creation.
[BACKUP-NAME] If not provided, current date/time is used.

restore PARTITION-TO-RESTORE BACKUP-NAME :

restore PARTITION-TO-RESTORE from existant BACKUP-NAME:


PARTITION-TO-RESTORE, multiples selection allowed:
S: system,
D: data,
C: cache,
R: recovery,
B: boot,
A: and-sec,
E: sd-ext,
M: skip md5 check.
BACKUP-NAME: could be full path or name of twrp backup in current twrp backup
folder.
Backup can't be encrypted.

remountrw :

revert /system mount type (read-only/read-write).

mount PATH.

set VARIABLE [VALUE] :


set VARIABLE to VALUE. If VALUE is empty, empty VARIABLE.

mkdir DIRECTORY.

reboot [recovery|poweroff|bootloader|download] :

reboot into system (no argument), recovery, bootloader, download mode or turn off
device.

sideload :

sideload zip from host adb.

fixperms :

launch fix permissions script.

decrypt password :

decrypt /data with provided password.


Password could be numeric, alphanumeric. For pattern see note bellow.
HOST SIDE
adb backup :
Use the adb backup command of the host computer to backup the device:
adb backup --twrp [compress] [PARTITION-LIST]
PARTITION-LIST: partition(s) name(s) without leading '/'. Only
partition present into fstab can be backuped.

adb restore FILENAME :


Use the adb restore command of the host computer to restore FILENAME where
FILENAME is a previously backup taken with adb backup.
Specific pattern decrypt note
Use the table bellow to determine what your password will be:
1 2 3
4 5 6
7 8 9
1 2 3 4
5 6 7 8
9 : ; <
= > ? @
1 2 3 4 5
6 7 8 9 :
; < = > ?
@ A B C D
E F G H I
Example: if your pattern is a "U" shape in the middle of the 5x5, enter twrp
decrypt '7<ABC>9' in the terminal or ADB shell. Note that characters ;<>? are
special to the shell and require backslash escaping or single quotes around the
string. Source

You might also like