We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

How can I migrate Android app, data and settings to Sailfish X?

asked 2017-11-08 13:33:16 +0200

hammerhead gravatar image

Taking WhatsApp as an example, which files from an existing Android device would I have to copy where on the Sailfish X in order to retain all settings and contents?

edit retag flag offensive close delete

Comments

In case of Whatsapp, you have to backup your chat history to a file and transfer that to your Xperia X before starting Whatsapp for the first time. The process is described in the Whatsapp FAQs.

The fact that Whatsapp has inbuilt backup/restore functions indicates that every Android app is responsible for their own data and settings.

ziellos ( 2017-11-08 15:14:08 +0200 )edit

For whatsapp, before running it on the Xperia, do that on your current phone (install Android Support on Xperia first):

scp -r ~/android_storage/WhatsApp nemo@<xperia_ip_address>:~/android_storage/

For the rest, you shouldn't use too much Android apps so just move on to Sailfish apps ;)

Sthocs ( 2017-11-09 11:11:23 +0200 )edit

Whatsapp backup on Google drive is not reliable, copy and paste your local backup works better. Nemo/android_storage/WhatsApp/Databases/msgstore.db.cypt12 However, image files are not stored in that backup file.

danfin ( 2017-11-09 11:15:37 +0200 )edit

i have copied the back up files from my android phone to Xperia XA2 ultra and able to restore the backup. but i am not able to download any media file after that. has someone else faced same issue?

bane07 ( 2020-06-21 09:29:11 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2017-11-09 11:01:24 +0200

DarkStarSword gravatar image

I copied settings for a few apps by copying the /opt/alien/data/data/com.xxx.yyy directory and fixing the permissions like so (using iMoodJournal as an example here):

  1. On source phone in the terminal:
    $ devel-su
    # cd /opt/alien/data/data
    # tar cvf ~nemo/moodjournal.tar com.inexika.imood
    
  2. Transfer tarball to destination phone via your preferred method (e.g.settings->storage->user data->pully menu->file manager->long tap on tarball->share->bluetooth)
  3. Run the app on the destination phone once, then close it (necessary to create the data directory for that app)
  4. On destination phone in the terminal:
    $ devel-su
    # cd /opt/alien/data/data
    # ls -l
    
  5. Note down the user ID of the app's data directory. In the below example I'm using 10042, but this will vary, so adjust accordingly:
  6. Unpack the data directory and fix the ownership:
    # tar xvf ~nemo/moodjournal.tar
    # chown -R 10042.10042 com.inexika.imood
    

Depending on the app there might be some more data you need to copy (e.g. ~/android_storage), but I've tried to avoid becoming an expert at Android, so I'm only figuring this out as I go ;-)

edit flag offensive delete publish link more

Comments

/opt/alien/data/data/ does not exist, I guess you mean /data/data/

Sebix ( 2019-03-04 15:02:38 +0200 )edit
0

answered 2020-06-18 11:01:37 +0200

aerique gravatar image

I just migrated my WhatsApp data from Android to SFOS but while I will list what I think are the steps below, there may be unnecessary steps or the order of some could be wrong. I'm not going to try it again since I'm happy I managed to do it once. Still perhaps the next victim could improve the steps:

  • make sure Alien Dalvik Control from OpenRepos is installed
  • copy android:Internal Storage/WhatsApp to sailfishos:~/android_storage/WhatsApp as mentioned above
  • leave only the Databases and Media directories in the WhatsApp folder, delete all others (should only be Backups?)
  • make sure the file permissions are the same as the other directories and files in ~/android_storage
  • make sure the owner and group are the same as the other directories and files in ~/android_storage
  • install WhatsApp, start it and set it up
  • go to the Storage menu in Settings so it asks for storage permissions
  • close WhatsApp
  • go to Android app settings using Alien Dalvik Control
  • clear Data in storage settings
  • give storage permissions in app permissions
  • start WhatsApp again, set it up and hopefully it finds your backup
edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2017-11-08 13:33:16 +0200

Seen: 1,829 times

Last updated: Jun 18 '20