-
Notifications
You must be signed in to change notification settings - Fork 145
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
[Android 10] [TESTME] Use ro.hardware.<class>=qcom to point to harware libraries #642
Conversation
Android 10 adds a nice feature that verifies whether the realpath of a loaded module starts with the searched path the module came from. For symlinks this is not true (for example the realpath of the camera library is /odm/lib/hw/camera.qcom.so: this does _not_ start with /vendor/lib/hw where the search originated from). See the relevant change in libhardware: https://android.googlesource.com/platform/hardware/libhardware/+/e448a05fecab601c59b89a2f948e1ad18050e40f%5E%21/#F0 Instead of creating a symlink on the odm partition, set ro.hardware.camera=qcom in the relevant platform repositories (currently only Tama and Kumano). This ensures libhardware also looks for camera.qcom.so in all search paths (vendor and odm libraries). Signed-off-by: MarijnS95 <marijns95@gmail.com>
Following the change on the camera, convert vulkan-specific symlinks to properties as well. While vulkan works fine without this change it is mostly just a correctness cleanup. Signed-off-by: MarijnS95 <marijns95@gmail.com>
i will check if it is possible to load them from odm |
I concur with Marijn, going with Google's way will prove less painful for the future. @jerpelea I remember you said no last time this was discussed for Pie #565 @MarijnS95 just as a refresher, there's a difference between |
for O it may be ok but not for O |
@ix5 That doesn't entirely sound like the difference between @jerpelea Unfortunately the answer is no. Maybe we can trim off some symlinks, but the ones to After some quick testing Android and Vulkan run fine when removing everything but The same holds for the camera. As shown in the PR under |
Gerrit CL time I'd say... maybe we can get rid of the hardcoded /vendor location until R. Imo we can merge this already and get rid of the symlinks in one fell swoop once we've gotten AOSP to look in /odm as well. |
Let's find some time to CL that stuff, and see about fixing the hardcoded path in the camera blobs. For now I suggest to leave this PR open, as a point of discussion and because removing the unused links is not vital (but merging might definitely help with testing). |
Unfortunately, camera.qcom.so has the component pathes fixed to /vendor/lib64/, and it is a prebuilt. |
@sraase Yeah, I figured |
The com.qti.chi.override.so is not a prebuilt, but camera.qcom.so is. |
If it isn't then it should be fixable, as the hardcoded string is in there (unless it comes from a static linked lib). |
Well, com.qti.chi.override.so (similar to other modules) is loaded from camera.qcom.so - with fixed pathes. I don't think camera.qcom.so expects itself to be in |
That's interesting, because |
You are right. So that path is fixed as well. Sigh. |
699ce56
to
5d1178b
Compare
we can drop this commit since the symlinks were dropped |
This fixes the camera that fails to start on Tama.
Together with sonyxperiadev/device-sony-kumano#4 and sonyxperiadev/device-sony-tama#64
Do the same for vulkan symlinks (while not strictly necessary) to clean up.
TODO:
Check other symlinks for removal. In principle, library folders in
/odm
are included in the search path (and VNDK rules) so there should be no problem loading these directly.While the vulkan link can safely be removed on all platforms the link (without name change) for camera cannot, because "new" camera blobs try to load them explicitly from
/vendor
:CHIUSECASE: chxutils.cpp:526 LibMap() Failed to load library /vendor/lib/hw/camera.qcom.so error dlopen failed: library "/vendor/lib/hw/camera.qcom.so" not found
Tested on Mermaid and Akatsuki. Please test other devices!