1. flapjack.fiasco's Avatar
    I'd like to take apart a recovery ROM and mess with the insides, but I can't quite figure out how to unpack it, assuming there is a way to unpack it. I searched for a while, and came up with the following method, which didn't work for me. This is what I did so far. Let's say that my recovery is named 'recovery.img'. What I tried was this:

    Code:
    gunzip -c recovery.img | cpio -i
    [Obviously executed in the same directory as recovery.img]

    The error I get is:

    Code:
    recovery.img: not in gzip format
    And cpio gives me:

    Code:
    premature end of archive
    I'd like to know if anyone has a method for extracting the contents of a recovery ROM, but I'm starting to think that it's going to have to be built from source. Not that that will be a problem, it's just that I've never done it before. I'm more than willing to learn how.
    03-07-2012 01:24 PM
  2. thewraith420's Avatar
    Wish I could help but best I can do is bump this post

    Sent from my LG-VM670 using Tapatalk
    flapjack.fiasco likes this.
    03-09-2012 11:53 AM
  3. flapjack.fiasco's Avatar
    Really, what I want to do is add a script that does all the standard formatting for a fresh ROM install (dalvik, system, data, boot, etc.) all with one button push. I've been flashing so many ROMs lately, what with all the new alphas out there, and I feel like I'm wearing out my buttons. Maybe this is an unfounded fear, but at least it's motivation for improvement.

    Sent from my LG-VM670 using Tapatalk
    03-09-2012 05:53 PM
  4. primalist's Avatar
    The touch recovery works well. Even so, that'd still be a nice shortcut.

    Sent from my VM670 using Tapatalk
    03-09-2012 06:33 PM
  5. flapjack.fiasco's Avatar
    That's what I was thinking. The touch recovery solves the hard keys wearing out issue, but it would still be nice to clean up for a fresh flash with one button press.

    Sent from my LG-VM670 using Tapatalk
    03-09-2012 06:43 PM
  6. thewraith420's Avatar
    That's what I was thinking. The touch recovery solves the hard keys wearing out issue, but it would still be nice to clean up for a fresh flash with one button press.

    Sent from my LG-VM670 using Tapatalk
    Sure would be nice. I switched to the touch recovery and it's also much easier on my buttons.

    Sent from my LG-VM670 using Tapatalk
    flapjack.fiasco likes this.
    03-09-2012 08:42 PM
  7. flapjack.fiasco's Avatar
    I haven't actually changed recoveries yet, I want to get the script figured out first. I'm trying to set up a computer to build on, but I'm having trouble initializing repo. I haven't had the chance to read through the entire building your own ROM thread yet, so maybe I'll find my answer there. Once that's done, I'll be on my way to making an improved recovery, I hope ;-).

    Sent from my LG-VM670 using Tapatalk
    03-10-2012 07:08 PM
  8. asadullah's Avatar
    you can unpack a recovery.img with split_bootimg.pl. Then repack it with mkbootfs and mkbootimg just like a boot.img
    03-11-2012 09:12 AM
  9. flapjack.fiasco's Avatar
    you can unpack a recovery.img with split_bootimg.pl. Then repack it with mkbootfs and mkbootimg just like a boot.img
    Thank you Asadullah! I just got my build environment up and running. I built Bobzhome last night. But I still have to find exactly where in the recovery ROM the scripts for wiping/formatting are (if that part is even script based).

    Sent from my LG-VM670 using Tapatalk
    03-11-2012 11:11 AM
  10. flapjack.fiasco's Avatar
    Okay, so it looks like it's not scripts, correct me if I'm wrong, but it looks like what I need to edit is here: /system/bootable/recovery/recovery.c

    So it's written in C? I guess I got the wrong impression from what little I had read on recovery ROMs. I somehow got the idea that the functions performed by the recovery were written in some sort of scripting language. At any rate, it doesn't look like it's going to be that hard to modify the code, after all, it's just combining the existing features.
    03-12-2012 12:03 AM

Tags for this Thread

LINK TO POST COPIED TO CLIPBOARD