20210212_Her_name_is_Oreo.md (4471B)
1 Topics: android 2 Title: Her name is Oreo 3 Date: Fri Feb 12 13:47:14 2021 4 5 I am at a point somewhere along the way of a long yak-shaving journey 6 ("I wonder if the MSM8953 SoC supports ANT+ in hardare and it just 7 needs enabling in the Android software?") which involves rebuilding 8 Android for my phone. There seem to be very few ROMs for the Moto G5 9 Plus ("potter") that are still being maintained, and even fewer of 10 them that have build instructions that (a) 11 [work as described](https://github.com/crdroidandroid/android/issues/57#issuecomment-773367834ArrowOS); 12 (b) comprise 13 [fewer than 30 manual steps](https://blog.arrowos.net/compilation-guide/). Do Android ROM 14 developers not do CI builds? If this was all GPL I could make a strong 15 case it's in breach. ("The source code for a work means the preferred 16 form of the work for making modifications to it [...] all the source 17 code for all modules it contains, plus any associated interface 18 definition files, plus the scripts used to control compilation and 19 installation of the executable."). Yes, I know, volunteers, spare 20 time, teeth of gift horses, etc etc. End rant 21 22 Anyway, so far I am doing the following and it has not yet blown up 23 24 1) using the [docker image](https://github.com/lineageos4microg/docker-lineage-cicd) from [LineageOS for Microg](https://lineage.microg.org/) 25 26 2) invoking it as follows 27 28 ``` 29 docker run \ 30 -e "BRANCH_NAME=lineage-15.1" \ 31 -e "DEVICE_LIST=potter" \ 32 -e "SIGN_BUILDS=false" \ 33 -e "SIGNATURE_SPOOFING=restricted" \ 34 -e "INCLUDE_PROPRIETARY=false" \ 35 -e "WITH_SU=true" \ 36 -e "CUSTOM_PACKAGES=GmsCore GsfProxy FakeStore MozillaNlpBackend NominatimNlpBackend com.google.android.maps.jar FDroid FDroidPrivilegedExtension " \ 37 -v "/$HOME/src/android/l4mg/lineage:/srv/src" \ 38 -v "/$HOME/src/android/l4mg/zips:/srv/zips" \ 39 -v "/$HOME/src/android/l4mg/logs:/srv/logs" \ 40 -v "/$HOME/src/android/l4mg/cache:/srv/ccache" \ 41 -v "/$HOME/src/android/l4mg/keys:/srv/keys" \ 42 -v "/$HOME/src/android/l4mg/manifests:/srv/local_manifests" \ 43 lineageos4microg/docker-lineage-cicd 44 ``` 45 46 3) with this manifest in `$HOME/src/android/l4mg/manifests/roomservice.xml` 47 48 ``` 49 <?xml version="1.0" encoding="UTF-8"?> 50 <manifest> 51 <project name="LineageOS/android_external_bson" path="external/bson" remote="github" revision="cm-14.1" /> 52 <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="lineage-15.1" /> 53 <project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="staging/lineage-15.1" /> 54 <project name="boulzordev/android_device_motorola_potter" path="device/motorola/potter" remote="github" revision="lineage-15.1-64" /> 55 <project name="boulzordev/android_vendor_motorola_potter" path="vendor/motorola/potter" remote="github" revision="lineage-15.1-64" /> 56 <project name="boulzordev/android_kernel_motorola_msm8953" path="kernel/motorola/msm8953" remote="github" revision="lineage-15.1-64" /> 57 </manifest> 58 ``` 59 60 Worthy of note: 61 62 - I found the manifest on [the Interwebz](https://pastebin.com/7xV9G1A4) by use of a search engine. I had to edit the revision attribute of `android_device_qcom_common` from `staging/lineage-15.1` to `lineage-15.1` 63 64 - because I have a (presumed working) example manifest for 15.1 I am 65 not attempting to build any newer version. One change at a time, 66 hey 67 68 - in my limited understanding, the manifest tells the build system 69 where to find Moto proprietary files, and the 70 `INCLUDE_PROPRIETARY=false` build argument tells the L4microg build 71 scripting not to try and download them from "TheMuppets". This is 72 important because the muppets don't have them for my device. 73 74 - getting F-droid and Microg baked in is probably no bad thing 75 76 As I write this, it has been building for ~ 30 minutes and not fallen 77 over yet, so things are looking vaguely promising 78 79 ``` 80 [ 8% 8343/95970] target thumb C++: libv8src_32 <= external/v8/src/builtins/builtins-constructor.cc 81 ``` 82 83 Apparently it's done 8% of something 84 85 ## Update: Fri Feb 12 19:57:48 GMT 2021 86 87 It works! It built a buch of stuff in `zips/potter/` including the file 88 `lineage-15.1-20210212-UNOFFICIAL-potter.zip` which I installed from Recovery 89 using the instructions at [https://wiki.lineageos.org/devices/peregrine/install](https://wiki.lineageos.org/devices/peregrine/install) 90 Yes, that's not the same phone, but it's close enough to use the same procedure 91