2

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

Including 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?
https://github.com/for2ando/dump-android-partitions
https://github.com/IzzySoft/Adebar
https://github.com/dlenski/tetherback
https://play.google.com/store/apps/details?id=ma.wanam.partitions&hl=en_US&gl=US
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.

5
  • All block devices are enumerated as /dev/block/mmcblk* or /dev/block/sd*. You can check from /sys/block/. Nov 25 at 8:28
  • 1
    Do something like grep PARTNAME /sys/block/*/*/uevent. Or simply use blkid command. Partitioning tools like parted and gdisk also show partition/filesystem labels. Any Linux tool will work on Android. Nov 25 at 18:14
  • @IrfanLatif Yeah, the partitions found in /dev/block/by-name are all sd*. Inside /sys/block/ though I find many partitions called dm-* loop* ram*, sdca, sdb, sdc, 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 /sys/block/ and /device/virtual/block/ for a while but without success.
    – R4ygen
    Nov 25 at 22:36
  • @IrfanLatif Alright, both grep PARTNAME /sys/block/*/*/uevent, parted print all and gdisk /dev/block/sdc listed the same partitions I've already found. But buth df and blkid commands listed all those partitions + all the missing ones minus system. That all points to the /dev/block/dm-* partitions. Now system is the only one left to find!
    – R4ygen
    Nov 25 at 22:38
  • Just realized that I've never searched in /dev/block manually 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/mapper, system included (it's /dev/block/dm-1). Thanks for the help!
    – R4ygen
    Nov 25 at 22:44
1

Found them!

All the missing partitions are listed with their labels in /dev/block/mapper

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.