Update or install Android from your PC with ADB

ADB, Android Debug Bridge, is a program included in the Google Android SDK developer platform that can be vital or very important to install a system update or to restore Android to factory settings if this is impossible through the automatic reset mode.
ADB allows you to control the device from the computer via USB cable, copy the files to the phone or tablet memory, install and uninstall applications, execute commands or even, for Google Nexus devices, to install and update Android.
In this article we see how to use ADB in general, especially to update or reinstall Android from scratch on Nexus 7, Nexus 4 or 5, which is particularly useful in the case of updates to the latest Android 4.4 KitKat version or to reinstall Android from scratch.
IMPORTANT NOTE: In another article we saw how to install custom ROMs or Android updates with ADB Sideload which is much simpler.
To use ADB from your Windows computer, you must first download the Google Android Platform tools package and extract the files to a folder.
On the Android smartphone it is important to go to the Android Developer Options and activate the USB debugging option.
To verify that ADB is working properly, connect the Android device to the computer via the USB cable used to recharge the cell, open a DOS command prompt (from the Start menu type cmd and press Enter) and move to the folder where the adb file is located. exe.
To do this, write the command: cd C: \ Users \ Username \ platform-tools_r28.0.1-windows \ platform-tools (if the path is different, use that of the folder where there is adb).
To see that everything works write the command: adb devices and see if there is an answer and the line indicating the presence of the device is displayed.
ADB can be used for :
- Install an apk application by writing adb install C: \ package.apk (if the app is in that location)
- Uninstall an application: adb uninstall package.name (you must use the type name com.rovio.angrybirds).
- Insert a file from the PC to the device: adb push C: \ file / sdcard / file .
- Take a file from your device and download it to your computer adb pull / sdcard / file C: \ file
- adb shell gives a Linux command line.
- adb backup -apk -shared -all -f C: \ Users \ NAME \ backup.ab is the command to make a complete backup of the mobile phone or tablet on the computer.
- adb restore C: \ Users \ NAME \ backup.ab is used to restore the backup.
If you want to install an Android update on Nexus devices, you can do it through ADB (in case the OTA update does not work or to anticipate it).
Before using ADB, to update Android on Nexus via OTA (Over The Air) just go to settings -> Information and look for new updates.
You can search Google for OTA updates that are not full versions and require that there is a specific version already installed.
The Zip downloaded and copied to the same folder where there is adb.exe that is .... Android \ android-sdk \ platform-tools .
To update Android from one version to another (for example on Nexus 7 from Android 4.3 (JWR66Y) to Android 4.4 (KRT16) ) without losing any data, the command is only one:
adb sideload filename.zip
This works now to update the Nexus 7 to Android 4.4 Kitkat using the following files for Nexus 7 2012 and Nexus 7 2013.
If the installation is not successful, perform this manual update procedure by extracting the zip always in the folder .... Android \ android-sdk \ platform-tools :
adb reboot bootloader
fastboot flash bootloader bootloader * .img
fastboot reboot-bootloader
(Only on 3G Nexus 7 version) fastboot flash radio radio-name.img
(Only on 3G Nexus 7 version) fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash boot boot.img
fastboot format cache
fastboot reboot
To install or reinstall Android on Nexus 7, 4, 5 by deleting everything .
(NB If the Nexus 7 tablet or mobile phone no longer starts, connect it to the computer via USB cable, switch it on in Recovery mode by pressing the power and volume down keys and holding down, once in the Bootloader press the volume down key twice and then press the power button to enter Recovery mode.
From the Recovery, select the Install Zip option and then adb sideload and stop like this).
SEE ALSO: Reset and restore Android even if your phone or tablet does not start
Download the " Factory Image " to install, ie the factory version of Android specific for Nexus 4, 7, 10 and Galaxy Nexus, from the official Google site.
Extract the archives until you get a folder with the system.img, boot.img, userdata.img, recovery.img files.
These 4 files must be copied to the SDK folder .... Android \ android-sdk \ platform-tools .
On the computer, from the Dos prompt, run the following commands:
adb reboot bootloader
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot flash bootloader bootloader * .img
fastboot reboot-bootloader
fastboot flash radio (only in versions with 3G)
fastboot reboot-bootloader (only in versions with 3G)
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash userdata userdata.img
fastboot flash recovery recovery.img
fastboot format cache
fastboot reboot
These are precise instructions but which must be integrated, especially in a short time, with an updated search in order to always have the latest version available.
Keep in mind that the Factory Image is the complete system while the OTAs are the updates to switch from one version to another.
All of these command line operations can also be done with the Nexus Toolkit program.

Leave Your Comment

Please enter your comment!
Please enter your name here