Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LineageOS 18.1 #96

Merged
merged 6 commits into from
May 26, 2021
Merged

LineageOS 18.1 #96

merged 6 commits into from
May 26, 2021

Conversation

hmenke
Copy link
Contributor

@hmenke hmenke commented Apr 7, 2021

@danielfullmer
Copy link
Collaborator

Thanks! Looks fairly straightforward.

There's one thing I was hoping we could do (in a future PR if you'd rather not deal with it now):
Have both lineageos-17.1 and lineageos-18.1 available, and have robotnix automatically choose the default androidVersion for a particular device based on the lineage-build-targets from the hudson repo. That way, we keep supporting any old devices until they're updated, and also allow the user the option to manually set androidVersion=11 if they want to try out the experimental branch for their device.

@lapp0
Copy link

lapp0 commented Apr 7, 2021

Thanks for your great work hmenke! I'm running 18.1 built with this code. 18.1 is still a bit buggy and missing some functionality like Xposed, which is only available for Android 10 right now. I agree that 17.1 should remain an install option.

@hmenke hmenke force-pushed the lineageos-18.1 branch 2 times, most recently from 50e8fd7 to 1f82b90 Compare April 8, 2021 06:46
@hmenke
Copy link
Contributor Author

hmenke commented Apr 8, 2021

@danielfullmer Done. In the previous LineageOS update you mentioned

Tested [...] by running checkAndroid on all 150 lineageos devices.

Do you have a script for that, so that I can do that too for 18.1?

Copy link
Collaborator

@danielfullmer danielfullmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updater scripts would need some changes to support both lineage-17.1 and lineage-18.1. A couple obvious things I can see: update-device-metadata.py should produce device-metadata.json with devices supporting either branch, instead of filtering for just one branch. The update-device-dirs.py script should take the branch as an argument, and device-dirs.json and vendor-dirs.json should be split into files supporting the 17.1 and 18.1 branches, with the nix expression choosing which one to use.

flavors/lineageos/default.nix Outdated Show resolved Hide resolved
flavors/lineageos/update.sh Outdated Show resolved Hide resolved
@danielfullmer
Copy link
Collaborator

@hmenke Here's what I had used in the past:

let
  pkgs = import ./pkgs {};
  lib = pkgs.lib;
  deviceMetadata = lib.importJSON ./flavors/lineageos/device-metadata.json;
in
  map (device: (import ./default.nix {
    inherit pkgs;
    configuration = {
      inherit device;
      flavor="lineageos";
    };
  }).config.build.checkAndroid ) 

(lib.attrNames (lib.filterAttrs (n: v: v.branch == "lineage-17.1") deviceMetadata))

Preferably we'd remove the filterAttrs part so we'd check all devices using their supported branch.

@Kranzes
Copy link
Member

Kranzes commented May 19, 2021

How is this PR going so far?, is anyone still working on it?

@danielfullmer
Copy link
Collaborator

danielfullmer commented May 22, 2021

I've just pushed up a new lineageos-18.1 branch with a few extra commits on top of @hmenke 's branch: https://github.com/danielfullmer/robotnix/commits/lineageos-18.1

The notable one is this: f859b08
The idea is that we only need one device-metadata.json file, not one for each branch. This metadata file contains the branch attribute for each device, which says which branch we should use by default for a build. The other big change in that commit is that the updater scripts are able to fetch both branches for each device. This should allow the user to set androidVersion=11 to try out lineage-18.1 if that branch is available, even if it hasn't yet been promoted to the default branch for that device.

I'm currently building config.build.checkAndroid output for each of the 166 devices. I'm also going to try to build and test both lineage-18.1 and lineage-17.1 for sunfish.

@Kranzes Thanks for the reminder. I had intended to look more closely at this, but got distracted with other things.
@hmenke Thank you very much for your work on this, and I'm open to any comments/questions about the follow up commits. We might also want to rebase/squash some commits before merging into master.

@danielfullmer
Copy link
Collaborator

Update: sunfish worked on lineage-18.1. Although there is a branch for lineage-17.1 on sunfish, it doesn't look like it was ever supported on 17.1, and so it doesn't build at all. So, unfortunately, I don't have any free devices that support both 17.1 and 18.1. (crosshatch does, but it's my daily driver).

@danielfullmer
Copy link
Collaborator

All 166 devices were able to build config.build.checkAndroid output successfully. So, at least we know we're not missing any obvious dependencies for these devices.

@hmenke hmenke force-pushed the lineageos-18.1 branch 2 times, most recently from ffe463a to 907eebd Compare May 23, 2021 15:55
@hmenke
Copy link
Contributor Author

hmenke commented May 23, 2021

I've fixed the evaluation error, followed your recommendation of unifying device-metadata.json and rebased onto master. It looks like on your lineageos-18.1 branch you have already fixed all the updater scripts. Please merge them into this PR and just push to my branch.

hmenke and others added 2 commits May 23, 2021 17:59
Co-authored-by: Daniel Fullmer <danielrf12@gmail.com>
Co-authored-by: Adrian Parvin D. Ouano <adrianparvino@gmail.com>
This is just a change of default.  By default, it will now fetch the
manifest file each time, with --resume being the option to go back to
the old behavior. Nix output hashes can still be cached and recovered
from the oldrepojson options.
We use the information about the default branch for each device from
LineageOS/hudson.

The updaters also now try to fetch both branches for each devices, to
allow the user to try an unsupported (newer or older) branch for their
device.
@danielfullmer
Copy link
Collaborator

@hmenke Rebased and pushed changes to your branch.

Unless there are any issues I've missed. I think this should be good to merge. If anyone has another device to that they'd like to test LineageOS 18.1 with, it would be nice to confirm that it works for others.

@danielfullmer danielfullmer merged commit e1605e8 into nix-community:master May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants