I'm rocking a OnePlus Nord 2 5G here that just recently came back from assistance because I had wiped the partitions with the IMEI stored in it...
I had made a Nandroid backup, but it didn't backed up all the needed partitions to be able to restore it.
So, I went searching for an alternative way to backup ALL the partitions of the phone. Mainly by the use of adb shell while booted in TWRP to gain root access without being rooted + dd for the backup. And I've made some good progress so far, but now I'm stuck.
For comparison, I've donwloaded a full stock firmware from a third party, and these are all the files it contains:
audio_dsp.img boot.img boot_para.img cache.img cam_vpu1.img cam_vpu2.img cam_vpu3.img cdt_engineering.img dpm_1.img dpm_2.img dtbo.img expdb.img flashinfo.img frp.img gz1.img gz2.img lk.img lk2.img logo.img mcupm_1.img mcupm_2.img md1img.img metadata.img misc.img my_carrier.img my_engineering.img my_heytap.img my_manifest.img my_product.img my_region.img my_stock.img ocdt.img odm.img oplus_custom.img oplusreserve1.img oplusreserve2.img oplusreserve3.img oplusreserve5.img oplusreserve6.img otp.img para.img param.img pi_img.img product.img recovery.img scp1.img scp2.img sec1.img seccfg.img spmfw.img sspm_1.img sspm_2.img super.img system.img tee1.img tee2.img vbmeta.img vbmeta2.img vbmeta_system.img vbmeta_vendor.img vendor.img vendor_boot.img
Now, these are all the partitions I was able to find in
/dev/block/platform/by-name and backup:
audio_dsp.img boot.img boot_para.img cache.img cam_vpu1.img cam_vpu2.img cam_vpu3.img cdt_engineering.img dpm_1.img dpm_2.img dtbo.img expdb.img flashinfo.img frp.img gz1.img gz2.img lk.img lk2.img logo.img mcupm_1.img mcupm_2.img md1img.img metadata.img misc.img nvcfg.img nvdata.img nvram.img ocdt.img oplus_custom.img oplusreserve1.img oplusreserve2.img oplusreserve3.img oplusreserve5.img oplusreserve6.img otp.img para.img param.img persist.img pi_img.img proinfo.img protect1.img protect2.img recovery.img scp1.img scp2.img sec1.img seccfg.img spmfw.img sspm_1.img sspm_2.img super.img tee1.img tee2.img vbmeta.img vbmeta_system.img vbmeta_vendor.img vendor_boot.img
As you can see, I'm missing a couple of partitions:
my_carrier.img my_engineering.img my_heytap.img my_manifest.img my_product.img my_region.img my_stock.img odm.img product.img system.img vbmeta2.img vendor.img
system, which is pretty strange since it's one of the main partitions.
I've no idea how to find the directory of these partitions, with their labels, and how to back them up.
These are all the solutions, tools, and similar questions I've already tried, without success:
How to list all major partitions with their labels?
Command to list partitions?
How can I view the Android internal partition table?
I just obtain the same list of partitions I'm finding, or straight not working / the directories do not exists. Maybe because it's a MTK device?
The only app that made a difference is FX file explorer. By going in the "file systems" section I can see the
my_* partitions and their directory, but no system, vendor, or others. And I'm searching for a command line solution ofc.
I've contacted the user that posted the unofficial full stock firmware on XDA. I'm still waiting for the full response on what specific method he use to extract it, but for now I know he used some root solution, if that could help.
Root solutions are completely fine by the way, just, no "Nandroid" as an answer please.
/dev/block/sd*. You can check from
grep PARTNAME /sys/block/*/*/uevent. Or simply use
blkidcommand. Partitioning tools like
gdiskalso show partition/filesystem labels. Any Linux tool will work on Android.
/sys/block/though I find many partitions called
zram0, that all point to
/device/virtual/block/. All without their labels though, so it's not really useful to know which of these partitions is what. I've searched around
/device/virtual/block/for a while but without success.
grep PARTNAME /sys/block/*/*/uevent,
parted print alland
gdisk /dev/block/sdclisted the same partitions I've already found. But buth
blkidcommands listed all those partitions + all the missing ones minus
system. That all points to the
systemis the only one left to find!
/dev/blockmanually aaand found them. Exactly all the missing ones that aren't listed in
dev/block/by-name, are listed with their labels in
/dev/block/dm-1). Thanks for the help!