Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Preparation
- The following preparations are required before creating a Fastboot ROM.
- - Bootloader Unlocked device
- - GSI with built-in SU (Phh-AOSP, LineageOS GSI, etc.) or boot.img with patched Magisk or KernelSU boot.img
- - DSU Sideloader (GSI Only)
- - adb and fastboot environment
- 2. Dump Image
- You can pull files as img by running certain commands with root privileges. In other words, you are doing that and pulling out img's such as boot and vbmeta.
- Let's do the necessary commands to save the img.
- Note: boot GKI(⚠Don't use fastboot flash boot)
- fastboot boot KSU_boot.img
- ## Dump Image Commands ##
- # 1. Superuser
- su
- # 2. Go to the path where each image is located (or /dev/block/by-name/ for MediaTek, etc.)
- ↓ Copy
- cd /dev/block/bootdevice/by-name/
- # 3. Create backup directory
- ↓ Copy
- mkdir /sdcard/backup_img
- # 4. Backup everything except cache and userdata to /sdcard
- ↓ Copy
- for file in *; do
- if [[ "${file}" = cache* || "${file}" = userdata* ]]; then continue ; else dd if=/dev/block/bootdevice/by-name/"${file}" of=/sdcard/backup_img/"${file}".img ; fi
- done
- # 5. MD5 check list
- ↓ Copy
- echo "" > /sdcard/backup_img/md5.txt
- for file in *; do
- if [[ "${file}" = cache* || "${file}" = userdata* ]]; then continue ; else
- echo "${file}" >> /sdcard/backup_img/md5.txt
- md5sum /dev/block/bootdevice/by-name/"${file}" >> /sdcard/backup_img/md5.txt
- md5sum /sdcard/backup_img/"${file}".img >> /sdcard/backup_img/md5.txt
- echo "" >> /sdcard/backup_img/md5.txt
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement