Advertisement
metalx1000

Termux Android allow write external media(USB Flash SD card)

Jun 28th, 2020
2,644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.98 KB | None | 0 0
  1. #Mount system as writable (I do this in TWRP).
  2.  
  3. #this might be /system/system/etc/permissions/ on some devices
  4. cd /system/etc/permissions/
  5.  
  6. #backup file
  7. cp platform.xml platform.xml.old
  8.  
  9. #modify/add these settings
  10.  
  11.     <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
  12.         <group gid="media_rw" />
  13.         <group gid="sdcard_rw" />
  14.         <group gid="sdcard_r" />
  15.         <group gid="u10_sdcard_rw" />
  16.         <group gid="u11_sdcard_rw" />
  17.         <group gid="u12_sdcard_rw" />
  18.         <group gid="u13_sdcard_rw" />
  19.         <group gid="u14_sdcard_rw" />
  20.         <group gid="u15_sdcard_rw" />
  21.         <group gid="u16_sdcard_rw" />
  22.         <group gid="u17_sdcard_rw" />
  23.         <group gid="u18_sdcard_rw" />
  24.         <group gid="u19_sdcard_rw" />
  25.         <group gid="u20_sdcard_rw" />
  26.     </permission>
  27.  
  28. #reboot device
  29. #don't access drive through '/storage'
  30. #you must access it through '/mnt'
  31. #example /mnt/media_rw/0000-0000
  32.  
  33.  
  34. #Create Link in termux
  35. ln -s /mnt/media_rw/0000-0000 $HOME/sdcard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement