Conversation
rooted-ota.sh
Outdated
| *) | ||
| printRed "LINEAGE_TYPE $LINEAGE_TYPE is not recognized!" | ||
| exit 1 | ||
| ;; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
rooted-ota.sh
Outdated
| microG) | ||
| printRed "LINEAGE_TYPE $LINEAGE_TYPE not yet supported! Maybe in the future! At least they have a download site at https://download.lineage.microg.org/" | ||
| exit 1 | ||
| ;; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| curl --fail -sLo ".tmp/$OTA_TARGET.zip" "$OTA_URL" | ||
| fi | ||
|
|
||
| if [ -n "$OTA_TARGET_SHA256" ]; then |
There was a problem hiding this comment.
Added sugar. Should I drop this?
07497fc to
5e12cb2
Compare
As done in #103 but simpler.
As done in #103 but simpler.
3eb0403 to
4b5858b
Compare
GRAPHENE_TYPE was renamed to OTA_TYPE and a new OTA_VENDOR was introduced. The defaults of OTA_TYPE and OTA_BASE_URL are based on this new OTA_VENDOR. The only supported OTA_TYPE for OTA_VENDOR=lineage is "nightly". The "microG" flavor is just food for thoughts. Example calls: OTA_VENDOR=lineage MAGISK_PREINIT_DEVICE=sda10 DEVICE_ID=shiba bash -c '. rooted-ota.sh && createRootedOta' OTA_VENDOR=lineage DEVICE_ID=shiba bash -c '. rooted-ota.sh && createRootedOta' OTA_VENDOR=lineage MAGISK_PREINIT_DEVICE=metadata DEVICE_ID=Spacewar bash -c '. rooted-ota.sh && createRootedOta' OTA_VENDOR=lineage DEVICE_ID=Spacewar bash -c '. rooted-ota.sh && createRootedOta' FYI: LineageOS Spacewar uses "erofs" for "vendor" which is not yet supported by asfr. It will fail because of that!
4b5858b to
24a8b3a
Compare
|
Hi @schnatterer , How should I continue?
I'm not working on this PR until your further notice! 🙂 |
| OTA_TYPE=${OTA_TYPE:-'nightly'} # Other option: microG (not really supported yet) | ||
| OTA_BASE_URL=${OTA_BASE_URL:-"https://download.lineageos.org/api/v2"} | ||
| if [ -n "$OTA_CHANNEL" ]; then | ||
| echo "Unsetting unused OTA_CHANNEL $OTA_CHANNEL for LineageOS" |
There was a problem hiding this comment.
Those nice print, printRed and printGreen functions are not available yet. And I didn't want to move them before this just now.
Maybe they could be moved into a separate file within the upcoming modularization work! 🙂
| # With the usage of "--clear-vbmeta-flags", the "--rootless" flag cannot be skipped: | ||
| # error: the following required arguments were not provided: | ||
| # <--magisk <FILE>|--prepatched <FILE>|--rootless> | ||
| args+=("--patch-arg=--rootless") |
There was a problem hiding this comment.
As a nice to have change would be an unconditional:
| args+=("--patch-arg=--rootless") | |
| args+=("--patch-arg=--${flavor}") |
Co-authored-by: Szabolcs Hubai <[email protected]>
|
Hey @xabolcs, Thanks for your patience! Here are my thoughts - open for discussion. Lets try to implement a modularized version getting rid of the At the beginning of
The last one might be challenging. While we can pass the This way we should be able to keep the code base much cleaner. I also like your idea of a Yes, at the end we should have a green build for both graphene and lineage. And at some point a real world test that proves that all of this works would be good 😅 I think the problem with the build is that secrets (like the signature key) are not loaded into untrusted PRs. I already though about that. We could just create temporary keys during build (which will waste my precious GH action minutes) or I'll try to provide dev keys as non-secrets. Writing the docs at the very end is fine with me! |
|
Hi @schnatterer, I'm mostly OK with your food for thoughts!
How would you like it to do? Modularizing first and adding LineageOS support as a first example, or in the reverse: use the current state of this PR and modularize now as a second commit?
I like using # some other code
# ...
# "parsing" some environment file: stuff=value
set -o allexport
source "$file"
ENVSUBST_VARIABLES=`cut -d= -f1 ${file} | sed -e 's/^/$/'|xargs`
set +o allexport
# and later then
envsubst "${ENVSUBST_VARIABLES}" < $file_for_environment_substitution
# do something else
# ...What do you think?
I already found a few spots where your precious GH action minutes could be saved. Are you interested in such contribution? |
Hi @schnatterer, |
I don't care about the order too much.
I'd rather source the module files as is.
Yeah, if you have any ideas regarding more efficient builds I'd be happy to hear them. Different PR? I haven't done a lot of optimization, yet, other than make them run concurrently for multiple devices.
You mean as an alternative to OTA_VERSION? I'd like to keep downward compatibility. Other than that feel free to add it here, or if it makes sense to a different smaller PR. |
I'd like to use an already downloaded zip! |
Hi!
I'm bad at naming things, sorry for that!
As you can see there are a few
fix:commits on my branch. They have the worst commit title and description in the world (so don't pick them as-is), but at least you get a hint from them! 😅About porting to LineageOS: well it was straightforward! 🙏
I put all the new things into
findLatestVersion().But sadly all this porting stuff should be put on hold because of
erofs: chenxiaolong/afsr#14