zhanghai / MaterialFiles

Material Design file manager for Android
https://play.google.com/store/apps/details?id=me.zhanghai.android.files
GNU General Public License v3.0
5.9k stars 398 forks source link

[Feature Request] Export data #523

Open victorbnl opened 3 years ago

victorbnl commented 3 years ago

It would be useful to export the app data, which would include, for example :

Personally I'd use it mainly to backup bookmarks, which would be useful as I often reset my data to change ROM for example

zhanghai commented 3 years ago

For now, you can just backup and restore the internal app data directory for this app, at /data/data/me.zhanghai.android.files/shared_prefs/, doable within this app. Remember to set the Linux owner/group to this app (it may be owned by root by default after copied back) and restore the SELinux context (the restore button in the edit SELinux context dialog) after you restore these files though.

victorbnl commented 3 years ago

Perfect thanks 👍

zhanghai commented 2 years ago

Note that you will be able to manually back up app settings without root in the next app version (1.5.0), which I'm planning to release this weekend. Here are the steps for doing that:

  1. Open Material Files, tap Settings in drawer, and temporarily set Root access mode to Normal access only.
  2. Close Settings, and press the three dot in the top-right corner of the main page, then tap Go to (new in 1.5.0), input /data/user/0/me.zhanghai.android.files/shared_prefs and tap OK.
  3. You'll be taken to the app's settings folder and should be able to see a me.zhanghai.android.files_preferences.xml and a me.zhanghai.android.files_preferences_path.xml (the latter only appears if you ever had any Only for this folder options). Select the two files and copy them to your desired location for backup.
  4. Upon restoration, do the same thing to get to the app's settings folder, but this time copy your backups into this folder. (Forgot to select the backups for copy? Use New window to select them without leaving the current folder.) Then Force stop this app in system Settings' app info page for this app for it to pick up the settings from file system.
  5. Once you open the app again, it should be using the settings that you've restored. If anything goes wrong and the app won't start, you can always go to system Settings and Clear data for this app.
  6. Finally, restore Root access mode to Automatic.
SodaWithoutSparkles commented 7 months ago

Actually is "add a button to zip the configs directory" a feasible export function? Maybe change the extension in the process.

Then import/restore is just unzipping it.

HarriBuh commented 6 months ago

This is NOT an option to backup, but the most uncomfortable way to imitate it. No way this is a duplicate of #1182

HarriBuh commented 3 months ago

@zhanghai So, what's the news on this issue?