-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix import from MoM 1.9.3 on android #1631
fix import from MoM 1.9.3 on android #1631
Conversation
…d on AssetStudio code.
…d by AssetStudio.
…rdcoding the year
…mport was broken due to the installation paths having changed.
These changes are on top of the previous fixes for importing from official MoM 1.9.3. On Android 11+ cross app data access is restricted so the import fails. The only way I can see around this is the "Hosted file import" idea or having the user copy the data manually using a file browser which has full access to the filesystem. |
Stopped importing assets multiple times.
…com/seinsinnes/valkyrie into dev/FixImportFromMoM_1.9.3onAndroid
…com/seinsinnes/valkyrie into dev/FixImportFromMoM_1.9.3onAndroid
After looking at the Proof of Concept: This is a build with this permission fix: Valkyrie-android-2.5.9d.apk |
Awesome! It would be fantastic if this would really solve the problem. Did you also ensure to catch the case that the user revokes the permission to the folder/cancels giving the permission initially? |
The permission will be requested each time the user clicks import/reimport. Once the import has completed the permission isn't needed anymore. |
Also I've just realised I only implemented the permission request for MoM and I need to implement it for Road to Legend on Android 11+ sigh Android Storage Access Framework and Permissions are kinda painful. Google will probably come up with some new changes that will break things in newer android versions. I note Road to Legend official app isn't even available on android 13 |
Oh I did not know that. So it is not even possible to install it on an Android 13 device? |
Some discussion regarding Road to Legend App on android 13 came up here. It is not working on Android 13 phones with 64Bit only but working on older phones with Android 13. Therefore your fix should work but somebody else will need to verify it once a build would be ready (I currently have not Android 13 device to test this). |
Right. Agreed. I only have an old device that can run android 11 and device (which is too new) that runs android 13 for testing. |
Fix problem permission request sometimes doesn't get registered properly.
Are you trying to import MoM data? I wonder where the data is if not Android/data/com.fantasyflightgames.mom |
If you see DCIM, Downloads, Videos etc. do you also see the Android folder? |
Yes but the I have installed Total Commander App to see if it has the same problem and it does. In total commander (after giving a lot of extra permissions while already running the app) I can go to
Clicking
Edit: The |
We should definitely investigate if clicking the back button in the folder picker dialog can be catched (e.g. show With your new method it would still be possible to copy all necessary files to another folder (e.g. downloads) somehow and then select this available folder in the file picker. |
Yeah, I'll think about a way to catch the back button (/fail gracefully) If you'd be willing I'd be curious to know if you get the same behaviour with MoM. I'm not able to test RtL on my Android 13 device (only on Android 11) but MoM import works on my Android 13 device. Perhaps the access rules for Android/obb (where RtL stores its data) and Android/data (where MoM stores its data) are different. |
Ok, something different between the two devices. But in terms of the file browsers yes this looks exactly the same on my device. The Android/data and Android/obb folders being hidden and/or restricted is what I'm hoping to work around. |
Ok after some more tests I think this is really a device bug because Lenovo might not have correctly implemented this API interface. Seems that no app (I tried with another file explorer app) is able to reach the correct folder but instead always lands in the root folder of the device. |
I've updated the apk so you can choose a different folder in the "Use this folder" dialog when importing. It isn't great since I was trying to remove that kind of manual handling but maybe better than nothing. |
Unfortunate if it is just down to vendors implementing the SAF differently. |
I would not remove the option where it auto selects the correct folder because I hope for most users this would still be the option that works. This would then heavily reduce amount of support questions because people don't need to understand where to find the files and copy them to other folder manually. Instead we could split it into two options (e.g. Import from App, Import from other folder)? This could be done with two buttons or instead using a followup page where users can select an option.
This did not change anything unfortunately. Still no folders showing inside |
I'm sorry to hear. Very disappointing. No folders inside the Android folder is how it appears to me in the default file browser, but file managers like Total Commander or Cx File Explorer could see inside Android/data. |
It is hard to know what the best workflow is here. If users are going to copy data around then they could also just copy in a pre-converted set of assets into Valkyrie's import folders, if they can get their hands on them from somewhere. |
I could solve the import issue now. So at least under Android 13 there is a solution (For android 14 this workaround will not work):
Edit: Import for Mansions of Madness was finished in ~20 seconds. |
MoM import taking 20 seconds is far too fast it means it didn't grab all the assets. For Rtl if the .obb file has been copied then the import should work. Like I said the import is extremely slow partly due to number of files contained in the obb which need to be checked for assets. Valkyrie on Android logs to the standard Android logging system. Viewable by anything that can do a logcat. |
Also note that a large number of assets are downloaded by the official MoM as it starts up so if you have installed MoM but never opened it Valkyrie won't get a complete set of assets. I've discovered that these are pulled from ffg's s3 bucket: So theoretically the extra assets could be downloaded from ffg's bucket for MoM bypassing the whole android security issue but it won't work for RtL because all the extra assets for RtL are stuffed in the obb. |
I've done some optimisations. |
…com/seinsinnes/valkyrie into dev/FixImportFromMoM_1.9.3onAndroid
Since integration of FSAF has been moved to external project this PR is approved now. |
Changes to allow Valkyrie to find MoM 1.9.3 data on Android.
The newer versions of the official app moved the locations of the installed data around.
Tested as working on Android 8 - Android 10 (inclusive).
It doesn't work on Android 11+ due to scoped storage.It now has a solution for importing assets on Android 11+ as well.