Search code examples
androidrecoveryreboot

Android Shell Command (or in adb) to automatically reboot and restore backup using cwm recovery


Looking for the command (or steps) to create a shell script on android that tells the device to reboot into recovery mode and automatically restore a backup located in the /sdcard/clockworkmod/backup/ folder. I know the reboot is:

reboot recovery

But I imagine there is something else I either need to add to that line or perhaps create a file somewhere that instructs cwm to automatically restore a backup and reboot.


Solution

  • Found my own answer... For the folks in the ether...

    1. Install ROM Manager Premium (small $$).
    2. Use Koush's test rom manage project (https://github.com/koush/TestRomManager) to connect to ROM Manager and essentially ask it to reboot the device into recovery and do a backup. The system is actually incredibly powerful in that you can do some kool stuff over the air. This is a good setup for internally managed devices... You can even run your own update.zip scipts...
    3. Optionally you can add a couple of exec lines to click ok automatically to the ROM Managers popup "do you want to reboot now?".

    Thats it. Lots of research, as usual a Frankenstein of source from a great world full of devs.