Tag Archives: install adb

How To dirty install a custom ROM

This post assumes you are experienced in installing custom ROM’s and have TWRP recovery already installed on your Phone

What is a Dirty Install : The difference between a clean install and a dirty install is that here there is no wipe or cleaning up of the existing data.

Why or when would you do a Dirty install: When you do not want to lose existing data on your phone, are too lazy to make a backup of your data 🙂

PreRequisites

  • Smartphone with TWRP installed
  • A working USB data cable(there are cables for charging only )
  • Download the zip file of the custom ROM you plan to install

    Ensure you have downloaded a ROM which was built specifically for your device.
    Flashing builds incompatible with your device can brick your phone.
  • Take a backup of any important data you have on your phone
  • Ensure you have developer options set on your phone

The Steps

  • On your phone remove any pattern , fingerprint locks you may have set
    This is to avoid any issues during the install process
  • Reboot to Recovery

    You can also boot into recovery by connecting your phone with a data USB cable to and adb enable computer and typing the below command on a console

    adb reboot recovery
  • Copy the .zip file – the ROM you want to install – from your PC to your phone

    You can also do this using the below adb command from the PC console

    adb push download.zip /sdcard/
  • In TWRP main screen tap the Install button
  • Browse to the zip file and swipe to install
  • Once the install is successful you will see an option to Reboot to System

After this the new OS should boot on your phone. Enjoy !!

How to Clean Install a custom ROM

This post assumes you are experienced in installing custom ROM’s and have TWRP recovery already installed on your Phone

PreRequisites

  • Smartphone with TWRP installed
  • A working USB data cable(there are cables for charging only )
  • Download the zip file of the custom ROM you plan to install

    Ensure you have downloaded a ROM which was built specifically for your device.
    Flashing builds incompatible with your device can brick your phone.
  • Take a backup of any important data you have on your phone
  • Ensure you have developer options set on your phone

The Steps

  • On your phone remove any pattern , fingerprint locks you may have set
    This is to avoid any issues during the install process
  • Reboot to Recovery

    You can also boot into recovery by connecting your phone with a data USB cable to and adb enable computer and typing the below command on a console

    adb reboot recovery
  • In the TWRP tap on the button marked Factory Reset
  • In the TWRP tap on the button marked Format Data

    the would remove any encryption on your phone if not encrypted wipe Dalvik + cache + data
  • Copy the .zip file – the ROM you want to install – from your PC to your phone

    You can also do this using the below adb command from the PC console

    adb push download.zip /sdcard/
  • In TWRP main screen tap the Install button
  • Browse to the zip file and swipe to install
  • Once the install is successful you will see an option to Reboot to System

After this the new OS should boot on your phone. Enjoy !!

How To-set up adb

This post covers the set up of adb tool on windows, mac or linux systems. To find out how to install adb or fastboot click here

Tip: Disable any security keys, patterns or passwords you have set on your device before trying out any installations. Having a password or lock can cause issues in some installations.You can always set them up later.

To use adb with your device, you’ll need to enable developer options and USB debugging:

  • Open Settings, and select “About”.
  • Tap on “Build number” seven times.
  • Go back, and select “Developer options”.
  • Scroll down, and check the “Android debugging” or “USB debugging” entry under “Debugging”.
  • Plug your device into your computer.
  • On the computer, open up a terminal/command prompt and type

    adb devices
  • A dialog should show on your device, asking you to allow usb debugging.

  • Check “always allow”, and choose “OK”.

adb should now be running on your device.

Want to setup Fastboot ? click here

How To-Set up Fastboot on your device

Tip: Disable any security keys, patterns or passwords you have set on your device before trying out any installations. Having a password or lock can cause issues in some installations.You can always set them up later.

Through the PC:

  • Connect your device to an adb enabled PC
    An adb enabled PC is a PC where adb has been installed and is working.
  • Type the below command in a console to check your device is detected by the adb installation

    adb devices
  • This should display a screen like this

this screenshot is from a PC with ubuntu

  • If your console shows an alpha numeric value along with ‘Device’ that would mean you device has been detected
  • If the screen shows unauthorized then it would mean you need to tweak developer options on your PC…check the steps here
  • If the device has been detected then type the below command to reboot to fastboot mode

    adb reboot bootloader
  • This would reboot the device into the bootloader or fastboot mode . On xiaomi devices the device screen would look like this

Through the device keys

Another way to go to the bootloader screen directly from your device is to use the device keys.

The difference between this and the previous method is that this one does not require and adb enabled PC.

This method also requires you to be nimble and may not always work perfectly. Requires a couple of tries to get it right.

Here all you do is browse and find out the correct combination for your device

For example check out this set of key combinations for Google and a few Samsung devices

or search for each device and then check for the device specific boot model.
For e.g. here you can find the Recovery and Download modes for the Xiaomi Mi A1 tissot

How To – Install adb and fastboot

This post only covers the installation of adb or fastboot on windows , mac or linux systems. To set up adb or fastboot scroll to the end to find links or click here

Tip: Disable any security keys, patterns or passwords you have set on your device before trying out any installations. Having a password or lock can cause issues in some installations.You can always set them up later.

On Windows PCs

  • Download the Windows zip from Google.
  • Extract it to a folder on your system – for example, %USERPROFILE%\adb-fastboot
  • On Windows 7/8:
    • From the desktop, right-click My Computer and select Properties
    • In the System Properties window, click on the Advanced tab
    • In the Advanced section, click the Environment Variables button
    • In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button
    • Append ;%USERPROFILE%\adb-fastboot\platform-tools to the end of the existing Path definition (the semi-colon separates each path entry)
  • On Windows 10:
    • Open the Start menu, and type “advanced system settings”
    • Select “View advanced system settings”
    • Click on the Advanced tab
    • Open the “Environment Variables” window
    • Select the Path variable under “System Variables” and click the “Edit” button
    • Click the “Edit Text” button
    • Append ;%USERPROFILE%\adb-fastboot\platform-tools to the end of the existing Path definition (the semi-colon separates each path entry)
  • Install the universal adb driver, and reboot.

On macOS

  1. Download the macOS zip from Google.
  2. Extract it to a folder on your system – for example, ~/adb-fastboot.
  3. Add the following to ~/.bash_profile:if [ -d "$HOME/adb-fastboot/platform-tools" ] ; then export PATH="$HOME/adb-fastboot/platform-tools:$PATH" fi
  4. Log out and back in.

On Linux

  1. Download the Linux zip from Google.
  2. Extract it to a folder on your system – for example, ~/adb-fastboot.
  3. Add the following to ~/.profile:if [ -d "$HOME/adb-fastboot/platform-tools" ] ; then export PATH="$HOME/adb-fastboot/platform-tools:$PATH" fi
  4. Log out and back in.
  5. You may also need to set up udev rules: see this repository for more info.


    Click here to learn how to set up adb or fastboot