Migrating a GadgetBridge installation to a new device

GadgetBridge for Android allows syncing locally with various wearable devices such as wristbands and watches. As they are typically connected through Bluetooth (LE), migration to a new device - or after reinstalling GadgetBridge on the same device - often invalidates the connection. This is a summary of how previous database history can be migrated to such a new installation.