1. Download our Official Android App: Forums for Android!

Root Anti-Theft Mechanism: Deleting Recovery?

Discussion in 'Android Devices' started by SarcasmSiempre, Jan 11, 2012.

  1. SarcasmSiempre

    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    31
    Joined:
    Dec 17, 2011

    Dec 17, 2011
    31
    7
    16
    I've already used avast! Mobile Security to set up a fairly resistant anti-theft system on my Triumph. My problem is that a slightly more tech-savvy thief might know to enter CWM and just wipe /system from there.

    Then I found this Tasker plugin, which claims to be able to execute Linux commands. This got me thinking that I could set up a Tasker profile that, when I send my lost Triumph a specific text message, would execute a series of commands that would replace CWM with the stock recovery image; I have the stock image still on my phone, named "recovery.img.backup" or something similar.

    I know that the thief could just enter Download Mode and replace the recovery image there, but that requires a computer and a microUSB cable, whereas wiping /system through CWM can be done with just the phone. Swapping recoveries could buy some time.

    So, my question is: is there a way to modify the recovery image in userspace? And if so, what commands would be necessary to do so?
     

    Advertisement

    bradhoschar likes this.
  2. hotalings

    hotalings Android Enthusiast
    Rank:
    None
    Points:
    43
    Posts:
    281
    Joined:
    Oct 26, 2011

    Oct 26, 2011
    281
    43
    43
    Interesting topic. Vary curious to answer as it would be an excellent anti theft option....
     
    bradhoschar likes this.
  3. marc12868

    marc12868 Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    2,460
    Joined:
    Oct 19, 2011

    Oct 19, 2011
    2,460
    850
    213
    Male
    Tier 2 Tech Support @ At&t
    Spokane Valley, Washington
    I actually saw a flashable .zip anti-theft thing that can't be wiped like that over on xda somewhere... I'll post a link if I can find it... Here's an xda link talking about it... Its called cerberus. If you just want the to go directly to the website then here.
     
    bradhoschar likes this.
  4. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    To replace the recovery image, you have to mount the mmcblk0p1 and copy it over to it! So you could call
    mkdir /vfat
    busybox mount -t vday /dev/block/mmcblk0p1 /vfat

    Then call to copy the stock recovery image into /vfat/image and it should work.

    The only thing is I have only done this through the recovery in an update zip. So permissions may need to be set. I have mount the partition with the recovery in my phone before using the terminal. But I have never copied over a recovery image to it from my sdcard on the phone!
     
    SarcasmSiempre likes this.
  5. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    Oh yeah and it will need to remount / as rw too!!
     
    SarcasmSiempre likes this.
  6. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    Okay I just tried it on my phone using a terminal emulator. The code is as follows(my recovery was named recovery.img on the root of the sdcard):
    Code (Text):
    1. mount -w -o remount /
    2.  
    3. mkdir /vfat
    4.  
    5. mount -t vfat /dev/block/mmcblk0p1 /vfat
    6.  
    7. cp /sdcard/recovery.img /vfat/image
    8.  
    9. umount /vfat
    10.  
    11.  
    That should get the stock recovery on there! It worked for me! Got anymore questions just ask!!
     
    SarcasmSiempre likes this.
  7. SarcasmSiempre

    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    31
    Joined:
    Dec 17, 2011

    Dec 17, 2011
    31
    7
    16
    b_randon, you're a genius. This will be quite useful.
     
  8. lanceg

    lanceg Well-Known Member
    Rank:
    None
    Points:
    43
    Posts:
    246
    Joined:
    Jun 7, 2011

    Jun 7, 2011
    246
    27
    43
    This wouldn't get you anything. They could easily boot the phone in download mode, and put the custom recovery back. You know, just like you did?

    The Triumph is bootloader unlocked, you can never prevent anyone from putting a custom recovery on there.
     
  9. SarcasmSiempre

    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    31
    Joined:
    Dec 17, 2011

    Dec 17, 2011
    31
    7
    16
    I understand that. The point of doing this is so that the thief can't wipe my phone on the go, but has to wait until he/she has access to a computer and a microUSB cable, which could buy some time.

    In fact, I stated all of this in the OP.
     
  10. konspiracy

    konspiracy Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    261
    Joined:
    Nov 5, 2011

    Nov 5, 2011
    261
    68
    53
    The only real problem with this is that when you start locking the phone down most thiefs are stupid and cant figure out why they ccant use the awesome device they just stole. So they take the phone and chunk it. In fact just out of curiosity I wonder if anybody has successfully recovered there stolen phone using any app.
     

Share This Page

Loading...