Difference between revisions of "OS: Android - Flashing Guide"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Sumber: https://forum.xda-developers.com/wiki/Flashing_Guide_-_Android ==Android Flashing Guide for S-Off Devices== ===Prerequisites=== To flash a ROM for your Android devic...")
 
 
(2 intermediate revisions by one other user not shown)
Line 12: Line 12:
 
# Obtain a [[ROM]] of your choice, many can be found in your devices development forum on XDA Forums or a alternate android development site.
 
# Obtain a [[ROM]] of your choice, many can be found in your devices development forum on XDA Forums or a alternate android development site.
 
# Once you have downloaded the ROM File, mount your phone's [[SD card]] and [http://www.samsung-messages-backup.com/resources/sync-android-phone-to-pc.html copy] there the .[[zip]] file.
 
# Once you have downloaded the ROM File, mount your phone's [[SD card]] and [http://www.samsung-messages-backup.com/resources/sync-android-phone-to-pc.html copy] there the .[[zip]] file.
# Power off the device and then [[boot]] up to [[recovery]], it is different per device. If you are unsure how to boot up to your Android device's recovery menu then look it up in your device page in this wiki, the forums or other tutorials on your device.
+
# Power off the device and then [[boot]] up to [http://www.tunesbro.com/android-data-recovery.html recovery], it is different per device. If you are unsure how to boot up to your Android device's recovery menu then look it up in your device page in this wiki, the forums or other tutorials on your device.
 
# In your phone's custom recovery [[bootloader]], locate the menu options which allow you to [[wipe]] the phone. Whenever changing roms, it is a good idea to make a [[Nandroid]] or [[BART]] [[How_to_backup_or_recover_via_Nandroid|backup]] first, then wipe Data/[[Factory]] and [[Dalvik]]-[[Cache]], OR, in the case of 4Ext Recovery Touch users, you can do a [[standard full wipe]] in one click: go to WIPE / FORMAT > Format all partitions EXCEPT SD Card, before flashing the new ROM, or if the ROM you want to flash comes with an [[Aroma Installer]], you can do the standard fullwipe in Aroma as it usually comes with that option before proceeding with the installation.
 
# In your phone's custom recovery [[bootloader]], locate the menu options which allow you to [[wipe]] the phone. Whenever changing roms, it is a good idea to make a [[Nandroid]] or [[BART]] [[How_to_backup_or_recover_via_Nandroid|backup]] first, then wipe Data/[[Factory]] and [[Dalvik]]-[[Cache]], OR, in the case of 4Ext Recovery Touch users, you can do a [[standard full wipe]] in one click: go to WIPE / FORMAT > Format all partitions EXCEPT SD Card, before flashing the new ROM, or if the ROM you want to flash comes with an [[Aroma Installer]], you can do the standard fullwipe in Aroma as it usually comes with that option before proceeding with the installation.
 
# Once your phone has been wiped, go back up to the root of the menu and select 'Flash Zip from SD Card' (the text may be different in your [http://www.coolmuster.com/android/lab-fone-for-android-guide.html Recovery]).
 
# Once your phone has been wiped, go back up to the root of the menu and select 'Flash Zip from SD Card' (the text may be different in your [http://www.coolmuster.com/android/lab-fone-for-android-guide.html Recovery]).
Line 61: Line 61:
  
 
===ROM Flashing===
 
===ROM Flashing===
 +
# apt install android-tools-adb
 +
# adb devices
 +
 +
* daemon not running. starting it now on port 5037 *
 +
* daemon started successfully *
 +
List of devices attached
 +
55cef322 device
 +
 +
# apt install android-tools-fastboot
 
# Obtain a ROM of your choice, and note the location on your computer.
 
# Obtain a ROM of your choice, and note the location on your computer.
 
# reboot your device into fastboot mode via one of the following options.
 
# reboot your device into fastboot mode via one of the following options.
Line 85: Line 94:
 
# If no errors arise during the flashing process then the ROM flash was successful. Reboot the device.
 
# If no errors arise during the flashing process then the ROM flash was successful. Reboot the device.
 
# With some root file explorer, remove the ROM file if you don't need it anymore, to free up space. Alternatively, use adb to remove the custom recovery: "adb shell rm data/custom_rom.zip"
 
# With some root file explorer, remove the ROM file if you don't need it anymore, to free up space. Alternatively, use adb to remove the custom recovery: "adb shell rm data/custom_rom.zip"
 +
 +
==adb sideload==
 +
 +
* Folks consider adb sideload <ZIP> when they have a ready to flash .zip file. The command is mostly used when booted into Recovery mode.
 +
* Fastboot on the other hand deals with per partition flashing at a time. E.g. fastboot flash  recovery <IMG> -- only flashes Recovery partition and not all the relevant partitions for ROM installation. ADB sideload <ZIP> on the other hand can achieve full ROM installation in one go.
 +
* You unlock the bootloader only if it is locked. Google Nexus devices comes with locked bootloaders while some Chinese Mediatek devices comes unlocked. You've to search web for your model.
 +
* No, the command doesn't work on every Android device. The reason is 2.
 +
 +
 +
 +
 +
  
 
== See also ==
 
== See also ==
Line 94: Line 115:
 
[[Category:Guide]]
 
[[Category:Guide]]
 
[[Category:Flashing| ]]
 
[[Category:Flashing| ]]
 
  
 
==Referensi==
 
==Referensi==
  
 
* https://forum.xda-developers.com/wiki/Flashing_Guide_-_Android
 
* https://forum.xda-developers.com/wiki/Flashing_Guide_-_Android

Latest revision as of 15:40, 28 April 2017

Sumber: https://forum.xda-developers.com/wiki/Flashing_Guide_-_Android

Android Flashing Guide for S-Off Devices

Prerequisites

To flash a ROM for your Android device you first need to meet the following prerequisites:

  1. An Android smartphone that has a custom recovery installed (ClockworkMod, TWRP, Etc.)
  2. A custom ROM that was developed or ported for your device.
  3. A microSD Card to hold the ROM file temporarily.

ROM Flashing

  1. Obtain a ROM of your choice, many can be found in your devices development forum on XDA Forums or a alternate android development site.
  2. Once you have downloaded the ROM File, mount your phone's SD card and copy there the .zip file.
  3. Power off the device and then boot up to recovery, it is different per device. If you are unsure how to boot up to your Android device's recovery menu then look it up in your device page in this wiki, the forums or other tutorials on your device.
  4. In your phone's custom recovery bootloader, locate the menu options which allow you to wipe the phone. Whenever changing roms, it is a good idea to make a Nandroid or BART backup first, then wipe Data/Factory and Dalvik-Cache, OR, in the case of 4Ext Recovery Touch users, you can do a standard full wipe in one click: go to WIPE / FORMAT > Format all partitions EXCEPT SD Card, before flashing the new ROM, or if the ROM you want to flash comes with an Aroma Installer, you can do the standard fullwipe in Aroma as it usually comes with that option before proceeding with the installation.
  5. Once your phone has been wiped, go back up to the root of the menu and select 'Flash Zip from SD Card' (the text may be different in your Recovery).
  6. Locate the ROM .Zip file you wish to flash.
  7. Confirm the flash by following the on-screen instructions (i.e.: pressing the trackball, pressing the call button, etc.)
  8. If no errors arise during the flashing process then the ROM flash was successful. Reboot the device.

RUU Flashing

  1. Connect your Android device to your computer. Most ROM Upgrade Utilities (RUUs) are .exe files which will only run in Microsoft Windows natively or in Linux/Mac OS X via Wine
  2. Download the RUU for your device, some can be found here at PCD Phones
  3. Run the RUU with your phone plugged in to your computer via its USB cable.
  4. Follow the RUU's instructions for flashing.
  5. Unless errors arise your device is now flashed.

App Installs/ROM Feature Installs via Flashing

Some ROMs have added features that are available to flash.

  1. To Flash the App/Rom Feature you must first download the .zip file.
  2. Mount your devices SD card and copy the .zip file over.
  3. Boot up to your devices custom recovery.
  4. Wipe your Dalvik-Cache in the Wipe Menu. And then go back to the recovery's main menu.
  5. This step may vary per device, there should be an option that says "Flash .zip from SD Card", select it.
  6. Select the .zip file you wish to flash.
  7. Confirm flashing of .zip file.
  8. Wait for the file to flash; and if successful, reboot.

Android Flashing Guide (with fastboot)

Prerequisites

To Flash a ROM for your Android device with fastboot you must have an unlocked bootloader or an engineering bootloader. Supported devices are listed below:

  1. Android Dev Phone 1
  2. Google I/O Device
  3. Nexus One
  4. Nexus S
  5. Sony XPeria and other devices - see the official instructions.

Unlocking your bootloader

The ADP1 and Google I/O Device do not require unlocking, however the new Nexus Devices do.

  1. Nexus One (cannot be relocked).
    1. fastboot oem unlock
    2. Accept/Decline warning on your devices screen.
  2. Nexus S (can be unlocked and relocked).
    1. fastboot oem unlock
    2. Accept/Decline warning on your devices screen.
    3. To relock the bootloader issue the following command:
    4. fastboot oem lock
    5. make a backup before flashing new ROMs.
    6. recovery tutorial if flashing failed.

ROM Flashing

  1. apt install android-tools-adb
  2. adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
55cef322	device
  1. apt install android-tools-fastboot
  2. Obtain a ROM of your choice, and note the location on your computer.
  3. reboot your device into fastboot mode via one of the following options.
    1. adb reboot bootloader (requires USB debugging to be turned on).
    2. power off the device then back on with 'vol up' + power button.
  4. Wipe your device.
    1. fastboot -w
  5. Update your ROM.
    1. fastboot update </path/to/your/RomFile.zip>
  6. Your phone will update and automatically reboot into the new ROM.

ROM update without SDcard

If you don't have an sd card, or your slot is broken you can try this trick, but you will need a custom recovery like Clockwork.

  1. Boot up your phone to recovery. Move your ROM file to the adb directory (or have adb in PATH), and start a command line prompt.
  2. adb shell
  3. mount data
  4. Ctrl+C
  5. adb push D:\custom_rom.zip /data/
  6. Wait until the push finishes, and restart your device to recovery again with "adb reboot-bootloader"
  7. mount data
  8. mount /data /sdcard (mount the data folder into your sdcard folder, so your recovery will think that you have an SD card installed)
  9. Locate the ROM .zip file you wish to flash.
  10. Confirm the flash by following the on-screen instructions (ie: pressing the trackball, pressing the call button, etc.)
  11. If no errors arise during the flashing process then the ROM flash was successful. Reboot the device.
  12. With some root file explorer, remove the ROM file if you don't need it anymore, to free up space. Alternatively, use adb to remove the custom recovery: "adb shell rm data/custom_rom.zip"

adb sideload

  • Folks consider adb sideload <ZIP> when they have a ready to flash .zip file. The command is mostly used when booted into Recovery mode.
  • Fastboot on the other hand deals with per partition flashing at a time. E.g. fastboot flash recovery <IMG> -- only flashes Recovery partition and not all the relevant partitions for ROM installation. ADB sideload <ZIP> on the other hand can achieve full ROM installation in one go.
  • You unlock the bootloader only if it is locked. Google Nexus devices comes with locked bootloaders while some Chinese Mediatek devices comes unlocked. You've to search web for your model.
  • No, the command doesn't work on every Android device. The reason is 2.




See also

Referensi