都忘记了,哎,每次 百度 狗狗 ,累
dd if=/dev/zero of=custom.img bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.338186 s, 3.2 GB/s
ls custom.img -l
-rw-r--r-- 1 root root 1073741824 Aug 13 17:08 custom.img
mkdir custom
chmod 777 -R custom
mount -o loop custom.img custom
mount: /mnt/data/ailiving/Workfolder/carl/aili/d/d-3/sc60_android7.1.2_ailiving/out/target/product/msm8953_64/custom: wrong fs type, bad option, bad superblock on /dev/loop3, missing codepage or helper program, or other error.
mkfs.ext4 custom.img
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: fea7199b-0ee0-4b5e-bf92-6aca388a95ed
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
mount -o loop custom.img custom
chmod 7777 -R custom
umount custom
file custom.img
custom.img: Linux rev 1.0 ext4 filesystem data, UUID=fea7199b-0ee0-4b5e-bf92-6aca388a95ed (extents) (64bit) (large files) (huge files)