blake502 / balatro-mobile-maker

Create a mobile Balatro app from your Steam version of Balatro
270 stars 21 forks source link

Add SAF support on Android #56

Open Enderteck opened 3 weeks ago

Enderteck commented 3 weeks ago

Could it be possible to add SAF support to the app to be able to change savefiles on device or from files on a computer ?

This should be possible like discussed in this similar project (python alternative to this project):

https://github.com/antipatico/balatromobile/issues/4

Here is the modified love-android version to use to get SAF/on device access to the game files:

https://github.com/antipatico/love-android

Not 100% sure this is doable but it would be amazing for file transfer.

blake502 commented 3 weeks ago

I'll consider this for sure. I'm not 100% convinced to use an unofficial Love build, although this does seem like a massive convenience for end users.

Thanks for the info.

CUexter commented 3 weeks ago

im looking forward to this, unfortunately the gradlew doesn't build but instead show depreciation error

antipatico commented 3 weeks ago

@CUexter I fixed that error, unfortunately by default the GitHub CI/CD does not build the embedded norecord release version. Thus, I manually compiled it. You can find it here.

To make it work, the external storage patch must be enabled (thus breaking the automated scripts to backup and restore the save data that you have in place now).

It should be possible to edit the default implementation to make it work without the external-storage patch, but I did not look into it too much.

You can find a video of how the patch works here: Video tut

blake502 commented 2 weeks ago

@Enderteck Until I take the time to dive a littler deeper into this topic, you can certainly download @antipatico's pre-built APK, and use it to replace the love-2d APK that my tool automatically downloads. As long as the name is exactly the same, the tool should use that as a base to build the app instead.

Enderteck commented 2 weeks ago

Ok thanks for the info !

kletellier commented 2 weeks ago

@Enderteck Until I take the time to dive a littler deeper into this topic, you can certainly download @antipatico's pre-built APK, and use it to replace the love-2d APK that my tool automatically downloads. As long as the name is exactly the same, the tool should use that as a base to build the app instead.

it works, you need also to change the apk patch and amend the manifest.xml inside

Enderteck commented 2 weeks ago

it works, you need also to change the apk patch and amend the manifest.xml inside

Ok you gotta give me better instructions than than this is not English to me 😭.

kletellier commented 2 weeks ago

here is my diff : image

you can download the apk-patch.zip here with the updated manifest.xml => https://www.kletellier.ovh/Balatro-APK-Patch.zip

and change the constant Love2dApkLink to antipatico apk embed url from https://www.kletellier.ovh/love-11.5-SAF-android-embed.apk to https://github.com/antipatico/balatromobile/blob/d0821ff1775ef9dbba30c4c0e68b005f06757fd9/balatromobile/artifacts/love-11.5-SAF-android-embed.apk

CUexter commented 2 weeks ago

Bruh i did it, but now i also want to know how to sync save using command line now... How do i get the best of both world ?