blob: 7cb7e62be2e66ffa63e9b94c4e338e5d31855af8 [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 :
42<div class="desc"> format <b>PARTITON</b>, one by line:
43 cache,
44 system,
45 dalvik,
46 data.</div>
47
48<b>backup</b> PARTITIONS-TO-BACKUP [BACKUP-NAME] :
49<div class="desc"> backup partition <b>PARTITIONS-TO-BACKUP</b> to [<b>BACKUP-NAME</b>]
50 <b>PARTITIONS-TO-BACKUP</b>, multiples selection allowed:
51 S: system,
52 D: data,
53 C: cache,
54 R: recovery,
55 B: boot,
56 A: and-sec,
57 E: sd-ext,
58 M: skip md5 creation.
59 [<b>BACKUP-NAME</b>] If not provided, current date/time is used.</div>
60
61<b>restore</b> PARTITION-TO-RESTORE BACKUP-NAME :
62<div class="desc"> restore <b>PARTITION-TO-RESTORE</b> from existant <b>BACKUP-NAME</b>:
63 <b>PARTITION-TO-RESTORE</b>, multiples selection allowed:
64 S: system,
65 D: data,
66 C: cache,
67 R: recovery,
68 B: boot,
69 A: and-sec,
70 E: sd-ext,
71 M: skip md5 check.
72 <b>BACKUP-NAME</b>: could be full path or name of twrp backup in current twrp backup folder.
73 Backup can't be encrypted.</div>
74
75<b>remountrw</b> :
76<div class="desc"> revert <i>/system</i> mount type (read-only/read-write).</div>
77
78<b>mount</b> PATH.
79
80<b>set</b> VARIABLE [VALUE] :
81<div class="desc"> set <b>VARIABLE</b> to <b>VALUE</b>. If <b>VALUE</b> is empty, empty <b>VARIABLE</b>.</div>
82
83<b>mkdir</b> DIRECTORY.
84
85<b>reboot</b> [recovery|poweroff|bootloader|download] :
86<div class="desc"> reboot into system (no argument), recovery, bootloader, download mode or turn off device.</div>
87
88<b>sideload</b> :
89<div class="desc"> sideload zip from host adb.</div>
90
91<b>fixperms</b> :
92<div class="desc"> launch fix permissions script.</div>
93
94<b>decrypt</b> password :
nailyk-free3b6a32017-03-15 23:25:44 +010095<div class="desc"> decrypt /data with provided <b>password</b>.
96 Password could be numeric, alphanumeric. For pattern see note bellow.</div></pre>
nailyk74f80d82016-09-25 15:08:22 +020097
98<ul class="page-heading">HOST SIDE</ul>
bigbiff bigbiff199a2fe2017-03-22 19:03:41 -040099<pre class="command"><b>adb backup</b> :
nailyk74f80d82016-09-25 15:08:22 +0200100<div class="desc"> Use the <i>adb backup</i> command of the host computer to backup the device:
101 adb backup --twrp [compress] [PARTITION-LIST]
102 PARTITION-LIST: partition(s) name(s) without leading '/'. Only partition present into fstab can be backuped.</div>
103
bigbiff bigbiff199a2fe2017-03-22 19:03:41 -0400104<b>adb restore</b> FILENAME :
105<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 +0100106
107
108
109<ul class="page-heading">Specific pattern decrypt note</ul>
110<div class="desc" >Use the table bellow to determine what your password will be: </div>
111<table border="1" class="inline-table">
112 <colgroup>
113 <col width="33%" /><col width="33%" /><col width="33%" />
114 </colgroup>
115 <tbody valign="top">
116 <tr><td>1</td><td>2</td><td>3</td></tr>
117 <tr><td>4</td><td>5</td><td>6</td></tr>
118 <tr><td>7</td><td>8</td><td>9</td></tr>
119 </tbody>
120</table>
121<table border="1" class="inline-table">
122 <colgroup>
123 <col width="25%" /><col width="25%" /><col width="25%" /><col width="25%" />
124 </colgroup>
125 <tbody valign="top">
126 <tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
127 <tr><td>5</td><td>6</td><td>7</td><td>8</td></tr>
128 <tr><td>9</td><td>:</td><td>;</td><td>&lt;</td></tr>
129 <tr><td>=</td><td>&gt;</td><td>?</td><td>&#64;</td></tr>
130 </tbody>
131</table>
132<table border="1" class="inline-table">
133 <colgroup>
134 <col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" />
135 </colgroup>
136 <tbody valign="top">
137 <tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr>
138 <tr><td>6</td><td>7</td><td>8</td><td>9</td><td>:</td></tr>
139 <tr><td>;</td><td>&lt;</td><td>=</td><td>&gt;</td><td>?</td></tr>
140 <tr><td>&#64;</td><td>A</td><td>B</td><td>C</td><td>D</td></tr>
141 <tr><td>E</td><td>F</td><td>G</td><td>H</td><td>I</td></tr>
142 </tbody>
143</table>
144<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.
145<a href='https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html'>Source</a></div>