blob: 450efe1b5f1d50d59a1b5eeb48d568200558d6f7 [file] [log] [blame]
nailyk74f80d82016-09-25 15:08:22 +02001---
2layout: post
3title: "TWRP Commandline Guide"
4---
5<style>
6.command {
7}
8.desc {
9 font-size: smaller;
nailyk-free3b6a32017-03-15 23:25:44 +010010 clear: both;
nailyk74f80d82016-09-25 15:08:22 +020011}
nailyk-free3b6a32017-03-15 23:25:44 +010012.inline-table
13{
14 border-collapse: collapse;
15 border-spacing: 0;
16 background-color: transparent;
17 text-align: center;
18 table-layout: fixed;
19 float: left;
20 margin-top: 10px;
21 margin-bottom: 10px;
22 margin-left: 2px;
23 margin-right: 2px;
24}
25.literal {
26 -moz-border-radius: 3px;
27 -webkit-border-radius: 3px;
28 background-color: #eef;
29 border-radius: 3px;
30 border: 1px solid #e8e8e8;
31 padding: 2px 4px;
32 white-space: nowrap;
33}
34</style>
nailyk74f80d82016-09-25 15:08:22 +020035</style>
36<div class="home">
37<ul class="page-heading">CLIENT SIDE/SCRIPT</ul>
38<pre class="command"><b>install</b> FILENAME :
39<div class="desc"> install <b>FILENAME</b> zip file.</div>
40
41<b>wipe</b> PARTITION :
Adrian DC81e70ee2021-01-07 00:37:03 +010042<div class="desc"> format <b>PARTITION</b>, one by line:
nailyk74f80d82016-09-25 15:08:22 +020043 cache,
44 system,
45 dalvik,
46 data.</div>
47
Adrian DC81e70ee2021-01-07 00:37:03 +010048<b>format</b> data :
49<div class="desc"> format <b>data</b></div>
50
nailyk74f80d82016-09-25 15:08:22 +020051<b>backup</b> PARTITIONS-TO-BACKUP [BACKUP-NAME] :
52<div class="desc"> backup partition <b>PARTITIONS-TO-BACKUP</b> to [<b>BACKUP-NAME</b>]
53 <b>PARTITIONS-TO-BACKUP</b>, multiples selection allowed:
54 S: system,
55 D: data,
56 C: cache,
57 R: recovery,
58 B: boot,
59 A: and-sec,
60 E: sd-ext,
61 M: skip md5 creation.
62 [<b>BACKUP-NAME</b>] If not provided, current date/time is used.</div>
63
64<b>restore</b> PARTITION-TO-RESTORE BACKUP-NAME :
65<div class="desc"> restore <b>PARTITION-TO-RESTORE</b> from existant <b>BACKUP-NAME</b>:
66 <b>PARTITION-TO-RESTORE</b>, multiples selection allowed:
67 S: system,
68 D: data,
69 C: cache,
70 R: recovery,
71 B: boot,
72 A: and-sec,
73 E: sd-ext,
74 M: skip md5 check.
75 <b>BACKUP-NAME</b>: could be full path or name of twrp backup in current twrp backup folder.
76 Backup can't be encrypted.</div>
77
78<b>remountrw</b> :
79<div class="desc"> revert <i>/system</i> mount type (read-only/read-write).</div>
80
81<b>mount</b> PATH.
82
83<b>set</b> VARIABLE [VALUE] :
84<div class="desc"> set <b>VARIABLE</b> to <b>VALUE</b>. If <b>VALUE</b> is empty, empty <b>VARIABLE</b>.</div>
85
86<b>mkdir</b> DIRECTORY.
87
88<b>reboot</b> [recovery|poweroff|bootloader|download] :
89<div class="desc"> reboot into system (no argument), recovery, bootloader, download mode or turn off device.</div>
90
91<b>sideload</b> :
92<div class="desc"> sideload zip from host adb.</div>
93
94<b>fixperms</b> :
95<div class="desc"> launch fix permissions script.</div>
96
97<b>decrypt</b> password :
nailyk-free3b6a32017-03-15 23:25:44 +010098<div class="desc"> decrypt /data with provided <b>password</b>.
99 Password could be numeric, alphanumeric. For pattern see note bellow.</div></pre>
nailyk74f80d82016-09-25 15:08:22 +0200100
101<ul class="page-heading">HOST SIDE</ul>
bigbiff bigbiff199a2fe2017-03-22 19:03:41 -0400102<pre class="command"><b>adb backup</b> :
nailyk74f80d82016-09-25 15:08:22 +0200103<div class="desc"> Use the <i>adb backup</i> command of the host computer to backup the device:
104 adb backup --twrp [compress] [PARTITION-LIST]
105 PARTITION-LIST: partition(s) name(s) without leading '/'. Only partition present into fstab can be backuped.</div>
106
bigbiff bigbiff199a2fe2017-03-22 19:03:41 -0400107<b>adb restore</b> FILENAME :
108<div class="desc"> Use the <i>adb restore</i> command of the host computer to restore <b>FILENAME</b> where <b>FILENAME</b> is a previously backup taken with <i>adb backup</i>.</div></pre>
nailyk-free3b6a32017-03-15 23:25:44 +0100109
110
111
112<ul class="page-heading">Specific pattern decrypt note</ul>
113<div class="desc" >Use the table bellow to determine what your password will be: </div>
114<table border="1" class="inline-table">
115 <colgroup>
116 <col width="33%" /><col width="33%" /><col width="33%" />
117 </colgroup>
118 <tbody valign="top">
119 <tr><td>1</td><td>2</td><td>3</td></tr>
120 <tr><td>4</td><td>5</td><td>6</td></tr>
121 <tr><td>7</td><td>8</td><td>9</td></tr>
122 </tbody>
123</table>
124<table border="1" class="inline-table">
125 <colgroup>
126 <col width="25%" /><col width="25%" /><col width="25%" /><col width="25%" />
127 </colgroup>
128 <tbody valign="top">
129 <tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
130 <tr><td>5</td><td>6</td><td>7</td><td>8</td></tr>
131 <tr><td>9</td><td>:</td><td>;</td><td>&lt;</td></tr>
132 <tr><td>=</td><td>&gt;</td><td>?</td><td>&#64;</td></tr>
133 </tbody>
134</table>
135<table border="1" class="inline-table">
136 <colgroup>
137 <col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" />
138 </colgroup>
139 <tbody valign="top">
140 <tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr>
141 <tr><td>6</td><td>7</td><td>8</td><td>9</td><td>:</td></tr>
142 <tr><td>;</td><td>&lt;</td><td>=</td><td>&gt;</td><td>?</td></tr>
143 <tr><td>&#64;</td><td>A</td><td>B</td><td>C</td><td>D</td></tr>
144 <tr><td>E</td><td>F</td><td>G</td><td>H</td><td>I</td></tr>
145 </tbody>
146</table>
147<div class="desc" >Example: if your pattern is a &quot;U&quot; shape in the middle of the 5x5, enter <tt class="literal">twrp decrypt '7&lt;ABC&gt;9'</tt> in the terminal or ADB shell. Note that characters <tt class="literal"><span class="pre">;&lt;&gt;?</span></tt> are special to the shell and require backslash escaping or single quotes around the string.
148<a href='https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html'>Source</a></div>