First, make sure your app can be backed up in AndroidManifest.xml, i.e. android:allowBackup is not false.
Backup command:
adb -s <device_id> backup -noapk <sample.package.id>
Create a tar with dd command:
dd if=backup.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.wri...