Remove All Ads from XDA

[RECOVERY] [TWRP] Fix • Backup Internal Storage • backup option

577 posts
Thanks Meter: 151
By aIecxs, Senior Member on 19th June 2019, 02:07 PM
Post Reply Email Thread

Fix for • Backup Internal Storage • backup option

Universal TWRP Bind Mount Enabler

It is a well known fact that TWRP Backup does not include Internal Storage
aka /storage/emulated/0
If you ever wonder how to backup your Pictures and Downloads here is a solution

  • device with external MicroSD Card
  • working TWRP image as file
  • ramdisk tool (i recommend AIK)
  • unpack your recovery ramdisk
  • create a folder for bind mount
  • place the shell script /scard0/init in your ramdisk
  • when your busybox is older than v1.29: replace /sbin/busybox in your ramdisk
  • replace the shell script /sbin/ in your ramdisk
  • edit the path in /sbin/
  • set permissions executable
  • make a new entry in /etc/recovery.fstab
/sdcard0  auto  /sdcard  flags=bind;display="Internal Storage";backup=1;usermrf;ignoreblkid
XDA:DevDB Information
Universal TWRP Bind Mount Enabler, Tool/Utility for the Android General


@Dees_Troy (TWRP)
@osm0sis (AIK)
Attached Files
File Type: zip - [Click for QR Code] (908.1 KB, 52 views)
The Following 2 Users Say Thank You to aIecxs For This Useful Post: [ View ] Gift aIecxs Ad-Free
19th June 2019, 02:09 PM |#2  
OP Senior Member
Thanks Meter: 151
Bugs & Known Issues
  • Restoring works only with -> Settings -> Use rm -rf instead of formatting
  • Backup Internal Storage -> to Internal Storage
  • does not show backup size / wrong size
  • Progress bar does not work
  • Internal Storage not proper unmounted when unmounting data
  • TWRP shows errors in log (E:Unhandled flag 'bind')
  • TWRP shows errors in log when successfully mounted (Failed to mount '/sdcard0')
  • does not work with busybox v1.22 bionic (TWRP default)
  • does not work with toybox
17th January 2020, 12:22 AM |#3  
OP Senior Member
Thanks Meter: 151
made some minor fixes because of TWRP switched from busybox to toybox (i didn't know)
/sbin/busybox is hard-coded for now until i have time to fix toybox compatibility - not so universal anymore, sorry (:
toybox grep: No 'E' with 'w' (see "grep --help")

yet another case where you might use bind mounts
/system and /system_root hybrid for maximum compatibility

instead of flashing one can mount "System" (which is /system_root/system) from the usual mount check box, then flash old zips like gapps
/system_root  ext4  /dev/block/platform/bootdevice/by-name/system  flags=display="System Root";backup=1;wipeingui
/system       auto  /system_root/system                            flags=bind;backup=0;usermrf;ignoreblkid
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes