Adb install apk wifi

How to Execute ADB Commands over WiFi without USB or Root

adb over wifi without usb

In this guide, we have covered an amazing trick to execute any ADB command simply over WIFi, without the need of any USB Cable. Android Debugging Bridge, or more popularly known as ADB, is among the most powerful command-line tool for Android devices. Part of the Android SDK and Platform-Tools, it provides for a successful connection between your PC and Android device. Right from booting your device to Fastboot or Recovery Mode, to flashing a custom recovery or sideloading OTA, the possibilities are endless. Keeping that in mind, we already have covered an extensive guide on some of the most powerful ADB commands.

Meanwhile, if you need to perform any of these ADB commands, the basic requirement is a USB cable. Until and unless you connect your device to PC via USB, you cannot carry out any of these ADB commands. Or so is a general notion. But today I found out an impressive hack using which you could execute any ADB command to your device just via WiFi without using any USB cable. But before beginning the same, some important prerequisites are to be kept in mind.

Prerequisites

  1. Download and install the Android SDK platform-tools on your desktop. If you face any issue while setting it up on Windows 10, you may refer to our guide.
  2. Enable USB Debugging on your device. Go to Settings >About Phone > Tap on Build Number 7 times > Go back to Settings >Developer options > Toggle on the USB Debugging switch. For further explanation, head over to our guide on how to enable Developer options and USB debugging on Android.
  3. For this trick to work, your device, as well as PC, needs to be connected on the same Wi-Fi network.

So these were the important requirements to keep in mind. Let us now have a look at how to execute ADB Commands over WiFi without any USB Cable.

Executing ADB Commands over WiFi

For setting up the process, connect your device to USB. This is only a one-time requirement. Moreover, you need to keep a note of your Ip Address on your Android device. If you’re on Android 9.0 Pie or later, go to Settings > Network and Internet > WiFi > Tap on the connected WiFi > Advanced > Note your IP Address.

Читайте также:  Вай фай станция йота

ip address pie

However, for Android 8.0 Oreo or previous versions, the method is slightly different. Go to Settings > About phone > Status > IP Address. Let’s now begin the process of executing ADB Commands over WiFi without a USB Cable.

adb wifi debug

    1. Go to the Android SDK and Platform Tools folder. Inside the same folder, type cmd in the address bar.
    2. This will open the Command Prompt window. You may carry out this procedure in the PowerShell window as well. For that, inside the platform-tools folder, right-click on an empty space while pressing the Shift key. Now click on Open PowerShell window here.
    3. If this is the first time, you will need to authorize your device for an ADB connection. A dialog box would appear on your device when you connect via USB. Tap on Always allow from this computer.
    4. Now type in the below code to check for a successful ADB connection. if you get an alpha-numeric code, the device is successfully connected:

    adb command wifi

    Next, enter the following code to connect your device to ADB via WiFi without USB cable.

    For example, as my IP address is 192.168.0.2, the command in my case will be as follow. You may also have a look at the above image for reference.

    Things to keep in mind

    If you connect your device via USB cable and type adb devices, you will get two device IDs. One will be in the form of the IP Address, with the :5555 (tcpip) suffix. The other one will be the alpha-numeric code. The latter one is the result of USB cable whereas the former is due to WiFi, as evident from the IP address.

    adb wifi usb

    If you wish to remove the WiFi device ID, simply closing and reopening the command shell won’t do any good. For that, you will have to kill the process. Type the below code in the command prompt to remove the same:

    ADB Commands Via WiFi when the device is turned on

    Till now we have discussed how to execute ADB commands via WiFi, without any USB cable. Now let’s have a look at some of the important ADB Command that could be executed in this wireless mode.

    Shows a list of all the devices connected to PC in ADB state.

    Used to reboot your Android device

    To reboot your device to bootloader/fastboot mode, you may use this command.

    To boot your device to stock or custom recovery like TWRP (if installed).

    Another useful ADB command that could be executed over WiFi without using a USB cable. It is used to install an APK to your Android device directly from the PC. Just make sure to move the APk file inside the platform-tools folder before executing the below code. If the name of the file is game.apk, then the command will be:

    Similarly, to uninstall any APK from your Android device, type the below code. To get the ID of any app, search for the desired app on Play Store on Desktop. From the address bar, copy the content next to To uninstall WhatsApp, the code will be:

    adb uninstall com.whatsapp

    Pull a file from your device and save it on your desktop. The file would be saved to the platform-tools folder. For example, to pull video.mp4, the command will be

    Used to push a file to your device from your PC. Keep the file in the platform-tools folder to push it on your device.

    Given above are only some of the adb commands. To get a complete list of all such commands, have a look at the List of ADB and Fastboot Commands for Android .

    With this, we conclude the guide on how to execute ADB commands over WiFi without using a USB Cable. Do let us know if you face any issues during the process. Your views are also welcome on this pretty useful trick.

    Источник

    Install Android App Bundle on device over WiFi

    How can I installed .AAB file with adb or other tool over a WiFi only connected Android 11 device? I have been using something like:

    adb.exe -s 192.168.1.120:5555 install -g some.apk 

    enter image description here

    tried specifying the .aab instead of the .apk in my script but it won’t accept it. The ionic build process started building .aab is there a way to tell it build only .apk for a specific device? I do not intend or wish to publish to the Google Play. Thank you.

    Please do not post code in a screenshot, jsut copy and paste the code into your question and format it as code.

    I put the relevant code initially I just forget to format it as code. The link you pointed out is about using the bundletool.jar tool but I did not see it support handling a device over WiFi, which is how I have been using adb.exe against these WiFi-only connected android devices, (they don’t connect over USB cable or at least Windows does not recognize them like it does when a phone is connected via USB cable). Thank you for sharing.

    Forget the Wifi part your problem is that an app bundle can’t be directly installed. You first have to convert it to APK file(s) which then can be installed. App bundles are only designed for upload to Play Store. And let me say again please don’t post screen shots that only contain text. I am talking about the black screen shot in your question. It only contains text you could have copied and paste.

    Источник

    Запуск/установка/отладка приложений Android по Wi-Fi?

    Я думал, что существует способ тестирования приложений в процессе разработки через Wi-Fi. Возможно ли это?

    Я бы хотел иметь возможность отвязать свой телефон и вести разработку без проводов.

    Как установить на Android любые приложения без Play Маркет? [Android ЛИКБЕЗ №4]

    Автоматическое включение\выключение моб. интернета при активации/деактивации WiFi

    Запуск и отладка приложения прямо на смартфоне

    Android Studio тесты приложения по WIFI

    WiFi ADB: установка apk файла на смартфон по WiFi, без USB кабеля (тестирование android приложений)

    Как подключить телефон к Android Studio

    Как просто связать Андроид и компьютер по WiFi

    Как создать андроид приложение Wi-Fi сканнер

    Полное отображение экрана смартфона в Android Auto: без рут прав

    Беспроводная передача файлов между компьютером и смартфоном💻📱Как связать пк и андроид по wifi .

    Установка Wі-Fі хот-спот на Аndrоіd

    Ускорить Wi-Fi и ИНТЕРНЕТ на телефоне ANDROID! Как УСКОРИТЬ и сделать интернет БЫСТРЕЕ на Андройде?

    Простое Android приложение для контроля ESP8266 по WiFI на Android Studio

    📺 Как отключить, заморозить,удалить системные приложения на Android TV без рут.Remote ADB Shell

    Как раздавать интернет с телефона бесплатно Android

    Этот вопрос имеет 1 ответ на английском, чтобы прочитать их войдите в свой аккаунт.

    1. Подключите устройство через USB и убедитесь, что отладка работает;
    2. adb tcpip 5555 . Это заставит устройство начать прослушивать соединения на порту 5555;
    3. Найдите IP-адрес устройства с помощью adb shell netcfg или adb shell ifconfig в версии 6.0 и выше;
    4. Теперь вы можете отключить USB;
    5. adb connect :5555 . Это соединяет с сервером, который мы установили на устройстве на шаге 2;
    6. Теперь у вас есть устройство в сети, с которым вы можете отлаживать, как обычно.

    Чтобы переключить сервер обратно в режим USB, выполните команду adb usb , которая переведет сервер на вашем телефоне обратно в режим USB. Если у вас несколько устройств, вы можете указать их с помощью опции -s : adb -s :5555 usb .

    Чтобы узнать IP-адрес устройства: запустите adb shell и затем netcfg . Вы увидите его там. Чтобы найти IP-адрес при использовании OSX, выполните команду adb shell ip route .

    ПРЕДУПРЕЖДЕНИЕ: оставлять опцию включенной опасно, любой в вашей сети может подключиться к вашему устройству в режиме отладки, даже если вы находитесь в сети передачи данных. Делайте это только при подключении к доверенному Wi-Fi и не забывайте отключать устройство после завершения работы!

    @Sergei предложил изменить строку 2, прокомментировав: «-d опция нужна для подключения к USB-устройству, когда другое соединение сохраняется (например, подключен эмулятор или другое Wi-Fi устройство)».

    Эта информация может оказаться ценной для будущих читателей, но я откатился к первоначальной версии, набравшей 178 upvotes.

    На некоторых устройствах вы можете сделать то же самое, даже если у вас нет USB-кабеля:

    1. Включите ADB по сети в настройках разработчика . Должен отобразиться IP-адрес
    2. adb connect :5555
    3. Отключите настройку после завершения

    В Android Studio есть плагин, позволяющий подключить USB Debugging без необходимости использования команды ADB из терминала.

    Источник

Оцените статью
Adblock
detector