是否有任何方法可以在没有root或twrp / cwm的情况下备份/转储内核图像？
Is there any way to backup/dump kernel image without root or twrp/cwm ?
It is possible to dump device partitions without root or custom recovery - if your device has "fastboot" mode and is boot unlocked. I'm not going to describe unlocking the boot loader, but with a fastboot device it is usually pretty easy - search the internet for instructions for your specific device.
You will need a TWRP recovery image for your device, but you don't need to actually install it on the device - we'd just temporarily boot into it to get access to the raw boot partition. Look at https://twrp.me/Devices/ and download the image for your device.
You need to find out which partition you want to backup from the device's storage. Usually there is a
by-name directory somewhere under the devices tree that lists all the operating system's partitions with names and physical partition identifiers.
adb devicesand verify your device is listed. You may need to authorize access on the device itself in a popup that will appear.
adb shellto go into the device's command line shell
find /dev -name 'by-name' 2>/dev/nullto find the
by-namedirectory. It should list one, though if there are a couple, it shouldn't be a problem and both should work.
ls -la <by-name-directory>(replacing the place holder with the actual directory name)
boot, or if your device has multiple slots, it is probably
boot_a- and record the physical partition path listed for it. It should be something like
/dev/block/mmcblk0p22(this is on my Mi A1 device - if you have a different one, the number after "p" will be different and possibly even the number before "p").
If you do not have a
by-name directory on your device, you might want to search the internet for the correct device name, though there are ways to detect the correct partition from within the device - comment if you need help.
adb reboot-bootloaderto go directly to fastboot mode.
fastboot boot recovery-3.2.1-1.img. It will take a couple of minutes for the device to boot into TWRP, so be patient.
adb pull /dev/block/mmcblk0p22 boot.img, replacing "
mmcblk0p22" with the correct boot device path you found in the preparations stage, and "
boot.img" with where you actually want to save the kernel boot image.
If your device has multiple boot slots, its probably a good idea to backup both (on my device, for some reason, after a clean install and update, they are not identical).
I just used
dd if=/dev/block/mmcblk0p15 of=test_boot.img
and then used adb to download the file for a backup of the boot ramfs