Adb reboot bootloader error closed

Приветствую. Почему при вводе команды: adb reboot bootloader выводит ошибку: error: closed? Хочу поставить TWRP

Ответ на:

комментарий
от romanlinux 09.01.21 07:43:28 MSK

Проблема в том, что нет доступа до андройда. Как это можно сделать без доступа до OS?

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от continue 09.01.21 07:52:06 MSK

Как это можно сделать без доступа до OS?

Из download mode штатным самсунговским обновлятором? А после этого включив отладку по usb делать то что там задумано?

init_6 ★★★★★

(09.01.21 07:56:29 MSK)



Последнее исправление: init_6 09.01.21 07:57:22 MSK
(всего

исправлений: 1)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от init_6 09.01.21 07:56:29 MSK

Ответ на:

комментарий
от continue 09.01.21 07:58:12 MSK

А через adb/fastboot вообще никак?

У тебя отключена отладка по usb и/или вообще заблокирован загрузчик. Я правильно вангую? Ппц почему информацию от вас надо клещами вытаскивать. Чтоб поставить twrp необходимо сперва разрешить отладку по usb и разблокировать загрузчик. Дальше думай сам если тебе лень написать нормально всю информацию.

init_6 ★★★★★

(09.01.21 08:05:23 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от init_6 09.01.21 08:05:23 MSK

Нужна перепрошивка OS. Человек забыл пароль от гугл аккаунта. Какая дополнительная информация нужна?

  • Показать ответы
  • Ссылка

Ответ на:

комментарий
от continue 09.01.21 08:21:26 MSK

Человек забыл пароль от гугл аккаунта.

Восстанавливай пароль от аккаунта. Входи. Разблокируй отладку по usb. Проходи процедуру разблокировки загрузчика. И вперед.

Можешь попробовать то что я написал выше но учти, в большинстве случаев, это, скорее всего, тебе не поможет. Так устроена защита в android у современных аппаратов. Пароль от аккаунта на телефоне надо знать. Мало того установка многих сторонних прошивок начинается с удаления аккаунта на стоке.

init_6 ★★★★★

(09.01.21 09:26:59 MSK)

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от init_6 09.01.21 09:26:59 MSK

Ответ на:

комментарий
от continue 09.01.21 09:47:29 MSK

Нет возможности восстановить пароль.

Страдай.

init_6 ★★★★★

(09.01.21 09:51:21 MSK)

  • Ссылка

Ответ на:

комментарий
от continue 09.01.21 09:47:29 MSK

Отжал телефон, а пароль отжать забыл?

anonymous

(09.01.21 11:10:17 MSK)

  • Ссылка

Ответ на:

комментарий
от continue 09.01.21 08:21:26 MSK

по идее можно попробовать сбросить к заводским настройкам и войти в новый гугл аккаунт

  • Показать ответы
  • Ссылка

Ответ на:

комментарий
от romanlinux 09.01.21 21:28:38 MSK

Не прокатит, если аппарат был заблокирован. Там будет особый секс с затиранием особых разделов.

Radjah ★★★★★

(10.01.21 03:09:43 MSK)

  • Ссылка

Ответ на:

комментарий
от romanlinux 09.01.21 21:28:38 MSK

по идее можно попробовать сбросить к заводским настройкам и войти в новый гугл аккаунт

Ага и на старых телефонах это даже работало. А вот в более новых девайсах если ты «забыл» пароль от аккаунта аппарат тебя его спросит даже после сброса к заводским настройкам. Потому как владелец всегда может восстановить явки, пароли.

init_6 ★★★★★

(10.01.21 03:42:53 MSK)

  • Ссылка

Удваиваю пожелание страдать. Ты не ознакомился даже с базовой теорией и скрываешь «некрасивые» подробности, влияющие на решение задачи. Тут таких не любят.

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от izzholtik 10.01.21 04:10:33 MSK

А что я скрываю? Что мне нужно сказать? Нет доступа вообще никакого к google аккаунту. Я хочу поставить TWRP и потом с 4pda поставить прошивку для телефона. Я не понимаю, какие я подробности скрываю? Может вы спросите, а я отвечу?

  • Показать ответ
  • Ссылка

Ответ на:

комментарий
от continue 10.01.21 13:37:19 MSK

Чек-коробка имеются? Обратитесь в сервис-центр. «забыл пароль» – звучит как стандартная проблема, должны помочь.

the1 ★★

(11.01.21 16:00:39 MSK)

  • Ссылка

Ты темнишь, но всё же подскажу, гугли «frp unlock samsung MODEL», adb и перепрошивка тебе никак не помогут.

ddidwyll ★★★

(11.01.21 17:33:26 MSK)

  • Ссылка

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.

I have an old Samsung Tab 3 (NT210) that is bricked after not being used for a few years — it gets stuck at the Samsung logo screen after being turned on. However, I am able to boot into the recovery screen.

I have been looking at various online solutions and most seem to suggest flashing custom recovery and ROM to solve this issue. I have managed to find a twrp recovery image and a custom ROM for the device, and had decided to load them into the device via adb. I followed the instructions from this webpage: https://how2do.org/how-to-use-adb-sideload-to-install-roms-updates-restore/

I first ensured that my device was recognised as shown:

adb devices
List of devices attached
5200ee695a69c000        sideload

However, the process will fail at ‘adb reboot recovery’ as I keep getting the following error:

adb reboot recovery
error: closed

Further research into this problem showed that likely cause of this error is because the device is using stock recovery. I can also confirm that the device has not been rooted before. Commands such as adb shell or adb usb will also return the «error: closed» error message.

Is it still possible to root or salvage the device? I can still charge the device and boot it into recovery or download mode, but that’s about it.

Thanks for the help!


ADB sideload, как пользоваться


ADB sideload, как пользоваться. Команда adb sideload очень прекрасна и с помощью ее можно легко выполнить обновление прошивки или выполнить восстановление Android в случае если он не загружается!

Еще раз о том для чего нужна команда ADB SIDELOAD — данная команда необходима для того чтобы выполнять прошивку ZIP архивов из меню recovery или если отсутствует bootloader. У данной команды есть аналог fastboot -w update, но у многих Android девайсов утилита fastboot не работает, соответственно adb sideload является универсальным средством.

Принцип работы ADB Sideload

 ZIP архив-обновление находится в папке с утилитой adb, смартфон или планшет переводится в режим recovery или bootloader. Запускается утилита adb и прописывается командаadb sideload <название_файла>.zip, после чего архив копируется в Android и затем прошивается.

Необходимое для ADB Sideload

  1. Компьютер или ноутбук
  2. Скачать драйвер Android и после установить его
  3. Скачать программу — ADB RUN или ADB
  4. Заряд Android устройства не меньше 40% или больше
  5. Оригинальный, неповрежденный кабель MicroUSB
  6. Включить Отладка по USB на Android
  7. ZIP архив-обновление

Инструкция использования ADB Sideload

В данной статье будет предложено два варианта как можно воспользоваться adb sideload, первый способ — демонстрация как все работает от начала до конца, второй способ — автоматизированный, без лишних действий и писанины руками.

Способ №1

1.   Подключаем устройство Android к компьютеру
2.   Файл ZIP архив-обновление переместить по пути C:/adb/progbin
3.   Запускаем программу ADB RUN или переходим в меню Manual Command -> ADB

ADB sideload, как пользоваться

 4.   Далее проверим «видит» ли adb ваш Android для этого наберем команду:

adb devices

И должны получить следующий ответ:

C:/ADB/adb/progbin> adb devices
List of devices attached
 NA36XWxxxххххх

Если получим ответ (ошибка):

C:/ADB/adb/progbin> adb devices
 List of devices attached
 NA36XWxxxххххх offline

То необходимо сделать компьютер доверенным.

Если получим ответ (ошибка):

C:/ADB/adb/progbin> adb devices
 List of devices attached

То есть ничего нет, после attached, то устройство не видно (переустанавливаем драйвера, меняем порт USB, меняем кабель USB)

5.   Переводим устройство в режим Recovery или режим Bootloader

6.   В зависимости от Recovery в некоторых случаях необходимо включать принудительно включать на устройстве режим передачи и установки Sideload:

Если у вас стандартное или CWM Recovery оно может называться

  • install zip from sileload
  • apply update from ADB
  • ADB Sideload

и находится это меню может в главном разделе Recovery, раздел Advanced или Install ZIP.

ADB sideload, как пользоваться

Если у вас TWRP Recovery

Чтобы активировать sideload перейдите в Advanced -> ADB Sideload и потянуть нижний ползунок вправо:

ADB sideload, как пользоваться

Далее все остальные действия происходят на компьютере.

7.   В ADB RUN пишем следующую команду:

 adb sideload XXXXXXXX.zip

Где XXXXXXXX — точное название прошиваемого ZIP обновления (учитывая ЗаГЛАвные или строЧНЫЕ, как написано, названия иначе получите ошибку)

После чего начнется перемещение обновления (прошивки) на Android и обновление.

  • Если вы получили ошибку error: closed — не активировали sideload на Android
  • Если вы получили ошибку error: device not found — не видит Android, меняйте ядро, recovery, перезапустить Android и снова перевести в режим.

Способ №2

1.   Подключаем устройство Android к компьютеру
2.   Запускаем программу ADB RUN и переходим в меню Reboot Device  -> выбрать Reboot Recovery или Reboot Bootloader (если нет на устройстве Recovery)
3.   Активируем sideload на устройстве

ADB sideload, как пользоваться

4.   Вернуться в главное меню и перейти в меню Move -> Sideload

ADB sideload, как пользоваться
5.   Выбрать вначале пункт Copy ZIP to Directory, в открывшееся окно переместить ZIP архив-обновление, после закрыть окно

6.   Выбрать Istall ZIP после чего, выбрать прошиваемый файл, после чего начнется прошивка.

  • Если вы получили ошибку error: closed — не активировали sideload на Android;
  • Если вы получили ошибку error: device not found — не видит Android, меняйте ядро, recovery, перезапустить Android и снова перевести в режим.

Содержание

  1. Adb error closed что это
  2. Android ADB Sideloading – Install & Update ROMs
  3. What Is Android Debug Bridge (ADB)?
  4. What is ADB Sideload?
  5. How To Install ADB?
  6. Download ADB & Fastboot Files Without Downloading The Whole SDK
  7. Before You Start Using ADB
  8. Using ADB The Right Way
  9. Testing Whether Your Phone Is Connected Properly
  10. Using ADB Sideload To Apply Update Packages And Flash ROMs
  11. Difference Between ADB Sideload Command And Fastboot Flash Command
  12. List Of Useful ADB Commands
  13. Common Error And Troubleshooting Tips
  14. ADB showing “error: closed”
  15. How to fix ADB sideload cannot read zip file error
  16. Final Words
  17. About Abhijith V M

Adb error closed что это

Platform-tools: r33.0.3
ADB: 1.0.41 (33.0.3-8952118)
Fastboot: 33.0.3-8952118
Make_f2fs (casefold): 1.15.0 (2022-05-20)
Mke2fs: 1.46.2 (28-Feb-2021)
Последнее обновление утилит в шапке: 23.08.2022

ADB (Android Debug Bridge — Отладочный мост Android) — инструмент, который устанавливается вместе с Android-SDK и позволяет управлять устройством на базе ОС Android.
Работает на всех Android-устройствах, где данный функционал не был намеренно заблокирован производителем.
Здесь и далее: PC — ПК, компьютер к которому подключено устройство.
ADB — консольное приложение для PC, с помощью которого производится отладка Android устройств, в том числе и эмуляторов.
Работает по принципу клиент-сервер. При первом запуске ADB с любой командой создается сервер в виде системной службы (демона), которая будет прослушивать все команды, посылаемые на порт 5037.
Официальная страница
ADB позволяет:

  • Посмотреть какие устройства подключены и могут работать с ADB.
  • Просматривать логи.
  • Копировать файлы с/на аппарат.
  • Устанавливать/Удалять приложения.
  • Удалять (очищать) раздел data.
  • Прошивать (перезаписывать) раздел data.
  • Осуществлять различные скрипты управления.
  • Управлять некоторыми сетевыми параметрами.

Поставляется ADB в составе инструментария разработчика Андроид (Android SDK), который, в свою очередь входит в состав Android Studio.

Если что-то неправильно, то в списке подключенных устройств (List of devices attached) будет пусто.

Скрытые команды ADB
adb -d Команда посылается только на устройство подключенное через USB.
Внимание: Выдаст ошибку, если подключено больше одного устройства.

adb -e Команда посылается на устройство в эмуляторе.
Внимание: Выдаст ошибку, если подключено больше одного эмулятора.

adb -s Команда посылается на устройство с указанным серийным номером:

adb -p Команда посылается на устройство с указанным именем:
Если ключ -p не указан, используется значение переменной ANDROID_PRODUCT_OUT.

adb devices Список всех подсоединенных устройств.

adb connect [: ] Подсоединиться к андроид хосту по протококу TCP/IP через порт 5555 (по умолчанию, если не задан).

adb disconnect [ [: ]] Отсоединиться от андроид подключенного через TCP/IP порт 5555 (по умолчанию, если не задан).
Если не задан ни один параметр, отключиться от всех активных соединений.

adb push Копировать файл/папку PC->девайс.

adb pull [ ] Копировать файл/папку девайс->PC.

adb sync [ ] Копировать PC->девайс только новые файлы.
Ключи:
-l Не копировать, только создать список.

adb shell Запуск упрощенного unix shell.
Примеры использования

adb emu Послать команду в консоль эмулятора

adb install [-l] [-r] [-s] Послать приложение на устройство и установить его.
Пример: adb install c:/adb/app/autostarts.apk Установить файл autostarts.apk лежащий в папке /adb/app/ на диске с:
Ключи:
-l Блокировка приложения
-r Переустановить приложение, с сохранением данных
-s Установить приложение на карту памяти
Установка split apk

adb uninstall [-k] Удаление приложения с устройства.
Ключи:
-k Не удалять сохраненные данные приложения и пользователя.

adb wait-for-device Ждать подключения устройства.

adb start-server Запустить службу/демон.

adb kill-server Остановить службу/демон.

adb get-state Получить статус:
offline Выключен.
bootloader В режиме начальной загрузки.
device В режиме работы.

adb get-serialno Получить серийный номер.

adb status-window Непрерывный опрос состояния.

adb remount Перемонтировать для записи. Требуется для работы скриптов, которые изменяют данные на.

adb reboot bootloader Перезагрузка в режим bootloader.

adb reboot recovery Перезагрузка в режим recovery.

adb root Перезапуск демона с правами root

adb usb Перезапуск демона, прослушивающего USB.

adb tcpip Перезапуск демона, прослушивающего порт TCP.

adb ppp [параметры] Запуск службы через USB.
Note: you should not automatically start a PPP connection. refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
Параметры:
defaultroute debug dump local notty usepeerdns

FastBoot — консольное приложение для PC. Используется для действий над разделами

fastboot devices Список присоединенных устройств в режиме fastboot.
fastboot flash Прошивает файл .img в раздел устройства.

fastboot erase Стереть раздел.
Разделы: boot, recovery, system, userdata, radio
Пример: fastboot erase userdata Стирание пользовательских данных.

fastboot update Прошивка из файла имя_файла.zip

fastboot flashall Прошивка boot + recovery + system.

fastboot getvar Показать переменные bootloader.
Пример: fastboot getvar version-bootloader Получить версию bootloader.

fastboot boot [ ] Скачать и загрузить kernel.

fastboot flash:raw boot [ ] Создать bootimage и прошить его.

fastboot devices Показать список подключенных устройств.

fastboot continue Продолжить с автозагрузкой.

fastboot reboot Перезагрузить аппарат.

f astboot reboot-bootloader Перезагрузить девайсв режим bootloader.
Перед командами fastboot можно использовать ключи:
-w стереть данные пользователя и кэш
-s Указать серийный номер устройства.
-p

Указать название устройства.
-c Переопределить kernel commandline.
-i Указать вручную USB vendor id.
-b Указать в ручную базовый адрес kernel.
-n

Указать размер страниц nand. по умолчанию 2048.

Команду logcat можно использовать с машины разработки
$ adb logcat
или из удаленного shell
# logcat Каждое сообщение лога в Android имеет тэг и приоритет
Тэг – это строка указывающая компонент системы, от которого принято сообщение (например: View для системы view)
Приоритет – имеет одно из нижеследующих значений (в порядке от меньшего к большему):
V — Verbose (Низший приоритет).
D — Debug
I — Info
W — Warning
E — Error
F — Fatal
S — Silent (Наивысший приоритет, при котором ничего не выводится).

Получить список тэгов, используемых в системе, вместе с их приоритетами можно запустив logcat. В первых двух столбцах каждого из выведенных сообщений будут указаны / .
Пример выводимого logcat сообщения:
I/ActivityManager( 585): Starting activity: Intent

Для уменьшения вывода лога до приемлемого уровня нужно использовать выражения фильтра. Выражения фильтра позволяют указать системе нужные комбинации и , остальные сообщения система не выводит.
Выражения фильтра имеют следующий формат : . где указывает нужный тэг, указывает минимальный уровень приоритета для выбранного тэга. Сообщения с выбранным тэгом и приоритетом на уровне или выше указанного записываются в лог. Можно использовать любое количество пар : в одном выражении фильтра. Для разделения пар : используется пробел.

Пример ниже выводит в лог все сообщения с тэгом «ActivityManager» с приоритетом «Info» или выше, и сообщения с тэгом «MyApp» и приоритетом «Debug» или выше:
adb logcat ActivityManager:I MyApp:D *:S
Последний элемент в выражении фильтра *:S устанавливает приоритет «silent» для всех остальных тэгов, тем самым обеспечивая вывод сообщений только для «View» и «MyApp». Использование *:S – это отличный способ для вывода в лог только явно указанных фильтров (т.е. в выражении фильтра указывается «белый список» сообщений, а *:S отправляет все остальное в «черный список»).

При помощи следующего выражения фильтра отображаются все сообщения с приоритетом «warning» или выше для всех тэгов:
adb logcat *:W

Если logcat запускается на машине разработчика (не через удаленный adb shell), можно также установить значение выражения фильтра по умолчанию задав переменную окружения ANDROID_LOG_TAGS:
export ANDROID_LOG_TAGS=»ActivityManager:I MyApp:D *:S»

Следует обратить внимание что задав переменную окружения ANDROID_LOG_TAGS она не будет работать в эмуляторе/устройстве, если вы будете использовать logcat в удаленном shell или используя adb shell logcat.
Вышеописанная команда export работает в ОС *nix и не работает в Windows.

Контроль формата вывода лога

Сообщения лога в дополнение к тэгу и приоритету содержат несколько полей метаданных. Можно изменять формат вывода сообщений показывая только конкретные поля метаданных. Для этого используется параметр -v и указывается один из ниже перечисленных форматов вывода.

brief Показывать приоритет/тэг и PID процесса (формат по умолчанию).
process Показывать только PID.
tag Показывать только приоритет/тэг.
thread Показывать только процесс:поток и приоритет/тэг.
raw Показать необработанное сообщение, без полей метаданных.
time Показывать дату, время вызова, приоритет/тэг и PID процесса.
long Показывать все поля метаданных и отдельно сообщения с пустыми строками.

При запуске logcat можно указать формат вывода используя параметр -v:
adb logcat [-v

Источник

Android ADB Sideloading – Install & Update ROMs

Last updated on November 13, 2019 By Abhijith V M Leave a Comment

ADB sideload is a feature in Android Debug Bridge (ADB) which allows you to flash a custom ROM or stock ROM zip file via entering the command on your computer.

Contents Of This Article

What Is Android Debug Bridge (ADB)?

The purpose of such a feature in the Android OS was to help developers and programmers to debug their applications with the help of their computer. You can connect your Android device to your PC via a USB cable and enter many terminal commands to control and manipulate data and update system files in your Android device. ADB works by running a software on your system (Windows, Linux, Mac) and the other one on your mobile device. The features of ADB ranges from controlling your device from your computer to sending files to your phone, installing apps from your computer and even running many advanced commands.

What is ADB Sideload?

Android sideloading feature was first added to JellyBean. The default recovery that comes with every Android phone now supports ADB. Over the years, many custom recovery tools like TWRP has come up with support for ADB sideloading. I have given you a brief explanation of what is sideloading in the first line of this article. If you are a geek and want to know more, you may keep reading. Otherwise, you should jump to the next headings or whatever it is that you came here for.

For a normal person, sideloading may not be that useful. But for custom ROM developer, it can be a life saver. Since all the development activities are conducted in a computer, and the developer (you) will be using your phone to test it out, ADB can be a lifesaver and a time saver in those occasions. When you have finished compiling your custom ROM and want to flash it to your device, all you have to do is enter a few commands (link to proper section) and your system will push the compiled ROM file to your device and flash it. This saves you tons of time. The alternate to this is, manually copying and pasting the custom ROM to your Android device storage, booting into recovery, entering the option to select the ZIP file to flash and then flashing it. ADB sideload saves you a lot of time by finishing all these individual tasks in a few keystrokes. You don’t have to be a developer to use ADB. Almost all the commands are available online and its pretty simple to understand too.

Warning: If and when you decide to test out ADB commands, you should keep in mind that if you don’t realize what you are doing, it could potentially damage and brick your device.

How To Install ADB?

Installing ADB in your system is pretty simple these days. When I say these days, what I really mean is, it was a gigantic pain in the butt back in the day. We had to download the complete Android Software Development Kit (SDK) to simply enable debug bridge on your PC. But Google released a standalone ZIP package which contains ADB and Fastboot files. So the process of installing ADB drivers and other necessary files in your system just got a lot less complicated.

Download ADB & Fastboot Files Without Downloading The Whole SDK

You can go to Google’s official SDK platform tools to download the ADB and Fastboot package.

You have to select the OS to download the proper ADB package. It’s only under 10 MB, so it won’t make your data drain like before.

Google will ask you to accept the terms and conditions. Simply tick the checkbox and click on the download button

After downloading, extract the ZIP file to any folder. You will now notice that the folder contains almost all the files you need to run ADB commands.

Before You Start Using ADB

There are certain things you have to do before you start using ADB for sideloading and flashing ROMs. The first and foremost is enabling USB debugging mode on your phone.

You remember that ADB stands for Android Debug Bridge right?

Since debug is the key term here, you have to enable debugging over USB cable by going into your phone’s settings. You can follow the below steps.

  • Go to settings.
  • Go to developer options.
  • If you don’t see this option, then go to Settings -> About ->. Tap on the “build number” 8 times or until you see “You are now a developer”. Now go back to settings and you will see developer options.
  • Under developer options, you’ll see USB Debugging. Just enable the option. You’ll get a warning, message. Just tap OK and you’ll be fine.

The second thing you have to take care before using ADB is to make sure you have installed the proper drivers for your device. This is pretty basic. Your device cannot establish a successful connection unless your computer has all the necessary drivers needed to make that connection happen. You can get the drivers from your phone/tablet manufacturer’s website. Most of the modern Android devices installs drivers automatically upon connecting via USB.

Using ADB The Right Way

Testing Whether Your Phone Is Connected Properly

Since all the operations in ADB are via commands, we are going to use one of the very very useful ADB commands to test whether your phone is connected properly and ADB detects it.

I hope you have followed the step above to download ADB files. After downloading, you have to extract those files into a folder. Also before attempting to test the phone, make sure you have followed other steps mentioned above. Note that the below steps are explained for Windows users only.

  • Go to the folder in which you have extracted the files.
  • Hold down the shift key and right-click anywhere.
  • Now select the option “Open command window here

  • You’ll see the command prompt opened.
  • It’s time to enter the commands which we have been talking from the beginning
  • Type the below code to see if your device is connected properly and is detected via ADB.

ADB devices

If you don’t see a list of devices on the screen, then you probably don’t have proper drivers or have missed any of the above steps.

Using ADB Sideload To Apply Update Packages And Flash ROMs

Let’s get to the core part of this tutorial. After all the testings are completed and you have made sure connection is established properly, let’s see how we can push the update ZIP package from your PC to your Android phone and run commands to flash the ZIP package from your computer.

The first thing you need is a recovery that supports ADB. No need to worry about having a custom recovery. The default one that comes with your phone already supports ADB. But those who are using a custom recovery which is found on sites like XDA developers should make sure that the custom recovery which you are using should support ADB and operation via ADB commands.

Once you have everything set up, follow the below steps to copy your ROM ZIP file to your phone and flash it.

Boot your device into fastboot mode

If you don’t know how to boot into fastboot mode, then I suggest you Google it. The method varies from device to device. There is no universal method to boot into fastboot mode.

Some devices like One Plus 3 have inbuilt option to reboot into bootloader. Check the screenshot below. I am able to boot into fastboot mode just by tapping on the reboot option. But some other devices don’t have this option. So you will have to search for how to enter into fastboot mode and then boot your phone into fastboot mode.

Once you are in fastboot mode, enter the below command to push the ROM zip file to your device

ADB sideload packagename.zip

Replace the packagename with the name of the custom ROM ZIP file you are flashing. This will send the package to your phone and flash it automatically.

Note: The ROM ZIP and the ADB files should be in the same folder for this to work.

Entering the above command will flash the package you sent. You might lose all your data. It is recommended to backup everything before you proceed. We are assuming you know what exactly you are flashing on your phone.

Difference Between ADB Sideload Command And Fastboot Flash Command

The main difference is that ADB sideload will send the ROM to the phone and flash it as a whole. But fastboot flash command can flash individual partitions. Fastboot commands are mainly used to flash stock ROMs. These ROMs comes in multiple files, instead of a single ZIP file. There are plenty of other commands supported by fastboot.

List Of Useful ADB Commands

This is a list of useful ADB commands. You can try out these after connecting your device. But be careful what commands you are entering, as the commands can modify system files, and might render your phone useless.

Command Function
adb version Displays the version number of ADB you are using
adb devices Displays the list of devices attached by their ID. Can be used for testing whether device is connected properly or not.
adb install %path of apk% If you replace the path with a location of an APK file, the app will get installed.
adb logcat path Replace the path with any folder location and you will get log data for your device. This command is not much useful to normal users. But developers can use this for debugging.
adb push %source path% %destination path% Send a file located in the source path to the destination path. Source has to be on your PC and destination has to be on your phone.
adb pull %source path% %destination path% Pulls a file from the source path to the destination path. Source is on the phone and destination is your computer.

Common Error And Troubleshooting Tips

It is not uncommon, especially for beginners, to run into some kind of trouble when using ADB for the first time. Here are some of the most commons errors and their solutions. Since the problem could be due to a variety of issues, instead of describing each solution, useful external resources are given here. Do not hesitate comment in this post if you run into any trouble that is not described here.

ADB showing “error: closed”

How to fix ADB sideload cannot read zip file error

If yu are getting adb cannot read error while triying to flash, try the following methods. The reality is, this error could cause from a number of issues. So it’s upto you to indentify it. The best way to make sure you don’t get stuck in zip file read error is to make sure you follow the tutorial exactly as it is.

  • Make sure the zip file is not corrupted. Download again if necessary.
  • Make sure your phone is on the correct recovery tool.
  • Ensure the zip file is in the correct directory. It should be put in the same folder where ADB tool are located.
  • Try reinstalling the USB drivers

Final Words

We have tried our best to produce the ultimate tutorial you’ll ever require regarding ADB. If you think we have missed out anything, need clarification on any of the section, or have something to ask us, please use the comment section below. And always be cautious while running ADB commands, as it could possibly brick your phone. Thanks for the read. Subscribe for more in-depth tutorials.

About Abhijith V M

SEO by profession, blogger by passion and engineer by mistake. Follow me on Facebook and Twitter

Источник

Не знаете как обновить или перепрошить Android через ADB? Подробно расскажем о том, как пользоваться adb sideload для обновления прошивки или восстановления Android если он не загружается!

Еще раз о том для что делает ADB SIDELOAD — данная команда необходима для того, чтобы выполнять прошивку ZIP архивов из меню recovery.

ADB Sideload что это? Принцип работы ADB Sideload

 ADB Sideload — это специальный режим установки прошивки, с помощью утилиты ADB.
Принцип работы следующий: ZIP архив-обновление находится в папке с утилитой adb, смартфон или планшет переводится в режим recovery. Запускается утилита adb, и прописывается команда adb sideload filename.zip (вместо filename указать ваш ZIP), после чего архив копируется в Android и прошивается.

Необходимое для прошивки ADB Sideload

  1. Компьютер или ноутбук
  2. Скачать драйвер Android и после установить его
  3. Скачать фирменную программу сайта — ADB RUN или adb
  4. Заряд Android устройства более чем 40%
  5. Оригинальный, неповрежденный кабель USB
  6. Включить Отладка по USB на Android
  7. ZIP архив-обновление

Телефон или планшет Android необходимо перевести в режим Recovery переведя его руками или с помощью adb. После чего необходимо активировать на Android прошивку через adb sideload.

В стандартном или CWM Recovery необходимо выбрать:

  • install zip from sileload
  • apply update from ADB
  • ADB Sideload
сайдлоад андроид

Иногда это опция находиться в меню Advanced.

Sideload в TWRP Recovery

Чтобы активировать Sideload на TWRP, перейдите в Advanced -> ADB Sideload и потянуть нижний ползунок вправо:twrp ADB Sideload

Далее все остальные действия происходят на компьютере.

Как пользоваться ADB Sideload?
Установка прошивки с помощью ADB SIDELOAD

В этой статье будет предложено два варианта как можно воспользоваться adb sideload, первый способ — демонстрация как все работает от начала до конца в adb, второй способ — автоматизированный сайтом Android +1 с помощью ADB RUN, без лишних действий и писанины руками.

Способ №1. С помощью ADB

  1. Подключаем устройство Android к компьютеру
  2. Файл ZIP архив-обновление переместить в папку ADBADB Sideload: Как пользоваться режимом прошивки? + Видео
  3. В ADB пишем следующую команду:

 adb sideload XXXXXXXX.zip

Где XXXXXXXX — точное название прошиваемого ZIP обновления (учитывая ЗаГЛАвные или строЧНЫЕ, как написано, названия иначе получите ошибку)ADB Sideload: Как пользоваться режимом прошивки? + ВидеоПосле чего начнется перемещение обновления (прошивки) на Android и установка на смартфон или планшет.

Способ №2. ADB Sideload с помощью ADB RUN

  1. Подключаем устройство Android к компьютеру
  2. Запускаем программу ADB RUN и переходим в меню Reboot Device  -> выбрать Reboot Recovery
  3. Активируем sideload на устройстве
  4. Вернуться в главное меню и далее в ADB SideloadADB Sideload: Как пользоваться режимом прошивки? + Видео
  5. Выбрать вначале пункт Copy ZIP to Directory, в открывшееся окно переместить ZIP архив-обновление, после закрыть окно
  6. Выбрать Istall ZIP после чего, выбрать прошиваемый файл, после чего начнется прошивка.

Ошибки ADB Sideload

  • Если вы получили ошибку error: closed — не активировали sideload на Android;
  • Если вы получили ошибку error: device not found — не видит Android, меняйте ядро, recovery, перезапустить Android и снова перевести в режим.

Вот и все! Больше статей и инструкций читайте в разделе Статьи и Хаки Android. Оставайтесь вместе с сайтом Android +1, дальше будет еще интересней!

Hello! I’m trying to install LineageOS 15.1 on my Pixel (sailfish). I’ve been following the official steps, but I’m running into a problem with getting OpenGapps Pico installed.

Setup:

  • Windows 10

  • Latest USB drivers and platform-tools

  • Command prompt (admin mode)

  • July Oreo build of stock Android as base ( sailfish-opm4.171019.021.p1-factory-0bcf4315.zip )

  • LineageOS 15.1 ( lineage-15.1-20181113-nightly-sailfish-signed.zip )

  • OpenGapps Pico ( open_gapps-arm64-8.1-pico-20181113.zip )

  • TWRP ( twrp-3.2.3-1-sailfish.img )

Steps followed:

  • Booted to bootloader (slot B)

  • Flashed stock

  • Booted into stock, set up PIN, enabled USB debugging

  • Rebooted to bootloader

  • Switched to slot A (fastboot —set-active=a)

  • Flashed stock

  • Booted into stock, set up PIN, enabled USB debugging

  • Rebooted to bootloader

  • Booted to TWRP

  • Went into Wipe and clicked Format Data

  • Then went into Advanced Wipe and selected only the System partition, then wiped

  • Copied the latest LineageOS 15.1 build and OpenGapps to the phone via ADB push to /sdcard/

  • Flashed LineageOS

  • Rebooted to recovery, which took me to the LineageOS recovery

  • Flashed OpenGapps… which failed

I went to the «apply update section» and chose the ADB sideload method. Then I ran «adb devices» and verified it could see my device in sideload mode. I ran «adb sideload open_gapps-arm64-8.1-pico-20181113.zip», which I believe actually pulled from the folder I was in on my computer.

It briefly reported an error about being unable to mount /media. Then it gave a verification failed message, but I told it to try anyway. Then it gave me this:

«Error! Installer will now exit… Error Code: 70

  • Unmounting /data /persist

E:Error in /sideload/package.zip (Status 70) Restarting adb… Installation aborted.»

I started over from scratch and tried again, making sure that the /system partition wasn’t resized after LOS installed. This time when I entered sideload mode and after making sure the phone was being seen by ADB, I tried running «adb shell» and got this error: «error: closed«. This seems to be why OpenGapps couldn’t install, or at least part of the reason. I couldn’t find any solutions to getting past this. The most popular answers I was finding after a couple hours of Googling were «update your ADB to latest» and «use TWRP».

Edit: I forgot to mention I’ve also tried «adb kill-server» and «adb start-server», which didn’t do anything, as well as doing «adb kill-server» and «adb usb», which still gave me the «error: closed» message.

I know I’m not supposed to flash TWRP as the recovery, but do I have any other option here? Can I reboot to bootloader instead of recovery after flashing LOS, and then boot into TWRP again without screwing up the current partition setup? I’m trying to follow the official instructions as they’re written… is it possible that they’re wrong or outdated?

Android Debug Bridge (adb) is one of the most powerful command-line tools for Android. It allows the user to follow a bridge communication between an Android device and PC. The adb tool offers several features and functionality. Similarly, the ADB Sideload mode is one of the new modes of ADB. In this post, we are going to learn more about ADB Sideload and how to use it to sideload OTA updates, ROMs, Recovery images, and Mods on Android devices.

ADB Sideload

Table of Contents

  • 1 What is ADB (Android Debug Bridge)?
  • 2 What is ADB Sideload?
  • 3 Pre-Requisites
  • 4 How to Sideload ROMs and Mods using ADB Sideload Command Tool
  • 5 How to Manually Install OTA Update on Android?
  • 6 How to ADB Sideload using TWRP Recovery?
  • 7 ADB Sideload issues, errors and fixes
    • 7.1 adb sideload not working
    • 7.2 adb sideload cannot read the zip file
    • 7.3 adb sideload TWRP invalid zip file format
    • 7.4 adb sideload no devices found
    • 7.5 TWRP adb sideload closed error
  • 8 FAQ
    • 8.1 Q) What files work with ADB Sideload?
    • 8.2 Q) Where does adb sideload put files on your phone?
    • 8.3 Q) How to exit adb sideload mode?
    • 8.4 Q) Can we sideload recovery.img using adb sideload?

What is ADB (Android Debug Bridge)?

If you’re new to Android and haven’t heard about ADB (Android Debug Bridge) then here is what ADB means. ADB stands for Android Debug Bridge, as the name implies it helps in debugging an Android device. Apart from debugging, it helps in the development of Android Apps, ROMs, and Mods, etc.

ADB is a versatile command-line tool that lets you communicate with your Android device from a PC. It facilitates a variety of features like installing and debugging apps, apply updates from adb by sideloading the OTA package, and many more. Here is a post with a list of all adb commands that lets you perform several actions on an Android device from a PC.

As mentioned earlier, ADB Sideload is a new feature of the ADB command-line tool that was added to AOSP (Android Open Source Project) Recovery with Android Jelly Bean.

With the help of adb sideload, we can push and install a zip file using adb sideload command from the computer. The adb sideload mode most likely won’t be very useful for normal Android users, but for the advanced users who are into rooting, developing ROMs, and Custom Recovery, etc., this mode is highly valuable.

Some of the uses of ADB sideload are flashing custom ROMs, flash zip Mods, and sideload OTA updates, etc.

Pre-Requisites

  • Make sure to take a complete backup of your Android phone.
  • Charge your device to at least 75% to avoid interruption between the process.
  • Enable USB Debugging on your device from here.Enable Android USB debugging
  • Download and install Android USB Driver for your device model from here.
  • Download and install ADB and Fastboot drivers on your PC from here or else you can download ADB and Fastboot SDK Platform Tools or mfastboot-v2.zip and extract it to a folder.

How to Sideload ROMs and Mods using ADB Sideload Command Tool

  1. First of all, make sure you have installed the required USB Drivers and ADB and Fastboot ADK platform tools for your device on your computer.
  2. Make sure to enable USB Debugging on your phone from Developer Options. If you don’t find Developer Options in your device’s settings, then go to About Phone and tap on Build Number 7-10 times.Enable Android USB debugging
  3. Open the ADB and Fastboot folder and press and hold the Shift key and right-click inside the folder and choose Open command window here or Open PowerShell window here. A CMD or command prompt window should open.ADB and Fastboot SDK Platform Tools - Open command window hereOpen PowerShell window here Windows 10
  4. Copy the zip files you want to flash inside the ADB and Fastboot folder.
  5. Power off your phone and boot into Recovery Mode, if you’re not familiar with how to boot your Android device into Recovery Mode, then you can use the Reboot Manager Android app to get the work done. Note that the Reboot Manager app requires root permissions.
  6. Once your device is in Recovery Mode, connect it to PC and select Apply update from adb sideload option.
    — If you are in TWRP Recovery, then go to Advanced > ADB Sideload.
    — If you are in CWM Recovery, then go to Install > Install zip from sideload.
  7. Now enter the below command inside the Windows Command Prompt and press Enter:
    adb devices

    Your phone might ask to authorize the computer, press OK.ADB Command - adb devices

  8. Now enter the below adb sideload command and press Enter to flash zip file on your Android phone.
    adb sideload <filename.zip>

    In the above command, replace <filename.zip> with the name of the zip file that you want to sideload to your Android device. For example, if the zip file is named update.zip , then enter the below command:

    adb sideload update.zip
  9. Once you have entered the adb sideload command, you’ll see the progress in CMD. The progress indicates that the zip file is copied to the device. Once it is transferred, it will be flashed automatically to your phone.Sideload ROMs and Zip Mods using ADB Command Tool
  10. Once the files are flashed, you can reboot your device to normal mode.

How to Manually Install OTA Update on Android?

  1. Download the OTA update package for your Android phone to your PC and copy it inside the ADB and Fastboot folder.
  2. We are assuming that you have enabled USB Debugging and installed USB Drivers and ADB and Fastboot drivers on your PC. Now, open the ADB and Fastboot folder.
  3. Now, press and hold the Shift key and right-click inside the folder and choose Open command window here or Open PowerShell window here. A CMD or command prompt window should open.ADB and Fastboot SDK Platform Tools - Open command window hereOpen PowerShell window here Windows 10
  4. Connect your phone to PC and enter the below command:
    adb devices

    A pop-up asking to authorize your computer should pop-up on your phone. Tap on, OK.ADB Command - adb devices

  5. Now enter the below command to boot your phone into Recovery Mode.
    adb reboot recovery
  6. Once the phone is in Recovery Mode, select the option adb sideload or apply update from adb.
  7. Enter the below command to adb sideload the OTA update package and flash it on the phone.
    adb sideload filename.zip

    In the above command replace filename.zip with the name of the OTA update package. For example, if the name of the OTA update file is ota-update.zip, then enter the below command.

    adb sideload ota-update.zip
  8. Now the adb sideload will start to transfer the OTA update zip file to your Android device.Sideload ROMs and Zip Mods using ADB Command Tool
  9. Once the file is transferred, it will be installed automatically.
  10. That’s it.

How to ADB Sideload using TWRP Recovery?

  1. Download and install the USB Drivers, ADB and Fastboot tools on your PC and enable USB Debugging on your PC.
  2. Download the OTA update android file or ROM file or other files that you want to flash to your phone and copy it inside the ADB and Fastboot folder.
  3. Open the ADB and Fastboot folder and press and hold the Shift key and right-click inside the folder and choose Open command window here or Open PowerShell window here.ADB and Fastboot SDK Platform Tools - Open command window hereOpen PowerShell window here Windows 10
  4. Connect your phone to your computer and enter the below command and press Enter:
    adb devices

    You might be asked to authorize your computer. Just tap on OK on your phone.ADB Command - adb devices

  5. Now enter the below command to boot your phone into TWRP Recovery.
    adb reboot recovery

    TWRP Recovery

  6. In TWRP head over to Advanced > ADB Sideload and enter the below command and press enter:
    adb sideload file-name.zip

    In the above command replace file-name.zip with the name of the file that you wish to sideload on your phone.Sideload ROMs and Zip Mods using ADB Command Tool

  7. Once the file is transferred and flashed, reboot your phone.

That’s it now you can adb sideload ROM, Mods, and OTA update file using adb sideload command easily and unbrick or update your Android phone.

ADB Sideload issues, errors and fixes

adb sideload not working

If the adb sideload is not working for you, make sure you have installed the Android USB Drivers, ADB and Fastboot Platform Tools on your PC. If you already have installed the drivers, uninstall the drivers and re-install them. Also, try using different Laptop or PC.

adb sideload cannot read the zip file

adb sideload cannot read zip file

The adb sideload cannot read zip file issue most likely arise on 32-bit PC and is caused because of the large size of the zip file you’re trying to flash.

As a workaround, you can use the Large Address Aware software and make adb.exe large address aware, and it should work fine. Source: XDA

If the above solution doesn’t work, then it is recommended to use a PC with 64-bit architecture and 8GB RAM installed. Also, uninstall and re-install the latest USB Drivers and ADB and Fastboot Drivers.

adb sideload TWRP invalid zip file format

Invalid zip can mean all sorts of things; it could be but not limited to:

  1. The zip file is corrupted: download the zip file again.
  2. The zip file is not meant for your phone.
  3. You might have incorrectly edited the zip file.
  4. The «updater-script» in the zip file is incorrect.
  5. The «update binary» is not for your phone.
  6. The zip file is not a flashable zip: look inside and make sure there is a META-INF folder — if it is not, then it’s not a flashable zip.

adb sideload no devices found

The «adb no devices found issue» is caused because of the corrupted drivers. So, it is recommended that you uninstall and re-install the latest USB Drivers and ADB and Fastboot Tool drivers.

Sometimes, it might be caused because of the lousy USB cable. So, try using a different USB cable and different USB port.

TWRP adb sideload closed error

adb sideload closed error

The adb closed error can be fixed by using the latest ADB and Fastboot platform tools. If it doesn’t fix your problem it is recommended to follow the below-mentioned links:

  • XDA Forum
  • Android Forums

FAQ

Q) What files work with ADB Sideload?

ADB sideload only supports flashable zip packages and doesn’t support other file formats.

Q) Where does adb sideload put files on your phone?

For TWRP versions lower than 2.8.2.0, the file will be copied to your device to whatever the current storage location selected in the mount page. It will always be placed in the root of that storage location and named as sideload.zip (e.g. /sdcard/sideload.zip) and it will automatically delete/overwrite any existing sideload.zip you may have on your device.

For TWRP versions 2.8.2.0 and higher the zip file will stream from your PC without storing it on your device. If you wish to save the zip on your device for later use, you should not use sideload and instead use adb push or some other method to copy the zip file to your device.

Q) How to exit adb sideload mode?

To exit the adb sideload mode, remove the battery and insert it back after 10 seconds if the battery is not removable then press and hold the power buttons for few seconds (~30sec) to force shut down the device.

Alternatively, you can create a zip file named test.zip and run the command adb sideload test.zip. The command should fail as the zip file is not flashable, and it should return you to the recovery mode.

Q) Can we sideload recovery.img using adb sideload?

ADB Sideload doesn’t support .img file formats. So, we cannot sideload recovery.img file. It is recommended to use fastboot flash recovery recovery.img command from Bootloader/Fastboot mode to flash the recovery file.

Was this post helpful?

Do let us know in the comment section, also don’t forget to mention the issues which you come across while using adb sideload to flash ROMs, Android Mods, and OTA update package to your device.

Do share this post with your friends on Facebook, Twitter, WhatsApp, and other social media platforms.

👇👇Latest Video on YouTube 👇👇

‘;
}
?>

This page may contain affiliate links so we earn a commission. Please read our affiliate disclosure for more info.

ADB Sideloading Guide

ADB sideload is a feature in Android Debug Bridge (ADB) which allows you to flash a custom ROM or stock ROM zip file via entering the command on your computer.

Contents Of This Article

  • 1 What Is Android Debug Bridge (ADB)?
  • 2 What is ADB Sideload?
  • 3 How To Install ADB?
    • 3.1 Download ADB & Fastboot Files Without Downloading The Whole SDK
    • 3.2 Before You Start Using ADB
  • 4 Using ADB The Right Way
    • 4.1 Testing Whether Your Phone Is Connected Properly
    • 4.2 Using ADB Sideload To Apply Update Packages And Flash ROMs
    • 4.3 Difference Between ADB Sideload Command And Fastboot Flash Command
  • 5 List Of Useful ADB Commands
  • 6 Common Error And Troubleshooting Tips
    • 6.1 ADB showing “error: closed”
    • 6.2 How to fix ADB sideload cannot read zip file error
  • 7 Final Words

What Is Android Debug Bridge (ADB)?

The purpose of such a feature in the Android OS was to help developers and programmers to debug their applications with the help of their computer. You can connect your Android device to your PC via a USB cable and enter many terminal commands to control and manipulate data and update system files in your Android device. ADB works by running a software on your system (Windows, Linux, Mac) and the other one on your mobile device. The features of ADB ranges from controlling your device from your computer to sending files to your phone, installing apps from your computer and even running many advanced commands.

Android sideloading feature was first added to JellyBean. The default recovery that comes with every Android phone now supports ADB. Over the years, many custom recovery tools like TWRP has come up with support for ADB sideloading. I have given you a brief explanation of what is sideloading in the first line of this article. If you are a geek and want to know more, you may keep reading. Otherwise, you should jump to the next headings or whatever it is that you came here for.

For a normal person, sideloading may not be that useful. But for custom ROM developer, it can be a life saver. Since all the development activities are conducted in a computer, and the developer (you) will be using your phone to test it out, ADB can be a lifesaver and a time saver in those occasions. When you have finished compiling your custom ROM and want to flash it to your device, all you have to do is enter a few commands (link to proper section) and your system will push the compiled ROM file to your device and flash it. This saves you tons of time. The alternate to this is, manually copying and pasting the custom ROM to your Android device storage, booting into recovery, entering the option to select the ZIP file to flash and then flashing it. ADB sideload saves you a lot of time by finishing all these individual tasks in a few keystrokes. You don’t have to be a developer to use ADB. Almost all the commands are available online and its pretty simple to understand too.

Warning: If and when you decide to test out ADB commands, you should keep in mind that if you don’t realize what you are doing, it could potentially damage and brick your device.

How To Install ADB?

Installing ADB in your system is pretty simple these days. When I say these days, what I really mean is, it was a gigantic pain in the butt back in the day. We had to download the complete Android Software Development Kit (SDK) to simply enable debug bridge on your PC. But Google released a standalone ZIP package which contains ADB and Fastboot files. So the process of installing ADB drivers and other necessary files in your system just got a lot less complicated.

Download ADB & Fastboot Files Without Downloading The Whole SDK

You can go to Google’s official SDK platform tools to download the ADB and Fastboot package.

You have to select the OS to download the proper ADB package. It’s only under 10 MB, so it won’t make your data drain like before.

Google Platform Tools ADB Download Link

Google will ask you to accept the terms and conditions. Simply tick the checkbox and click on the download button

After downloading, extract the ZIP file to any folder. You will now notice that the folder contains almost all the files you need to run ADB commands.

Before You Start Using ADB

There are certain things you have to do before you start using ADB for sideloading and flashing ROMs. The first and foremost is enabling USB debugging mode on your phone.

You remember that ADB stands for Android Debug Bridge right?

Since debug is the key term here, you have to enable debugging over USB cable by going into your phone’s settings. You can follow the below steps.

  • Go to settings.
  • Go to developer options.
  • If you don’t see this option, then go to Settings -> About ->. Tap on the “build number” 8 times or until you see “You are now a developer”. Now go back to settings and you will see developer options.
  • Under developer options, you’ll see USB Debugging. Just enable the option. You’ll get a warning, message. Just tap OK and you’ll be fine.

USB Debugging Android

The second thing you have to take care before using ADB is to make sure you have installed the proper drivers for your device. This is pretty basic. Your device cannot establish a successful connection unless your computer has all the necessary drivers needed to make that connection happen. You can get the drivers from your phone/tablet manufacturer’s website. Most of the modern Android devices installs drivers automatically upon connecting via USB.

Using ADB The Right Way

Testing Whether Your Phone Is Connected Properly

Since all the operations in ADB are via commands, we are going to use one of the very very useful ADB commands to test whether your phone is connected properly and ADB detects it.

I hope you have followed the step above to download ADB files. After downloading, you have to extract those files into a folder. Also before attempting to test the phone, make sure you have followed other steps mentioned above. Note that the below steps are explained for Windows users only.

  • Go to the folder in which you have extracted the files.
  • Hold down the shift key and right-click anywhere.
  • Now select the option “Open command window here

Accessing ADB Via Command Prompt

  • You’ll see the command prompt opened.
  • It’s time to enter the commands which we have been talking from the beginning
  • Type the below code to see if your device is connected properly and is detected via ADB.

ADB devices

Testing ADB Device Connection

If you don’t see a list of devices on the screen, then you probably don’t have proper drivers or have missed any of the above steps.

Using ADB Sideload To Apply Update Packages And Flash ROMs

Let’s get to the core part of this tutorial. After all the testings are completed and you have made sure connection is established properly, let’s see how we can push the update ZIP package from your PC to your Android phone and run commands to flash the ZIP package from your computer.

The first thing you need is a recovery that supports ADB. No need to worry about having a custom recovery. The default one that comes with your phone already supports ADB. But those who are using a custom recovery which is found on sites like XDA developers should make sure that the custom recovery which you are using should support ADB and operation via ADB commands.

Once you have everything set up, follow the below steps to copy your ROM ZIP file to your phone and flash it.

Boot your device into fastboot mode

If you don’t know how to boot into fastboot mode, then I suggest you Google it. The method varies from device to device. There is no universal method to boot into fastboot mode.

Some devices like One Plus 3 have inbuilt option to reboot into bootloader. Check the screenshot below. I am able to boot into fastboot mode just by tapping on the reboot option. But some other devices don’t have this option. So you will have to search for how to enter into fastboot mode and then boot your phone into fastboot mode.

One Plus 3 Advanced Reboot

Once you are in fastboot mode, enter the below command to push the ROM zip file to your device

ADB sideload packagename.zip

Replace the packagename with the name of the custom ROM ZIP file you are flashing. This will send the package to your phone and flash it automatically.

Note: The ROM ZIP and the ADB files should be in the same folder for this to work.

Entering the above command will flash the package you sent. You might lose all your data. It is recommended to backup everything before you proceed. We are assuming you know what exactly you are flashing on your phone.

Difference Between ADB Sideload Command And Fastboot Flash Command

The main difference is that ADB sideload will send the ROM to the phone and flash it as a whole. But fastboot flash command can flash individual partitions. Fastboot commands are mainly used to flash stock ROMs. These ROMs comes in multiple files, instead of a single ZIP file. There are plenty of other commands supported by fastboot.

List Of Useful ADB Commands

This is a list of useful ADB commands. You can try out these after connecting your device. But be careful what commands you are entering, as the commands can modify system files, and might render your phone useless.

Command Function
adb version Displays the version number of ADB you are using
adb devices Displays the list of devices attached by their ID. Can be used for testing whether device is connected properly or not.
adb install %path of apk% If you replace the path with a location of an APK file, the app will get installed.
adb logcat path Replace the path with any folder location and you will get log data for your device. This command is not much useful to normal users. But developers can use this for debugging.
adb push %source path% %destination path% Send a file located in the source path to the destination path. Source has to be on your PC and destination has to be on your phone.
adb pull %source path% %destination path% Pulls a file from the source path to the destination path. Source is on the phone and destination is your computer.

Common Error And Troubleshooting Tips

It is not uncommon, especially for beginners, to run into some kind of trouble when using ADB for the first time. Here are some of the most commons errors and their solutions. Since the problem could be due to a variety of issues, instead of describing each solution, useful external resources are given here. Do not hesitate comment in this post if you run into any trouble that is not described here.

ADB showing “error: closed”

Solutions :

XDA Forum
Android Forums

How to fix ADB sideload cannot read zip file error

If yu are getting adb cannot read error while triying to flash, try the following methods. The reality is, this error could cause from a number of issues. So it’s upto you to indentify it. The best way to make sure you don’t get stuck in zip file read error is to make sure you follow the tutorial exactly as it is.

  • Make sure the zip file is not corrupted. Download again if necessary.
  • Make sure your phone is on the correct recovery tool.
  • Ensure the zip file is in the correct directory. It should be put in the same folder where ADB tool are located.
  • Try reinstalling the USB drivers

Final Words

We have tried our best to produce the ultimate tutorial you’ll ever require regarding ADB. If you think we have missed out anything, need clarification on any of the section, or have something to ask us, please use the comment section below. And always be cautious while running ADB commands, as it could possibly brick your phone. Thanks for the read. Subscribe for more in-depth tutorials.

Понравилась статья? Поделить с друзьями: