Closed gsstudios closed 8 years ago
http://review.cyanogenmod.org/#/c/130043/
For CM il create a new commit bcoz prebuilt .so needs to reside on vendor_samsung from Muppets. But Iam using the above mentioned commit.
https://github.com/kularny/android_hardware_samsung/commit/01c8bc82ae4a8e5eb6907f2f8b4137931a98b772
Or u can extract the lights.exynos4.so and bundle it with kernel. Create a system/lib/hw and place it inside that. Then under the updater script u can use package_extract_dir("system", "/system"); It will unload all the folders+files in the right place ie the .so file in system/lib/hw. Thats it.
I had to compile the lights.c outside build and use the resultant ndk .so bcoz few codes in the bln supported code breaks build and even if i bypass them with pragma push..it doesnt work...so had to backport the old codes from the bln lights.c to the new lights.c from insignal and using a prebuilt c shared lib so that users might not face build issues.
OK, so what I get from this is that I can modify updater script to automatically replace the bln files.
So when I use package extract directory, will it replace the destination file or will I have to remove from original destination?
run_program("/sbin/busybox", "mount", "/system"); delete("/system/lib/hw/lights.exynos4.so"); package_extract_dir("system", "/system"); run_program("/sbin/busybox", "unmount", "/system");
In the system folder, place lib/hw/lights.exynos4.so
Thats it.
Oh, I already got it working on my kernel :) Thanks anyway.
So I currently have it set so it copies it to the required destination. It will also change permission to 644. I didn't make it delete anything but it works.
Plz make sure it deletes. thats the proper way. Dont do it directly. And I will be pushing a new commit for cm soon. Il just have to link hardware_samsung with prop_vendor_samsung with a conditional flag to be set in boardconfigcommon.mk in s2_common.
Ok. Will make sure.
btw permission 644 is not required as the hw folder has itself the perms required and hence all the sub-files easily inherit that permission.
Ok, thanks. Will remove unnecessary line
I will close this issue unless there are problems that we may come across. Thanks kularny!
ur wc
What changes u made in kernel side to fix bln without tge the lights.c???
I think its better to ask realex-fire. BLN is still working on my side, so it could be something related to the post-init or init scripts that have now been updated to properly support cm12.1.
Ya i asked him...in my kernel...without that..it wont work...there got to be some module built in for BLN by dorimanx himself.
There is another lights.exynos4.so file in the initramfs repo. I believe something in the post-init or install.sh triggers the kernel to do something similar. Not quite sure though.
yup thats it. Thanks
I still need to confirm if BLN works on phones that haven't installed the build that changes the ROM BLN file. Will test soon on my other s2.
the path has just been updated...I was also going crazy thinking as to how the lights get controlled by BLN without lights.c
for CM I have to make the patch that I told u earlier for default support.
Practically ur friend used the same lights.exynos4.so module that I made...Just from a different path. Btw hez doe a brilliant job.
Yep, he deserves a lot of credit on making DorimanX LP possible :)
Ya say congrats to him from me and hello too.
https://github.com/gsstudios/initramfs3/blob/master-lp/sbin/ext/install.sh#L191 - it is an installation of lights.exynos4.so https://github.com/gsstudios/initramfs3/blob/master-lp/sbin/ext/post-init.sh#L115 - this line install.sh script is caused. (it was commented out)
Got it. Thanks.
@kularny
BLN not been working on DorimanX kernel since CM12.1 was released.
A possible workaround is already available on the XDA developer forums, but a proper fix is needed.
Any ideas if this is ROM related or if something needs to be changed in the kernel?
Thanks.