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
Proper addon.d support for the /vendor and /product partitions for A/B devices #872
Comments
/vendor will also need some consideration.. for addon.d (v1) they can be mounted to /vendor and /product, but for addon.d-v2 it'll need to be /postinstall/vendor and /postinstall/product, but only if e.g. /postinstall/product is a directory and /postinstall/system/product is a symlink. Then the normal addon.d lists should work fine, since they're all based in /system, and things are symlinked. Main problem is I'm not sure that's possible when booted without root. That'll require some investigation. |
I have just verified the above commit to work on an A only dynamic device. If it's looks fine, i shall extend the mount support in the function for vendor as well, and verify it on my A only non dynamic device too. If so, we could gurantee proper addon functionality on A devices and leave A/B as pending. Looking forward to you guys opinion on this. |
Nice work!! A couple minor notes:
If you could fix those up and submit as PR I think we're good! 🙂 |
Awesome. As for: 1: That's what I wanted to do. Just wanted to see if this initial approach was feasible. I'll do it as you suggested. 2: I thought I'd leave that since I don't have an A/B device to test on. Hence I just left checks to skip it on A/B. I'll see to both and open a PR then. |
Hmm there might still be a complication with A/B.. I think addon.d using $SYS or /postinstall/system as a base will cause issues, since the /system/vendor and /system/product symlinks aren't relative.. so would point to actual /vendor and /product, and mounting over those would be kinda haphazard to do in a global mount namespace on a booted device.. 😕 |
There is also the question of mounts happening while booted, without root (as you mentioned earlier above). Even then /postinstall is ro. I have made the mount function generic and added vendor to the mounts as well. Tested on A only Dynamic ( Poco X2 ) / A only Non Dynamic ( Redmi Note 7 Pro ). Both have a separate product partition. However as we dont have a clear methodology figured out for A/B (Dynamic / Non Dynamic), i still left the A/B checks in the Keeping that in mind. I would say that the current commit is good to go ? |
I'm OK with fixing only the A devices for now, that's better than nothing anyway and will help some of the users. |
We should still be tracking the issue for A/B devices. |
Seems like this could be resolved by addon.d-v3 once it's merged and widely rolls out to other ROMs: https://review.lineageos.org/c/LineageOS/android_vendor_lineage/+/299059 |
Has there been any update to this? I'm sitting here with a oneplus 8t that has a 500MB system partition, and a 450MB product partition that opengapps doesn't seem to be using, which sucks because it mean i can install half as many apps, essentially. In fact, looking at it, it seems flashing the biggest package i could (modified stock) filled up system so it has 16MB left, and it deleted the stock apps that were in product, so now it has 719MB that i can't use. |
Thanks to @merothh users who have custom /product partition are now able to properly remove stock apps during the installation process: #868
The addon.d script though requires more work and stil needs to be fixed. Let's track this issue here.
The text was updated successfully, but these errors were encountered: