Mobile application development is a process that requires testing on real devices. Emulators are convenient for initial debugging, but they will not show how the application will behave with unique characteristics: screen resolution, OS version, chipset performance or firmware features from Android Studio are convenient for initial debugging, but they will not show how the application will behave on physical device with unique characteristics: screen resolution, OS version, chipset performance or firmware features from Samsung, Xiaomi or Google Pixel. Without testing on a real gadget, the risk of releasing a โ€œcrudeโ€ product with bugs increases manifold.

This article will help both novice developers and experienced users who want to install .apkfile outside Google Play. We will analyze all current methods - from classic installation via USB debugging to wireless methods using Wi-Fi ADB. We will pay special attention to typical errors (for example, INSTALL_FAILED_TEST_ONLY or INSTALL_PARSE_FAILED_MANIFEST_MALFORMED) and ways to work around them. If you have never connected a smartphone to a PC for debugging, donโ€™t worry: the instructions are adapted for beginners, with explanations of each step.

1. Preparing the device: enable developer mode

Before installing the application on a real device, you need to activate developer mode and allow USB debugging. This process differs slightly depending on the version Android and shell manufacturer (for example, MIUI y Xiaomi or One UI y Samsung). The general scheme is as follows:

  1. Open Settings โ†’ About phone (or About tablet).

  2. Find the item Build number (sometimes hidden in Software information).

  3. Tap on it 7 times in a row - a notification โ€œYou have become developer!โ€.

After this, a new section will appear in the main settings For developers (or Developer Options). developer

  • ๐Ÿ”ง Enable USB debugging (switch at the top of the list).
  • ๐Ÿ”„ Allow Installation from unknown sources (path: Settings โ†’ Applications โ†’ Special access).
  • ๐Ÿ“ฑ For Xiaomi: additionally activate OEM unlocking (if you plan to flash custom ROMs).
โš ๏ธ Attention: On devices with Android 11+ after connecting to a PC, a request for debugging permission will appear. Confirm it by checking the โ€œAlways allow from this computerโ€ checkbox - this will eliminate repeated requests.

Samsung Galaxy and some other models may require installation USB drivers on PC. They can be downloaded from the manufacturerโ€™s official website or via SDK Manager v Android Studio. If the device is not detected, check the connection in Windows Device Manager โ€”there should be no exclamation marks next to ADB Interface.

๐Ÿ“Š What brand of smartphone are you using for testing?
Samsung
Xiaomi
Google Pixel
OnePlus
Other

2. Installation via ADB: step-by-step guide

ADB (Android Debug Bridge) is a universal tool for interacting with the device via the command line. To install .apk via ADB, follow these steps:

  1. Download Platform Tools (included Android SDK) from official website and unpack the archive into a convenient folder (for example, C:\adb).

  2. Connect the device to the PC via a USB cable (preferably original).

  3. Open the command line (Win + R โ†’ enter cmd) and go to the folder with ADB:

    cd C:\adb
  4. Check the device connection with the command:

    adb devices

    The serial number of your device should appear in response. If the list is empty, check the drivers and debugging permissions.

  5. Install the application:

    adb install path_to_file.apk

    For example: adb install C:\Downloads\myapp-debug.apk.

If the installation was successful, a message will appear in the command line. To reinstall, use the flag Success. To reinstall, use the flag -r:

adb install -r myapp.apk
โš ๏ธ Attention: On some devices (for example, Huawei or Honor) additional permission Install via USB in the developer settings. Without it, ADB will generate an error INSTALL_FAILED_USER_RESTRICTED.

Connect the device with the original cable|Enable USB debugging in the settings|Check the device visibility with the command `adb devices`|Download the APK to an accessible folder|Run CMD as administrator-->

3. Wireless installation: Wi-Fi ADB

If you are tired of fiddling with cables, you can connect to the device via Wi-Fi. This method works on Android 11+ and requires preliminary configuration via USB (only for the first connection).

  1. Connect the device to the PC via USB and do:

    adb tcpip 5555
  2. Disconnect the cable and find the local IP address of the device in the Wi-Fi settings (for example, 192.168.1.100).

  3. Connect via Wi-Fi:

    adb connect 192.168.1.100:5555
  4. Make sure that the device appears in the list:

    adb devices
  5. Now you can install APK in the same way as via USB:

    adb install myapp.apk

Advantages of the method:

  • ๐Ÿ”Œ No dependence on the USB cable (relevant for devices with damaged port).
  • ๐Ÿ“ถ Can be tested on several devices simultaneously.
  • ๐Ÿ”„ Quick deployment of updates without a physical connection.

Disadvantages:

  • ๐Ÿข Data transfer speed is lower than via USB.
  • ๐Ÿ”‹ The device must be on the same network as the PC.
  • ๐Ÿ”’ On some firmware (for example, MIUI) Wi-Fi ADB may turn off after a reboot.
๐Ÿ’ก

If Wi-Fi ADB stops working after rebooting the device, repeat the command `adb tcpip 5555` via USB. Some firmware resets the port when turned off.

4. Installation without a PC: via a file manager or browser

You donโ€™t always have a computer at hand. In this case, .apkthe file can be downloaded directly to the device and installed manually. data-i="143">Method 1: via browser

Method 1: via browser

  1. Open a browser (for example, Chrome) and go to the site with the APK (for example, APKMirror).

  2. Download the file. The browser will warn you about potential danger - confirm the download.

  3. After downloading, tap on the notification or find the file in the folder Downloads.

  4. Click โ€œInstallโ€ and confirm permissions.

Method 2: through the file manager

If the APK is already on the device (for example, copied via Google Drive or Telegram):

  1. Open the file manager (for example, Files by Google or Mi File Manager).

  2. Find the file and click on it. .apk-file and tap on it.

  3. In the window that appears, click โ€œInstallโ€ (you may need to allow installation from this source).

โš ๏ธ Attention: Installation of APK from unknown sources is blocked by default. To unlock it for a specific file manager, go. in Settings โ†’ Applications โ†’ Special access โ†’ Installation of unknown applications and select your manager.

On devices with Android 8+ the system remembers permissions for each source separately. For example, if you allowed installation for Chrome, this does not mean that Files by Google will also be able to install the APK without additional confirmation.

Installation method PC required Speed Difficulty Suitable for
ADB via USB โœ… Yes โšก Fast โญโญ (average) Developers, debugging
Wi-Fi ADB โœ… Yes (for setup only) ๐Ÿข Slower USB โญโญโญ (high) Testing without cable
File manager โŒ No โšก Fast โญ (low) Users without a PC
Browser โŒ No ๐Ÿข Depends on the Internet โญ (low) Quick installation

5. Typical errors and their solutions

When installing an APK on a real device, you may encounter errors. Let's look at the most common ones and how to fix them:

Error: INSTALL_FAILED_INSUFFICIENT_STORAGE

Cause: there is not enough space on the device or in the partition /data.

  • ๐Ÿงน Clear the application cache in Settings โ†’ Storage.
  • ๐Ÿ—‘๏ธ Delete unnecessary files or transfer them to an SD card.
  • ๐Ÿ”ง For developers: check the size android:installLocation in AndroidManifest.xml.

Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Reason: corrupted AndroidManifest.xml or incompatible version Android.

  • ๐Ÿ”„ Rebuild the APK with the correct settings in Android Studio.
  • ๐Ÿ“‹ Check minSdkVersion i targetSdkVersion in build.gradle.

Error: INSTALL_FAILED_TEST_ONLY

Reason: APK was built as a test (android:testOnly="true").

  • ๐Ÿ› ๏ธ Remove the flag testOnly in AndroidManifest.xml.
  • ๐Ÿ”„ Rebuild the project in mode release.

Error: ADB: device unauthorized

Reason: the device does not trust this PC.

  • ๐Ÿ”‘ Connect the device via USB and confirm the debugging request on the smartphone screen.
  • ๐Ÿ”„ Restart the ADB service: adb kill-server โ†’ adb start-server.

If the error persists, try:

  • ๐Ÿ”Œ Use a different USB cable (sometimes the problem is a damaged wire).
  • ๐Ÿ”„ Restart the device and PC.
  • ๐Ÿ› ๏ธ Update Platform Tools up to the latest version.
What to do if ADB does not see the device?

1. Check if USB debugging is enabled and access is allowed for this PC.

2. Make sure that the drivers are installed (there should be no unknown devices in the Device Manager).

3. Try another USB port (preferably USB 2.0, since USB 3.0 sometimes conflicts with ADB).

4. Execute the commands:

adb kill-server

adb start-server

5. If you use macOS/Linux, check the rights to the port: lsusb and sudo chmod 777 /dev/bus/usb// (temporary solution).

6. Features for different manufacturers

Firmware from different manufacturers may introduce their own limitations. Let's consider the nuances for popular brands:

Xiaomi (MIUI)

  • ๐Ÿ” By default, APK installation from unknown sources is blocked. Permission must be given for each application separately.
  • ๐Ÿ”„ After updating MIUI, the permission for Installation via USB may be reset.
  • ๐Ÿ›ก๏ธ On some models (Redmi Note 10, POCO X3) you need to disable MIUI Protection in the security settings.

Samsung (One UI)

  • ๐Ÿ”Œ ADB may require installation Samsung USB Driver for Mobile Phones.
  • ๐Ÿ“ฑ On devices with Knox (for example, Galaxy S22) some system restrictions cannot be bypassed without root access.
  • ๐Ÿ”„ After updating the firmware, you may need to re-enable USB debugging.

Google Pixel

  • โšก The cleanest implementation of ADB, minimum connection problems.
  • ๐Ÿ”ง On Pixel 6/7 c Android 13+ may require additional permission for wireless debugging.
  • ๐Ÿ“ฆ Supports Fastboot for flashing custom recovery (for example, TWRP).

Huawei/Honor

  • ๐Ÿšซ On new devices (after 2019) it may be blocked OEM Unlock.
  • ๐Ÿ” To install APK via ADB, you need permission Install via USB in the developer settings.
  • ๐ŸŒ On devices without Google Mobile Services (for example, Huawei P40) you will have to use AppGallery or manual installation.
โš ๏ธ Attention: Firmware from manufacturers can change the location of menu items. For example, in MIUI 14 the path to the developer settings is different from MIUI 12. If you donโ€™t find the section you need, use the search in settings (magnifying glass icon in the upper right corner).

7. Alternative methods: cloud services and third-party tools If standard methods are not suitable, you can use alternative solutions: data-i="264">or

If standard methods are not suitable, you can use alternative solutions:

๐ŸŒฅ๏ธ Cloud services for testing

  • Firebase App Distribution โ€” allows you to upload an APK to a private channel and install it via a link on test devices.
  • BrowserStack or Sauce Labs โ€”platforms for testing on real devices in the cloud (paid, but there are trial periods).
  • APKMirror Installer โ€”application for installing APKs with automatic updates.

๐Ÿ› ๏ธ Third-party tools

  • Scrcpy โ€”not only mirrors the screen on a PC, but also allows you to drag an APK directly into the window for installation.
  • SideQuest (for Oculus Quest, but also works with regular Android devices) - simplified APK installation via Wi-Fi.
  • Bugjaeger - mobile application for ADB commands without a PC (requires root on some devices).

The advantage of cloud services is the ability to test on dozens of devices simultaneously, without physically having them. The disadvantage is the limitations of free plans and possible delays in data transfer.

๐Ÿ’ก

ADB or a file manager is suitable for quickly installing an APK on one device. For mass testing on different devices, it is better to use cloud services like Firebase.

8. Security: How to Avoid Malicious APKs

Installing applications from unknown sources always carries risks. Here's how to minimize threats:

  • ๐Ÿ›ก๏ธ Check the APK hash. Compare SHA-256 the file with the official one (you can check it through VirusTotal or certutil -hashfile in Windows).
  • ๐Ÿ” Use antivirus software. Before installation, scan the file in Dr.Web or Kaspersky Mobile.
  • ๐Ÿ“„ Read permissions. If the Flashlight application requests access to SMS or geolocation is suspicious.
  • ๐ŸŒ Download APK only from trusted sources:
    • APKMirror (checks developer signatures).
    • GitHub (for open source software).
    • Official sites developers.

If, after installation, the application behaves suspiciously (for example, it shows ads out of context or heats up the device), immediately:

  1. Uninstall it through Settings โ†’ Applications.

  2. Check your device for viruses (for example, via Malwarebytes).

  3. If you suspect a rootkit, perform a factory reset.

โš ๏ธ Attention: On devices with Android 10+ the system limits the background activity of applications installed outside Google PlayThis can lead to sudden stops of services. To avoid problems, add the application to optimization exceptions. batteries (Settings โ†’ Battery โ†’ Battery optimization).

FAQ: Frequently asked questions

Can I install an APK on Android without enabling developer mode?

Yes, but with limitations. You can:

  • Download the APK through a browser and open it in a file manager (you must allow installation from unknown sources).
  • Use cloud services like Firebase App Distributionif you are a developer.

However, for debugging via ADB or installing system applications developer mode is required.

Why does ADB write "no devices/emulators found" even though the device is connected?

The reasons may be as follows:

  • ๐Ÿ”Œ Not the original USB cable (try another one).
  • ๐Ÿ–ฅ๏ธ Drivers are not installed (download Google USB Driver or drivers from the manufacturer).
  • ๐Ÿ”„ USB debugging is not enabled or permission is not given for this PC.
  • ๐Ÿ”Œ USB 3.0 port (try USB 2.0).
  • ๐Ÿ› ๏ธ ADB service is not running (run adb start-server).

Also check if the device is recognized in Windows Device Manager as Android ADB Interface.

How to install APK on Android TV or Fire TV Stick?

For Android TV or Amazon Fire TV Stick the process is similar, but there are nuances:

  1. Enable ADB debugging in the settings (Settings โ†’ Device Preferences โ†’ About โ†’ Build - tap 7 times, then return to Developer options).

  2. Connect via Wi-Fi:

    adb connect IP_devices:5555
  3. Use adb install or third-party launchers like Send Files to TV to transfer APK.

For Fire TV Stick you may need to disable Amazon restrictions:

adb shell settings put global install_non_market_apps 1
Is it possible to rollback installed via ADB application?

Yes, there are several ways:

  • ๐Ÿ“ฑ Through device settings: Settings โ†’ Applications โ†’ Application name โ†’ Delete.
  • ๐Ÿ–ฅ๏ธ Via ADB:
  • adb uninstall com.example.package
  • ๐Ÿ”„ If the application is a system one, you will need root access or the command:
  • adb shell pm uninstall -k --user 0 com.example.package

To find out the package name, use:

adb shell pm list packages | grep "keyword"
How to test an application on a real device without physical access to him?

If you do not have a physical device, consider the following options:

  • ๐ŸŒฅ๏ธ Cloud farms: BrowserStack, Sauce Labs, Firebase Test Lab (paid, but there are free minutes).
  • ๐Ÿค– Remote devices: Services like AWS Device Farm provide access to real devices over the network.
  • ๐Ÿ“ฑ Device rental: Some platforms (for example, TestFlight for iOS or Beta by Crashlytics) allow you to distribute builds among testers.
  • ๐Ÿ–ฅ๏ธ Emulators with root access: Genymotion or Bluestacks with custom images.

For full testing, it is better to combine cloud services and 1-2 physical devices of different manufacturers.