Dear NXP,
I am developing Android-13.0.0_2.0.0 AOSP.
I finished building according to Android User's Guide (Rev. android-13.0.0_2.0.0 — 31 Julie 2023) and I am writing an image to the SD card, but I get the error "Missing make_f2fs, fallback to erase the user data partition". 'make_f2fs' exists in '$OUT/host/linux-x86/bin/', but this error occurs. Is there no problem writing images on the sd card?
Thanks.
Solved! Go to Solution.
For some reason, it did not work even if the location of make_f2fs was set as an environment variable. I specified /out/host/linux-x86/bin/make_f2fs in the sh file and it was resolved.
I've had this problem a few times while working with SD cards, and it can be annoying. The error usually indicates a problem with the card itself or the file system. Those who may be faced with similar concerns while handling critical papers, such as files related to a social work essay writing service, should ensure that their SD card is in good condition and properly formatted to avoid losing significant work.
For some reason, it did not work even if the location of make_f2fs was set as an environment variable. I specified /out/host/linux-x86/bin/make_f2fs in the sh file and it was resolved.
Have you installed android sdk platform tools?
If so, you can use the make_f2fs is in Android/Sdk/platform-tools
Need to add the folder to root path.
Hi ,
Installed android sdk and added make_f2fs path in imx-sdcard-partition.sh
still facing error in flashing Andorid 13 image on sd card.
$ sudo ./imx-sdcard-partition.sh -f imx8mp -c 28 /dev/sdc
make gpt partition for android: partition-table-28GB.img
17+0 records in
17+0 records out
17408 bytes (17 kB, 17 KiB) copied, 0.00608634 s, 2.9 MB/s
/dev/sdc:
re-reading partition table
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR
formating android images
format_partition: metadata:/dev/sdc10 f2fs
/usr/lib/android-sdk/platform-tools/make_f2fs: invalid option -- 'g'
Error: Unknown option ?
Usage: mkfs.f2fs [options] device [sectors]
[options]:
-a heap-based allocation [default:0]
-c [device path] up to 7 devices excepts meta device
-d debug level [default:0]
-e [cold file ext list] e.g. "mp3,gif,mov"
-E [hot file ext list] e.g. "db"
-f force overwrite the exist filesystem
-i extended node bitmap, node ratio is 20% by default
-l label
-m support zoned block device [default:0]
-o overprovision ratio [default:5]
-O [feature list] e.g. "encrypt"
-q quiet mode
-s # of segments per section [default:1]
-S sparse mode
-t 0: nodiscard, 1: discard [default:1]
-w wanted sector size
-z # of sections per zone [default:1]
sectors: number of sectors. [default: determined by device size]
Here is the make_f2fs binary in my PC.
Maybe your Android sdk is not correctly installed.
xxx@xxx-Ubuntu:~$ which make_f2fs
/home/xxx/Android/Sdk/platform-tools/make_f2fs
xxx@xxx-Ubuntu:~$ make_f2fs -V
mkfs.f2fs 1.16.0 (2023-04-11)
xxx@xxx-Ubuntu:~$ make_f2fs --help
Usage: mkfs.f2fs [options] device [sectors]
[options]:
-a heap-based allocation [default:0]
-c device1[,device2,...] up to 7 additional devices, except meta device
-d debug level [default:0]
-e [cold file ext list] e.g. "mp3,gif,mov"
-E [hot file ext list] e.g. "db"
-f force overwrite of the existing filesystem
-g add default options
-i extended node bitmap, node ratio is 20% by default
-l label
-U uuid
-m support zoned block device [default:0]
-o overprovision percentage [default:auto]
-O feature1[,feature2,...] e.g. "encrypt"
-C [encoding[:flag1,...]] Support casefolding with optional flags
-q quiet mode
-r set checkpointing seed (srand()) to 0
-R root_owner [default: 0:0]
-s # of segments per section [default:1]
-S sparse mode
-t 0: nodiscard, 1: discard [default:1]
-T timestamps
-w wanted sector size
-z # of sections per zone [default:1]
-V print the version number and exit
sectors: number of sectors [default: determined by device size]
Another method without having to modify the script.
After completing the build, make_f2fs is on the build environment path.
Just need to pass the build environment PATH to the sudo environment.
Instead of:
$ sudo $MY_ANDROID/device/nxp/common/tools/imx-sdcard-partition.sh -f <soc_name> /dev/sdX
Pass the build environment PATH to the sudo environment:
$ sudo env "PATH=$PATH" $MY_ANDROID/device/nxp/common/tools/imx-sdcard-partition.sh -f <soc_name> /dev/sdX
The script will now find make_f2fs.