Android + NextCloud sync

MMEX4Android: Manage your finances on-the-go, encrypted for security, sync via your own cloud

Moderator: Renato

Post Reply
guanlisheng
Developer
Posts: 382
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Android + NextCloud sync

Post by guanlisheng »

@Bingbong26 , let's use this thread, would you provide some more details, e.g. screenshot or error message


viewtopic.php?p=24479#p24479
Lisheng Guan,
Developer of MoneyManagerEX (http://moneymanagerex.org)
guanlisheng
Developer
Posts: 382
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Re: Android + NextCloud sync

Post by guanlisheng »

@dbolton , seems you have a very similar issue on opening file from NextCloud
Lisheng Guan,
Developer of MoneyManagerEX (http://moneymanagerex.org)
guanlisheng
Developer
Posts: 382
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Re: Android + NextCloud sync

Post by guanlisheng »

@dbolton , and @Bingbong26

do you understand the issue mentioned here https://docs.nextcloud.com/server/lates ... _sync.html
Unfortunately, 2-way-sync, a.k.a bidirectional sync, isn’t fully implemented in the Android client yet.
Lisheng Guan,
Developer of MoneyManagerEX (http://moneymanagerex.org)
Bingbong26
New User
Posts: 13
Joined: Sun Dec 03, 2023 5:35 pm
Are you a spam bot?: No

Re: Android + NextCloud sync

Post by Bingbong26 »

I could provide some info tonight comparing the phones behaviors and providing screenshots. However her pixel 6a will be in tonight and I've got to install CalyxOS on it.

Regarding the github issue, that makes sense. I've noticed that if I delete synced pictures, from my gallery app, that it doesn't get reflected in nextcloud.

I wonder how exactly people are using syncthing with nextcloud and mmex?

Regarding the issues opening the database, I've attached two screenshots. 1 is of the main menu, I select open and I see the 2nd screenshot, and I choose nextcloud on the left side, then navigate to the database file and select it. Then it just goes back to screenshot 1 without any message or error.
Attachments
2.png
2.png (29.86 KiB) Viewed 14953 times
1.png
1.png (29.2 KiB) Viewed 14953 times
Bingbong26
New User
Posts: 13
Joined: Sun Dec 03, 2023 5:35 pm
Are you a spam bot?: No

Re: Android + NextCloud sync

Post by Bingbong26 »

So I just deleted all databases locally and on nextcloud and created a new database locally in mmex. And when I try to sync changes it says "invalid remote uri, please reopen database". However I have yet to open the nextcloud database as it doesn't exist. Should I just copy and paste my local database to the nextcloud directory of my choice?
guanlisheng
Developer
Posts: 382
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Re: Android + NextCloud sync

Post by guanlisheng »

Thanks @Bingbong26 for providing the these.

in terms of NextCloud, @dbolton has mentioned that
In the Nextcloud app if you choose Delete > Delete local copy, then the next load works in Money Manager Ex

i am not sure whether NextCoud is eligible.

creating a new database locally in mmex is not working, will hide this option soon. we should always open a database remotely and it should be created by your desktop mmex.

i belive syncthing + android is sufficient and here you go the thread Android + Syncthing.
Lisheng Guan,
Developer of MoneyManagerEX (http://moneymanagerex.org)
dbolton
Super User
Posts: 126
Joined: Fri Jan 03, 2020 3:24 pm
Are you a spam bot?: No
Contact:

Re: Android + NextCloud sync

Post by dbolton »

Nextcloud does not monitor local folders for changes. That's what the issue linked above refers to. However, files opened through remote storage framework should work as expected. For example, I can verify that KeePassDX works and syncs as expected with Nextcloud.

It appears MMEx for Android is doing something a little unusual, since it opens the database when you access it through the remote storage, but fails if Nextcloud happens to have a synced local copy.

Second issue: MMEx for Android crashes if it can't establish a connection with Nextcloud (e.g. airplane mode, and no synced local copy).
dbolton
Super User
Posts: 126
Joined: Fri Jan 03, 2020 3:24 pm
Are you a spam bot?: No
Contact:

Re: Android + NextCloud sync

Post by dbolton »

Today's release with support for the storage access framework (saf) fixed the crashes that prevented money manager ex from working with files stored in Nextcloud!

Note: I had to delete all app data (from previous releases) before the current app worked
ThePixelBug
New User
Posts: 2
Joined: Sat Mar 23, 2024 1:56 pm
Are you a spam bot?: No

Re: Android + NextCloud sync

Post by ThePixelBug »

Hi,
I have some problems with the Nextcloud sync on Android as follows:

1. Installed MMEX on Windows, saved encrypted emb, sync it with NextCloud
2. Installed MMEX on Android, opened synced encrypted emb via NC storage framework -> error (as expected > 128/256 AES issue)
..then
3. On windows saved a new non-encrypted mmb file, synced it, and on Android, when opening, a password prompt appears. Type any password and error "Unable to open DB. Not a mmb file". Now, it asks for a password for ANY file, even for a mmb that was created on the phone without encryption and it generates the same error.
This behavior is persistent even after deinstall / reinstall of the apk.

In the logs, the error that got my untrained attention was that "oney.manager.ex":

Code: Select all

1711200486.901 25714 25714 I auditd : avc=type=1400 audit(0.0:28219): avc: denied { read } for comm="oney.manager.ex" name="u:object_r:userdebug_or_eng_prop:s0" dev="tmpfs" ino=435 scontext=u:r:untrusted_app_30:s0:c3,c257,c512,c768 tcontext=u:object_r:userdebug_or_eng_prop:s0 tclass=file permissive=0 app=com.money.manager.ex
Thank you and you have my total appreciation for this wonderful still evolving project.
Attachments
mmex_logcat.txt
Android 14, GrapheneOS, logcat attached
(21.68 KiB) Downloaded 55 times
guanlisheng
Developer
Posts: 382
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Re: Android + NextCloud sync

Post by guanlisheng »

hi @ThePixelBug , for this particular case, just leave the password blank/empty.

thanks for trying mmex4android, especially for android + nextcloud (private cloud) combo.
if everything goes well, would you write up something to help more guys?
ThePixelBug
New User
Posts: 2
Joined: Sat Mar 23, 2024 1:56 pm
Are you a spam bot?: No

Re: Android + NextCloud sync

Post by ThePixelBug »

guanlisheng wrote: Sat Mar 23, 2024 11:05 pm hi @ThePixelBug , for this particular case, just leave the password blank/empty.
Thanks @guanlisheng , IT WORKED!.

To recap, I have a Windows and an Android MMEX install that I want to sync via Nextcloud via a common database (unencrypted for now for reasons of 256vs128AES encryption in Android vs Windows version of the database). In the future I hope that @guanlisheng will solve this problem.

The Windows MMEX is using the Nextcloud folder created by the NC client for accessing the "data.mmb".
The Android MMEX (after Storage acces permission granted) is using the Storage Framework created by the Nextcloud client to access the same, synchronized "data.mmb".

If someone is using an encrypted "data.emb" for now, the Windows-Android sync is not possible.
If you are using an normal, unencrypted "data.mmb" and the MMEX on Android is still requesting a password, just live the password box empty and use the database without problems.

Hope it will help someone and I will post an update when the problem with the encryption will be solved by our dear @guanlisheng
Post Reply