1. Are you ready for the Galaxy S20? Here is everything we know so far!

Does flash mean what it use to?

Discussion in 'Android Development' started by my1stSmartPhone, Oct 26, 2014.

  1. my1stSmartPhone

    Thread Starter

    My first smartphone, and I'm still on my months-long exploration of how to backup up the original OS before installing CyanogenMod. I want a backup of what's on the phone, before rooting or unlocking the boot loader, not a downloaded stock from the internet.

    I've ran across this question a few times, and I find that the documentation on fastboot is a bit terse. For example, I've seen exmples of "fastboot [re]boot" online, but the actual help for fastboot doesn't even show that an argument (img file) is needed. So I know that there are lots of meanings that are implied rather than explicit.

    I have had electrical engineering training, and flashing a ROM meant something very specific: You actually write the read-only memory. However, from the threads I found online, I'm really unsure whether that is always what is meant with fastboot. For example, threads I've read indicate that if you want to backup without root, you need to fastboot CWM without installing. So that implies to me that you don't actually write it to the smartphone, you just boot from the img file. It's still called flashing, just not flashing to ROM. It seems very unlike the meaning of flashing from the old electrical engineering schooling days. Is this actually the meaning?

    I haven't yet cleared up in my head whether the implied meaning is that img file is somehow transferred to the smartphone, nor whether the bootloader needs unlocking. These details are distributed over many, many threads that I surfed, and the connection between them is not entirely clear just yet (though I've reread them lots). Hoping to clear that up with some more googling.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. scary alien

    scary alien not really so scary
    VIP Member

    Welcome to our AndroidForums, my1stSmartPhone :).

    There's two lines referencing the "flash" command in fastboot (I've colored the one you want in red):
    Code (Text):
    1. C:\Users\Scary Alien>fastboot
    2. usage: fastboot [ <option> ] <command>
    3.  
    4. commands:
    5.   update <filename>                        reflash device from update.zip
    6.   flashall                                 flash boot, system, vendor and if found,
    7.                                            recovery
    8.   [COLOR="Red"]flash <partition> [ [B]<filename>[/B] ]         write a file to a flash partition[/COLOR]
    9.   erase <partition>                        erase a flash partition
    10.   format[:[<fs type>][:[<size>]] <partition> format a flash partition.
    11.                                            Can override the fs type and/or
    12.                                            size the bootloader reports.
    13.   getvar <variable>                        display a bootloader variable
    14.   boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
    15.   [COLOR="Blue"]flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
    16.                                            flash it[/COLOR]
    17.   devices                                  list all connected devices
    18.   continue                                 continue with autoboot
    19.   reboot                                   reboot device normally
    20.   reboot-bootloader                        reboot device into bootloader
    21.   help                                     show this help message
    22.  
    23. options:
    24.   -w                                       erase userdata and cache (and format
    25.                                            if supported by partition type)
    26.   -u                                       do not first erase partition before
    27.                                            formatting
    28.   -s <specific device>                     specify device serial number
    29.                                            or path to device port
    30.   -l                                       with "devices", lists device paths
    31.   -p <product>                             specify product name
    32.   -c <cmdline>                             override kernel commandline
    33.   -i <vendor id>                           specify a custom USB vendor id
    34.   -b <base_addr>                           specify a custom kernel base address.
    35.                                            default: 0x10000000
    36.   -n <page size>                           specify the nand page size.
    37.                                            default: 2048
    38.   -S <size>[K|M|G]                         automatically sparse files greater
    39.                                            than size.  0 to disable
    40.  
    41. C:\Users\Scary Alien>
    The non-flashing (what I call "soft booting") of a ROM is done with a fastboot boot <img> command. This will not write the <img> file to the device (to it's NAND memory), but loads it up instead in/to RAM. Use this to boot-up a custom recovery without modifying your device with that fastboot command.

    The fastboot flash <partition> <img> will indeed write the given image to the specified partition.

    You will need an unlocked bootloader to use the fastboot command as discussed above.

    Can't help you with the EE stuff, though ;) :p, but I hope that helps.

    Cheers!
     
    my1stSmartPhone likes this.
  3. my1stSmartPhone

    Thread Starter

    Thanks, Scary Alien. I apologize for the long delay in responding, but I only have slivers of some weekends to dig into this in earnest, though I was perusing your response earlier.

    Just to help me browsing the online info, is it somewhat customary for veterans to sometimes refer to a operation as flashing even when they only mean booting?
     
  4. scary alien

    scary alien not really so scary
    VIP Member

    No worries! :) :thumbup:

    I actually don't see too many references to the "fastboot boot <image>" soft-booting option since most folks just use the actual fastboot flash.

    For example, I usually keep the stock recovery installed on my devices and just soft-boot a custom one when I need to do something like a Nandroid backup or installing (lol, "flashing" a .zip file inside custom recovery--yet another use/reference to "flashing", although it's usually more relevant/applicable when flashing a ROM in a custom recovery).

    Cheers!
     
    my1stSmartPhone likes this.
  5. my1stSmartPhone

    Thread Starter

    Thanks again, Scary Alien. I know that custom recoveries are like CWM (which I intend to use), but the rest of your bracketed sentence went over my head. But no need to elaborate, I think I can proceed with what I've come to understand.

    I also understand what you said about running the stock OS, but I have my reasons for not wanting to do that.
     
    scary alien likes this.
Loading...
Similar Threads - Does flash mean
  1. BuckLikesAndroid
    Replies:
    6
    Views:
    382
  2. watchintv
    Replies:
    2
    Views:
    359
  3. persistentone
    Replies:
    0
    Views:
    378
  4. metroidRoid2
    Replies:
    6
    Views:
    792
  5. Razvanescu
    Replies:
    1
    Views:
    583
  6. Laura Martin
    Replies:
    2
    Views:
    606
  7. ezio aulditore
    Replies:
    11
    Views:
    1,199
  8. kevinmac1
    Replies:
    22
    Views:
    2,693
  9. BeckJohn21
    Replies:
    2
    Views:
    1,584
  10. groston
    Replies:
    5
    Views:
    1,878

Share This Page

Loading...