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 a rooted device). Unfortunately, it does not work due to incompatible versions between a newly 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 a mount on vendor.img
, I discovered it not working due share_blocks
attribute blocking 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 the share_blocks
feature that prevented me to do mount as RW. Of course, doing mount RW works correctly.
In the last phase, I tried to replace files in the 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 the kernel module called abc.ko
, deleting the file doesn't show any new free space in the file system. At this point, I can't update the old kernel modules with the new ones (compatible with the newly compiled kernel). Of course, running df -h .
returned no free space and 100% used.
Does anyone have any idea what I need to do?
Asked by sivandahan
(43 rep)
Sep 19, 2021, 11:28 AM
Last activity: Mar 27, 2025, 03:25 PM
Last activity: Mar 27, 2025, 03:25 PM