Skip to content
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

ro.boot.vbmeta.device could not be found on many devices #7219

Closed
xiaoxindada opened this issue Aug 8, 2023 · 14 comments · Fixed by #7220
Closed

ro.boot.vbmeta.device could not be found on many devices #7219

xiaoxindada opened this issue Aug 8, 2023 · 14 comments · Fixed by #7220
Assignees
Labels
app This issue is related to Magisk App confirmed Issue confirmed to exist and the reason is known

Comments

@xiaoxindada
Copy link

Device: OnePlus 11
Android version: 13
Magisk version name: 4000369
Magisk version code: 26105

ro.vbmeta.device prop doesn't seem to be found on OnePlus 11 devices but there is ro.boot.vbmeta.device_state and it is indeed a device using vbmeta /dev/block/bootdevice-by-name/vbmeta_a is exists

getprop_log.txt

@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

Same on OnePlus 9 Pro: #7216 (comment)

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 8, 2023

Only A/B devices have this property, which is better than completely unusable path test.

@vvb2060 vvb2060 closed this as completed Aug 8, 2023
@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

OnePlus 9 and 11 are A/B devices...

@osm0sis osm0sis reopened this Aug 8, 2023
@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

Whoops, didn't necessarily mean to reopen.

How about checking ro.product.ab_ota_partitions for vbmeta? Still prop-based.

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 8, 2023

Well, it looks like it only works on some devices, at least the AOSP devices. This is more than enough to replace a path test that doesn't work at all.
Magisk app only cares when it detects vbmeta partition, so I think it's better now than before. When app has root, it uses path test.

@vvb2060 vvb2060 closed this as completed Aug 8, 2023
@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 8, 2023

How about checking ro.product.ab_ota_partitions for vbmeta? Still prop-based.

I think it's good, I chose the simpler prop, ignoring device compatibility.

@vvb2060 vvb2060 reopened this Aug 8, 2023
@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 8, 2023

ro.product.ab_ota_partitions u:object_r:ota_prop:s0 exact string

app does not have permission to access ota_prop

@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

I just did some experiments and something like this could work:

getprop ro.product.ab_ota_partitions | grep -w vbmeta

since grep properly parses , as a word separator (and not _).

@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

ro.product.ab_ota_partitions u:object_r:ota_prop:s0 exact string

app does not have permission to access ota_prop

Really? Damn, accessing it worked fine from unrooted prompt in Terminal Emulator app on my device.

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 8, 2023

type ota_prop { property_type core_property_type system_property_type system_public_property_type }

Sorry, I only searched for allow rules and forgot to look at attribute, it is system_public_property_type

@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

type ota_prop { property_type core_property_type system_property_type system_public_property_type }

Sorry, I only searched for allow rules and forgot to look at attribute, it is system_public_property_type

Hey, that's great!

So perhaps || getprop ro.product.ab_ota_partitions | grep -qw vbmeta on what you have could be the best for coverage.

@xiaoxindada
Copy link
Author

I just did some experiments and something like this could work:

getprop ro.product.ab_ota_partitions | grep -w vbmeta

since grep properly parses , as a word separator (and not _).

I think that's a good idea but you need to add the -o option here

getprop ro.product.ab_ota_partitions | grep -w vbmeta
abl,aop,aop_config,bluetooth,boot,cpucp,devcfg,dsp,dtbo,engineering_cdt,featenabler,hyp,imagefv,init_boot,keymaster,modem,my_bigball,my_carrier,my_company,my_engineering,my_heytap,my_manifest,my_preload,my_product,my_region,my_stock,odm,oplus_sec,oplusstanvbk,product,qupfw,recovery,shrm,splash,system,system_dlkm,system_ext,tz,uefi,uefisecapp,vbmeta,vbmeta_system,vbmeta_vendor,vendor,vendor_boot,vendor_dlkm,xbl,xbl_config,xbl_ramdump
OP591BL1:/ # getprop ro.product.ab_ota_partitions | grep -ow vbmeta
getprop ro.product.ab_ota_partitions | grep -ow vbmeta
vbmeta

@osm0sis
Copy link
Collaborator

osm0sis commented Aug 8, 2023

I just did some experiments and something like this could work:
getprop ro.product.ab_ota_partitions | grep -w vbmeta
since grep properly parses , as a word separator (and not _).

I think that's a good idea but you need to add the -o option here

getprop ro.product.ab_ota_partitions | grep -w vbmeta abl,aop,aop_config,bluetooth,boot,cpucp,devcfg,dsp,dtbo,engineering_cdt,featenabler,hyp,imagefv,init_boot,keymaster,modem,my_bigball,my_carrier,my_company,my_engineering,my_heytap,my_manifest,my_preload,my_product,my_region,my_stock,odm,oplus_sec,oplusstanvbk,product,qupfw,recovery,shrm,splash,system,system_dlkm,system_ext,tz,uefi,uefisecapp,vbmeta,vbmeta_system,vbmeta_vendor,vendor,vendor_boot,vendor_dlkm,xbl,xbl_config,xbl_ramdump OP591BL1:/ # getprop ro.product.ab_ota_partitions | grep -ow vbmeta getprop ro.product.ab_ota_partitions | grep -ow vbmeta vbmeta

-o just affects the output from grep, the internal matching still occurred and only matches ,vbmeta, because of -w. 🙂

We can just add -q and check the return value only.

@xiaoxindada
Copy link
Author

xiaoxindada commented Aug 8, 2023

ok

@osm0sis osm0sis added confirmed Issue confirmed to exist and the reason is known app This issue is related to Magisk App labels Aug 11, 2023
@osm0sis osm0sis changed the title ro.boot.vbmeta.device could not be found on OnePlus 11 devices ro.boot.vbmeta.device could not be found on many devices Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app This issue is related to Magisk App confirmed Issue confirmed to exist and the reason is known
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants