Skip to content

Instantly share code, notes, and snippets.

@AndroPlus-org
Created June 30, 2021 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndroPlus-org/a788c9c3f82fd624a8b287a521f363d6 to your computer and use it in GitHub Desktop.
Save AndroPlus-org/a788c9c3f82fd624a8b287a521f363d6 to your computer and use it in GitHub Desktop.
modem-backup
su
cd /dev/block/bootdevice/by-name/
for file in *; do
if [[ "${file}" == "modem" || "${file}" == "modemst1" || "${file}" == "modemst2" || "${file}" == "fsg" ]]; then dd if=/dev/block/bootdevice/by-name/"${file}" of=/sdcard/"${file}".img ; else continue ; fi
done
@AndroPlus-org
Copy link
Author

Run these commands line by line.
It will create modem backup to /sdcard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment