I have created this thread so that users can restore their macros if MacroDroid is inaccessible for some reason.
ROOT (macros.json) : If you are rooted, this is very easy (I still recommend to try other methods, but if you don't have auto backups, this is the way to go). Go to
/data/data/com.arlosoft.macrodroid/files
and copy out the
macros.json
file.
Then try the other methods mentioned
here. If they don't work, uninstall/clear all data of MacroDroid. Then install/open MacroDroid and
disable it (very important if you got a badly made macro). Then kill MacroDroid in the app's settings (to make sure that nothing goes wrong) and make sure it is not running in background. Then access
/data/data/com.arlosoft.macrodroid/files
again and replace the
macros.json
file with the one you copied earlier.
Note that this will only restore the macros and not all other settings, unlike with normal backups.
NOT ROOTED:
There are several ways to restore your macros if you are not rooted.
AUTO BACKUP
If you have auto backups enabled (which is recommended), you are able to restore your macros without accessing MacroDroid.
Local backup: Use a file manager that can access Android/data (I use ZArchiver which uses a workaround to access the directory). Once you are in this directory, search for "com.arlosoft.macrodroid", then go to files/MacroDroid/Autobackup
. There you can find your backups.
Cloud backup : If you have the pro version of MacroDroid and are logged in with an account (with auto backups enabled), you can safely uninstall MacroDroid. Then, you can reinstall it back, disable it (especially if you have got a bad macro, that you can delete/disable), log into your account at the autobackup section and all your cloud backups should appear (I recommend also doing the previous method with local backups before uninstalling MacroDroid first just in case something goes wrong). You can then restore your macros by clicking on the latest backup.
Quick Setting Tile
There is a quick settings tile that allows you to enable/disable MacroDroid outside the app. It will only work if MacroDroid is working for at least a few seconds. Here are the steps to follow.
- Open the quick settings tile section of the status bar.
- Add a new tile called "Enable/Disable" with a MacroDroid icon.
- If the app only crashes when you open it, click this tile to disable MacroDroid. Otherwise, start MacroDroid and quickly click the tile.
If you do not have auto backups and are (not) rooted, you can try these methods:
- Boot into safe mode (Google how to do this on your device) or quickly open MacroDroid once your device has booted and disable it.
- Try opening the app directly (not from a shortcut).
- If you really don't want to lose your data, contact the developer at support@macrodroid.com and he may create a fix for your problem. Then wait for an update.
Reinstalling MacroDroid with all data using adb (experimental)
I've written a script that will uninstall and reinstall MacroDroid again without losing any data.
This should help in cases where MacroDroid is broken after a system update but as written this is experimental and we don't know if it actually works. It comes in 2 different versions (depending on your OS).
You'll need to establish an adb connection to your device where you run adb commands.
The scripts are attached to this post, the file to run is called 'script.bat/sh'.
What to do to avoid losing your macros
There are 2 main actions you can take to keep your macros safe :
- Turn on auto backup issue in MacroDroid's auto backup section.
- Create/install a macro that will automatically disable MacroDroid on startup (great for macros gone wrong). You can use this macro : https://www.macrodroidlink.com/macrostore?id=16975
One detail about the above macro is that it can delete all your macros if MacroDroid crashes in quick succession. I have no idea how.
IMPORTANT NOTE:
If you see this thread before updating to a new OS version or doing a system update (especially on Samsung),
make sure you backup your macros as updating to a new version often breaks MacroDroid!
If you have any questions feel free to ask and reply to this thread.