I want to get my room/sqlite database off a phone. The app is downloaded from the Google Play store as an internal test and the manifest has these settings:
android:allowBackup="false"
android:fullBackupOnly="false"
I have read a few posts and ran this:
adb backup -f backup.ab com.myco.myapp
Which produced a file with 47 bytes. Seems low, but...
I then tried this:
dd if=backup.ab bs=4K iflag=skip_bytes skip=24 | openssl zlib -d > backup.tar
But got:
dd: bs: illegal numeric value
openssl:Error: 'zlib' is an invalid command.
So I tried:
java -jar ./abe.jar unpack backup.ab backup.tar
but when I try to open the tar file I get:
Unable to expand "backup.tar". It is an unsupported format.
The AppDatabase instance is:
instance = Room.databaseBuilder(context.getApplicationContext(),
AppDatabase.class, "user-database")
.fallbackToDestructiveMigration()
.addCallback(roomCallback)
.addMigrations(MIGRATION_1_2, MIGRATION_2_3, MIGRATION_3_4, MIGRATION_8_9, MIGRATION_9_10, MIGRATION_10_11)
.build();
The I am connected to the phone using a usb and it have developer settings on.
From what I have gathered here you cannot adb backup when the developer settings are false.
I have tried:
adb -d shell "run-as com.myco.myapp cat /data/data/com.myco.myapp/databases/user-database"> data.db
but get:
run-as: package not debuggable: com.myco.myapp
Will I be able to do this given it is not a debuggable app and the allowBackup is false?