-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path20240817200051-blog_一加手机解锁刷入kernelsu.html
432 lines (384 loc) · 10 KB
/
20240817200051-blog_一加手机解锁刷入kernelsu.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2025-01-02 周四 15:00 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>+blog+一加手机解锁刷入KernelSU</title>
<meta name="generator" content="Org Mode" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
/*@import url("https://fonts.googleapis.com/css2?family=Lora:wght@500&display=fallback");
@import url("https://fonts.googleapis.com/css2?family=Inconsolata&display=fallback");
*/
body {
margin: 2% auto;
width: 90%;
max-width: 100%;
background-color: rgba(242,229,188,0.5);
/* background-color: rgba(255,255,255,0.5); */
font-size: 18px;
line-height: 1.4em;
}
@media screen and (min-width: 600px) {
body {
font-size: 18px;
}
}
@media screen and (min-width: 910px) {
body {
width: 900px;
}
}
#preamble {
width: 80%;
max-width: 980px;
text-align: right;
margin: auto;
}
hr {
border: none;
border-top: 5px double #333;
margin: 0px 0;
}
.button {
border: none;
color: black;
padding: 6px 14px;
text-align: center;
text-decoration: none;
display: inline-block;
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
}
.button:hover {
background-color: #3a1616;
color: white;
}
.todo {
background-color: #9d0006;
color: #fbf1c7;
padding: .1em 0.3em;
border-radius: 3px;
background-clip: padding-box;
font-size: $code-size;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
line-height: 1;
}
.done {
background-color: #427b58;
color: #fbf1c7;
padding: .1em 0.3em;
border-radius: 3px;
background-clip: padding-box;
font-size: $code-size;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
line-height: 1;
}
#postamble p {
font-size: 80%;
margin: .2em;
}
#content, .content {
width: 80%;
max-width: 980px;
margin: auto;
}
#org-div-home-and-up{
position: fixed;
right: 0.5em;
margin-top: 70px;
font-family:sans-serif;
}
#table-of-contents {
margin-top: 105px;
font-size: 12pt;
position: fixed;
left: 0em;
top: 0em;
background: white;
max-height: 80%;
overflow: auto;
}
#table-of-contents h2 {
display: none;
}
#table-of-contents li {
clear: both;
}
.timestamp {
color: #928374;
font-size: $smaller;
}
.timestamp-kwd {
color: #5f9ea0;
}
@media screen and (max-width: 1200px) {
#table-of-contents {
position: relative;
margin-top: 0px;
}
}
/* p:not(blockquote > p) :not(ol > p) { */
/* text-indent: 2em; */
/* } */
p {
margin: 1em auto;
}
.title {
font-size: 30px;
line-height: 1.3;
font-weight: bold;
color: #0c2340;
}
h2:not(#table-of-contents > h2) {
font-size: 30px;
line-height: 1.2;
position: relative;
color: #204060;
}
h2::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background-color: black;
}
h3:not(#table-of-contents > h3) {
font-size: 20px;
line-height: 1.1;
position: relative;
color: #4b748d;
}
h3::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
/* border-bottom: 1px dashed black; */
}
h4 {
font-size: 14px;
line-height: 1.1;
font-weight: bold;
}
a {
cursor: pointer;
text-decoration: none;
}
a:link {
color: #458588;
/* text-decoration: underline; */
}
a:hover {
/* font-weight: bold; */
text-decoration: underline;
/* color: #076678; */
}
.figure {
text-align: center;
}
a:visited{
color: #8f3f71;
/* text-decoration: underline; */
}
img {
max-width: 100%;
vertical-align: middle;
}
.MathJax_Display {
margin: 0!important;
width: $smaller!important;
}
@media screen and (max-width: 1200px) {
img {
width: 400px;
}
.MathJax_Display {
margin: 0!important;
width: $smaller!important;
}
}
.org-src-container {
font-size: 14px;
outline: 2px dashed #ccc;
outline-offset: 10px;
position: relative;
}
.org-src-container>pre {
overflow: auto;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Cascadia Code,Consolas, Liberation Mono, monospace;
}
.org-src-container>pre:before {
display: block;
position: absolute;
background-color: #b3b3b3;
top: 0;
right: 0;
padding: 0 0.5em;
border-bottom-left-radius: 8px;
border: 0;
color: white;
font-size: $code-size;
}
pre {
overflow: auto;
}
.example{
font-size: 14px;
outline: 2px dashed #ccc;
outline-offset: 10px;
position: relative;
}
.example::before {
content: "Results";
}
pre:before {
display: block;
position: absolute;
background-color: #b3b3b3;
top: 0;
right: 0;
padding: 0 0.5em;
border-bottom-left-radius: 8px;
border: 0;
color: white;
font-size: $code-size;
}
/* .org-src-container::before { */
/* content: "Copy"; */
/* position: absolute; */
/* top: 5px; */
/* right: 5px; */
/* padding: 5px; */
/* background-color: #ccc; */
/* color: #fff; */
/* border-radius: 3px; */
/* cursor: pointer; */
/* } */
code {
font-size: 16px;
color: #427b58;
}
.subtitle {
text-align: right;
}
blockquote {
border-left: 3px solid #ccc;
padding-left: 10px; /* Optional: add some left padding for the content */
margin-inline-start: 0px;
margin-inline-end: 0px;
}
.info {
overflow: hidden;
}
.created {
float: right;
}
.updated {
float: left;
}
.org-ol {
list-style-type: decimal; /* Set the list style type to decimal numbers */
/* margin-left: 0.5em; /\* Add left margin to the list *\/ */
}
b {
color: #9d0006;
}
#footnotes {
position: fixed;
left: auto;
right: 0;
top: 105px;
bottom: 0;
width: 20%;
padding: 10px;
overflow: auto;
font-size: 14px;
z-index: 9999;
}
#footnotes h2 {
display: none;
}
@media screen and (max-width: 1200px) {
#footnotes {
position: static;
left: 0;
right: 0;
bottom: 0;
width: 100%;
max-height: 30%;
overflow: auto;
padding: 10px;
font-size: 14px;
z-index: 9999;
}
}
/*]]>*/-->
</style>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href=""> UP </a>
|
<a accesskey="H" href="index.html"> HOME </a>
</div><div id="content" class="content">
<h1 class="title">+blog+一加手机解锁刷入KernelSU</h1>
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2024-08-17 周六 20:00]</span></span><br />
</p>
<div id="outline-container-orgadacd6c" class="outline-2">
<h2 id="orgadacd6c"><span class="section-number-2">1.</span> 准备工作</h2>
<div class="outline-text-2" id="text-1">
<p>
下载以下资源:<br />
</p>
<p>
<a href="https://yun.daxiaamu.com/OnePlus_Roms/">对应手机系统当前版本的官方ROM</a>,用于提取 <code>init_boot.img</code><br />
</p>
<p>
<a href="https://developer.android.com/tools/releases/platform-tools">Platform tools</a> ,用来操作fastboot<br />
</p>
</div>
</div>
<div id="outline-container-org63aa8ae" class="outline-2">
<h2 id="org63aa8ae"><span class="section-number-2">2.</span> 开始解锁BL</h2>
<div class="outline-text-2" id="text-2">
<p>
<b>解锁和上锁BL都会格式化手机,提前做好数据备份</b><br />
</p>
<ol class="org-ol">
<li>开启「开发者模式」,打开「OEM解锁」<br /></li>
<li>用 <b>原装数据线</b> 连接电脑,使用adb工具 <code>adb devices</code> ,确认有输出<br /></li>
<li>执行 <code>adb reboot bootloader</code> ,进入bl界面<br /></li>
<li>执行 <code>fastboot flashing unlock</code> ,用音量键移动,电源键确认解锁<br /></li>
</ol>
</div>
</div>
<div id="outline-container-org2c26642" class="outline-2">
<h2 id="org2c26642"><span class="section-number-2">3.</span> 刷入img文件</h2>
<div class="outline-text-2" id="text-3">
<ol class="org-ol">
<li>下载对应ROM,用<a href="https://github.com/vm03/payload_dumper">Payload-Dumper</a> 执行 <code>python payload_dumper.py --images "init_boot" payload.bin</code> 解压出ROM文件<br /></li>
<li>找到 <code>init_boot.img</code> 并将其传输到手机上<br /></li>
<li>手机<a href="https://github.com/tiann/KernelSU/releases">下载安装</a>并打开 KernelSU管理器,选中输入的 <code>init_boot.img</code> ,按流程修补文件<br /></li>
<li>将输出的 <code>KernelSU***.img</code> 拷贝到 <code>adb.exe</code> 所在路径并重命名为 <code>init_boot.img</code><br /></li>
<li>执行 <code>adb reboot bootloader</code> ,进入bl界面<br /></li>
<li>执行 <code>fastboot flash init_boot init_boot.img</code> ,将修补后的文件刷入手机<br /></li>
<li>执行 <code>fastboot reboot</code> ,重启设备<br /></li>
</ol>
</div>
</div>
</div>
<div id="postamble" class="status">
<p>▲ 编辑于 <span class="timestamp-wrapper"><span class="timestamp">[2024-12-31 周二 15:30]</span></span> | © Published by <a href="https://www.gnu.org/software/emacs/">Emacs</a> 31.0.50 (<a href="https://orgmode.org">Org</a> mode 9.7.18) on <span class="timestamp-wrapper"><span class="timestamp">[2025-01-02 周四 15:00]</span></span> | <a href="https://tomoemami.github.io/rss.xml">RSS</a></p>
</div>
</body>
</html>