you made the system raw of the entire mmcblk0;
it needs to be converted to be compliant with flash.sh or mksparse;
as defaults presume that images are created from mmcblk0p1
in the latter case it would be possible to use it with flash.sh / mksparse as is
looped mmcblk0 will also have the parftition mmcblk0p1
so that it can be extacted separately and processed by flash.sh
the reason why it did not work at once was that
mmcblk0 & mmcblk0p1 are differnt images;
while the former is supported for entire disc recovery, the latter is only APP partition recovery;
so when the flash.sh script for APP partition recovery finds an entire disk image with dozen of partitions it fails, as it doesn’t have instrucitons for that use case. It is only good for one partition recovery.
how exactly did you create the raw image? which exactly command did you use to create the raw image?
is it raw image of APP partition mmcblk0p1 or of the entire disk? mmcblk0?
as I mentioned before; there is a differenrce between mmcblk0 & mmcblk0p1
you made full disk dump;
mksparse&flash.sh support single partition dump only,
as is the full disk dump is supported by dd recovery method only, [experimental live rewrite of underlying eMMC]
so that it will override the whole disk- dozen of partitions on eMMC,
it is why it is required to extract from the full disk dump only one app partition mmcblk0p1;
or at once just do raw from the mmcblk0p1 if you are concerned in using mksparse & flash.sh method
will try this. thanks.
let say the target still bootable, are we still able to overwrite the mmcblk0p1 even thought it is mounted?
in ubuntu pc, usually we boot from thumb drive to overwrite the sda image for restore.
i think i missed out this point. it make sense why it fail now.
However, the full disk dump still contains all partitions as components, as the entire disk structure has been dumped.,
so that mmcblk0p1 [ APP partition] can be dumped from within the existent full disk dump,
given the latter is mounted via the loop device so it will get into a form of disk structure from that the single partition raw image can be dumped and further processed by default scripts like flash sh etc. Experemental method - steps for live disk rewrite from booted OS I shared previously, as a respond to your earlier post in the current thread. it uses magic keys/ system triggers to get it possible to rewrite system disc been booted from it, via unmounting all drives, and then remounting them as readwrite. Or even without remounting dd might sork. For me from 20 uses it failed in 0 cases., but it might be considered safer for your use case to extract partition from full raw disk dump, probably, then to override disc with Os running from it?
This is a sparse image, not a raw image. The size is invalid for a raw image. In the case of using “-S size” during a flash it depends on the raw size, not sparse. “-S 15GiB” is far too small for the expanded size.