Schlagwort-Archive: android

How to make a full adb backup with a broken android phone screen

With a broken screen and not a absolutely up to date backup I wanted a complete backup with everything to the latest.
I was able to unlock my phone with my fingerprint but couldn’t see anything besides a black screen.
Searching for a tool to backup I found a blog post that helped a lot because I also wanted to use Titanium Backup to restore apps and other data. The command is:
.\adb.exe backup -f FullBackup.ab -apk -all
(oh my, am I happy to have usb debugging enabled already)

Update 2019-07-28:
Not that easy with the adb Backup. The restore didn’t work with the backup I made above.
Searching for answers I found a post on stackoverflow that explains a bit more on how to verify a adb backup. I haven’t tried it and my backup is encrypted so I propably should try https://github.com/nelenkov/android-backup-extractor
https://lyubomyr-shaydariv.github.io/posts/2016-08-27-when-android-backup-and-restore-tools-may-fail/
Also Titanium Backup didn’t work. Fuck Android and their backup/restore capabilities.

My phone is encrypted so the adb command asked on my phone for a password to encrypt my backup. I could enter the password with the command
.\adb.exe shell input text <password>
and selecting the „start backup“ button with two tabs:
.\adb.exe shell input keyevent 61
.\adb.exe shell input keyevent 61
and finally „press“ enter with:
.\adb.exe shell input keyevent 66
(more keyevents can be found here)

Later I found a java tool called AndroidScreencast that allowed with the help of adb to connect to my phone and cast my screen to a small window where I could use my mouse and keyboard to navigate 🙂

How to import your SMS from Android to Jolla

I found a quite nice tutorial online that explains all the steps you have to take to do the job.
I couldn’t copy the mmssms.db database like he was doing it.
I had to change to a root shell on my android and copy it to somewhere else on the filesystem and give it other permissions to get it to my machine.
The only thing I „improved“ is the shell one liner (see below) export from the sqlite mmssms.db that marks the newlines in sms the correct way so the tool Harmattan-SMS-Boat can make its job just fine.


#!/bin/sh
sqlite3 "$1" \
"select address,type,datetime(date/1000, 'unixepoch','localtime'),datetime(date/1000, 'unixepoch','localtime'),body from sms;" | \
sed -e 's;^\([^|]\+\)|1|\(.*\);\1|IN|\2;' -e 's;^\([^|]\+\)|2|\(.*\);\1|OUT|\2;' -e '/^[A-Za-z0-9+]*|[IN|OUT]/! s;^; ;' | \
sed 's/|/;/g'