blob: 9a6754d417ac29d1fea808556d0dcbfa95b492d5 (
plain)
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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>postmarketOS</title>
<meta name="description" content="Aiming for a 10 year life-cycle for smartphones">
<meta name="keywords" content="postmarketOS">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="all">
<link rel="canonical" href="https://postmarketos.org/wiki/Xperia-E-Dual/">
<link href="/pmosweb/static/css/tachyons.min.css" rel="stylesheet">
<link href="/pmosweb/static/css/main.css" rel="stylesheet">
</head>
<body>
<div class="mw7 center">
<div class="cf ph2-ns">
<a class="title" href="/pmosweb/">
<h1 class="f2 lh-title">
<img src="/pmosweb/static/img/recycle.png"></img>
<span>postmarketOS</span>
</h1>
</a>
<div class="menu">
<ul>
<li><a href="/pmosweb/">Home</a></li>
<li><a href="/pmosweb/wiki/">Wiki</a></li>
<li><a href="/pmosweb/blog/">Blog</a></li>
</ul>
</div>
<h1>Xperia E Dual</h1>
<h3>Contributors</h3>
<ul>
<li>Nicknack</li>
</ul>
<h3>What works</h3>
<ul>
<li>Compiling the kernel </li>
</ul>
<h3>What does not work</h3>
<ul>
<li>Flashing, there are problems with Sony's boot image format</li>
</ul>
<p>The built kernel boots with a black screen and no further sign of acitivity. Fastboot flashes without errors but flash offsets are probably wrong. Only known working kernels have a different ELF file format.</p>
<h3>Boot image format</h3>
<p>There is one tool avaiable for unpacking Sony's ELF boot format into the normal ANDROID format:
<a href="https://github.com/Tasssadar/libbootimg">libbootimg</a></p>
<p>Sadly, even unpacking and repacking a working prebuilt kernel doesn't seem to work.</p>
<p>I had more luck with mkelf.py script from Sony. You can loosely follow the tutorial <a href="https://www.netzgewitter.com/2013/10/compiling-android-linux-kernel-for-xperia/">here</a>. This time unpacking a working kernel elf image and repacking it with mkefl.py worked. Needed to change only a few bits with vbindiff. Now we only need to find a working set of offsets and image parts to do the same with a custom kernel!</p>
<p>Here are some links describing the problem with Sony's boot format:
<em> https://github.com/chenxiaolong/DualBootPatcher/issues/181
</em> https://github.com/Tasssadar/libbootimg/pull/2/commits/8986984b5d618be0b753e55d6b9d9d1744bc4094
* https://books.google.de/books?id=2qo6AwAAQBAJ&pg=PA313&lpg=PA313&dq=sony+boot.img+format&source=bl&ots=0mtMMle9eZ&sig=adCVtfarXK9cticvd5qqYA6g39Y&hl=de&sa=X&ved=0ahUKEwjgp5mfx5XVAhUHWRQKHWSeDZcQ6AEIQzAB#v=onepage&q&f=false</p>
<h3>Next possible steps</h3>
<ul>
<li>Try booting pmOS with a prebuilt kernel.</li>
<li>Try repacking built kernel into ELF format</li>
<li>UART debugging?</li>
</ul>
<h3>Links</h3>
<ul>
<li>
<p><a href="https://github.com/Nicknack/pmOs_device_sony_nanhu">Device package</a></p>
</li>
<li>
<p><a href="https://github.com/Klozz/android_kernel_sony_msm7x27a-nanhu">Kernel Source</a></p>
</li>
<li><a href="https://github.com/LineageOS/android_kernel_sony_msm7x27a/">Kernel Source LineageOS</a></li>
<li><a href="https://github.com/der-koenig/android_kernel_sony_msm7x27a/tree/c5738aa4dbfa5f4b36331f07396e5eeaa12c9782">Kernel Source FreeXperia</a></li>
</ul>
</div>
</div>
</body>
</html>
|