There is a vendor image in my device I want to change (unpack/mount, doing changes, pack/umount).
My purpose is to update boot.img with my new kernel (in rooted device).
Unfortinatly it does not working due incompatible versions between a new compiled kernel (my compilation) to the previous kernel modules stored in vendor.img.
As I figure it, I need to update the old "ko" executables stored in vendor.img in my product.
The first step is to do "dd" from my device and "adb pull" it out to my build environment. While I tried to do mount on vendor.img I discovered It not working due "shared_blockes" attribute block it to mount as "RW" (dmesg wrote: "...unsupported optional features (4000)"), To solve it, running the following command
e2fsck -y -E unshare_blocks vendor.img
will disable "share_blocks" feature prevented me to do mount as RW, Of course doing mount RW working correctly !
In the last phase, I tried to replace files in vendor filesystem and then I discovered another challenge into my way, Unfortunately, there was a problem with limited space in the file-system,
For example: In case I want to replace kernel module called "abc.ko", Delete the file doesn't show any new free space in the file-system ! In this point I cant update the old kernel modules with new one (compatible to the new compiled kernel), Of course running "df -h ." returned not free space and 100% used, Anyone have any idea what I need to do ?
Thanks,