{"id":21113094,"url":"https://github.com/vr-25/migrator","last_synced_at":"2025-07-08T18:31:52.251Z","repository":{"id":48642986,"uuid":"273920109","full_name":"VR-25/migrator","owner":"VR-25","description":"A backup solution and data migration utility for Android","archived":false,"fork":false,"pushed_at":"2021-07-18T10:11:44.000Z","size":879,"stargazers_count":95,"open_issues_count":4,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T08:11:08.201Z","etag":null,"topics":["android","appdata","backup","data","factoryreset","magisk","migation","migrate","titaniumbackup"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VR-25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"VR25","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"VR25","issuehunt":null,"otechie":null,"custom":"https://paypal.me/vr25xda/"}},"created_at":"2020-06-21T14:25:58.000Z","updated_at":"2025-01-08T08:59:41.000Z","dependencies_parsed_at":"2022-08-12T19:50:57.985Z","dependency_job_id":null,"html_url":"https://github.com/VR-25/migrator","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/VR-25/migrator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VR-25%2Fmigrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VR-25%2Fmigrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VR-25%2Fmigrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VR-25%2Fmigrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VR-25","download_url":"https://codeload.github.com/VR-25/migrator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VR-25%2Fmigrator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264323938,"owners_count":23590768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","appdata","backup","data","factoryreset","magisk","migation","migrate","titaniumbackup"],"created_at":"2024-11-20T01:38:20.357Z","updated_at":"2025-07-08T18:31:47.235Z","avatar_url":"https://github.com/VR-25.png","language":"Shell","readme":"# Migrator - A Backup Solution and Data Migration Utility for Android\n\n\nInstall as a regular Magisk module - no reboot required, though.\nIf `M` and `migrator` executables are unavailable before a reboot, use `/dev/M` or `/dev/migrator`.\n\n`migrator` can be extracted from the root of the zip and used as is (e.g., `su -c sh migrator`).\n\nBusybox is required on systems not rooted with Magisk.\nThe binary can simply be placed in `/data/adb/bin/`.\n\n\n---\n## CHANGELOG\n\n```\nv2020.9.24-beta (202009240)\n\n- Do not remount / rw if it's not tmpfs.\n- Fixed backup import issue.\n\n\nv2021.7.16-beta (202107160)\n\n- APKs are no longer hard-linked (crash due to SELinux).\n- Data dir is /sdcard/Documents/vr25/migrator/.\n- Exclude thumbnails, input method and adb settings from backups.\n- General optimizations\n- Installer prints changelog and other info.\n- Inverted changelog order.\n- Move option is -M to prevent confusion (formerly -m).\n- Updated documentation \u0026 bundled terminal.\n\nMerged pull request #5 from SebastianApel/master\n\n  Enhancements:\n\n  - Backup /data/media/0/Android/data/${pkg} [used for pictures by ch.threema.app]\n  - And also restore it later into the correct location (including setting the correct user \u0026 perms)\n  - Also backup widget configuration and roles of apps into _sysdata\n  - Wifi Config is at a different location in Android 11 - make sure it's backed up\n  - Better approach to restoring _sysdata (handle case where file does not exist [in some cases])\n\n  Bugfixes:\n\n  - In recovery mode, /data/user/0 does not exist (at least on my phone) - /data/data works\n  - Apps were crashing without RestoreCon of /data/data/$pkg - added that\n\n\nCurrent\n\n- Suppress error: \"runtime-perms.txt: no such file or directory\".\n- Updated module.prop, README.md and TODO.txt.\n```\n\n---\n## LICENSE\n\n\nCopyright 2018-present, VR25\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n\n---\n## Donations\n\n\n- [Liberapay](https://liberapay.com/VR25/)\n- [Patreon](https://patreon.com/vr25/)\n- [PayPal](https://paypal.me/vr25xda/)\n\n\n---\n## Online Support\n\n\n- [Facebook page](https://fb.me/vr25xda/)\n- [Git repository](https://github.com/VR-25/acc/)\n- [Telegram channel](https://t.me/vr25_xda/)\n- [Telegram group](https://t.me/migrator_group/)\n\nAnyone can contribute with pull requests, as long as they follow my scripting style.\nHaving very distinct scripting styles can be a huge mess.\nI'm open to changes, though.\nIf you think there's room for improvement in my style, I'll be glad to hear you out.\n\n\n---\n## --help\n\n```\nMigrator v2021.7.16-beta (202107160)\nA Backup Solution and Data Migration Utility for Android\nCopyright 2018-present, VR25\nLicense: GPLv3+\n\n\nZERO warranties, use at your own risk!\nThis is still in beta. Backup your data before using.\n\n\nUSAGE\n\nmigrator (wizard)\nmigrator [option...] [arg...]\n\n[p=\u003c\"password for encryption/decryption\"\u003e] migrator [option...] [arg...]\n\nM is a migrator alias.\n\n\nOPTIONS[flags]\n\nBackup\n-b[abdDemMns] [regex|-v regex] [[+ file or full pkg names] | [/path/to/list] | [-- for /sdcard/Documents/vr25/migrator/packages.list]]\n\nDelete local backups\n-d \u003c\"bkp name (wildcards supported)\" ...\u003e\n\nExport backups\n-e[i] [regex|-v regex] [-d \u003cdestination directory\u003e] [-c \u003c\"compression method\" or \"-\" (none, default)\u003e]\n\nImport backups\n-i [regex|-v regex] [-d \u003csource directory\u003e] [-c \u003c\"decompression method\" or \"-\" (none)\u003e]\n-ii [regex|-v regex] [-c \u003c\"decompression method\" or \"-\" (none)\u003e]\n\nList backups\n-l [regex|-v regex]\n\nExport logs to /sdcard/Documents/vr25/migrator/migrator.log.bz2\n-L\n\nMake hard link backups immune to factory resets\n-M\n\nForce all apps to reregister for push notifications (Google Cloud Messaging)\n-n\n\nRestore backups\n-r[abdDemns] [regex|-v regex]\n\nManually enable SSAID apps\n-s\n\n\nFLAG MNEMONICS\n\na: app\nd: data\nb: both (app and data)\nD: system data\nm: magisk data\nM: move /data/migrator to internal sdcard\ns: settings (global, secure and system)\ne: everything (-be = -bbDms, -re = -rbms)\ni: interactive (-ei, -ii)\nn: not backed up (-bn) or not installed (-rn)\n\n\nUSAGE EXAMPLES\n\nBackup only packages not yet backed up\nmigrator -bn\n\nBackup Facebook Lite and Instagram (apps and data)\nmigrator -b ook.lite,instagram\n\nBackup all user apps and data, plus two system apps, excluding APKs outside /data/app/\nmigrator -b + com.android.vending com.android.inputmethod.latin\n\nBackup data (d) of pkgs in /sdcard/list.txt\nmigrator -bd /sdcard/list.txt\n\nBackup Magisk data (m) and generic Android settings (s)\nmigrator -bms\n\nBackup everything\nmigrator -be + $(pm list packages -s | sed 's/^package://')\n\nBackup everything, except system apps and move /data/migrator to internal sdcard, so that hard link backups survive factory resets\nWhen launched without the -M (move) option, Migrator automatically moves hard link backups back to /data/migrator/local, for convenience\nmigrator -beM\n\nBackup all users apps' data (d)\nmigrator -bd\n\nDelete all backups\nmigrator -d \\*\n\nDelete Facebook Lite and Instagram backups\nmigrator -d \"*facebook.lite*\" \"*instag*\"\n\nExport all backups to /sdcard/Documents/vr25/migrator/exported/\nmigrator -e\n\n... To /storage/XXXX-XXXX/migrator_exported\nmigrator -e -d /storage/XXXX-XXXX\n\nInteractive export\nmigrator -ei\n\nImport all backups from /sdcard/Documents/vr25/migrator/exported\nmigrator -i\n\n... From /storage/XXXX-XXXX/migrator_exported\nmigrator -i -d /storage/XXXX-XXXX/migrator_exported\n\nInteractive import\nmigrator -ii -d /sdcard/m\n\nExport backup, encrypted\np=\"my super secret password\" migrator -e instagr\n\nImport encrypted backup\np=\"my super secret password\" migrator -i instagr\n\nList all backups\nmigrator -l\n\nList backups (filtered)\nmigrator -l facebook.lite\n\nRestore only app data of matched packages\nmigrator -rd facebook.lite\n\nRestore generic Android settings\nmigrator -rs\n\nRestore system data (e.g., Wi-Fi, Bluetooth)\nmigrator -rD\n\nRestore Magisk data (everything in /data/adb/, except magisk/)\nmigrator -rm\n\nRestore everything, except system data (D), which is usually incompatible)\nmigrator -re\n\nRestore not installed user apps+data\nmigrator -rn\n\n\nMigrator can backup/restore apps (a), respective data (d) and runtime permissions.\n\nThe order of secondary options is irrelevant (e.g., -rda = -rad, \"a\" and \"d\" are secondary options).\n\nEverything in /data/adb/, except magisk/ is considered \"Magisk data\" (m).\nAfter restoring such data, one has to launch Magisk Manager and disable/remove all modules that are or may be incompatible with the [new] ROM.\n\nAccounts, call logs, contacts and SMS/MMS, other telephony and system data (D) restore is not fully guaranteed nor generally recommended.\nThese are complex databases and often found in variable locations.\nYou may want to export contacts to a vCard file or use a third-party app to backup/restore all telephony data.\n\nBackups of uninstalled packages are automatically removed at the end of backup and export operations.\n\nFor greater compatibility and safety, system apps are not backed up, unless specified as \"extras\" (see examples).\nNo APK outside /data/app/ is ever backed up.\nData of specified system apps is always backed up.\n\nMigrator itself is included in backups and exported alongside backup archives.\n\nBackups are stored in /data/migrator/local/.\nThese take virtually no extra storage space (hard links).\n\nBackups can be exported as individual [compressed] archives (highly recommended).\nData is exported to /sdcard/Documents/vr25/migrator/exported/ by default - and imported to \"/data/migrator/local/\".\nThe default compression method is \u003cnone\u003e (.tar file).\nMethod here refers to \"\u003cprogram\u003e \u003coptions\u003e\" (e.g., \"zstd -1\").\nThe decompression/extraction method to use is automatically determined based on file extension.\nSupported archives are tar, tar.bz*, tar.gz*, tar.lzma, tar.lzo*, tar.pigz, tar.xz, tar.zip and tar.zst*.\nThe user can supply an alternate method for decompressing other archive types.\nAmong the supported programs, only pigz and zstd are not generally available in Android/Busybox at this point.\nHowever, since pigz is most often used as a gzip alternative (faster), its archives can generally be extracted with \"gzip -cd\" as well.\n\nThe Magisk module variant installs NetHunter Terminal.\nHighly recommended, it's always excluded from backups.\nIf you use another terminal, it MUST BE EXCLUDED manually (e.g., \"migrator -bA -v termux\").\nThis is because apps being backed up are temporarily suspended.\nBefore restore, they are terminated.\nThus, not excluding the app that runs migrator will lead to incomplete backup/restore.\n\nHaving a terminal ready out of the box also adds convenience.\nUsers don't have to install a terminal to get started, especially after migrating to another ROM.\n\nBut why \"NetHunter Terminal\"?\nIt's free and open source, VERY light and regularly updated.\nThe homepage is https://store.nethunter.com/en/packages/com.offsec.nhterm .\nYou can always compare the package signatures and/or checksums.\n\n\nENCRYPTION\n\nMigrator uses ccrypt for encryption, but it does not ship with it.\nI'm looking for suitable static ccrypt binaries to bundle.\nThere's a package available for Termux: \"pkg install ccrypt\".\nOnce installed, non-Magisk users have to symlink ccrypt to /data/adb/bin/: \"su -c \"mkdir -p /data/adb/bin; ln -sf /data/data/com/termux/files/usr/bin/ccrypt /data/adb/bin/\".\nMagisk users need not do anything else besides installing the ccrypt Termux package.\nAlternatively (no Termux), a static ccrypt binary can be placed in /data/adb/bin/.\n\n\nAUTOMATING BACKUPS\n\n\"init.d\" Script (Magisk users don't need this)\n#!/system/bin/sh\n# This is a script that daemonizes \"migrator -B\" to automate backups.\n/path/to/busybox start-stop-daemon -bx /path/to/migrator -S -- -B\nexit 0\n\nConfig for Magisk and init.d\n# /data/migrator.conf\n# Default config, same as a blank file\n# Note: this is not created automatically.\ncmd=\"migrator -be \u0026\u0026 migrator -e\" # Commands to run\nfreq=24 # Every 24 hours\ndelay=60 # Starting 60 minutes after boot\n\nSample Tasker Script\n#!/system/bin/sh\n# /data/my-tasker-script\n# su -c /data/my-tasker-script\n# This requires read and execute permissions to run\n(migrator -be\nmigrator -e -d /storage/XXXX-XXXX \u0026)\n\nDebugging\nVerbose is redirected to \"/dev/migrator.log\".\n\n\nFULL DATA MIGRATION STEPS AND NOTES\n\nNotes\n- If you have to format data, export backups to external storage after step 1 below (-e -d /storage/XXXX-XXXX) and later import with -i -d storage/XXXX-XXXX).\n- If you use a different root method, ignore Magisk-related steps.\n- In \"-beM\", the \"M\" sub-option means \"move hard link backups to internal sdcard, so that they survive factory resets\".\n  When launched without the -M (move) option (i.e., migrator -M), Migrator automatically moves hard link backups back to /data/migrator/local/, for convenience.\n- Using a terminal emulator app other than NetHunter means you have to exclude it from backups/restores or detach migrator from it.\n\n1. Backup everything, except system apps: \"migrator -beM\".\n\n2. Install the [new] ROM (factory reset implied), addons as desired - and root it.\n\n3. Once Android boots, flash migrator from Magisk Manager.\nRebooting is not required.\n\n6. Restore all apps+data, settings and Magisk data: \"migrator -re\".\n\n7. Launch Magisk Manager and disable/remove all restored modules that are or may be incompatible with the [new] ROM.\n\n8. Reboot.\n\n\nSYSTEM DATA (D)\n\nIf you find any issue after restoring system data (-rD), remove the associated files with \"su -c rm \u003cline\u003e\".\n\n/data/system_?e/0/accounts_?e.db*\n/data/system/sync/accounts.xml\n/data/misc/bluedroid/bt_config.*\n/data/misc/apexdata/com.android.wifi/WifiConfigStoreSoftAp.xml\n/data/misc/apexdata/com.android.wifi/WifiConfigStore.xml\n/data/misc/wifi/WifiConfigStore.xml\n/data/misc/wifi/softap.conf\n/data/system/xlua/xlua.db*\n/data/system/users/0/photo.png\n/data/system/users/0/appwidgets.xml\n/data/system/users/0/roles.xml\n/data/system/users/0/wallpaper*\n/data/user_de/0/com.android.*provider*/databases/*.db*\n/data/data/com.android.*provider*/databases/*.db*\n/data/system/deviceidle.xml\n\n\nASSORTED NOTES \u0026 TIPS\n\nBusybox and extra binaries can be placed in /data/adb/bin/.\nThat's the first field in migrator's $PATH.\n\n\"regex\" and \"-v regex\" are grep syntax. \"-E\" is always implied.\n\nMost operations work in recovery environments as well.\nOne can either flash the Magisk module [again] to have migrator and M commands available, or run \"/data/M\".\n\nrsync can be used in auto-backup config to sync backups over an SSH tunnel.\ne.g., cmd=\"migrator -be \u0026\u0026 rsync -a --del $bkp_dir vr25@192.168.1.33:migrator\"\n```\n","funding_links":["https://patreon.com/VR25","https://liberapay.com/VR25","https://paypal.me/vr25xda/","https://liberapay.com/VR25/","https://patreon.com/vr25/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvr-25%2Fmigrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvr-25%2Fmigrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvr-25%2Fmigrator/lists"}