[Android Q&A, Help & Troubleshooting] Andy-in-NH:
Hi folks, I am a computer programmer, but NOT for Android. So although I've used adb on my Linux box before to install different Android images onto my phone, I have only a shallow understanding of how Android actually works. I'm hoping you can give me advice...

Short version of the question:

By default, the Minecraft android app stores its user game data ("worlds") in Android "App-specific storage". How can I backup that user data, and move it to a new device? The best online resources I could find recommend copying the data via "adb backup", something like so:

adb shell pm path com.mojang.minecraftpe
adb shell am force-stop com.mojang.minecraftpe
adb shell am start com.mojang.minecraftpe/.MainActivity
adb backup -noapk com.mojang.minecraftpe
java -jar abe.jar unpack backup.ab mc.tar

However, when I do that, the output "backup.ab" file is tiny, only 47 bytes long. Clearly it is NOT finding any of the actual data (many MBs) in the com.mojang.minecraftpe App-specific storage. Am I doing something wrong? How else should I try to get a copy of that data?

I've never rooted a phone, and I don't know if rooting would help with this problem or not.

Long version of the question:

My kids are big fans of Minecraft Bedrock Edition (aka Pocket Edition), which they play on their Android devices, currently older Google Pixel 3a phones running stock Android 11. They have created dozens of Minecraft worlds on their phones, using the default settings the app came with.

The Minecraft app, as I recently learned, has TWO choices for where it stores the user's worlds. This this its "File Storage Location" setting, which is global for the whole app. The choices are either "External" or "Application". Now, if you choose External BEFORE creating any worlds, all should be well, your data is stored in a normal folder and to backup, you simply copy the files off the phone the normal way.

But in Minecraft, the default File Storage Location is "Application", which is what Android calls "App-specific storage":

https://developer.android.com/training/data-storage

Worse, once you have world data saved in the App-specific storage, the Minecraft app gives you NO WAY to copy it anywhere else! Really, no joke. When you upgrade to a newer phone, and connect your two phones with a USB cable, the normal Android "Copy Apps and Data" process does NOT copy ANY of the Minecraft game worlds the user created! So Mojang/Microsoft, in their wisdom, have made it essentially IMPOSSIBLE for anyone to backup their own game data, or to move it to a newer device, if you used the default File Storage Location = "Application".

I see that Android includes standard APIs for backing up and restoring user data, but apparently Minecraft never uses any of that:

https://developer.android.com/guide/topics/data/backup

In older versions of the Minecraft app, there was a UI widget to change the storage location of individual worlds, one at time. But at least as of Minecraft version 1.19.71.02, that no longer exists. Mojang silently removed it at some point, probably long ago. Mojang's bug tracker has lots of user-entered bugs about this (often confusingly written), but they seem to have no intention of ever doing anything to fix the problem. E.g.:

https://bugs.mojang.com/browse/MCPE-136918

There is no 'File storage location' option in my game

Mojang officially supports only ONE way of moving those worlds to a new device. Basically, paying them a monthly subscription to their "Realms" servers, uplading each of your worlds to a Realm server, and then downloading each one to your new device. This may be the way to go but I have not tried it yet:

https://help.minecraft.net/hc/en-us/articles/4409165790605#h_01FG9YRQBDPNJ8JYNKVGXK04FX

Managing Data and Game Storage in Minecraft

I've tried using "adb backup -noapk com.mojang.minecraftpe" to copy the data (see above), but it never works for me. I'm doing this on Linux, Ubuntu 22.04.2 LTS (jammy), which reports:

$ adb --version

Android Debug Bridge version 1.0.41

Version 28.0.2-debian

Installed as /usr/lib/android-sdk/platform-tools/adb

I don't know if I'm doing something wrong with adb, something has changed in Android such that this can no longer work correctly, what.

Do you have any advice on what else I should try to copy the data?

Thanks for your help!