lineageos4microg / docker-lineage-cicd

Docker microservice for LineageOS Continuous Integration and Continous Deployment
https://hub.docker.com/r/lineageos4microg/docker-lineage-cicd
GNU General Public License v3.0
480 stars 189 forks source link

21.0 system partitions on alioth have too little free space #626

Closed paulfertser closed 1 month ago

paulfertser commented 2 months ago

I was always copying an OpenCamera apk to /system/priv-app and permissions xml to /system_ext to allow other apps use OpenCamera for taking photos. Witih the current lineage-21-based microg builds that is no longer possible.

Filesystem      Size Used Avail Use% Mounted on
/dev/block/dm-8 375M 374M  1.1M 100% /system_ext
/dev/block/dm-5 848M 846M  2.5M 100% /system/bin/ziptool

Please consider making the partitions larger in your builds or probably clarify the best practicies of dealing with issues like that. Thank you!

petefoth commented 2 months ago

This is controlled by the upstream device-specific code. We don't make device-specific changes in our builds (because we don't have the resources or knowledge, and because it is out of scope for this project). To get it changed you would need to ask the maintainer of the upstream code, or the LineageOS project.

Sorry we can't help

paulfertser commented 1 month ago

Hello @petefoth,

As suggested by @LuccoJ I tried https://github.com/HuskyDG/magic_overlayfs/ to workaround the issue.

This seems to work however release v3.2.2 isn't compatible with Magisk 27.0. I used the build artifact from the latest commit (no idea why people at https://github.com/HuskyDG/magic_overlayfs/issues/64 say about forking and running github actions manually, the build artifacts on the main upstream repository are available to all GitHub users for downloading right away).

Is this the recommended approach or should I really be trying to convince LOS maintainers to do something about that? But I would need to install and test their vanilla builds first before talking there, right?

Thank you.

FintasticMan commented 1 month ago

I think that the vanilla LOS builds won't have this problem, as they build without the WITH_GMS flag enabled. That flag changes the partition sizes so that when Google apps are preinstalled in the image, there is no wasted space.

We use the flag (although I personally think we shouldn't, but that's irrelevant here), so you'll need to try to convince the LOS maintainers to increase the size with WITH_GMS.

petefoth commented 1 month ago

That flag changes the partition sizes so that when Google apps are preinstalled in the image, there is no wasted space.

But that change can be over-ridden by setting values of various BOARD_<image>_PARTITION_RESERVED_SIZE in environment variable before building: for most devices, the values are only changed in config/BoardConfigReservedSize.mk if they are not already set.

you'll need to try to convince the LOS maintainers to increase the size with WITH_GMS.

Good luck with that :) The device-specific code of alioth uses the default values mentioned above, so you would need to persuade the LineageOS team to make a chnage that applies to most of their (200 plus) devices. Probably easier to build yourself

paulfertser commented 1 month ago

So probablyy if it's lineageos4microg that's special and upstream LOS doesn't really care (and have no reason to) about WITH_GMS configuration it makes sense to change that variable (for 200+ devices, but everybody wants at least some 100 MB of free space there, right?) here in the docker environment?

petefoth commented 1 month ago

it makes sense to change that variable (for 200+ devices, but everybody wants at least some 100 MB of free space there, right?) here in the docker environment?

If the project wanted to make that change, then that would be the best way of doing it. But that is not something the project wants or needs to do. This is not a problem for most users of LineageOS builds, only those who want to 'modify' the build by installing addons or apps in the system partition. If that is your use-case, then your best bet s to make your own build that meets your needs better than our builds.

As @FintasticMan mentioned, we've been over this issue in great detail and at great length, a decision has been made by the project about how we do our builds, and that decision is unlikely to change.

And making your own builds can be a very educational experience ;) If you don't have a machine powerful enough to build, then cloud VMs are pretty cheap to use for making builds.

paulfertser commented 1 month ago

OK, I see. Thank you for the clarifications.

The projects I'm interested in all have non-hostile and sane upstreams, e.g. OpenWrt has healthy relationship with Linux and musl. I'm educating myself by porting (and helping others to port) OpenWrt to new boards, fixing kernel bugs etc, I have enough system programming on my plate already.

With Google's AOSP being clearly anti-user these days I do not feel myself at home and can't imagine myself investing into learning more about this "mess". I'm very grateful for all the efforts Free Software developers like you are putting into making it at least somehow usable.

During Openmoko I was contributing to all layers of the platform: hardware, bootloader, kernel, middleware, UI. Those were the fun days and community around was highly skilled and motivated. I enjoyed both the process and everyday usage of my Freerunner. But these days are long gone.

Please do not get me wrong, I really appreciate your work. Guess just my expectations (or rather desires) do not align with today's reality. If using weird magisk modules is the answer, ok. If using the LOS Camera is required, ok. If anything stops working or breaks, ok, so be it. I just should keep in mind Android is not something to enjoy for me.

petefoth commented 1 month ago

I wasn't intending to be hostile or negative: if I came across that way, I apologise.

If using the LOS Camera is required, ok.

In my experience, the LOS camera app Aperture is generally at least as good as (if not better than) OpenCamera, but my interest in photography is minimal.

If using weird magisk modules is the answer, ok

If you really want OpenCamera as a system app, then I guess that might be a way to go. I don't use Magisk - I've never needed or wanted it - so I can't really comment.

There are lots of ways that LineageOS for microG could be 'tweaked' to make it more flexible and more adapted to the needs of people who want to 'mod' their phone software. But the project's resources are very limited - I am currently the only active maintainer / contributor - and so we (I) limit the scope of the project to 'building Lineage OS with MicroG and F-Droid included and enabled`.

Android is not something to enjoy for me.

Nor me generally 😄 I mostly enjoy the challenge of keeping this project ticking over and producing builds for ~200, devices each month, but I don't have the time, interest, or motivation to spend much (any) time on things outside the current project scope.

paulfertser commented 1 month ago

I wasn't intending to be hostile or negative: if I came across that way, I apologise.

Hey, it's me being negative and Google is being hostile and LOS just being LOS, no need to apologise :)

If using the LOS Camera is required, ok.

In my experience, the LOS camera app Aperture is generally at least as good as (if not better than) OpenCamera, but my interest in photography is minimal.

I like that OpenCamera: 1. Highlights under/over exposed areas with zebra stripes so I see I need to either ask it to tune to the specific area or to change the expo manually; 2. Has a slider to zoom in/out with one finger rather than a two finger gesture which is somehow harder to control for me; 3. Has a slider for manual focus; 4. Has a quick and handy way to manually control any of the numerous shooting settings (e.g. to force flash light always on/on for shooting/always off/auto; ISO sensitivity etc); 5. Has manual camera selection (so if e.g. I do not need wide I just use the main camera that has better resolution).

It's not about photography for me but rather trying to not miss capturing the important details that I need captured in less than ideal conditions.

If using weird magisk modules is the answer, ok

If you really want OpenCamera as a system app, then I guess that might be a way to go. I don't use Magisk - I've never needed or wanted it - so I can't really comment.

How do you get root permissions then?

There are lots of ways that LineageOS for microG could be 'tweaked' to make it more flexible and more adapted to the needs of people who want to 'mod' their phone software. But the project's resources are very limited - I am currently the only active maintainer / contributor - and so we (I) limit the scope of the project to 'building Lineage OS with MicroG and F-Droid included and enabled`.

That's perfectly understandable and, as I mentioned, much appreciated, thank you for keeping this going, I see many strange obstacles appear all the time (thanks google), and each of them needs considerable work to fix.

petefoth commented 1 month ago

If you really want OpenCamera as a system app, then I guess that might be a way to go. I don't use Magisk - I've never needed or wanted it - so I can't really comment.

How do you get root permissions then?

I don't. I've never needed or wanted to root my phones - they mostly work fine without. Both LineageOS and LOS4microG ship userdebug builds, which allow rooted debugging (i.e. adb root): that gives me enough root access, which I only use for running the Android Backup and Restore Tools project, which is the only working backup / restore solution I have found.

It may be that you can do what you want (i.e. install OpenCamera in /system/priv-app) with adb root and adb shell. If the LOS camera app Aperture is installed there, you could remove it and its permissions, and add OpenCamera and its permissions in its place. (Note I am assuming that Aperture can be used by other apps and is therefore installed in /system/priv-app, with its permissions in /system_ext. But I'm getting out of my depth here 😄 )