├── .gitignore
├── README.md
├── build_sargo.sh
├── clean_sargo.sh
├── local_manifests
├── custom_packages.xml
└── muppets-hal.xml
└── userscripts
├── before.sh
├── include-opengapps-pico.patch
└── unused_patches
├── disable-selinux.patch
├── dont-enforce-rro.patch
└── test_patches
├── 0001-Don-t-build-in-euicc-esim-supportx.patch
├── 0001-Remove-esim-euicc-support-Crashes-carrier-services.patch
├── 0001-Revert-init-only-provide-control-message-results-for.patch
├── 0002-Revert-Reland-2-init-run-property-service-in-a-threa.patch
├── disable-bluetooth-sap.patch
└── frameworks-changes.patch
/.gitignore:
--------------------------------------------------------------------------------
1 | ccache
2 | logs
3 | src
4 | userscripts/test_patches
5 | zips
6 | mass_build_sargo.sh
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Build LineageOS 17.1 for the Pixel 3a aka sargo
3 |
4 | Installation instructions can be found below as well.
5 |
6 | These instructions will also likely work for the Pixel 3a XL aka bonito with some modification.
7 |
8 | There are two ways to build, the easy way and the hard way. The easy way uses a docker image as the build environment and applies functionality patches and optionally patches for microg support. This is the recommend way as the build dependency versions your linux distro provides may cause unexpected issues.
9 |
10 | The hard way requires you to set up your own build environment and apply the patches manually. You may want to choose this route if you want to familiarize yourself with AOSP, lineaseos, and the build process. If you choose this route I suggest using Debian Stretch.
11 |
12 | _At the bottom of this page are some troubleshooting and debug instructions_
13 |
14 | # Get adb and fastboot
15 | _Required for both the easy and hard ways_
16 | the platform tools provided by distros is often wayyyy out of date. We have to grab the binaries ourselves.
17 |
18 | get adb and fastboot from google https://dl.google.com/android/repository/platform-tools-latest-linux.zip
19 | cd to your home directory, and extract them: `unzip platform-tools-latest-linux.zip -d ~`
20 | and add them to your path by adding the following to your `~/.profile`
21 | ```
22 | # add Android SDK platform tools to path
23 | if [ -d "$HOME/platform-tools" ] ; then
24 | PATH="$HOME/platform-tools:$PATH"
25 | fi
26 | ```
27 |
28 | and run `source ~/.profile`
29 |
30 |
31 | # Build lineageos 17.1 for pixel 3a (sargo) docker aka the easy way
32 |
33 | This uses https://github.com/SolidHal/docker-lineage-cicd/ which automates the build.
34 |
35 | Install docker for your OS. Instructions can be found on the docker website.
36 |
37 | clone a copy of the repo
38 |
39 | ```
40 | cd ~/
41 | mkdir lineage-docker-solidhal
42 | cd lineage-docker-solidhal
43 | git clone https://github.com/SolidHal/docker-lineage-cicd.git .
44 | ```
45 |
46 | and build the docker image
47 |
48 | ```
49 | docker build --tag solidhal/docker-lineage-cicd .
50 | ```
51 |
52 | Now clone a copy of this repo if you haven't already
53 |
54 | ```
55 | cd ~/
56 | mkdir lineage-sargo
57 | cd lineage-sargo
58 | git clone https://github.com/SolidHal/Build-lineageos-sargo.git .
59 | ```
60 |
61 | make the directories we will pass into the docker:
62 | ```
63 | mkdir src zips logs ccache
64 | ```
65 | and the a directory for your signing keys. If you already have these, you can skip this step
66 | ```
67 | mkdir ~/.android-certs
68 | ```
69 |
70 | now we can build.
71 |
72 | `build_sargo.sh` builds lineageos with support for signature spoofing and other location providers both of which are required for microg and unifiedNLP support.
73 | It also includes the f-droid privileged extension, which allows f-droid to be used without the "unknown sources" permission and allows for a cleaner app install process.
74 |
75 | The script `before.sh` in `userscripts` applies a handful of patches to fix a bootloop, improve battery life, and fix bluetooth
76 |
77 | If all of that sounds good, you can build by running
78 | ```
79 | ./build_sargo.sh
80 | ```
81 | this will take over an hour most likely, especially the first time.
82 |
83 | you can watch the progress by reading the logs in `logs`.
84 | The repo log is the process of syncing all of the repos. When that is complete, a second log in the `logs/sargo` directory will track the build progress.
85 |
86 | when the build is complete, you can find the lineageos zip and the `boot.img` in `zips/sargo`
87 |
88 | ### Install
89 | _Install instructions can be found farther down this readme_
90 |
91 | ### Customization
92 |
93 | if you don't have any interest in microg, you can remove `SIGNATURE_SPOOFING` and `SUPPORT_UNIFIEDNLP`.
94 |
95 | Additional environment variables can be added to the script to further customize the build. See https://github.com/SolidHal/docker-lineage-cicd/ for a list
96 |
97 |
98 | # Build lineageos 17.1 for pixel 3a (sargo) no docker aka the hard way
99 | This is more difficult, as you have to setup the environment yourself. It is also less reliable as build dependencies can cause unknown issues depending on the version your distro provides.
100 |
101 |
102 | Basing these instructions off of https://wiki.lineageos.org/devices/sailfish/build with modifications for the pixel 3a aka sargo
103 |
104 | Note that while the pixel 3a is codenamed `sargo`, it is very closely related to the pixel 3a XL codenamed `bonito`. Because of this,
105 | most of the files we care about are actually under `bonito` directories. This is important to keep in mind if you want to modify this process.
106 |
107 | ## Setup build enviroment
108 |
109 | In my experience, over 16GB of RAM + swap is needed to build.
110 | I have 16GB of ram but my first build failed because I only had 2GB of swap :(
111 | If you get a random failure in the build process, because something was "killed" low memeory is likely why
112 | I needed over 8GB of swap, ended up using 16GB
113 |
114 | Guides all over the internet can tell you how to grow your swap, but to start you can check it with:
115 | `free -h`
116 |
117 | You also need about 150-200GB of free disk space.
118 |
119 |
120 | install the repo command
121 |
122 | ```
123 | curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
124 | chmod a+x /usr/bin/repo
125 | ```
126 |
127 | ## Setup sources
128 | make and enter a desired source directory
129 |
130 | ```
131 | cd ~/android/lineage
132 | repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
133 | ```
134 |
135 |
136 | and now let repo grab all of the sources
137 |
138 | `repo sync`
139 |
140 | if that fails, you may have to run the following to clear any conflicts:
141 |
142 | ```
143 | repo sync --force-sync
144 | ```
145 |
146 | now download the device specific config and kernel:
147 |
148 | ```
149 | source build/envsetup.sh
150 | breakfast sargo
151 | ```
152 |
153 | ### proprietary blobs
154 | these are unfortunately required, there is no android phone without some proprietary blobs.
155 | we have to specifiy them explicitly because they are not provided by lineageos for potential copyright issues.
156 |
157 | add the following to `.repo/local_manifests/muppets.xml`
158 | ```
159 |
160 |
161 |
162 |
163 | ```
164 |
165 | and run `repo sync`
166 | to get the proprietary blobs.
167 |
168 |
169 |
170 | now to patch in signature spoofing and add the fdroid privileged extension:
171 |
172 | ### Fdroid & microg
173 | include the fdroid privileged extension in the build. This combined with the fdroid.apk will allow us to securely install microg from the supported fdroid repo.
174 | information on this process can be found here: https://gitlab.com/fdroid/privileged-extension/#f-droid-privileged-extension
175 |
176 | make a file called `fdroid_extension.xml` in `.repo/local_manifests` and add the following to it:
177 | ```
178 |
179 |
180 |
181 |
182 |
185 |
186 |
187 | ```
188 | note that when fdroid privileged extension is updated the revision (0.2.11) will need to be updated to build the new version into lineageos
189 |
190 | now run `repo sync` again to pull in the fdroid privileged extension files
191 |
192 | Next to actually include it in the build, add `F-DroidPrivilegedExtension` to the `PRODUCT_PACKAGES` list in `device/google/bonito/device-common.mk`
193 | ```
194 | PRODUCT_PACKAGES += \
195 | F-DroidPrivilegedExtension \
196 | ```
197 |
198 | after bootup, we can then install fdroid, and then installing the microg apks from there. This is the "supported" method of microg inclusion.
199 | This also provides the benefit of having a microg-free ROM if desired.
200 |
201 |
202 | *NOTE: if you run repo sync after this point, you will have to re apply the patches*
203 |
204 | _Patches can be found in the following places
205 | Signature Spoofing:
206 | _
207 |
208 | ### Signature Spoofing patch for android 10
209 | to take advantage of microg, we need to allow signature spoofing.
210 |
211 | The patch can be found here https://github.com/SolidHal/docker-lineage-cicd/tree/master/src/signature_spoofing_patches
212 | ```
213 | cd frameworks/base/core
214 | patch -p1 < sig_spoofing_patch/android_frameworks_base-Q.patch
215 | ```
216 |
217 |
218 | ### UnifiedNLP patch
219 | The patch can be found here https://github.com/SolidHal/docker-lineage-cicd/tree/master/src/location_services_patches
220 | ```
221 | cd frameworks/base/core`
222 | patch -p1 < location_patch/android_frameworks_base-Q.patch
223 | ```
224 |
225 | ### msm patches
226 | there is one patch to prevent a bootloop that has not yet been merged. Lets cherry pick it now.
227 |
228 | `cd kernel/google/msm-4.9`
229 | `git fetch "https://github.com/LineageOS/android_kernel_google_msm-4.9" refs/changes/27/263927/2 && git cherry-pick FETCH_HEAD`
230 |
231 | ### bluetooth patch
232 | bluetooth is currently broken due to hal_bluetooth_default lacking some permissions, cherry pick the patch. This may get merged, making this step unnecessary:
233 | ```
234 | cd device/google/bonito
235 | git fetch "https://github.com/LineageOS/android_device_google_bonito" refs/changes/45/268545/1 && git cherry-pick FETCH_HEAD
236 | ```
237 |
238 | ### battery life improvement patch
239 | this may also get merged at some point
240 |
241 | ```
242 | cd kernel/google/msm-4.9
243 | git fetch "https://github.com/LineageOS/android_kernel_google_msm-4.9" refs/changes/40/263940/1 && git cherry-pick FETCH_HEAD
244 | ```
245 |
246 | Now we can get back to building.
247 |
248 | ## ccache
249 | setup ccache, I highly recommend this. Android takes a very long time to build (>1 hour). This _greatly_ speeds up subsequent builds:
250 |
251 | run:
252 | ```
253 | export USE_CCACHE=1
254 | ```
255 | and add that line to your `~/.bashrc`
256 |
257 | and choose a size for your ccache. The wiki recommends 50G but I went with 75G to be safe.
258 | ```
259 | ccache -M 75G
260 | ```
261 |
262 | ## build
263 | And finally, start the build. This will take a while.
264 | ```
265 | croot
266 | brunch sargo
267 | ```
268 |
269 | you can find the build results in `$OUT` which is
270 | ```
271 | croot
272 | cd out/target/product/sargo
273 | ```
274 |
275 | inside you'll find the `lineage-17.1-XXXXXXXX-UNOFFICIAL-sargo.zip`
276 |
277 | # Install
278 |
279 | Plug your phone into you computer, power it off, and hold down `power` + `volume down` to boot into the bootloader
280 |
281 | make sure your bootloader is unlocked. You can unlock it by running:
282 | `fastboot flashing unlock`
283 | accept the bootloader unlock, and reboot into bootloader
284 |
285 | Now to flash the recovery image we built, which is part of the boot.img
286 | for the hard way, the boot.img is located in ``out/target/product/sargo`
287 | for the easy way it is along with your lineageos image in `zips`
288 |
289 | flash boot.img by running:
290 | `fastboot flash boot boot.img`
291 |
292 | reboot into the bootloader and boot into recovery by using volume up or volume down in the bootloader
293 | Do a factory wipe of user data to avoid any issues.
294 | Next choose `Apply update from adb`
295 | Locate your built lineageos.zip and sideload it
296 | `adb sideload lineage-17.1*.zip`
297 |
298 | it will get stuck at 47% for a bit, just give it a few minutes
299 | When it is done, you will be back at the android recovery screen
300 | choose "Reboot System Now"
301 |
302 |
303 | # Fdroid and microg setup
304 | Right now you need an alpha version of fdroid to function with the privileged extension on Android 10
305 | get version `1.8-alpha1` or newer
306 |
307 | Once installed, add the microg fdroid repo. A quick search will lead you to it.
308 |
309 | Install microg services core, microg services framework proxy, fakestore, and a unified nlp backend.
310 |
311 | I found for installing microg services, I still had to give fdroid unknown sources permission. This doesn't seem to happen with any other app from fdroid.
312 |
313 | Open the microg app, give it the permissions it requests and then in the self check tap "system grants signature spoofing permission" and grant it signature spoofing
314 |
315 | Now we have to grant unified nlp location permissions. This is done easily from adb root
316 |
317 | enable adb and root adb in developer options, plug in your phone, and run:
318 |
319 | ```
320 | adb root
321 | adb shell
322 | ```
323 | then run the following in the adb shell
324 | ```
325 | pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
326 | pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION
327 | ```
328 |
329 | Finally, grant the fakestore signature spoofing permissions
330 |
331 | ```
332 | pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE
333 | ```
334 |
335 | and reboot your phone
336 | you can now disable developer options
337 |
338 | Further troubleshooting information can be found here https://old.reddit.com/r/MicroG/wiki/issues
339 |
340 | # Debug build
341 | useful for debugging bootloops, provides access to adb functions like `adb logcat` right away.
342 |
343 | ### docker
344 | TODO
345 |
346 | ### no docker
347 | to build a debug eng image on lineageos do the following:
348 | `TARGET_BUILD_TYPE=debug breakfast sargo eng`
349 | `TARGET_BUILD_TYPE=debug brunch sargo eng`
350 |
351 | sideload the `lineage-17.1-XXXXXXXX-UNOFFICIAL-sargo.zip` like a usual build
352 |
353 | ### fastboot usage
354 | sargo is an A/B device, so you can flash either slot_a or slot_b by adding `_b` to the partition
355 | example for boot:
356 | ```
357 | fastboot flash boot_a boot.img
358 | fastboot flash boot_b boot.img
359 | ```
360 |
361 | ### Troubleshooting:
362 |
363 | at some point, I got stuck where I couldn't get into recovery from the bootloader.
364 |
365 | to get out I took the following from `out/target/product/sargo` and flashed them.
366 | flash `boot.img`, `dtbo.img`, `vbmeta.img`
367 | ```
368 | fastboot flash boot boot.img
369 | fastboot flash dtbo dtbo.img
370 | fastboot flash vbmeta vbmeta.img
371 | fastboot reboot bootloader
372 | ```
373 | then use the volume keys to choose "recovery" and boot to recovery
374 |
375 | wipe the data and system partitions
376 |
377 |
378 | ### how to debug selinux issues
379 |
380 | To test if selinux is at fault, you can apply the selinux-permissive.patch, build, and see if it is fixed
381 |
382 | check if selinux is permissive or enforcing:
383 | ```
384 | adb root
385 | adb shell
386 | getenforce
387 | ```
388 |
389 | in permissive mode, it will log the requests that would be denied if enforcing
390 | you can see all of the requests the sepolicy has denied by running
391 | ```
392 | adb shell dmesg | grep denied
393 | ```
394 |
395 | find the policy file, which end in `.te` in `device///sepolicy` or `sepolicy-lineage`
396 |
397 | you can used the old audit2allow.perl, which will turn the denieds into policies to add the the policy file
398 |
399 | get the perl script:
400 | `wget https://github.com/OpenDarwin-CVS/SEDarwin/raw/master/sedarwin7/src/sedarwin/policycoreutils/audit2allow/audit2allow.perl`
401 | give it execution permissions:
402 | `sudo chmod +x audit2allow.perl`
403 | and then run it like this:
404 | `adb shell dmesg | grep denied | perl ~/android/audit2allow.perl`
405 |
406 | this page has some information, but some of it is outdated right now https://source.android.com/security/selinux/implement
407 |
408 | ### Flashing the stock google rom
409 |
410 | the latest factory image for the 3a from here
411 | https://developers.google.com/android/images
412 |
413 | extract and run `flash-all.sh`
414 |
415 | ### Additional information I stumbled upon during this process:
416 | tried to setup debug using somgthing like this: https://groups.google.com/forum/#!topic/mozilla.dev.b2g/epQ6qhIFZ50
417 | unpacking the boot.img with with this https://github.com/xiaolu/mkbootimg_tools
418 | but that didn't work
419 | https://source.android.com/compatibility/vts/vts-on-gsi
420 |
--------------------------------------------------------------------------------
/build_sargo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | docker run \
4 | -e "BRANCH_NAME=lineage-18.1" \
5 | -e "DEVICE_LIST=sargo" \
6 | -e "INCLUDE_PROPRIETARY=false" \
7 | -e "CLEAN_AFTER_BUILD=false" \
8 | -e "SIGN_BUILDS=true" \
9 | -e "SIGNATURE_SPOOFING=yes" \
10 | -e "CUSTOM_PACKAGES=GmsCore GsfProxy FakeStore FDroid FDroidPrivilegedExtension AndroidAuto" \
11 | -v "$PWD/src:/srv/src" \
12 | -v "$PWD/zips:/srv/zips" \
13 | -v "$PWD/logs:/srv/logs" \
14 | -v "$PWD/ccache:/srv/ccache" \
15 | -v "$PWD/local_manifests:/srv/local_manifests" \
16 | -v "$PWD/userscripts:/srv/userscripts" \
17 | -v "$HOME/.android-certs:/srv/keys" \
18 | solidhal/docker-lineage-cicd
19 |
20 | # Keep the android signing keys in the home directory to avoid accidentally including in a git commit
21 |
22 | # we don't include proprietary, and instead specify the proprietary repos in local_manifests because lineageos 17.1 isn't supported in the default proprietary repos.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/clean_sargo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | rm -rf zips/sargo/*
4 | rm -rf logs/*
--------------------------------------------------------------------------------
/local_manifests/custom_packages.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/local_manifests/muppets-hal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/userscripts/before.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # # Apply patch to increase CONFIG_HZ to 1000 to improve performance and decrease power usage
4 | # # see https://source.android.com/devices/tech/debug/jank_jitter for source
5 | # cd kernel/google/msm-4.9
6 | # git fetch "https://github.com/LineageOS/android_kernel_google_msm-4.9" refs/changes/40/263940/1 && git cherry-pick FETCH_HEAD
7 | # cd ../../..
8 |
9 | #used to build in opengapps if desired
10 | # cd device/google/bonito
11 | # patch -p1 < /srv/userscripts/include-opengapps-pico.patch
12 | # git commit -a -m 'build in opengapps pico'
13 | # cd ../../..
14 |
--------------------------------------------------------------------------------
/userscripts/include-opengapps-pico.patch:
--------------------------------------------------------------------------------
1 | diff --git a/device.mk b/device.mk
2 | index 65eb7052..14659094 100644
3 | --- a/device.mk
4 | +++ b/device.mk
5 | @@ -14,6 +14,8 @@
6 | # limitations under the License.
7 | #
8 |
9 | +GAPPS_VARIANT := pico
10 | +GAPPS_EXCLUDED_PACKAGES := CarrierServices
11 | TARGET_CHIPSET := sdm710
12 |
13 | PRODUCT_SOONG_NAMESPACES += \
14 | @@ -870,3 +872,5 @@ PRODUCT_PRODUCT_PROPERTIES += \
15 | # Increment the SVN for any official public releases
16 | PRODUCT_PROPERTY_OVERRIDES += \
17 | ro.vendor.build.svn=20
18 | +
19 | +$(call inherit-product, vendor/opengapps/build/opengapps-packages.mk)
20 |
--------------------------------------------------------------------------------
/userscripts/unused_patches/disable-selinux.patch:
--------------------------------------------------------------------------------
1 | diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
2 | index 98d2b188..6bb70daf 100644
3 | --- a/BoardConfig-common.mk
4 | +++ b/BoardConfig-common.mk
5 | @@ -49,6 +49,7 @@ BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
6 | BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1
7 | BOARD_KERNEL_CMDLINE += loop.max_part=7
8 | BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/7c4000.sdhci
9 | +BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
10 |
11 | BOARD_KERNEL_BASE := 0x00000000
12 | BOARD_KERNEL_PAGESIZE := 4096
13 |
--------------------------------------------------------------------------------
/userscripts/unused_patches/dont-enforce-rro.patch:
--------------------------------------------------------------------------------
1 | diff --git a/device.mk b/device.mk
2 | index c1d7dd42..762e232e 100644
3 | --- a/device.mk
4 | +++ b/device.mk
5 | @@ -679,7 +679,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
6 | PRODUCT_PACKAGES += \
7 | vndk-sp
8 |
9 | -PRODUCT_ENFORCE_RRO_TARGETS := *
10 | +# PRODUCT_ENFORCE_RRO_TARGETS := *
11 |
12 | # Override heap growth limit due to high display density on device
13 | PRODUCT_PROPERTY_OVERRIDES += \
14 |
--------------------------------------------------------------------------------
/userscripts/unused_patches/test_patches/0001-Don-t-build-in-euicc-esim-supportx.patch:
--------------------------------------------------------------------------------
1 | From 6ebec46d749f5e00639e2afd0c2ab7d926ec2087 Mon Sep 17 00:00:00 2001
2 | From: SolidHal
3 | Date: Mon, 23 Mar 2020 16:32:21 -0700
4 | Subject: [PATCH] Don't build in euicc/esim supportx
5 |
6 | Change-Id: Ia3d36474fdf9834bafd66bf1841e2d4681ac48b2
7 | ---
8 | bonito/Android.bp | 24 -------------------
9 | bonito/bonito-vendor.mk | 2 --
10 | .../privapp-permissions-google-p.xml | 19 ---------------
11 | 3 files changed, 45 deletions(-)
12 |
13 | diff --git a/bonito/Android.bp b/bonito/Android.bp
14 | index 786221c..7de58f4 100644
15 | --- a/bonito/Android.bp
16 | +++ b/bonito/Android.bp
17 | @@ -231,30 +231,6 @@ android_app_import {
18 | product_specific: true,
19 | }
20 |
21 | -android_app_import {
22 | - name: "EuiccGoogle",
23 | - owner: "google",
24 | - apk: "proprietary/product/priv-app/EuiccGoogle/EuiccGoogle.apk",
25 | - presigned: true,
26 | - dex_preopt: {
27 | - enabled: false,
28 | - },
29 | - privileged: true,
30 | - product_specific: true,
31 | -}
32 | -
33 | -android_app_import {
34 | - name: "EuiccSupportPixel",
35 | - owner: "google",
36 | - apk: "proprietary/product/priv-app/EuiccSupportPixel/EuiccSupportPixel.apk",
37 | - presigned: true,
38 | - dex_preopt: {
39 | - enabled: false,
40 | - },
41 | - privileged: true,
42 | - product_specific: true,
43 | -}
44 | -
45 | android_app_import {
46 | name: "HotwordEnrollmentOKGoogleRT5514",
47 | owner: "google",
48 | diff --git a/bonito/bonito-vendor.mk b/bonito/bonito-vendor.mk
49 | index 4d5cd68..54bae0f 100644
50 | --- a/bonito/bonito-vendor.mk
51 | +++ b/bonito/bonito-vendor.mk
52 | @@ -139,8 +139,6 @@ PRODUCT_COPY_FILES += \
53 | vendor/google/bonito/proprietary/product/lib64/libsecureuisvc_jni.so:$(TARGET_COPY_OUT_PRODUCT)/lib64/libsecureuisvc_jni.so \
54 | vendor/google/bonito/proprietary/product/lib64/vendor.google.wifi_ext@1.0.so:$(TARGET_COPY_OUT_PRODUCT)/lib64/vendor.google.wifi_ext@1.0.so \
55 | vendor/google/bonito/proprietary/product/lib64/vendor.qti.hardware.qdutils_disp@1.0.so:$(TARGET_COPY_OUT_PRODUCT)/lib64/vendor.qti.hardware.qdutils_disp@1.0.so \
56 | - vendor/google/bonito/proprietary/product/priv-app/EuiccSupportPixel/esim-full-v0.img:$(TARGET_COPY_OUT_PRODUCT)/priv-app/EuiccSupportPixel/esim-full-v0.img \
57 | - vendor/google/bonito/proprietary/product/priv-app/EuiccSupportPixel/esim-v1.img:$(TARGET_COPY_OUT_PRODUCT)/priv-app/EuiccSupportPixel/esim-v1.img \
58 | vendor/google/bonito/proprietary/product/priv-app/MyVerizonServices/lib/arm64/libakuaf.so:$(TARGET_COPY_OUT_PRODUCT)/priv-app/MyVerizonServices/lib/arm64/libakuaf.so \
59 | vendor/google/bonito/proprietary/product/priv-app/MyVerizonServices/lib/arm64/libmotricity.so:$(TARGET_COPY_OUT_PRODUCT)/priv-app/MyVerizonServices/lib/arm64/libmotricity.so \
60 | vendor/google/bonito/proprietary/product/etc/cne/andsfCne.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/cne/andsfCne.xml \
61 | diff --git a/bonito/proprietary/product/etc/permissions/privapp-permissions-google-p.xml b/bonito/proprietary/product/etc/permissions/privapp-permissions-google-p.xml
62 | index 73c9506..d011cf3 100644
63 | --- a/bonito/proprietary/product/etc/permissions/privapp-permissions-google-p.xml
64 | +++ b/bonito/proprietary/product/etc/permissions/privapp-permissions-google-p.xml
65 | @@ -198,25 +198,6 @@ It allows additional grants on top of privapp-permissions-platform.xml
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 | 2.20.1
93 |
94 |
--------------------------------------------------------------------------------
/userscripts/unused_patches/test_patches/0001-Remove-esim-euicc-support-Crashes-carrier-services.patch:
--------------------------------------------------------------------------------
1 | From d4312a02666af34c0f7084b994d4adfe4c866aad Mon Sep 17 00:00:00 2001
2 | From: SolidHal
3 | Date: Fri, 20 Mar 2020 10:18:10 -0700
4 | Subject: [PATCH] Remove esim/euicc support. Crashes carrier services app if no
5 | gapps are used
6 |
7 | Change-Id: Iaee41ad6b35bc5096441530a7145ddf07a1a72c1
8 | ---
9 | bonito-proprietary-files.txt | 4 ----
10 | device-lineage.mk | 4 ----
11 | permissions/privapp-permissions-aosp-extended.xml | 11 -----------
12 | 3 files changed, 19 deletions(-)
13 |
14 | diff --git a/bonito-proprietary-files.txt b/bonito-proprietary-files.txt
15 | index f8a33989..c9fb6596 100644
16 | --- a/bonito-proprietary-files.txt
17 | +++ b/bonito-proprietary-files.txt
18 | @@ -101,10 +101,6 @@ product/lib64/vendor.google.wifi_ext@1.0.so
19 | -product/priv-app/CarrierSettings/CarrierSettings.apk
20 | -product/priv-app/CarrierSetup/CarrierSetup.apk
21 | -product/priv-app/DMService/DMService.apk
22 | --product/priv-app/EuiccGoogle/EuiccGoogle.apk;PRESIGNED
23 | --product/priv-app/EuiccSupportPixel/EuiccSupportPixel.apk;PRESIGNED
24 | -product/priv-app/EuiccSupportPixel/esim-full-v0.img
25 | -product/priv-app/EuiccSupportPixel/esim-v1.img
26 | -product/priv-app/grilservice/grilservice.apk
27 | -product/priv-app/OemDmTrigger/OemDmTrigger.apk
28 | -product/priv-app/RilConfigService/RilConfigService.apk
29 | diff --git a/device-lineage.mk b/device-lineage.mk
30 | index 00b115f5..344beac8 100644
31 | --- a/device-lineage.mk
32 | +++ b/device-lineage.mk
33 | @@ -14,10 +14,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
34 | DEVICE_PACKAGE_OVERLAYS += device/google/bonito/overlay-lineage
35 | PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += device/google/bonito/overlay-lineage/lineage-sdk
36 |
37 | -# EUICC
38 | -PRODUCT_COPY_FILES += \
39 | - frameworks/native/data/etc/android.hardware.telephony.euicc.xml:system/etc/permissions/android.hardware.telephony.euicc.xml
40 | -
41 | # LiveDisplay
42 | PRODUCT_PACKAGES += \
43 | vendor.lineage.livedisplay@2.0-service-sdm \
44 | diff --git a/permissions/privapp-permissions-aosp-extended.xml b/permissions/privapp-permissions-aosp-extended.xml
45 | index 606095e2..60fb36be 100644
46 | --- a/permissions/privapp-permissions-aosp-extended.xml
47 | +++ b/permissions/privapp-permissions-aosp-extended.xml
48 | @@ -1,16 +1,5 @@
49 |
50 |
51 | -
52 | -
53 | -
54 | -
55 | -
56 | -
57 | -
58 | -
59 | -
60 | -
61 | -
62 |
63 |
64 |
65 | --
66 | 2.20.1
67 |
68 |
--------------------------------------------------------------------------------
/userscripts/unused_patches/test_patches/0001-Revert-init-only-provide-control-message-results-for.patch:
--------------------------------------------------------------------------------
1 | From 4d6278bf0761befd1f96f900045e150c123075ff Mon Sep 17 00:00:00 2001
2 | From: SolidHal
3 | Date: Sun, 16 Feb 2020 21:12:42 -0800
4 | Subject: [PATCH 1/2] Revert "init: only provide control message results for
5 | devices launching > Q"
6 |
7 | This reverts commit 250a290dedabe55c72d790fca1ce311534b7bf18.
8 | ---
9 | init/property_service.cpp | 2 +-
10 | 1 file changed, 1 insertion(+), 1 deletion(-)
11 |
12 | diff --git a/init/property_service.cpp b/init/property_service.cpp
13 | index 65e9cda1c..7a229cc84 100644
14 | --- a/init/property_service.cpp
15 | +++ b/init/property_service.cpp
16 | @@ -409,7 +409,7 @@ static uint32_t SendControlMessage(const std::string& msg, const std::string& na
17 | // We must release the fd before sending it to init, otherwise there will be a race with init.
18 | // If init calls close() before Release(), then fdsan will see the wrong tag and abort().
19 | int fd = -1;
20 | - if (socket != nullptr && SelinuxGetVendorAndroidVersion() > __ANDROID_API_Q__) {
21 | + if (socket != nullptr) {
22 | fd = socket->Release();
23 | control_message->set_fd(fd);
24 | }
25 | --
26 | 2.20.1
27 |
28 |
--------------------------------------------------------------------------------
/userscripts/unused_patches/test_patches/0002-Revert-Reland-2-init-run-property-service-in-a-threa.patch:
--------------------------------------------------------------------------------
1 | From 2373647e22bfe899cf6c856e9179f03a45aa76a1 Mon Sep 17 00:00:00 2001
2 | From: SolidHal
3 | Date: Sun, 16 Feb 2020 21:13:26 -0800
4 | Subject: [PATCH 2/2] Revert "Reland^2: "init: run property service in a
5 | thread""
6 |
7 | This reverts commit aa39415260171b8a5645a5c255330eb98e1de020.
8 | ---
9 | init/Android.bp | 1 -
10 | init/builtins.cpp | 25 +---
11 | init/init.cpp | 67 +----------
12 | init/init.h | 7 +-
13 | init/property_service.cpp | 221 ++++++++++++------------------------
14 | init/property_service.h | 13 ++-
15 | init/property_service.proto | 44 -------
16 | init/proto_utils.h | 62 ----------
17 | init/reboot.cpp | 6 -
18 | init/subcontext.cpp | 64 ++++++++++-
19 | init/subcontext.proto | 6 +
20 | 11 files changed, 149 insertions(+), 367 deletions(-)
21 | delete mode 100644 init/property_service.proto
22 | delete mode 100644 init/proto_utils.h
23 |
24 | diff --git a/init/Android.bp b/init/Android.bp
25 | index 377a3740c..212ed57a9 100644
26 | --- a/init/Android.bp
27 | +++ b/init/Android.bp
28 | @@ -120,7 +120,6 @@ cc_library_static {
29 | "persistent_properties.cpp",
30 | "persistent_properties.proto",
31 | "property_service.cpp",
32 | - "property_service.proto",
33 | "property_type.cpp",
34 | "reboot.cpp",
35 | "reboot_utils.cpp",
36 | diff --git a/init/builtins.cpp b/init/builtins.cpp
37 | index 7db851ac6..855109601 100644
38 | --- a/init/builtins.cpp
39 | +++ b/init/builtins.cpp
40 | @@ -77,7 +77,6 @@
41 | using namespace std::literals::string_literals;
42 |
43 | using android::base::Basename;
44 | -using android::base::StartsWith;
45 | using android::base::unique_fd;
46 | using android::fs_mgr::Fstab;
47 | using android::fs_mgr::ReadFstabFromFile;
48 | @@ -712,15 +711,6 @@ static Result do_swapon_all(const BuiltinArguments& args) {
49 | }
50 |
51 | static Result do_setprop(const BuiltinArguments& args) {
52 | - if (StartsWith(args[1], "ctl.")) {
53 | - return Error()
54 | - << "Cannot set ctl. properties from init; call the Service functions directly";
55 | - }
56 | - if (args[1] == kRestoreconProperty) {
57 | - return Error() << "Cannot set '" << kRestoreconProperty
58 | - << "' from init; use the restorecon builtin directly";
59 | - }
60 | -
61 | property_set(args[1], args[2]);
62 | return Success();
63 | }
64 | @@ -1072,20 +1062,7 @@ static Result do_loglevel(const BuiltinArguments& args) {
65 | }
66 |
67 | static Result do_load_persist_props(const BuiltinArguments& args) {
68 | - // Devices with FDE have load_persist_props called twice; the first time when the temporary
69 | - // /data partition is mounted and then again once /data is truly mounted. We do not want to
70 | - // read persistent properties from the temporary /data partition or mark persistent properties
71 | - // as having been loaded during the first call, so we return in that case.
72 | - std::string crypto_state = android::base::GetProperty("ro.crypto.state", "");
73 | - std::string crypto_type = android::base::GetProperty("ro.crypto.type", "");
74 | - if (crypto_state == "encrypted" && crypto_type == "block") {
75 | - static size_t num_calls = 0;
76 | - if (++num_calls == 1) return Success();
77 | - }
78 | -
79 | - SendLoadPersistentPropertiesMessage();
80 | -
81 | - start_waiting_for_property("ro.persistent_properties.ready", "true");
82 | + load_persist_props();
83 | return Success();
84 | }
85 |
86 | diff --git a/init/init.cpp b/init/init.cpp
87 | index 7be795ee0..1386eeb04 100644
88 | --- a/init/init.cpp
89 | +++ b/init/init.cpp
90 | @@ -28,9 +28,6 @@
91 | #include
92 | #include
93 |
94 | -#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
95 | -#include
96 | -
97 | #include