class AppMetadataBackupWriter {

    public void backupObb(@UserIdInt int userId, PackageInfo packageInfo) {
        // TODO: migrate this to SharedStorageBackup, since AID_SYSTEM doesn't have access to
        // external storage.
        Environment.UserEnvironment userEnv =
                new Environment.UserEnvironment(userId);
        File obbDir = userEnv.buildExternalStorageAppObbDirs(packageInfo.packageName)[0];
        if (obbDir != null) {
            if (MORE_DEBUG) {
                Log.i(TAG, "obb dir: " + obbDir.getAbsolutePath());
            }
            File[] obbFiles = obbDir.listFiles();
            if (obbFiles != null) {
                String obbDirName = obbDir.getAbsolutePath();
                for (File obb : obbFiles) {
                    FullBackup.backupToTar(
                            packageInfo.packageName,
                            FullBackup.OBB_TREE_TOKEN,
                            /* linkDomain */ null,
                            obbDirName,
                            obb.getAbsolutePath(),
                            mOutput);
                }
            }
        }
    }

    public  AppMetadataBackupWriter(FullBackupDataOutput output, PackageManager packageManager);

}