Skip to content

Instantly share code, notes, and snippets.

@telent
Created May 12, 2011 14:23
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 telent/968586 to your computer and use it in GitHub Desktop.
Save telent/968586 to your computer and use it in GitHub Desktop.
The case of the incredible disappearing file ...
GingerBreak got me a shell with uid 0. Now what?
/proc/mounts says
/dev/block/mmcblk0p25 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
# mount -o remount,rw /dev/block/mmcblk0p25 /system
# cat /system/bin/sh > /system/rootsh
# chmod 4711 /system/rootsh
# ls -l /system/rootsh
-rws--x--x root shell 82840 2011-05-12 15:08 rootsh
# sync;sync
# sync;sync
# ls -l /system/rootsh
-rws--x--x root shell 82840 2011-05-12 15:08 rootsh
# mount -o remount,rw /dev/block/mmcblk0p25 /system
# ls -l /system/rootsh
-rws--x--x root shell 82840 2011-05-12 15:08 rootsh
# mount -o remount,ro /dev/block/mmcblk0p25 /system
# ls -l /system/rootsh
/system/rootsh: No such file or directory
It's gone!?
@telent
Copy link
Author

telent commented May 20, 2011

If anyone should stumble across this and wonder what the problem was: the hardware device is write-protected but not in a way that linux can detect

http://ww.telent.net/2011/5/15/desire_s_don_t

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