Backing up a non-pmOS phone
🚧 | This page is a work-in-progress. Some information contained within may be inaccurate or incomplete. |
This guide will show you how to backup a phone, tablet, or other device before installing postmarketOS.
Things to remember
It's useful to have a checklist of things to back up from a device:
- Files, both photos and other files (downloads, documents, etc.)
- Some phones may also have a "secure folder" feature; if you used it, remember to back up those files as well.
- Contacts, which can be exported to .vcf format from your contacts app of choice.
- You can re-import your contacts later on postmarketOS; see your interface's wiki page for instructions.
- Call logs or SMS message logs.
- 2FA app data, if you use your phone for two-factor authentication. Back up your authentication keys, so that you don't lock yourself out of your accounts.
- App data. Save data of various applications or games.
- Of note are things like notes from your preferred notepad app, etc.
- Saved account information, in case you're logged into any accounts on your phone that you otherwise may not have access to.
Android
Note: Do not use Google Drive's "backup" to backup your phone, as it only backs up some app data among basic phone data like call logs and messages, but not all app data. Additionally the format is unknown and proprietary and there is no way to download this data except restoring it to Google's Android skin.
Android 5 and up
1. Enable developer mode by repeatedly tapping the build number in settings.
2. Install SMS Import / Export from F-Droid: https://f-droid.org/en/packages/com.github.tmo1.sms_ie/
Note: I tried QUIK SMS, Fossify Messages, SMS Gate, and Slight Backup, and all of those apps had some missing messages, and all photos were missing.
3. Disconnect from the internet, by enabling airplane mode and making sure Wi-Fi is disabled.
4. Use that app to export messages, call log, contacts, and blocked numbers. Make sure to set a different SMS app as the default after if you plan to reconnect the phone to the internet before switching to pmOS. If you do not do this, incoming SMS messages will be lost!
5. Connect to a host computer and copy all the files that are visible to the computer using the host's file manager.
6. Use `adb backup -f ~/Downloads/backup.ab -apk -obb -shared -all -system -keyvalue` to backup some app data. Note that this will not include apps that have opted out of the backup system, and the only way to work around that is with root.
7. I am not sure if Samsung Notes are included in what has been backed up so far, but one can select all notes at once and select "Share" as a text file using Bluetooth. Notes apps from other companies may have different export options.
8. I am not aware of a way to backup Chrome browsing history or open tabs, other than manually copy and pasting to notes and then backing up notes.
9. Even if a lot of things don't have good backup support, screenshots can often come in handy, like for example to backup the positions of apps on the home menu.
10. This is not a complete backup, but it includes a lot of what can be backed up without root and without going through the internet.
Note: Slight Backup can backup some Android settings values, but the app seems to have been de-listed from F-Droid, or I am misremembering where I got it from.
Android ROMs with Seedvault backup included
1. Search for Seedvault backup in settings
2. In settings, choose to not have any quota ...
rooted Android 4 "Ice Cream Sandwich" and up
1. Enable developer mode by repeatedly tapping the build number in settings.
2. Enable USB debugging.
3. Download BusyBox from F-Droid: https://f-droid.org/packages/ru.meefik.busybox/
4. Install that file with adb install.
5. Run that app to install BusyBox.
6. Run `adb exec-out "su -c tar --exclude=proc --exclude=sys -c / 2> /dev/null" > rootdir.tar` on the host device (i.e. not the phone).
Note that this will also exclude other files or folders named "proc" or "sys", not just those direcly in the root directory. If you know how to exclude /proc and /sys without excluding other files and folders named "proc" or "sys", please edit the wiki to describe how!
7. Make sure the backup can open correctly and contains files!