1.安装adb
2.找到镜像文件
3.进入fastboot
4.刷入system.img
5.开机
out/target/product/sailfish
下的
huruwo@ubuntu:~/ASOP_8.0_r2/out/target/product/sailfish$ ls android-info.txt installed-files.json root boot.img installed-files.txt symbols build_fingerprint.txt kernel system clean_steps.mk module-info.json system.img current_build_config.mk obj system_other data obj_arm system_other.img dex_bootjars previous_build_config.mk userdata.img fake_packages ramdisk-recovery.img vendor gen ramdisk.img vendor.img installed-files-system-other.json recovery installed-files-system-other.txt recovery.id ``` ### 3.进入fastboot 页面 adb reboot bootloader ### 4.刷入系统 sudo apt install fastboot fastboot flash system system.img 刷入系统 等待开机 ``` fastboot flash system system.img target reported max download size of 536870912 bytes erasing 'system_a'... OKAY [ 0.318s] sending sparse 'system_a' 1/2 (517276 KB)... OKAY [ 64.682s] writing 'system_a' 1/2... OKAY [ 7.142s] sending sparse 'system_a' 2/2 (445827 KB)... OKAY [ 55.041s] writing 'system_a' 2/2... OKAY [ 6.691s] finished. total time: 133.874s ``` ### 5.为什么刷入的是system.img System.img就是设备中system目录的镜像,里面包含了Android系统主要的目录和文件 也就是最核心的内容 ### 6.补充 如何新增编译版本 比如我要编译user版本 https://blog.csdn.net/qq_35993502/article/details/118670355 编译配置文件新增一行即可 ## img文件介绍 vendor.img 248M userdata.img 149M system_other.img 148M ramdisk.img 1.8M ramdisk-recovery.img 7.5M system.img 986M boot.img 29.8M



