Project

General

Profile

AndroidDistributions » History » Version 7

Denis 'GNUtoo' Carikli, 11/26/2022 11:09 PM
Add AOSP MAinline

1 1 Denis 'GNUtoo' Carikli
h1. Android distributions
2
3 2 Denis 'GNUtoo' Carikli
{{toc}}
4 1 Denis 'GNUtoo' Carikli
5 2 Denis 'GNUtoo' Carikli
h2. Reviews
6
7
h3. Anbox
8
9 1 Denis 'GNUtoo' Carikli
*Manifest*: https://github.com/anbox/platform_manifests/blob/anbox/default.xml
10
*Android base*: 7.1.1_r13
11
*Based on*: AOSP
12
13
Goals:
14
15
 * Run Android (applications) in containers on top of GNU/Linux
16
17
Extra repositories (overridden or added):
18
19
| path                       | URL                                                           | Comments |
20
| art                        | https://github.com/anbox/platform_art                         |          |
21
| bionic                     | https://github.com/anbox/platform_bionic                      |          |
22
| frameworks/av              | https://github.com/anbox/platform_frameworks_av               |          |
23
| frameworks/base            | https://github.com/anbox/platform_frameworks_base             |          |
24
| frameworks/native          | https://github.com/anbox/platform_frameworks_native           |          |
25
| frameworks/opt/net/wifi    | https://github.com/anbox/platform_frameworks_opt_net_wifi     |          |
26
| hardware/libhardware       | https://github.com/anbox/platform_hardware_libhardware        |          |
27
| hardware/libhardware_legacy| https://github.com/anbox/platform_hardware_libhardware_legacy |          |
28
| system/core                | https://github.com/anbox/platform_system_core                 |          |
29
| system/netd                | https://github.com/anbox/platform_system_netd                 |          |
30
| system/vold                | https://github.com/anbox/platform_system_vold                 |          |
31
| vendor/anbox               | https://github.com/anbox/anbox                                |          |
32
33 2 Denis 'GNUtoo' Carikli
h3. Android x86
34 1 Denis 'GNUtoo' Carikli
35
At the time of writing, the most recent images are RC images for Android 9, but there are branches for Android 10.
36
37
As they use (mostly?) upstream kernels, they sometimes have interesting code.
38
39
*Source code*: https://git.osdn.net/view?a=project_list;pf=android-x86
40
*Manifest*: git://git.osdn.net/gitroot/android-x86/manifest.git
41
42
Branches[1]: 
43
44
| Branch | Android version |
45
| q-x86 | 10.0 |
46
| pie-x86 | 9.0 |
47
| oreo-x86 | 8.1 |
48
| nougat-x86 | 7.1 |
49
| marshmallow-x86 | 6.0 |
50
| lollipop-x86 | 5.1 |
51
| kitkat-x86 | 4.4 |
52
| jb-x86 | 4.3 |
53
| ics-x86 | 4.0 |
54
| honeycomb-x86 | 3.2 |
55
| gingerbread-x86 | 2.3 |
56
| froyo-x86 | 2.2 |
57
| eclair-x86 | 2.1 |
58
| donut-x86 | 1.6 |
59
| cupcake-x86 | 1.5 |
60
 
61
fn1. https://www.android-x86.org/source.html
62
63 2 Denis 'GNUtoo' Carikli
h3. AOSP
64 1 Denis 'GNUtoo' Carikli
65
AOSP doesn't support many devices, but it seem to support some devboards. 
66
67
The advantage is that in general devboards are well supported by upstream kernels.
68
69
Supported devboards[1]?:
70
| Devboard | Freedom issues | Comments |
71
| Beagleboard-X15 | No free GPU driver | Well supported by GNU/Linux, free bootloader |
72
| Cuttlefish emulator | ? | ? |
73
| Other | ? | ? |
74
75
The official documentation also "mentions some devboards":https://source.android.com/setup/build/devices .
76
77
fn1. Some of the devboards in this page are probably supported: https://wiki.linaro.org/AOSP#AOSP_Dev_Board_Reference_Information
78
79 7 Denis 'GNUtoo' Carikli
h3. AOSP Mainline
80
81
*website*: https://github.com/aospm
82
*manifest*: https://github.com/aospm/android_local_manifests/blob/main/aospm.xml
83
84
Repositories:
85
86
| Path                  | URL                                                    | Comments             |
87
| device/generic/sdm845 | https://github.com/aospm/android_device_generic_sdm845 | Use prebuilt kernels |
88
| external/tinyhal      | https://github.com/aospm/tinyhal                       | Generic HAL[1]       |
89
| external/vibrator-ff  | https://github.com/aospm/external_vibrator-ff          | Generic HAL[1]       |
90
91
fn1. https://aosp-developers-community.github.io/#generic-hal-efforts
92
93 2 Denis 'GNUtoo' Carikli
h3. CustomROMs
94 1 Denis 'GNUtoo' Carikli
95
CustomROMs seem to be a space for unofficial port of LineageOS. The idea is probably to develop the port until they manage to meet LineageOS's "device-support-requirements.md":https://github.com/LineageOS/charter/blob/master/device-support-requirements.md . When the requirements are met, they are probably included in LineageOS directly.
96
97
Interesting ports:
98
* The Galaxy SIII (GT-I9300) is being ported to more recent LineageOS versions. There is "a thread on the collaboration with Replicant":https://github.com/CustomROMs/android_local_manifests_i9300/issues/1 in github. The person/people doing the port seem to alternate between an upstream kernel and a older kernel based on the vendor code depending on the amount of work required to finish the port and/or the difficulties encountered. As we are also using a kernel based on upstream Linux we collaborate on that part by reusing each other work when applicable.
99
100 2 Denis 'GNUtoo' Carikli
h3. DivestOS Mobile
101 1 Denis 'GNUtoo' Carikli
102
This distribution is based on LineageOS. While they seem to reuse nonfree software to make the hardware work, they spent some time cleaning up LineageOS code itself.
103
104
For instance it contains patches to remove privacy issues and nonfree software included in CyanogenMod or LineageOS.
105
106
As we need to do that too in Replicant as long as we use LineageOS as base, it would be interesting to collaborate more with DivestOS on that part.
107
108
Web site:
109
*https*: https://divestos.org/
110
*Onion*: http://6sdlxbqgcxdbkvysoir2qvqqs5ro3fxgyl3phvuphcdyklv7rg57jhid.onion
111
112 2 Denis 'GNUtoo' Carikli
h3. Fairphone
113 1 Denis 'GNUtoo' Carikli
114
As October 2020, they are porting the Fairphone 2 to Android 9. However to do that, they are using 3.4 kernel and not any upstream kernels.
115
116
In addition, they don't seem very interested in free software bootloaders, and the Fairphone 1 and 2 use Qualcomm System On a Chip.
117
118
However they are probably interested in free software libraries to make the port to newer Android versions easier.
119
120 3 Denis 'GNUtoo' Carikli
h3. GLODroid
121
122
*Based on*: AOSP
123 4 Denis 'GNUtoo' Carikli
*Manifest*: https://github.com/GloDroid/glodroid_manifest/blob/master/glodroid.xml
124 3 Denis 'GNUtoo' Carikli
125 6 Denis 'GNUtoo' Carikli
h4. device/glodroid repository
126 1 Denis 'GNUtoo' Carikli
127 6 Denis 'GNUtoo' Carikli
*url*: https://github.com/glodroid/glodroid_device.git
128 1 Denis 'GNUtoo' Carikli
129 6 Denis 'GNUtoo' Carikli
Content:
130 1 Denis 'GNUtoo' Carikli
131 6 Denis 'GNUtoo' Carikli
| Path                                         | description                             | Comments                                                |
132
| common/                                      | * low memory configuration
133
                                                 * selinux policies
134
                                                 * Other (TODO)                          |                                                         |
135
| hals/power/                                  | power management (DVFS, CPU boost, etc) |                                                         |
136
| hals/usb-aidl/                               |/2. USB gadget HAL                       |/2. It seems to use the same API than our scripts.
137
                                                                                              It also look very generic (for instance it uses
138
                                                                                              the Google/Android VID/PID).                         |
139
| hals/usb-gadget/                             |
140
| platform/kernel/kernel.mk                    | Kernel build system                     | Can it be moved?                                        |
141
| platform/uboot/uboot.mk                      | u-boot build system                     | Can it be moved?                                        |
142
| pinephone/lights/                            | LEDS HAL                                | Is there a generic LED HAL ?                            |
143
| pinephone/reference-ril/                     |/2. AT ril based on the reference RIL    |/2. We could use it for now, until we manage to use QMI  |
144
| pinephone/rild/                              |
145
| pinephone/vibrator/                          | Vibrator HAL                            | AOSP Mainline has a separate vibrator                   |
146
147
h4. Forked repositories
148
149 3 Denis 'GNUtoo' Carikli
| Path                              | URL                                                    | Comments |
150
| external/libcamera                | https://github.com/glodroid/glodroid_forks.git         |          |
151
| external/boost                    | https://github.com/glodroid/glodroid_forks.git         |          |
152
| external/libyaml                  | https://github.com/glodroid/glodroid_forks.git         |          |
153
| external/libyuv_chromium          | https://github.com/glodroid/glodroid_forks.git         |          |
154
| external/iio-sensors-hal          | https://github.com/glodroid/glodroid_forks.git         |          |
155
| external/minigbm                  | https://github.com/glodroid/glodroid_forks.git         |          |
156
| external/drm_hwcomposer           | https://github.com/glodroid/glodroid_forks.git         |          |
157
| external/mesa3d                   | https://github.com/glodroid/glodroid_forks.git         |          |
158
| external/u-boot                   | https://github.com/glodroid/glodroid_forks.git         |          |
159
| external/tinyhal                  | https://github.com/glodroid/glodroid_forks.git         |          |
160
| kernel/glodroid-megous            | https://github.com/glodroid/glodroid_forks.git         |          |
161
| kernel/glodroid-megous-edge       | https://github.com/glodroid/glodroid_forks.git         |          |
162 1 Denis 'GNUtoo' Carikli
| kernel/glodroid-broadcom          | https://github.com/glodroid/glodroid_forks.git         |          |
163 3 Denis 'GNUtoo' Carikli
| kernel/glodroid-stable            | https://github.com/glodroid/glodroid_forks.git         |          |
164
| kernel/glodroid-modules/rtl8189es | https://github.com/glodroid/glodroid_forks.git         |          |
165
| kernel/glodroid-modules/rtl8189fs | https://github.com/glodroid/glodroid_forks.git         |          |
166 1 Denis 'GNUtoo' Carikli
167 6 Denis 'GNUtoo' Carikli
h4. Toolchains repositories
168 1 Denis 'GNUtoo' Carikli
169
| Path                                                         | URL                                                  | Comments |
170
| prebuilts/gcc/linux-x86/arm/gcc-linaro-arm-linux-gnueabihf   | https://github.com/glodroid/linaro_gcc_prebuilts.git |          |
171
| prebuilts/gcc/linux-x86/aarch64/gcc-linaro-aarch64-linux-gnu | https://github.com/glodroid/linaro_gcc_prebuilts.git |          |
172
| prebuilts/gcc/linux-x86/arm/gcc-linaro-arm-eabi"             | https://github.com/glodroid/linaro_gcc_prebuilts.git |          |
173 3 Denis 'GNUtoo' Carikli
| prebuilts/gcc/linux-x86/or1k/gcc-linux-or1k"                 | https://github.com/glodroid/linaro_gcc_prebuilts.git |          |
174
175 6 Denis 'GNUtoo' Carikli
h4.  bootloader related repositories
176
177
| Path                                         | URL                                                        | Comments |
178
| external/crust-firmware/arm-trusted-firmware | https://github.com/crust-firmware/arm-trusted-firmware.git |          |
179
| external/crust-firmware/crust                | https://github.com/crust-firmware/crust.git                |          |
180
181
h4. Other repositories
182 3 Denis 'GNUtoo' Carikli
183 5 Denis 'GNUtoo' Carikli
It also contains various repositories for nonfree firmwares and nonfree bootloader components (BL1, etc), and a repository with just APKs (this might be an issue for license compliance).
184 3 Denis 'GNUtoo' Carikli
185 2 Denis 'GNUtoo' Carikli
h3. LineageOS
186 1 Denis 'GNUtoo' Carikli
187
See "device-support-requirements.md":https://github.com/LineageOS/charter/blob/master/device-support-requirements.md for more information on LineageOS expectations.
188
189
Replicant has "a script":https://git.replicant.us/replicant/vendor_replicant-scripts/tree/research that is able to parse the "LineageOS wiki data":https://github.com/LineageOS/lineage_wiki . That can be useful to find information on devices supported by LineageOS.
190
191
The "devices supported by LineageOS 16":https://wiki.lineageos.org/devices/ have either:
192
* A Qualcomm SOC with an integrated modem inside (MSM*) for many devices
193
* A Qualcomm SOC without a modem inside (APQ*) for many devices
194
* A HiSilicon Kirin 970 SOCs for devices like:
195
** The "Huawei Honor View 10":https://wiki.lineageos.org/devices/berkeley
196
** The "Huawei P20 Pro":https://wiki.lineageos.org/devices/charlotte
197
* A Samsung Exynos 7580 SOC for the following device
198
** "Galaxy S5 Neo":https://wiki.lineageos.org/devices/s5neolte (Smartphone): It has shared memory between the modem and the SOC
199
200
It may be because they rely on nonfree software to support devices, which has not been ported to Android 9, or may be because they need more time to add devices with other SOCs like exynos.
201
202 2 Denis 'GNUtoo' Carikli
h3. Waydroid
203 1 Denis 'GNUtoo' Carikli
204
Waydroid consist in some host tool that can containerize an Android distribution, and some changes on top of LineageOS.
205
206
Some repositories would only be useful if we decide to integrate Waydroid in Replicant to have some FSDG compliant way to run Android applications on top of GNU/Linux:
207
* The audio library does something like that: @snd_pcm_open(&out->pcm, "pulse", SND_PCM_STREAM_PLAYBACK, 0);@ [1], so if I understood right, it uses Pulseaudio's alsa compatbility layer.
208
* For the graphics, some repositories like mesa, minigbm are replaced by Waydroid's own repositories. It also integrates boringdroid APK as-is instead of building it from source. Boringdroid brings moving windows to Android instead of the default full-screen windows.
209
210
There is some interest in Guix about having something like that as a "patch serie":https://issues.guix.gnu.org/51737#22 was sent for adding the Waydroid host part in Guix.
211
212
What would be more interesting for Replicant as-is that in android_hardware_waydroid[2], there is libraries that work with upstream kernels like the vibrator library. We also have our own vibrator library but it would probably be a good idea to share the maintenance somehow.
213
214
fn1. https://github.com/waydroid/android_hardware_waydroid/blob/lineage-18.1/audio/audio_hw.c
215
216
fn2. https://github.com/waydroid/android_hardware_waydroid
217
218 2 Denis 'GNUtoo' Carikli
h3. Building a collaboration with other Android distributions
219 1 Denis 'GNUtoo' Carikli
220
Given that:
221
* Replicant doesn't want to support devices that have more freedom issues than the ones currently supported.
222
* Many other Android distributions probably don't have the same goals with the freedom of the devices they support.
223
* Replicant 9 is based on upstream Linux and will have to maintain its userspace libraries.
224
* Some users may still want to support devices that have more freedom issues than the ones supported by Replicant.
225
226
It could be a good idea to share the maintenance of the code used to make Replicant 9 with other distributions.
227 2 Denis 'GNUtoo' Carikli
228
h2. Comparison
229
230
h1. Comparison of distributions
231
232
h2. AOSP and LineageOS
233
234
| Feature | AOSP | LineageOS |
235
| Code quality | Better than LineageOS | |
236
| Documentation | Better than LineageOS | |
237
| root | Not sure if supported or not | Supported |
238
| Minor release versioning | supported with Git tags | Not supported.
239
For instance frameworks/native has no LineageOS tags (only cm-1x tags) and has no other branch for lineage OS 16.0 than the lineage-16.0 branch, as the other branches name are for other things. This was confirmed after running 'git fetch github' in frameworks/native to fetch the other branches that are not fetched by repo by default.
240
Despite that, some code was even merged in after the lineage-16.0 release:
241
<pre>
242
commit 22abc3cf4077644463a2dc1c59a5a74e9518ea16
243
Merge: 9e96d54 8a6b6c3
244
Date:   Sat Jul 13 18:57:45 2019 +0200
245
246
    Merge remote-tracking branch 'aosp/pie-gsi' into lineage-16.0-pie-gsi
247
</pre> |
248
| GUI features for developers
249
* Advanced reboot | ? | Supported |
250
| Integrated kernel builds | Unsupported | Supported |