-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add WITH_GMS_ALT
setting as an alternative to WITH_GMS
#493
Conversation
@Lanchon This looks interesting. I'll look at it more closely, but we would need some additions to README.md
|
sure, let me know after taking a look if you are still interested and i'll write the docs. thank you! |
Having looked at your changes, and reviewed the previous discussions in the issues you reference, I'm sorry but I'm still not inclined to merge this change for a number of reasons
So, thanks for the time you have spent on this, but I reached the conclusion after earlier discussions that we do not need to make a change. Nothing in this PR persuades me to change that conclusion, and I feel I have already spent too much time on this issue which - from what I can make out - affects very few developers so I'm going to close the PR. I'm happy to leave this branch here, so that if any developers do feel the need for the fix, they can build a docker image using your changes. In that case, it may be interesting for them to know what testing you have performed. Thanks again. |
answering your concerns:
as you can see, the file that i am replacing starts with yes, replacing the file when WITH_GMS_ALT is used has consequences: the consequences are replacing the way microG is included in the build, which is exactly what i need and want when WITH_GMS_ALT is true. the file in question has always been effectively empty when WITH_GMS is not true and will always be, because it has to be a no-operation in those cases. and the right way to handle that file, since i am replacing the way microG is included, is to replace the file. but if you don't like that for any reason, any of these can be used instead (which i don't favor):
although these changes would answer your concern, note that i do not favor any of these. hacking the handling of WITH_GMS is not the right way of doing things: replacing WITH_GMS with an alternative way is. i cannot know what the file in question will be in the future, and thus i cannot produce a hack guaranteed to work in the future, but i can replace the whole file safely.
there is nothing to fix upstream and nothing will be fixed. WITH_GMS is not used in LineageOS: it is an unsupported feature and one they have repeatedly warned against using. the bug that needs fixing is in this project: this project uses WITH_GMS, which is not supported by LineageOS. i tried to fix this bug before (#460), but it was established that this project does not want to fix this bug. so the next best thing: introduce an alternative way to use this project without WITH_GMS. because WITH_GMS produces unusable builds for may devices, and more worryingly, most newer devices.
this is not a technical concern and as such cannot be answered intelligently. but there are many, many users: just search online, on reddit, on xda. users find out the L4M builds are broken when they try to root their new installs, and just move on to other ROMs that support sig-spoof, and that's the end of it. regarding your "most of whom seem to have moved on": you are exactly right.
no, you had reached the conclusion that you didn't have the time/energy to test changes on all devices. this PR does address those concerns: it does not change current builds in any way. it just gives users the tools to do working builds for themselves without having to fork this repo.
so do i. your older concerns no longer apply (no time/resources). your newer concerns were addressed here. i would like to know if your decision not to merge is based on further technical reasons that can be argued, or on emotional reasons that cannot. also, i cannot see a reason to oppose a feature that does fix existing real problems, on the basis that it could trigger unspecified unknown and so far imagined issues, given that the proposed feature is unsupported and optional. the only reasonable opposition would be: i oppose it because i want to wait for a supported solution. but you clearly stated you don't want such a solution. my take on this: just merge it and keep it undocumented! please in short: i need these builds. do you want to review your merge decision o have me fork your project? thanks. |
hi @petefoth,
the issue of many L4M builds not having free space in the system partition for add-ons was widely discussed. the cause of the problem is known and fixes were proposed.
but the position of this project is that maintainers do not have the resources/motivation to test a change that affects all builds.
fine, i get that, and there is no possible counter-argument to that.
however...
as evidenced in previous, somewhat heated talks, many users are still in need of a solution.
here i am proposing one: do not change the way official builds are made, nor the default behavior of this docker, but still let users build their own images with free space for add-ons if they so choose. and let them do this without the hassle of having to fork and build their own docker.
if any such unsupported builds were to fail (they should not, but if) it is entirely their problem, and their time and effort to fix them. i think this is a reasonable solution that still respects the wishes of the project maintainers regarding their resources.
which devices are affected by this issue?
android 10+ devices that use dynamic partitions. because dynamic partitions seriously simplify the lives of OEMs and have no drawbacks, i think it is safe to say that virtually all newer devices will be affected.
how is this patch used?
you use
WITH_GMS_ALT=true
instead ofWITH_GMS=true
:WITH_GMS_ALT=true
on devices using dynamic partitions causes some free space to be reserved in system. the exact reserved amount is device-specific, but in most if not all affected devices, it is 600MB. (this number will grow in future android versions when gapps growth requires it.)WITH_GMS_ALT=true
on devices not using dynamic partitions behaves exactly likeWITH_GMS=true
.example of use
on OnePlus 8 Pro, building with
WITH_GMS=true
produces:while building with
WITH_GMS_ALT=true
produces:showing the expected 600MB increment in free space.
one final note
this patch reports an error if both
WITH_GMS_ALT=true
andWITH_GMS=true
are set because i have no better way to handle the condition:to this effect, the script needs to check for
WITH_GMS
being true. naive checking causes an error if accessing an undefined variable, so the tidiest solution was to add these lines.note that:
this change cannot affect official builds, because all official builds are done with
WITH_GMS=true
.this change cannot affect unofficial builds in which
WITH_GMS
is undefined, becauseWITH_GMS
is tested exclusively viaifeq ($(WITH_GMS),true)
andifneq ($(WITH_GMS),true)
statements in LineageOS (which means thatfalse
behaves the same way as undefined).however, if these lines are still considered an undue risk, the lines and the detection of concurrent use of
WITH_GMS_ALT=true
andWITH_GMS=true
can simply be eliminated.references
#358
#314
#486
#460
thank you for your help!