-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
manager.sh: add ro.boot.vbmeta.size + ro.product.ab_ota_partitions to vbmeta check #7220
Conversation
osm0sis
commented
Aug 8, 2023
•
edited
Loading
edited
- ro.boot.vbmeta.device doesn't seem to be in use on all devices, so add some alternative props which may be instead
- ro.boot.vbmeta.device doesn't seem to be in use on all A/B devices
I think we may have forgotten something. https://android-review.googlesource.com/c/platform/external/avb/+/320888 |
Hmm yeah, the original non-working path check also had the non-A/B partition name:
But if there's no A-only equivalent to ro.product.ab_ota_partitions that will tell us vbmeta exists then I'm not sure what else we can do for unrooted checks. |
My A-only Poco X2 on stock MIUI 12 (Android 11) has a vbmeta partition. Here's what I got there:
|
Per my above grep output and https://android.googlesource.com/platform/external/avb/+/88b13e12a0ebe3c5195dbb5f48ba00ec896d1517, size having a value could be another good indicator on an A-only device. Still not sure what to do about devices like @Stillhard's though: #7216 (comment) |
I noticed some differences in Samsung devices as well:
|
ro.product.ab_ota_partitions must be an a/b device, we have detected a/b device, so it can be deleted. |
But do A/B devices always have a vbmeta partition? I don't believe they always did/do, so checking that prop for vbmeta could still be useful to more likely have the info be accurate. |
|
I didn't mean how it's used in Magisk, I mean in reality, so I still think it's worth leaving so the results of the check are more accurate, for whatever it later gets used for. |
I still don't understand if implementing AVB without a vbmeta image is possible and there are devices that do not have it. Also regarding the "Patch vbmeta in boot image" option in the install page: from my understanding, changing the flags in a non-vbmeta image shouldn't be possible (avb_slot_verify.c#801), is it? |
At least the first generation of A/B devices (e.g. Pixel XL, Essential PH-1, and apparently some ChromeOS devices before that) didn't have a vbmeta partition. Not sure what their prop situation looks like (maybe someone can post output from last stock?) As for the boot.img vbmeta flags, yeah, Magisk started doing that awhile back; it only has effect on non-vbmeta partition devices, hence the check: f4ed627 |
Dug out my PH-1 (mata) and flashed the last factory build. No No separate vbemta partition.
Patched with Magisk f86c66c-ip (26105).
PH1 dev/block/by-name Edit: |
Sort of? Check out my Poco X2 output above, avb 1.0 (with vbmeta prop as such), but has A-only vbmeta partition. |
@vvb2060 I wonder if we could just check if ro.boot.vbmeta.avb_version has a value at all, or if ro.boot.avb_version is > 1.0, they do seem to be the common props on all the vbmeta devices, including @Stillhard's. Just not sure if that's true everywhere. I think this PR is good to go for now though, until we can figure more of that stuff out. |
|