Score:2

make_ext4fs: command not found, in ubuntu 22.04

gh flag

I need to create system.img file from a mounted folder, found make_ext4 command method in online, but it shows "make_ext4fs: command not found" in ubuntu 22.04.

Then I tried running "sudo apt-get install android-tools-fsutils", but got error "E: Package 'android-tools-fsutils' has no installation candidate"

Please help.

guiverc avatar
cn flag
Where are you getting your instructions from?, Ubuntu has `mkfs.ext4` & other standard GNU/Linux tools built in, where you appear to be expecting to use *modified* tools created for Android & other OSes based on the standard tools you're trying to avoid?
Md Hafeez avatar
gh flag
Okay, but I found guide with make_ext4fs, However, please give an example to create system.img from a folder content using **mkfs.ext4** command.
Score:0
in flag

android-tools-fsutils is an old package (see this doc from Debian Buster, which was the basis of Ubuntu 18.04 to 19.10). This package is not available in Ubuntu 22.04. You should use mkfs -t ext4 instead (provided by the Ubuntu 22.04 package makefs.

make_ext4fs is not maintained by Android any more and has been deleted from their codebase (see this commit). In Android, it has been replaced by mke2fs, which is available in Ubuntu 22.04 with the package android-sdk-platform-tools which installs /usr/lib/android-sdk/platform-tools/mke2fs (this path is not in the default PATH).

You can create an ext4 image and add the content of a directory to the image using mkfs -t ext4 by following e.g. the instructions in this answer which uses a loop mount.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.