chris41g

20-dalviktocache

May 19th, 2011
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.13 KB | None | 0 0
  1. #!/system/bin/sh
  2. #
  3. # Move dalvik-cache to /cache
  4. #
  5. #
  6. # This program is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU Library General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. #
  16. # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
  17. #
  18. if [ ! -d /cache/dalvik-cache ]
  19. then
  20.     busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
  21.     mkdir /cache/dalvik-cache /data/dalvik-cache
  22. fi
  23.  
  24. busybox chown 1000:1000 /cache/dalvik-cache
  25. busybox chmod 0771 /cache/dalvik-cache
  26.  
  27. # bind mount dalvik-cache so we can still boot without the sdcard
  28. busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
  29. busybox chown 1000:1000 /data/dalvik-cache
  30. busybox chmod 0771 /data/dalvik-cache
  31.  
  32. # remove debugger memory dumps
  33. busybox rm -rf /data/tombstones/*
Advertisement
Add Comment
Please, Sign In to add comment