I am trying to build system.img from a folder which contains system files(extracted from system.img)

the system.img is for Api level 25 on emulator( Android SDK)

I am trying to run this command

sudo make_ext4fs -L system -l 274783648 -a system new_system.img savedir/

but I get this error

Creating filesystem with parameters:
    Size: 274780160
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 5600
    Inode size: 256
    Journal blocks: 1048
    Label: system
    Blocks: 67085
    Block groups: 3
    Reserved block group size: 23
error: ext4_allocate_best_fit_partial: failed to allocate 3967 blocks, out of space?
  • 1
    Can you paste the output of df -h and df -hi here? (The error says out of disk space) – GMaster Sep 8 at 17:04

The error was related to the size of the image I was trying to create which was smaller than the folder size.

Increasing the size removed the error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.