752

A few years ago when I was still an apple fan boy, friend of mine bragging me about how android is awesome, we were drinking some shots at our local pub and I was starting to get light headed. At one point he showed me so called "terminal emulator" app. I checked it out, and assumed it's an emulation, just like dosbox, so I decided to verify that "rm -rf *"... (the phone was rooted)

The phone shutdown within seconds, I couldn't stop laughing, while my friend was shock that his new phone was longer booting.

Luckily he managed to reflash the ROM. What can I learn from that experience?
1. Don't drink and sudo
2. Don't call your app an emulator if it's the real deal.

Comments
  • 289
    ++ for using rm -rf to check wether it's working ;) that's the safest way to know :D
  • 12
    Hmm, isn't preserve-root parameter enabled by default? :p
  • 102
    "Don't drink and sudo" ++
  • 135
    Actually "terminal emulator" is the correct term. A terminal is a hardware device, which is why software terminals are called "terminal emulators".
  • 137
    Yep. You shouldn't use me without thinking
  • 18
    @rm-rf Hahaha. Get out.
  • 7
    @lotd Busybox is evil
  • 4
    @lotd it is in some distros, but it's not for granted. As Android is not rooted by default, it's understandable that such protection is not enabled.
  • 3
    @lucas22 hmm I figured it was enabled by default in vanilla version and thought that would be the default for most.. Guess not.. :)
  • 17
    @lotd I thought so last week when I ran 'sudo rm -rf /' on my friend's Mac just to scare him out. Turns out preserve root is not a thing in OSX.
  • 3
    Ahahaha his fault for adding emulator. That brutal, at least it doesn't wipe the user partition. Easy fix if you have the ROM flash files stored on your device (honestly a must for power root users)
  • 14
    I don't understand this story at all. On every device I know, /system is mounted read only. It would need to have been remounted.. /data could have be wiped, but then not readily reflashed as described. He would also have had to type su to get the # root prompt...

    Also, as pointed out, terminal emulator is exactly the right term. And he may not have installed it as it comes built into some firmware distros.

    I dunno. This smells like bs, but regardless, the story in effect is "haha I trashed my friends computer because he trusted me and I don't know what im doing. I then laughed at him."
  • 2
    @fattire you can mount /system as rw from recovery really easily. You can also setup a command to launch when the shell starts, I have mine set to "su" so I don't have to always type it.
  • 2
    @fattire custom Roms don't necessarily have it like that
  • 3
    Also gonna point out a lot of people keep backups that can be flashed from their recoveries In case something goes wrong, such as wiping a partition. As long as recovery is there, or even just ADB access you can practically fix any issue (from what I've experienced)
  • 6
    @nicnaknic you *can* also mount system read write from the shell (mount -o rw,remount /system as root), but why would op have typed that? Mounting system rw in the recovery generally doesn't persist to the next system boot- the mount ro is set in the init.rc file in the ramdisk which is kind of hard to change.. And maybe some rom could but why. And yes, you can back up /data from twrp/nandroid or whatever but @kirill578 said the rom itself was destroyed... Maybe he just didn't know what he did.

    @kirill578 I don't care if it happened or not. Just thought "I accidentally trashed my friends device when I was drunk because I thought terminal emulator meant the phone was running a VM" is a weird rant to begin with. Kinda like "I'm a Mac guy. A couple of years ago my friend gave me his phone when i was wasted so I bent it in half twice and flushed it down the toilet. Lesson learned: don't be drunk when you have your friends phone and don't name your app appropriately!" Okay....
  • 4
  • 6
    Technically all terminals are called terminal emulators, i frequently refer to them as such. It's because they're emulating old dec vts. When you think about it they are an io device but there's nothing that says terminals have to behave the way they do to any ioctl or escape character except legacy, so yeah. Still don't drink and sudo though.
  • 1
    Go home Linux, your drunk.
  • 1
    "Don't drink and sudo" is probably some of the best advice I've ever heard
  • 1
    The term emulator is supposed to indicate that it isn't a hardware, serial-connected terminal. Even the ttys in your Linux box are really just emulators
  • 0
    Brainius !!
  • 0
    2.

    oh shit.

    i think i realized the mistake i've been making about life
  • 0
    @johnDoe

    "You can also setup a command to launch when the shell starts, I have mine set to "su" so I don't have to always type it."

    congrats.

    that's called insecurity by default by circumventing security by default because it's annoying.
Your Job Suck?
Get a Better Job
Add Comment