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

Upgrading to 21 from 20 on alioth is not working (other targets with erofs might be affected the same way) #625

Open paulfertser opened 2 months ago

paulfertser commented 2 months ago

Not sure if it's upstream LOS issue so filing here as @LuccoJ suggested on IRC.

Sideloading 21.0 zip to a 20.0 recovery fails at the second step:

[  155.722367] update_engine_sideload W 12-24 23:33:09   597   597] [WARNING:utils.cc(578)] Unable to mount destination device /dev/block/dm-14 on /postinstall as erofs: No such device (19)
[  155.722388] update_engine_sideload E 12-24 23:33:09   597   597] [ERROR:utils.cc(582)] Unable to mount /dev/block/dm-14 with any supported type
...
[  155.933240] update_engine_sideload E 12-24 23:33:09   597   597] [ERROR:postinstall_runner_action.cc(531)] Postinstall action failed.
[  155.933377] update_engine_sideload I 12-24 23:33:09   597   597] [INFO:action_processor.cc(116)] ActionProcessor: finished last action PostinstallRunnerAction with code ErrorCode::kPostInstallMountError

Apparently the reason is 20.0 recovery lacking erofs and I was able to upgrade by manually flashing boot and vendor_boot from 21 with fastboot; that allowed sideload to finish the process to completion, upgrade preserved all the apps and data.

petefoth commented 1 month ago

From what I can see, I don't think this is a bug in this project, and I believe that any problem lies upstream, with the LineageOS recovery. Our recovery is identical to the upstream recovery, so I am fairly confident that the problem is there. To check, you could install 'normal' LOS 20 ROM and recovery (following the LOS installation instructions), then try to upgrade to LOS 21 following the LOS Update instructions. If that works, but a similar process with our ROM and recovery do not work, then I might accept that the problem is ours. If that were the case, I would just suggest that you use the workaround that you have already discovered, and install the 21 recovery before trying to sideload.

[rant] It is unfortunate that official LOS's attitude to LOS4MicroG in their 'support' channels is / has been hostile, and their default response to any mention of LOS4microG has historically been 'We don't support LOS4MicroG. If you are using it, raise a bug there!`, even when the problem is clearly in their code.

For a bug that needs to be fixed upstream, by LineageOS (like this one in my opinion), the only way to get a response is to reproduce it using official LineageOS, then raise a bug in their issue tracker. And then hope that they will do something to fix it, rather than mocking you for being a 'noob', or making 'clever' responses to show that they are clever and smart, and you are not [/rant]

Sorry I can't be more help, but this project does not have resources to investigate and/or fix problems that are owned by upstream. I'll close this issue sometime soon, but please feel free to ask for ot to be re-opened if you can show that it is not an upstream problem

paulfertser commented 1 month ago

Thank you for the rather elaborate answer.

I think this issue can be left open for a while to raise awareness among other users who are going to have trouble updating. At least I found and documented a good enough workaround here.

Regarding testing and reporting upstream, I'm afraid I'm not in a position to do that, as I have just one "alioth" device and I'd prefer to not mess with it any more than necessary because I "have to" daily-drive it.

My hope was that it's reasonably straightforward to tell exactly which part of the code in the lineage-21 branch requires erofs support from recovery and which part of the code in the lineage-20 branch prevents it from being included in boot modules. If it was identified then reporting to LOS upstream would be feasible even without testing as the nature of the problem seems to allow being confident enough just "theoretising". It surprises me that it's non-trivial for someone familiar with the code but, heh, I bet it's not the last discouraging surprise Android is giving me.

Thank you nevertheless, what you're doing undoubtly makes my life better.

paulfertser commented 1 month ago

If that were the case, I would just suggest that you use the workaround that you have already discovered, and install the 21 recovery before trying to sideload.

At least on my device that wasn't enough IIRC, I used /both/ boot and vendor_boot. The recovery can be showing it's from 21 but apparently the kernel and the modules are from boot? What I didn't try is just updating the boot alone, probably it would have allowed the old recovery to work too?