-
Notifications
You must be signed in to change notification settings - Fork 0
Home
For users that don't have root access to their device, there seems to be no good way to copy the existing data. You'll have to create an OPML export with the old app and import it into the new app. That will give you all your podcasts, but will not retain settings, playlists and listened episodes. Sadly there is a bug in the original uPod that prevents exporting on devices that run Android 7 and newer. Thanks to the fucked up state of the Android ecosystem you could be among the lucky 50% of users running a version that old. Although I generally wouldn't call that luck. Anyway, for those people there is currently no way to switch. But there might be a new hope: I just saw that uPod adds the whole database into diagnostic reports. So there might be a simplish way to import from all devices. I'll have a look into that.
If you have root access to your device and have used a shell before there is an advanced way to "import" your existing settings, playlists, etc. I would not recommend using this, it's better to use a clean import of the OPML like described above, but if you have lots of podcasts and per-podcast settings, like I have, then it'll save quite some time setting up the new application.
For this you need to install the new upod alongside the old upod. Start the new upod, select "I'm new to uPod" and go through the initialisation steps to give access to the SD-card. Once you see the familiar menu you can start an adb shell or possibly other shells (termux?) as well and run the following code. This will copy the raw databases and settings file from the old installation. General advice: never copy&paste code directly from a webpage into a terminal, it could contain command that are invisible on a webpage. Copy to an editor first and check what that code is going to do. That being said, here is the code you have been waiting for :)
su
set -e
SD_DATA=/sdcard/Android/data
DATA_DATA=/data/data
OLD_UPOD_APP=mobi.upod.app
NEW_UPOD_APP=de.wcht.upod
NEW_UPOD_USER=`stat -c %U ${DATA_DATA}/${NEW_UPOD_APP}/`
am force-stop ${OLD_UPOD_APP}
am force-stop ${NEW_UPOD_APP}
mkdir -p ${DATA_DATA}/${NEW_UPOD_APP}/shared_prefs/ ${DATA_DATA}/${NEW_UPOD_APP}/databases/
for file in evernote_jobs.db{,-journal} upod{,-journal}; do cat ${DATA_DATA}/${OLD_UPOD_APP}/databases/${file} > ${DATA_DATA}/${NEW_UPOD_APP}/databases/${file}; done
for file in {device,evernote_jobs,tips,_has_set_default_values}; do cat ${DATA_DATA}/${OLD_UPOD_APP}/shared_prefs/${file}.xml > ${DATA_DATA}/${NEW_UPOD_APP}/shared_prefs/${file}; done
cat ${DATA_DATA}/${OLD_UPOD_APP}/shared_prefs/${OLD_UPOD_APP}_preferences.xml > ${DATA_DATA}/${NEW_UPOD_APP}/shared_prefs/${NEW_UPOD_APP}_preferences.xml
rm -rf ${SD_DATA}/${NEW_UPOD_APP}
cp -ra ${SD_DATA}/${OLD_UPOD_APP} ${SD_DATA}/${NEW_UPOD_APP}
chown -R ${NEW_UPOD_USER}:${NEW_UPOD_USER} ${DATA_DATA}/${NEW_UPOD_APP}/databases ${DATA_DATA}/${NEW_UPOD_APP}/shared_prefs
chown -R ${NEW_UPOD_USER} ${SD_DATA}/${NEW_UPOD_APP}
Note: This code uses "cat" to copy the /data/data files into the existing files. I tried to use cp, but the app was not able to open the resulting files despite having the correct user. This is also the reason why you need to start the new app once to create those files