While switching between branches and upgrading, it may help to keep a backup of the pairing data.
-
retrieve a list of the installed user-level apks:
$ adb shell pm list packages -3 | grep ruffy package:org.monkey.d.ruffy.ruffy
-
Variant a), assuming a rooted phone:
- Copy the entire data directory of the application to your computer:
adb root adb pull /data/data/org.monkey.d.ruffy.ruffy
- and restore it later or to a different phone
adb push org.monkey.d.ruffy.ruffy /data/data
- Copy the entire data directory of the application to your computer:
-
Variant b), requesting the backup of an apk's data - this does not include the apk itself. (Filename according to personal preference - in this example depending on version)
$ adb backup -f monkey.d.ruffy-1.ab org.monkey.d.ruffy.ruffy $ adb backup -f monkey.d.ruffy-2.ab org.monkey.d.ruffy.ruffy-2
To restore a backup:
adb restore monkey.d.ruffy-1.ab
-
That
ab
archive can be checked/unpacked using either specialized tools, or the generic commandline:$ dd if=monkey.d.ruffy-1.ab bs=24 skip=1 | unpigz | tar -tvf - 36+1 records in 36+1 records out 877 bytes transferred in 0.000095 secs (9242223 bytes/sec) -rw------- 0 1000 1000 1000 Jan 1 1970 apps/org.monkey.d.ruffy.ruffy/_manifest -rw-rw---- 0 10096 10096 441 Feb 11 16:41 apps/org.monkey.d.ruffy.ruffy/sp/pumpdata.xml
- The first 24 bytes of the file are skipped
- Zlib is applied to uncompress the content. If
pigz
isn't installed, there are a few generic alternative ways to achieve this task - just slot into the second part of the pipe (in place ofunpigz
): *python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))"
*perl -MCompress::Zlib -e 'undef $/; print uncompress(<>)'
* ifpigz
is installed,unpigz
(same aspigz -d
) * any other ideas? - The resulting tar archive can be examined or unpacked with
tar
(use-x
to unpack)
-
The Bluetooth pairing information can be fetched for safekeeping off-phone. Example from Lineageos 14.1:
adb pull /data/misc/bluedroid/bt_config.conf
-
Same with AndroidAPS configuration data
Export Settings
from within AndroidAPS- Fetch the file (I prefer adding yyyy-mm-dd to the filename to keep track of versions. YMMV :)
adb pull /storage/emulated/0/AndroidAPSPreferences AndroidAPSPreferences-2018-02-13