I want to reinstall the OS on my OnePlus
phone running Android 12
. Before I do that I would like to backup some of my apps which don't store their data in the cloud. The phone is not rooted
, so I have tried using Helium
which is apparently dead, but I still tried it. While trying to enable it I found that my phone wasn't recognized by adb as a device, but this was fixed by adding the backup password, but the app just crashes when trying to backup briefly displaying this:
As you can see it also clicks on the "set password" option which just opens desktop. The funny thing is: I don't think I can disable the password now, so...
So after this didn't work I tried looking into backing up with ADB
in PowerShell
on my Windows 11
pc, but It seems to have issues with doing backups.
To list the files I just do: adb shell pm list packages -f -3
Let's say that out of those I would like to backup this one:
package:/data/app/~~yCw1hZQNzK2LConsvhuejg==/com.rovio.BadPiggiesHD-pMe0TFd1aaE5-WduzwZ1Zw==/base.apk=com.rovio.BadPiggiesHD
It pulls the .apk
file no problem with this command:
adb pull "/data/app/~~yCw1hZQNzK2LConsvhuejg==/com.rovio.BadPiggiesHD-pMe0TFd1aaE5-WduzwZ1Zw==/base.apk" ".\BP.apk"
Although, a little suspicious that it is only 58MB when it should be more like 170.
But trying to make a backup with this line:
adb backup "/data/app/~~yCw1hZQNzK2LConsvhuejg==/com.rovio.BadPiggiesHD-pMe0TFd1aaE5-WduzwZ1Zw==/base.apk=com.rovio.BadPiggiesHD"
generates an empty backup.ab
file (literally 0B) even if I pass just com.rovio.BadPiggiesHD
as an argument.
I have also tried using the advice from this post and adding quotes around the arguments, so ideally it I want something like this since I need both an apk and data:
adb backup "-apk com.rovio.BadPiggiesHD -f C:\Users\name\Desktop\app_backups\
But this just spits out Now unlock your device and confirm the backup operation.
and stops instantly without doing anything.
I have even tried:
adb backup "-apk -shared -all -f C:\Users\name\Desktop\app_backups\full_backup.ab"
I don't need all apps, but this generates an empty file too.
What is the cause of this issue? I am at a loss since there are no error messages.
bu
is fine since It outputs the manual as it should no problem. And the app in question was released in 2012, so I doubt it was made for android 12+ :). Also, are you saying that there is basically no way to backup data on 12+ and if you need to switch to another phone or reset the current one you just lose all of your in-app data? There must be another way, right? – user9102437 Jan 18 '24 at 11:39allowBackup=false
in AndroidManifest.xml) so no matter which backup or migration technique you try you will loose most app data when reinstalling the phone or moving to a new one. – Robert Jan 18 '24 at 17:37base.apk
forcom.rovio.BadPiggiesHD
and actually inAndroidManifest.xml
it clearly states<application android:allowBackup="true"
but the file size is still 0... Could it be an issue with PowerShell maybe? I have redownloaded the sdk from the official site and tried using cmd too to no avail. – user9102437 Jan 20 '24 at 11:58adb logcat > log.txt
to find what was going on and found this:BackupManagerService: Backup password mismatch; aborting
. So this whole time my phone was asking for a password and I just didn't see it. I was just pressing "Allow backup" and since now I have set the password, leaving the field blank no longer works... Now the file is full of data) Hopefully, it will be able to restore from this. I will check this. – user9102437 Jan 20 '24 at 12:14