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

Root CWM ADB install zip command

Discussion in 'Android Devices' started by Yoinx, May 9, 2013.

  1. Yoinx

    Yoinx Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    1,032
    Joined:
    Sep 6, 2011

    Sep 6, 2011
    1,032
    370
    163
    Male
    Military
    Virginia, USA
    I know there must be a command to load a zip from sdcard as things like rommanger/cmupdate and such can reboot and auto-install a zip. Being that I hate having to scroll through all my folders to get to the file I'm going to flash.

    I'd kinda like to just issue the command from adb if I'm sitting at the computer.

    Any have any idea what the command would be from adb to install a zip from sdcard in CWM?
     

    Advertisement

  2. Neph81

    Neph81 Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,401
    Joined:
    Mar 3, 2012

    Mar 3, 2012
    1,401
    823
    213
    Male
    Wisconsin
    I don't know as that exists as a function yet, but that would be a kick ass idea for Koush to implement. About the closest thing I could thing of would be doing ADB push for the files that would normally be in the .zip , but then you would still need to set up a script for any permission changes needed.
     
    Yoinx likes this.
  3. Yoinx

    Yoinx Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    1,032
    Joined:
    Sep 6, 2011

    Sep 6, 2011
    1,032
    370
    163
    Male
    Military
    Virginia, USA
    Yeah I was digging through the recovery image trying to find any binary or script that would be able to be called... couldn't manage to. I mean the was the binary for gunzip I think. I guess it could be scripted to make a temp directory on /cache extract everything there then call the updater binary.

    Any idea how cmupdater and the like do it though where they auto install a zip when recovery boots?

    Sent from my VS920 4G using Tapatalk 2
     
  4. tdm

    tdm Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    1,965
    Joined:
    Jun 4, 2012

    Jun 4, 2012
    1,965
    3,248
    313
    Developer
    Seattle, WA
    You can do an automatic install. But only one zip file per recovery session (eg. you cannot flash a rom then gapps). Here's how:

    The file "/cache/recovery/command" contains command-line arguments for recovery. So you might want it to look like this:

    Code (Text):
    1.  
    2. --update_package=/sdcard/cm-10.1-latest.zip
    3.  
    Now run "reboot recovery". The recovery should do the install and reboot into the new system.
     
    PrinceCorwin and Yoinx like this.
  5. Yoinx

    Yoinx Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    1,032
    Joined:
    Sep 6, 2011

    Sep 6, 2011
    1,032
    370
    163
    Male
    Military
    Virginia, USA
    Cool thanks.

    Sent from my VS920 4G using Tapatalk 2
     
  6. Yoinx

    Yoinx Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    1,032
    Joined:
    Sep 6, 2011

    Sep 6, 2011
    1,032
    370
    163
    Male
    Military
    Virginia, USA
    You're the man tdm. No really.

    This command works fine from recovery.

    adb shell
    cd /sbin
    recovery --update_package=/sdcard/whatever.zip

    it will kill the currently running recovery interface and jump into the installing screen with no prompt. Though, it does still automatically reboot at the end. I can't help but wonder if maybe there's a toggle to prevent the reboot :s

    Unless maybe this was done as some form of security feature in order to prevent apps from installing multiple zips with you thinking they only installed one. Though... really... the app would mostly already have root access anyway.
     
    tdm likes this.
  7. tdm

    tdm Android Expert
    Rank:
    None
    Points:
    313
    Posts:
    1,965
    Joined:
    Jun 4, 2012

    Jun 4, 2012
    1,965
    3,248
    313
    Developer
    Seattle, WA
  8. Yoinx

    Yoinx Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    1,032
    Joined:
    Sep 6, 2011

    Sep 6, 2011
    1,032
    370
    163
    Male
    Military
    Virginia, USA
    Yeah. I see now. When it's called like that, it looks like it sets a flag to reboot to recovery and try again. Once the install finishes in which case it's calling finish_recovery() which unsets that flag and reboots.

    Oh well. Was just looking for an easier way to flash zips. For instance one zip that could flash everything in a specific folder like "to_flash" then reboot.

    *shrug* thanks anyway.
     
  9. PlayfulGod

    PlayfulGod Android Expert
    Rank:
    None
    Points:
    353
    Posts:
    8,109
    Joined:
    Jan 28, 2011

    Jan 28, 2011
    8,109
    4,938
    353
    Male
    Web Design and Hosting/PC Repair
    NW Georgia
    Yoinx likes this.
  10. Yoinx

    Yoinx Android Expert
    Thread Starter
    Rank:
    None
    Points:
    163
    Posts:
    1,032
    Joined:
    Sep 6, 2011

    Sep 6, 2011
    1,032
    370
    163
    Male
    Military
    Virginia, USA
    Thanks.

    Nothing that would help in those extra three references though. Looks like the CM version just lets you also power down instead of rebooting, which is where the extra references come in.
     
  11. robert 68

    robert 68 Lurker
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Dec 31, 2014

    Dec 31, 2014
    1
    0
    5
    Male
    I can get it to work I run 4.4 + towelroot and :
    adb shell
    cd /sbin
    recovery --update_package=/sdcard/data/Superuser-master.zip

    didn't work - I need to update my superuser binary
     
Tags:

Share This Page

Loading...