Ubuntu touch with threema on anbox: Where are the files?

Hi!
I’ve just changed to Ubuntu Touch, my phone runs on ubuntu touch 16.04, 2019-W41/2), and I would like to keep threema. With Anbox (installed via ubuntu and adb, see Android apps - UBports documentation ) I was able to install Threema, but had problems installing a backup from the Threema Safe server. My contacts reappeared, but the chats and pictures were gone. I have another backup-zip, but I can’t find a way to copy it into the anbox filesystem to re-import it from within Threema.

Can anybody tell me where I could put the zip archive? An android file manager installed within the anbox container shows new backup zips in /root/sdcard/Threema/Backups, but from the “outside” I can’t even locate those files.
I can’t change the directory where to put the threema backups either; Threema tells me the go to file:///storage/emulated/0/Threema/Backups, but I can’ find that either.

a bit at a loss –

so long
hank

It’s a bit complicated and I haven’t done it in quite a while. Looking at UBPorts 16.04 updates + feature tests I had a way to access the anbox files from UT via

mkdir -p /home/phablet/AnboxHome
sudo chmod -R 777 /home/phablet/anbox-data/data/media/0
sudo mount --bind /home/phablet/anbox-data/data/media/0 /home/phablet/AnboxHome

If I remember correctly that didn’t mean you could copy files to /home/phablet/AnboxHome, just read from there.

Probably it’s sufficient to copy files to /home/phablet/anbox-data/data but IIRC that requires sudo. And I don’t remember where the files show up when using the file manager in anbox.

And maybe it’s a good idea to check this topic in the UBPorts forum: https://forums.ubports.com/topic/1676/development-testers-for-anbox

1 Like

Thanks for your answer, I’ll give it a try. I had seen those posts, but on my installation the anbox-data/data/ directory is empty, no /media/0/, nor anything else, especially no threema backup zips. It should be quite easy to push some files into that folder. I’ll try my luck and keep searching :confused:

so long

It’s probably a rights issue. I have a vague recollection that this way was a little like navigating blindly.

In principle I would assume you’d get faster results from asking in the UT community. That anbox thing doesn’t sound FP2 specific to me. But if you get some answers there and things work, it would be nice if you left a small summary here.

Ok, it is almost exactly as you wrote. I was able to copy the threema zip to /home/phablet/anbox-data/data/media/0/Threema/Backups/. No need to use the steps with chmod or bind; I just copied the zip to /home/phablet/Downloads

from my computer (Ubuntu), an did

sudo cp /home/phablet/Downloads/threema-backup.XXX.zip /home/phablet/anbox-data/data/media/0/Threema/Backups/

Afterwards Threema was able to locate the zip, and I was able to reinstall my chats, contacts, ID etc.
Strangely enough, the UT file manager does not show /media/0/. But it is possible to push files into the anbox container in this way.

Thanks a lot!

1 Like

Hello Heinrich,
when trying to install anbox on Fairphone 2(“anbox-tool install” over adb), I get the message “fp2 not supported (yet)”

How did you manage to install anbox on your device?

Thanks in advance!

P.S. Ubuntu Touch OTA11, following the guideline for anbox installation which you shared.

The same question was asked in the UT forum: https://forums.ubports.com/topic/3968/anbox-not-supported-on-fp2?_=1584875259296

Looks like a recent change to the anbox-tool broke the support for FP2 :frowning:

New issue is here: https://github.com/ubports/anbox/issues/39

2 Likes

Thanks for the Update Ingo.

Should be fixed by now, Anbox is working “fine” (well, with an occasional need to toggle it on and of…) on my Fairphone2, rc-version 69.

Hello Heinrich,

now anbox accepts fp2 for installation (the error message “…not supported(yet)” doesn’t come up anymore, however after restart the phone is stuck in boot.

Did you deviate in any way from this installation procedure you posted: http://docs.ubports.com/en/latest/userguide/dailyuse/anbox.html

Thanks in advance,
Fabian

Ooops, no, I installed it just the way described there.

But I just noticed that I didn’t reinstall Anbox for some time now, I only did an upgrade lately, when Anbox didn’t want to start after the last rc-channel-update two days ago, using anbox-tool upgrade

If the Phone won’t start at all, you should probably try a reflash using the UBports Installer, but don’t wipe your personal data/userdata. Anbox will be gone afterwards, and you could try anew… Which channel are you using? The fix has not yet reached stable; but perhaps the bug hasn’t, either.

Hello Heinrich,

i was using ubports installer 0.4.18 to install UT 16.04/stable.
The re-installation of UT was successfull, I still have the apps and data from before.

I tried to reinstall Anbox, every step of the installation manual was working, except there was no success message after anbox was 100% installed.
When i checked the phone, there was an anbox window, with an activity indicator running as if something was loading, but that went on forever.

After rebooting from this state I get stuck in the boot screen again…

Hm, I’ve seen that issue on the UBports forum, too, but no solution so far. Could you try to switch the channel, using rc instead? Works fairly stable on my Fairphone 2.

Were you able to try an anbox-tool upgrade after the installation? Perhaps that would help, but it’s just guessing; I really don’t know what is causing this.

0.4.18 is the most recent version, I used 0.4.14 beta, but that should not make much of a difference…

Hi Heinrich,

I used the rc channel of UT16.04, then same Anbox installation procedure as in the link you provided, now it works!!
Thanks very much for the tips.

So in summary:
FP2 + UT16.04/rc + Anbox Install from Here:
http://docs.ubports.com/en/latest/userguide/dailyuse/anbox.html
—> works

Now I can try restoring Threema as well…:slight_smile:

Thanks again for your help.

Did you wipe yor data? My android apps survived every reinstall of Anbox, so far; just wondering why you have to restore Threema.

Hello Heinrich,
I switched from Fairphone 1 to FP2 and installed Ubuntu Touch right away. I wasn’t aware that you can install UT on top of the setup Android phone, install UT and keep the installed Apps.

Ok, some misunderstanding here. I thought you had UT already installed, and Anbox, too. You can’t keep Android Apps when changing to UT…

1 Like

Hello Heinrich,

sorry to bother you again but did Threema work without problems after the restore of your backup? I did the same (restore from .zip as described above), but I don’t seem to get any messages, neither receiving any.

Hi!

I was able to restore Threema from a backup; but I don’t recall if the backup worked as expected :frowning:

Reason: I opened up a new account on the UT device pretty soon, since I wanted to continue to use the instance installed on my other Android fairphone. You can’t use the same instance on different devices; so I did a complete threema reinstall, and then opened a “group chat” which includes both Threema instances (UT and Android f airphone ) and a “third” person to “sync” the chats, or at least the new entries with the other person.

You have to activate “polling” in the threema settings, since the push-notifications don’t work without google play store etc on Anbox, which doesn’t work, as far as I know. MicroG isn’t an option either, since you can’t “root” Anbox.

It is hidden in “About Threema”, -> “Error handling” or “Bugs” (don’t know for sure, in german it is “Fehlerbehebung”, it’s the last entry in “About Threema”) and there “Workarounds” -> “Polling”

Threema on Anbox is not very comfortable to use, it is reacting rather slow, you can’t use the camera (so you can’t read QR codes to verify users), or the microphone, (no calls possible!), or play videos someone send, so be warned… It crashes everytime you try to open “help”, very convenient indeed :grimacing:

Thanks for the hint Heinrich,

after reinstallation of Threema and setting up a new account it works. Maybe trying to use the same account as on android broke it…