Jump to content

Pro¹ X - backup, restore and repair device specific partitions


Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

It is highly advised to take a backup of your device specific partitions right after you receive the device. Update 20220829: tl:dr: Community has not found a safe way to restore backups as of yet.

Yet another way how to backup persist (or any other) partition even without PC, with rooted phone and Magisk: Install Magisk module "backup" and reboot. After that using some terminal app in phon

Edited the first post with working repair instructions using restorecon. Ii just now successfully found that way to be working on my side. 🥳🎉

On 9/26/2022 at 12:17 AM, thilo said:

I can't manage to backup the partitions of my Pro1X. Neither adb nor edl recognizes my phone. It doesn't matter whether it is booted normal, or in fastboot mode or in bootloader mode. But I don't want to start flashing my device with sailfishOS without saving my partitions first.

Meanwhile I'm a bit further. When running android my phone is recognized by

linux:~ # adb devices -l
List of devices attached
xxxxxxx               device usb:3-8.2 product:QX1050_2_EEA model:QX1050 device:QX1050 transport_id:16

but when in recovery mode I get

linux:~ # adb devices 
List of devices attached
xxxxxxxx        unauthorized

So I can't use

linux:~ # adb pull /dev/block/sda2 persist_20221101.img
adb: error: failed to get feature set: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

When in fastboot mode fastboot recognizes my phone:

linux:~ # fastboot devices
xxxxxxxx        fastboot

When I try to make a backup via fastboot, I get the following error.

linux:~ # fastboot fetch persist persist_20221101.img
fastboot: error: Unable to get max-fetch-size. Device does not support fetch command.

When in edl mode using edl for the backup, edl recognizes my pro1x, but nothing happens.

linux:~ # edl r persist persist_backup.img
Capstone library is missing (optional).
Keystone library is missing (optional).
Qualcomm Sahara / Firehose Client V3.60 (c) B.Kerler 2018-2022.
main - Trying with no loader given ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: sahara

Running edl with --debugmode shows timeout errors (see attached file)edl-debug.txt.

So I still don't manage to make a backup. Any hints?

Link to post
Share on other sites

Consider that, concerning non-working sensors, the recommendation to do a full backup of the original Android system is largely obsoleted by the latest edit of the OP of this thread:

Concerning your connection troubles, I can only recommend to try different (USB) hardware. I ended up doing all my adb/fastboot business from a Raspberry Pi3 as my Thinkpads are seemingly to "advanced" for the purpose ...

Link to post
Share on other sites
21 hours ago, claude0001 said:

Consider that, concerning non-working sensors, the recommendation to do a full backup of the original Android system is largely obsoleted by the latest edit of the OP of this thread:

Concerning your connection troubles, I can only recommend to try different (USB) hardware. I ended up doing all my adb/fastboot business from a Raspberry Pi3 as my Thinkpads are seemingly to "advanced" for the purpose ...

Indeed, for edl it might be worth to try a usb 2.0 connection. This can be done by using an old cheap usb 2.0 hub if your computers do not offer any @thilo
`fastboot fetch` is just not available, sadly.
Regarding your backup attempts using adb, its necessary to root android using magisk to be permitted to access those partitions. Its an easy process documented here officially:
https://docs.google.com/document/d/1sBS-Taw-3MXrG4lETA6dfuwda8K-9uVlzLhGk46ctzg/edit

Or in short,
- install magisk from the official source https://github.com/topjohnwu/Magisk
-
grab the boot.img fitting to your build number (contained in the same system image package used to fully flash the device)
- patch this boot image using magisk
- Download the patched boot.image using adb
- flash the patched boot.img using fastboot
- Boot into android to see working root in the magisk app
- `adb root` to grant root rights for next command
- grant permission for the adb root in the pop-up or when missed in the magisk apps section for the shell app.
- `adb pull /dev/block/sda2 persist_20221101.img`
- `adb unroot` not really necessary since it does not persist reboot or adb on/off

But as @claude0001correctly noted, there is no know way to restore the persist partition currently.
But it might be worth having it for the point in time when a working way has been found.

  • Thanks 1
Link to post
Share on other sites
  • 4 weeks later...

Yet another way how to backup persist (or any other) partition even without PC, with rooted phone and Magisk: Install Magisk module "backup" and reboot.

After that using some terminal app in phone (I use Termux), first gain root access:

su

and then enter

backup persist

it will create file persist.img in folder /backup of your phone's internal storage. The path can be changed of course. I suppose same can be achieved with dd command, but the above is easier.

Instead of terminal app in the phone you can of course use adb shell from a pc.

  • Like 3
  • Thanks 3
Link to post
Share on other sites
  • 2 months later...
On 11/1/2022 at 9:13 PM, thilo said:

Running edl with --debugmode shows timeout errors (see attached file)edl-debug.txt.

So I still don't manage to make a backup. Any hints?

I also couldn't get it to work and gave up. Same timeout errors as you.

I just rooted the phone with Magisk and used the following command to backup all the partitions to the sdcard:

mkdir /sdcard/backup
cd /dev/block/platform/soc/*/by-name
for filename in *; do if [ "$filename" != "userdata" ]; then echo "dd if=$filename of=/sdcard/backup/$filename.dd"; fi; done

This prints lines with the dd syntax to back up all partitions. It does not execute them for you. Please check if those lines fit your expectations first and then run one or all of them.

I then got the backups off the device using

adb pull /sdcard/backup

 

  • Thanks 1
Link to post
Share on other sites
1 hour ago, dicer said:

for filename in *; do if [ "$filename" != "userdata" ]; then echo "dd if=$filename of=/sdcard/backup/$filename.dd"; fi; done

Believe it or not, this is how we used to create OS distributions back-in-the-day.  Fattire even wrote a short poem about it:

So Many Zeroes!  A Children's Book By Dr. Seuss (a.k.a. fattire)

Blue had his V2, all shiny and GNU, and wanted to send it, but stopped to review.
"What would this ware weigh, if zipped up today?  Should it not be much larger than the SDK?"
And yet it was bigger (nearly one-half a gigger!), but Blue still released it with vim and with vigor.
"A drive is a drive, at any old size!  But a drive is alive when its zero'ed to thrive!"
So Blue packered his tracks with a /dev/zero-whacker.  And then that blue cracker, he launched his bittracker...
And he ripped, and he zipped (but he didn't encrypt), until it was scripted, and that's when he shipped it!
It was plain to see-- that his brand-new v3-- was shiny and tiny and better.  Whoopie!
In fact the whole thing was down to 180.  A number of megs that was far, far less weighty.
And now when the Rommers all rom their romses, and now when the Singers all sing their songses,
their image of Blue will be bigger and taller,
and installers they image will be *many* megs smaller.

180 MB for an entire OS image. Ah, life was simpler then ;-)

  • Like 2
  • Haha 1
Link to post
Share on other sites
58 minutes ago, Sean McCreary said:

180 MB for an entire OS image. Ah, life was simpler then 😉

Ah you youngsters. started before there was dos. 1KB memory +  plug to a TV and a tape recorder.  (ZX81)

A few years later I had the first PC with not one but TWO floppy drives so I could have source on one, compile to another, swap the first, and link the object-code back to the first drive.

Later that was upgraded with what I saw as an almost infinite big harddisk - it was a whooping 10Mb 🤣👴 👴

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Terms