I solved this problem using linux tools to create the image.
- Create file system_new.img:
dd if=/dev/zero of=system_new.img bs=4k count=1800000 - Create ext4 file system:
mkfs.ext4 system_new.img - Cancel file system check (otherwise the image will not work):
tune2fs -c0 -i0 system_new.img - Mount Image:
sudo mount -o loop system_new.img mount_point - Copy the files you need.
- Enlarge image:
sudo umount mount_pont
Your image is ready!
You can check it with the Android emulator -avd YOUR_VIRTUAL_DEVICE -system system_new.img : emulator -avd YOUR_VIRTUAL_DEVICE -system system_new.img
source share