to prepare:
$ bmgr transport com.android.localtransport/.LocalTransport
$ bmgr enable true
to backup:
$ bmgr backupnow --all
host$ adb root; adb pull /data/data/com.android.localtransport/files/1
Conversation
to restore:
host$ adb root; adb push 1 /data/data/com.android.localtransport/files/
$ bmgr restore 1 [package...]
2
1
39
note: this is mostly useful as a replacement for `adb backup`/`adb restore` that doesn't require blood sacrifices to restore half of your data instead of none of your data
it doesn't work remotely and AFAIU requires a userdebug build
3
3
40
Replying to
I don't think it requires a userdebug build, since it's part of the functionality required by the CTS and the CTS only fully passes with a user build.
2
2
Replying to
CTS largely operates via adb. There's a whole lot of functionality available in `adb shell` that's largely to support the CTS. So, CTS has access as `adb shell` and as the many apps it installs, including device managers, accessibility services, etc. that it authorizes.
1
2
CTS is kind of unprivileged and does most of the testing via apps, but it also does a whole lot of stuff via `adb shell` that an app could never do, and it uses `adb shell` to install the thousands of different app-based test suites, etc.
1
1
If you look at the CTS modules list, you'll see a lot of modules with the term "Host" in their name, and that means a test suite that operates via `adb shell` and largely does the work on the host running the CTS test harness, not within an app on the device like most tests.
1
1
To fully pass the CTS, you need to have a non-test-key-signed release / user build. Something that amuses me is that the public CTS build published by Google isn't signed with release keys and it gets mad about the apps it sees using the test key that it installed itself.
1
2
Can build it from source and properly sign it or just ignore those couple test failures though.
1
1
grapheneos.org/build#compatib has a quick guide on using their public builds. In the CTS test harness, `run cts --skip-device-info --module CtsBackupTestCases` will run the backup tests.
Those definitely pass on a user build and it does backups/restores via LocalTransport.
Replying to
right, I'm reading the CTS sources right now but so far I don't understand how it actually pulls/pushes the data
1
Replying to
I think it's a set of app-based test suites that are installed and run on the device rather than host tests, and it just triggers LocalTransport via adb and then does most of the work via the code running on the device. I'm normally just running the CTS tests, not writing them.
1
Show replies

