Import from authy fails
Version
2.1.2
Source
F-Droid
Vault encryption
Yes (with biometric unlock)
Device
Oneplus 3t
Android version
Android 11
ROM
Havoc OS 4.19
Steps to reproduce
On a rooted phone with authy installed and 2fa codes in it, open aegis, go to settings and then import from app. When authy is selected and ok is pressed, it will give an error message and in more details it will show:
com.beemdevelopment.aegis.importers.DatabaseImporterException: java.io.FileNotFoundException: No such file or directory: /data/user/0/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml
What do you expect to happen?
It to import the 2fa codes from authy
What happens instead?
It fails to find the file the tokens are stored in
Log
No response
I'm using Lineage 19.1 (freshly installed, rooted with Magisk), and I encountered the exact same problem. Microsoft Authenticator imported seamlessly, for reference.
I haven't taken a look at this yet, but if you guys indeed have Authy installed, are logged into the app and that file doesn't exist.. It may mean that Authy now stores everything in a different file and perhaps in a different format as well. This'll require a bit of investigation.
Can confirm I did have Authy installed, logged into it, and couldn't import into Aegis, with the same error as the OP. As a temporary solution, I used this guide to export my 2FA codes, and successfully imported them into Aegis.
Can confirm that the import does not work. I managed to manually navigate to /data/data/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml using a file explorer that allows root access to the storage. Looks like the file is still in the same path, but the one aegis uses is incorrect. Surprisingly when I try to import an Authy file manually via the Import from file option, the correct path is displayed.
Edit:
A quick look into the code shows that the man.getApplicationInfo(pkgName, 0).dataDir call returns a wrong path. Maybe this is a OnePlus specific issue since the returned path should normaly be the correct one.
@Trup3s
A quick look into the code shows that the
man.getApplicationInfo(pkgName, 0).dataDircall returns a wrong path.
What does it return?
@alexbakker
I did not test or debug this, so maybe my assumption was wrong, but the error message states that it could not find a file under data/user/0/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml. A quick check showed that there is no authy directory under data/user/0/, but I could find one under /data/data/. Therefore I concluded that man.getApplicationInfo(pkgName, 0).dataDir returned the wrong path.
i had the same problem as the OP but my experience was a little different than @Trup3s. /data/user/0/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml and /data/data/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml both exist on my phone and they're identical. when i tried to import from authy, aegis said that i needed the xml from /data/user/0 but when i tried to import from a file, aegis pointed me to the xml from /data/data. when i tried to import from a file, i used root explorer to get to the xml in /data/data but when i selected it, i got a message saying that the file was not readable by non-root apps. but i had granted aegis root access. the permissions on both xml files are 660.
i ended up copying one of the xml files to my internal sdcard and pointing aegis to that and it worked.
my phone is a oneplus 7 pro running oxygen os 11.0.9.1.GM21AA. android version 11. it's rooted with magisk 25.2 with zygisk and ramdisk enabled. i'm running aegis 2.1.3 downloaded from google play with biometric unlock for my vault. the version of authy i have is 24.11.0.
Just adding that I have the same issue on my Google Pixel 7 on Android 13. However, my previous phone and the one I imported the Android backup was a OnePlus Nord CE 5G with Oxygen OS 12, in case that matters.
Can confirm the file exists

And the error is also the same
com.beemdevelopment.aegis.importers.DatabaseImporterException: java.io.FileNotFoundException: No such file or directory: /data/user/0/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml
Same problem here. This quite simple workaround solved it for me:
- Use a root explorer (I used MiXPlorer) to navigate to /data/user/0/com.authy.authy/shared_prefs
- Copy 'com.authy.storage.tokens.authenticator.xml' to a non-root location (eg. Download folder)
- In Aegis, go to Settings > Import & Export > Import from file > Authy > OK
- Select the copied 'com.authy.storage.tokens.authenticator.xml' and choose which 2FA accounts to import
- Profit 😎
I also had this problem. It is weird that Authy “does no find” the file when root access is granted and the same file can be verified to exist e.g. via Termux. I wonder if there’s some SELinux shenanigans going on. I’m using Magisk 26.1 and Android 13.
I was able to work around the problem by importing via a file, as suggested in the post above.
Same, here. Galaxy S21 Ultra rooted with Magisk and cannot import from Authy.
The error i got when i try to import Authy tokens to Aegis:
com.beemdevelopment.aegis.importers.DatabaseImporterException: java.io.FileNotFoundException: No such file or directory: /data/user/0/com.authy.authy/shared_prefs/com.authy.storage.tokens.authenticator.xml
Same problem here. This quite simple workaround solved it for me:
1. Use a root explorer (I used [MiXPlorer](https://forum.xda-developers.com/t/app-2-2-mixplorer-v6-x-released-fully-featured-file-manager.1523691/)) to navigate to /data/user/0/com.authy.authy/shared_prefs 2. Copy 'com.authy.storage.tokens.authenticator.xml' to a non-root location (eg. Download folder) 3. In Aegis, go to Settings > Import & Export > Import from file > Authy > OK 4. Select the copied 'com.authy.storage.tokens.authenticator.xml' and choose which 2FA accounts to import 5. Profit 😎
Oh, it works fine! Thanks for the tip ^^
I managed to solve this problem by changing Magisk mount settings to Global Namespace, as explained here.
I stumbled upon this while trying to copy the com.authy.storage.tokens.authenticator.xml and not understanding why my file explorer couldn't see anything in /data/user/0/.
We do actually request the root shell to be run in the global mount namespace:
https://github.com/beemdevelopment/Aegis/blob/224ec2553c1d2d0c6bec4236c464bc132b426581/app/src/main/java/com/beemdevelopment/aegis/ui/tasks/RootShellTask.java#L18-L19
So I'm not sure what we could be doing wrong here.
Oh, I see: #1278.