{"id":1818,"date":"2022-05-14T10:42:02","date_gmt":"2022-05-14T02:42:02","guid":{"rendered":"https:\/\/rogen.us\/what-is-the-difference-between-android-flashing-through-fastboot-and-recovery\/"},"modified":"2022-05-14T10:42:02","modified_gmt":"2022-05-14T02:42:02","slug":"what-is-the-difference-between-android-flashing-through-fastboot-and-recovery","status":"publish","type":"post","link":"https:\/\/rogen.us\/en\/what-is-the-difference-between-android-flashing-through-fastboot-and-recovery\/","title":{"rendered":"What is the difference between android flashing through fastboot &#038; recovery"},"content":{"rendered":"<p><![CDATA[\n\n<h2 id=\"partitionofandroidsystem\">Partition of Android system<\/h2>\n\n\n\n\n\n<p>The Android system generally divides the rom chip into 7 areas. If you add the built-in sd card partition, it will be 8:<\/p>\n\n\n\n\n\n<p><em>1<\/em>. <strong>Hboot<\/strong> partition  \/\/for booting.<\/p>\n\n\n\n\n\n<p><em>2<\/em>. <strong>Radio<\/strong> partition  \/\/for the driver.<\/p>\n\n\n\n\n\n<p><em>3<\/em>. <strong>Recovery<\/strong> partition  \/\/for recovery.<\/p>\n\n\n\n\n\n<p><em>4<\/em>. <strong>Boot<\/strong> partition  \/\/system kernel.<\/p>\n\n\n\n\n\n<p><em>5<\/em>. <strong>System<\/strong> partition  \/\/system files.<\/p>\n\n\n\n\n\n<p><em>6<\/em>. <strong>Cache<\/strong> partition  \/\/system cache.<\/p>\n\n\n\n\n\n<p><em>7<\/em>. <strong>Userdata<\/strong> partition  \/\/user data.<\/p>\n\n\n\n\n\n<p>The 7 partition mainly installs some software and is a partition that users can use. The size of this partition directly affects the amount of software that can be installed. That is to say, the <strong>Userdate<\/strong> partition is what we often call &#8220;available rom&#8221;. In Android, although the software can be installed to the SD card, some system software such as desktop software and desktop display plug-ins are best installed in the <strong>Userdata<\/strong> partition, otherwise there will be some loading problems. And even if you install all the software on the card, the <strong>Userdata<\/strong> partition will continue to be shrinked. Just like in the computer, even if you install the software to the D drive, some system files will still be generated in the C drive.  <\/p>\n\n\n\n\n\n<h2 id=\"bootloader\">BootLoader<\/h2>\n\n\n\n\n\n<p>Simply put, <strong>BootLoader<\/strong> is a small program that runs before the operating system kernel runs. Through this small program, we can initialize the hardware device and establish the memory space map, so as to bring the software and hardware environment of the system to a suitable state, so as to prepare the correct environment for the final call to the operating system kernel.<\/p>\n\n\n\n\n\n<p>In embedded systems, there is usually no firmware program like BIOS (note that some embedded CPUs also have a short startup program embedded), so the loading and starting tasks of the entire system are completely completed by <strong>BootLoader<\/strong>. For example, in an embedded system based on ARM7TDMI core, the system usually starts to execute from address 0x00000000 when it is powered on or reset, and the <strong>BootLoader<\/strong> program of the system is usually arranged at this address.  <\/p>\n\n\n\n\n\n<h2 id=\"bootloaderfastboot\">BootLoader &amp; FastBoot<\/h2>\n\n\n\n\n\n<p>Literally speaking, <strong>Fastboot<\/strong> means &#8220;fast boot&#8221;. <strong>Fastboot<\/strong> can be said to be a communication protocol, through which the computer can directly write files (.img) to different partitions of the mobile phone system.<\/p>\n\n\n\n\n\n<p><strong>Fastboot<\/strong> is mainly used as a PC command line tool for USB communication with <strong>Bootloader<\/strong>.It is generally mainly used to transfer flash files to <strong>Bootloader<\/strong> for file partition reburning. Therefore, when using it, there must be a PC and the USB cable must always be connected.<\/p>\n\n\n\n\n\n<p><strong>Bootloader<\/strong> support is required to use <strong>Fastboot<\/strong>, however, not every company&#8217;s products support this feature.<\/p>\n\n\n\n\n\n<p>Usually the <strong>Fastboot<\/strong> that everyone talks about usually refers to the <strong>Fastboot<\/strong> mode of Android phones. In Android phones, <strong>Fastboot<\/strong> is a lower-level flashing mode than <strong>Recovery<\/strong>. Simply put, it is a flashing mode that uses a USB data cable to connect to a computer. <\/p>\n\n\n\n\n\n<p>In addition, Android phones also have a flashing method called &#8220;card flashing&#8221;. The difference between the two is as follows:<\/p>\n\n\n\n\n\n<p><strong>Fastboot Flashing<\/strong>: Write the <em>.img<\/em> file directly to the hard disk of the mobile phone. I personally think this method is quicker and less troublesome. But you must use a computer and data cable.<\/p>\n\n\n\n\n\n<p><strong>Card Flashing<\/strong>: It is to use the function of <strong>Recovery<\/strong> to update the system from the SD card. If you want to flash a third-party ROM, you must flash a third-party <strong>Recovery<\/strong>. Only <strong>Fastboot<\/strong> mode can flash <em>recovery.img<\/em>. There is a limit to the card flashing, you must copy the ROM (Android system) you want to update to the SD card. If the phone is already bricked. It can only be flashed with <strong>Fastboot<\/strong>.<\/p>\n\n\n\n\n\n<h2 id=\"howtoenterfastbootbootloadermode\">How to enter Fastboot (bootloader) mode?<\/h2>\n\n\n\n\n\n<p><em>1<\/em>. Most Android phones can be turned off, then press and hold the [<strong>Power<\/strong>] button + [<strong>Volume +<\/strong>] button at the same time, about 2-3s later, you can enter <strong>Fastboot<\/strong> mode.<\/p>\n\n\n\n\n\n<p><em>2<\/em>. As a developer, you can type the following command when the phone is turned on:\n<code>adb reboot bootloader<\/code>.<\/p>\n\n\n\n\n\n<p>Then you can execute the following <strong>Fastboot<\/strong> commands: <br \/>\n<code>fastboot flashing unlock<\/code>  \/\/Device unlock.<\/p>\n\n\n\n\n\n<p><code>fastboot erase {partition}<\/code> \/\/Erase partition.<\/p>\n\n\n\n\n\n<p><code>fastboot  erase  frp<\/code>  \/\/Erase the frp partition, frp is Factory Reset Protection, which is used to prevent user information from leaking after the phone is lost.<\/p>\n\n\n\n\n\n<p><code>fastboot  flash  boot  boot.img<\/code> \/\/Flash the boot partition.<\/p>\n\n\n\n\n\n<p><code>fastboot  flash  system  system.img<\/code>  \/\/Flash the system partition.<\/p>\n\n\n\n\n\n<p><code>fastboot  flash  recovery  recovery.img<\/code>  \/\/Flash the recovery partition.<\/p>\n\n\n\n\n\n<p><code>fastboot flashall<\/code>  \/\/Burn all partitions, note: This command will find all <em>img<\/em> files in the current directory, burn these <em>img<\/em> files to all corresponding partitions, and restart the phone.<\/p>\n\n\n\n\n\n<p><code>fastboot  format  data<\/code>  \/\/Format the data partition.<\/p>\n\n\n\n\n\n<p><code>fastboot  flashing lock<\/code>  \/\/Lock the device, and the flashing is complete.<\/p>\n\n\n\n\n\n<p><code>fastboot  continue<\/code>  \/\/Reboot the device automatically.<\/p>\n\n\n\n\n\n<p><code>fastboot reboot<\/code>  \/\/Reboot the device.<\/p>\n\n\n\n\n\n<p><code>fastboot reboot-bootloader<\/code>  \/\/Reboot to bootloader.<\/p>\n\n\n\n\n\n<p><code>fastboot devices<\/code>  \/\/Discover mobile phones, showing which mobile phones are currently connected through fastboot.<\/p>\n\n\n\n\n\n<p>Burn the <strong>Boot<\/strong>, <strong>System<\/strong>, and <strong>Recovery<\/strong> partitions at one time. <br \/>\n<em>1<\/em>. Create a zip package containing boot.img, system.img, recovery.img files.<\/p>\n\n\n\n\n\n<p><em>2<\/em>. Execute <code>fastboot update {*.zip}<\/code> command.<\/p>\n\n\n\n\n\n<h2 id=\"introductiontorecoverymode\">Introduction to Recovery Mode<\/h2>\n\n\n\n\n\n<p><strong>Recovery<\/strong> is more like a small management system. But the function is simple and the management is limited. In the <strong>Recovery<\/strong> mode, part of the file system will be loaded, so you can read the <em>update.zip<\/em> in the SD card for flashing. Of course, you can also clear the <strong>cache<\/strong> and <strong>user data<\/strong>.<\/p>\n\n\n\n\n\n<p>This mode can be modified according to the needs of users, so there are official <strong>Recovery<\/strong> modes and third-party <strong>Recovery<\/strong> modes. The third-party <strong>Recovery<\/strong> mode can recognize third-party <strong>ROM<\/strong> packages, so it can be used to flash the device. The official <strong>Recovery<\/strong> generally does not recognize third-party <strong>zip<\/strong> files. <\/p>\n\n\n\n\n\n<p>When flashing with <strong>Recovery<\/strong>, the flashing package is usually placed in the SD card, so the flashing here is generally called card flashing.  <\/p>\n\n\n\n\n\n<h2 id=\"flashtherec\">Flash the REC<\/h2>\n\n\n\n\n\n<p><em>1<\/em>. Enter the <strong>bootloader<\/strong> (<strong>fastboot<\/strong>) mode;<\/p>\n\n\n\n\n\n<p><em>2<\/em>. <code>fastboot flash recovery recovery.img<\/code>.<\/p>\n\n]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Partition of Andr&#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[250],"tags":[],"class_list":["post-1818","post","type-post","status-publish","format-standard","hentry","category-coding-notes","wpcat-250-id"],"views":82,"_links":{"self":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/posts\/1818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/comments?post=1818"}],"version-history":[{"count":0,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/posts\/1818\/revisions"}],"wp:attachment":[{"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/media?parent=1818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/categories?post=1818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rogen.us\/en\/wp-json\/wp\/v2\/tags?post=1818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}