RetroArch
RetroArch copied to clipboard
Cloud Sync WebDAV Support for Android
First and foremost consider this:
- Only RetroArch bugs should be filed here. Not core bugs or game bugs
- This is not a forum or a help section, this is strictly developer oriented
Description
- On iOS/TVOS platforms, an additional setting for Cloud Sync exists
- On Android and possibly other platforms these configuration options are missing
- I play my games on AppleTV and see the save has synced successfully to my WebDAV share, but then have to run another program (Folder Sync) manually on my Android phone to keep these saves synced up to my share.
- Ideally both platforms could have this functionality built in.
Expected behavior
- I would expect interfacing with a WebDAV share would work fairly similarly. However I'm unaware of the potential challenges to port this to other platforms. (Though I did read a more generic bounty issue for some universal cloud support earlier)
Actual behavior
- Options do not exist on Android, as well as potentially other platforms.
Steps to reproduce the bug
- Go to Settings
- Go to Saving
- See that Cloud Sync is not at the end of the list (It would be on AppleTV)
Bisect Results
- Feature just missing
Version/Commit
- RetroArch: 1.19.1
Environment information
- OS: Android
In addition to what I've stated above, my Apple TV's last modified date for all save/savestate files is +4 hours from Eastern even though my phone and ATV are configured the same (is this UTC possibly?)
So my third party app (FolderSync) cannot properly identify which file is newer. As a result, I am one save behind or 4 hours delayed before syncing correctly. To be honest, the easiest approach is to just cut out the middleman however I'm curious if there is a underlying timing issue on ATV or a configuration issue on my end...
Screenshot attached of my ATV save synced down, and my local Android save now taking an "older" yet true, modified date due to this discrepancy.
It should be there now, you can try to download the build artifact from the PR ( https://github.com/libretro/RetroArch/actions/runs/11086458531?pr=17060 ). Android does not have SSL enabled, so WebDav will only work over plain HTTP for this platform
@KiralyCraft Nice work on getting WebDav in there! Played around with this a bit and really like how far it's come. Do you know what's needed to get SSL going in Android?
Just adding that this is completely useless for me without SSL support. Please support SSL when you get this feature added.
Oopsie - Looks like I missed notifications. Building OpenSSL intro Android is feasible, however due to lack of time I could not also add this. I use RetroArch with a VPN to overcome this issue.
I'd have to see what is the general recommendation for bundling OpenSSL into Android apps, as this platform is not my particular cup of tea. There has been some debate regarding bundling heavy dependencies on embedded platforms, so probably this postponed the implementation as well;
I'll look into this as soon as I get some free time, but unfortunately it doesn't seem to be happening soon.
Oopsie - Looks like I missed notifications. Building OpenSSL intro Android is feasible, however due to lack of time I could not also add this. I use RetroArch with a VPN to overcome this issue.
I'd have to see what is the general recommendation for bundling OpenSSL into Android apps, as this platform is not my particular cup of tea. There has been some debate regarding bundling heavy dependencies on embedded platforms, so probably this postponed the implementation as well;
I'll look into this as soon as I get some free time, but unfortunately it doesn't seem to be happening soon.
What are you using to provide the WebDAV implementation? According to AI, SSL is built into android. Here is an excerpt for instructions on adding cloud sync
- Use HttpURLConnection or HttpsURLConnection for network requests.
- Implement your API calls to perform authentication and file transfers (e.g., upload/download).
- Use Android's TrustManager for SSL certificate verification (default behavior is secure for HTTPS).
I don't know if that is Java or Kotlin, as these are not my primary language, and android is not a platform I develop on.
Unfortunately it's native C code that requires SSL, the WebDav library comes from the native part of RetroArch: https://github.com/libretro/RetroArch/pull/15548
Does that mean that libcurl is not available on android, or that it is not compiled with SSL support on android?
Does that mean that libcurl is not available on android, or that it is not compiled with SSL support on android?
More complicated than that, retroarch does not use curl, it uses its own custom http client.
@KiralyCraft Have you played around at all with the builtin mbed-tls integration? It's what's used on iOS. -DHAVE_BUILTINMBEDTLS -DHAVE_SSL
I think I have, although i'm yet to test it again. I remember hitting a roadblock, but will look into this asap, as soon as I get some time for this. Sorry for the wait :)
I only get the error "[CloudSync] could not begin" in the log, even with debug log enabled. I assume that I have this issue described here, as my server is only accessible via https. If someone still works on that a more appropriate error message would be helpful, that saves people like me the research time what could be wrong. Thanks for all the work!
How can I find out what version this will be in, and how to find it in the UI?
I'm not sure exactly which question you're asking, but if it's enabled, you'll see it in the main menu > information > system information, at the very bottom should be SSL Support: Yes. If you don't see that (or if it says No) then it doesn't have it.
Sorry, my bad. The issue title says Cloud Sync WebDAV Support for Android. This issue was closed as "completed", so I was wondering when the cloud sync ability for Android would be released to an installable version (i.e., F-droid).
Stable releases don't happen on a schedule so I can't say exactly when. You can install a nightly build now and test it out, https://buildbot.libretro.com/nightly/android/. I'm not sure on android if there's an equivalent to the nightly build that's put on the stores? On iOS the TestFlight is the nightly build of the App Store version.
I'm not sure exactly which question you're asking, but if it's enabled, you'll see it in the main menu > information > system information, at the very bottom should be
SSL Support: Yes. If you don't see that (or if it says No) then it doesn't have it.
I don't understand. Should SSL support be at the operating system level? Which version of Android supports this?
Should SSL support be at the operating system level?
No. RetroArch has its own built in SSL library, it doesn't matter if the OS does or not, it won't use it if it has it anyway.
I downloaded RetroArch.apk from https://buildbot.libretro.com/nightly/android/ and put it on my Retroid. Then in the Main Menu > Information, System Information, at the top of the screen I see:
The important bit there is the Build Date, which is today. Please also note the Git Version here.
And at the bottom I see:
The important bit is the SSL Support should be Yes. If that's not what you see, please let me know what the Git Version you see is.
Stable releases don't happen on a schedule so I can't say exactly when. You can install a nightly build now and test it out, https://buildbot.libretro.com/nightly/android/. I'm not sure on android if there's an equivalent to the nightly build that's put on the stores? On iOS the TestFlight is the nightly build of the App Store version.
There is not an equivalent to nightly on the stores, in fact, the store versions are out of date compared to the normal Stable build too!