Modern Xiaomi TVs are powered by Android TV, which offers users a wide range of options compared to classic Smart TVs. One of the most powerful features of this platform is access to the Android Debug Bridge (ADB), often referred to in the context of the Chromecast Android Shell broadcast. This allows you not only to broadcast content, but also to get deep access to the system to control the device from a computer or smartphone.
Many owners of Xiaomi Mi TV Stick or built-in modules in the TV series Mi TV P1, Q1, A2 do not know that they can use debugging protocols to more stable connection or install applications that are not available in the official Play Market Store. Activation of this mode requires care, since you get the rights to change system parameters.
In this article, we’ll take a closer look at how to activate developer mode, set up a network connection for ADB, and take advantage of Chromecast’s capabilities at a deeper level.You’ll learn how to safely interact with your TV file system and fix common connection errors.
⚠️ Note: Making changes to system files through ADB Shell can cause the TV to run in an unstable way. All the actions you perform are at your own risk, so before you start experimenting, make sure you understand the meaning of the commands you enter.
Preparing Xiaomi TV for debugging
The first step to accessing the Android Shell shell is to activate the hidden Developer Menu, which, as standard, hides these settings so that ordinary users don’t accidentally change critical settings, and you’ll need a remote control and access to the main settings menu.
Find the Settings → Device section. You can find the Build item in the system information list. This item may be called differently on different versions of MIUI for TV firmware, but the essence remains the same. You need to quickly press the confirmation button on the remote (usually the central OK button) seven times in a row.
After a few clicks, the system will start showing the countdown of the remaining clicks. When the limit is exhausted, a notification will appear on the screen that the developer mode is activated. Now a new item will appear in the settings menu, usually under the "Device Settings" or "System" section, "Developers For".
- 🔍 Find the item "Assembly" in the section "About the device».
- 🔢 Press the OK button on the remote 7 times quickly.
- ✅ Check the appearance of a new menu in the system settings.
Inside the developer menu, we are interested in two key parameters: “Debugging by the user” USB» and "Debugging over the network" (if available in your firmware version). To work with Android Shell via Wi-Fi, you need to turn on "Debugging over the Internet" USB», This is the switch that activates the demon. ADB, even if USB-connection not used.
Adjusting the ADB network connection
After debugging, the TV is ready to accept commands, but for remote control you need to know it. IP-Without this option, a computer or smartphone will not be able to find the device on the local network. → Network and Internet → Wi-Fi by selecting the current connected network.
Write it down. IP-The address that usually looks like 192.168.1.XX or 192.168.0.XX. Standard port for connection ADB The default is 5555.However, in some versions of Xiaomi firmware, the port can be changed or require manual activation of listening.
To get started with Android Shell, Google's Platform Tools platform must be installed on your computer, a suite of utilities that includes adb.exe. Once you've installed and added paths to the environment variables, you can try connecting to your TV.
☑️ Checking before connection
Open the command line on your computer and type in the connection command. If the connection is successful, a request for debugging permission from that computer will appear on the TV screen, and you must agree by ticking the "Always Allow from this computer" box.
adb connect 192.168.1.105:5555If the command is successful, the message connected to 192.168.1.105:5555 will appear in the console.Now your computer has full access to the Android Shell shell of the Xiaomi TV, and you can send commands, install apps or broadcast the screen.
Use of Chromecast and broadcast protocols
The term “Chromecast” in the context of Android TV is often confused with the usual Cast function. In fact, Android Shell allows you to manage casting processes more flexibly. Google Cast protocol is built into the system, but through ADB you can restart the corresponding services if the broadcast is not working properly.
For example, if YouTube stops seeing TV, you can force the restart of the service Google Cast Receiver. this often solves the problem of “disappearance” of the device from the list available for broadcast in the smartphone.
Services are managed using the am (Activity Manager) commands, which not only allow you to restart processes, but also run applications by batch name, which is useful for automating smart home scenarios.
| Team team. | Description of action | The result |
|---|---|---|
| adb shell pm list packages | Deletion of the list of all packages | Display of installed applications |
| adb shell am start -n package | Launch of the application | Opening the necessary program on TV |
| adb shell pm clear package | Cleaning the application data | Reset to the factory settings of the application |
| adb reboot | Rebooting the device | Soft restart of the Android TV system |
It is important to understand the difference between simple video casting and control via Shell. The first is the user function, the second is administrative access. Using Shell, you can, for example, change the screen resolution or refresh rate if the standard settings of the Xiaomi TV do not allow you to choose the desired mode for a particular monitor or projector.
💡
Use the team. `adb shell wm size` to check the current screen resolution and `adb shell wm density` Change the pixel density if the interface looks too large.
Install applications via Android Shell
One of the main advantages of accessing Android Shell on Xiaomi TV It is possible to install applications from third-party sources (APK-This is especially true for Russian users, whose app stores may be restricted.
The installation process is simple: you will need APK-the file of the desired application (for example, a file manager or an alternative store) on the computer. ADB. Make sure that your TV and computer are on the same network.
Enter adb install -r path to file.apk. The -r flag stands for reinstall, which allows you to reinstall the application over an existing one, saving data if any. If the installation is successful, the console will give a Success message.
⚠️ Attention: Download APK-files only from trusted sources such as APKMirror or 4PDA. Installing modified system applications can disrupt the interface MIUI TV.
Shell can also remove system applications that are pre-installed by the manufacturer and interfere with work (bloatware), but this requires extreme caution: removing critical system components can lead to a bootloop (cyclic reboot).
To remove, use the command adb shell pm uninstall --user 0 packet name. This command removes the application only for the current user, without erasing it physically from the system partition, which allows you to return everything back if necessary.
Solving Common Connection Problems
Despite the simplicity of the theory, in practice, Xiaomi users often experience a computer “can’t see” the TV, most often due to settings on a Windows firewall or antivirus that block incoming connections to port 5555.
The second common problem is dynamic. IP-If the router gives the TV a new address after the reboot, the connection command will stop working. IP for the TV in the router settings or DHCP-reservation.
Also, some versions of MIUI for TV firmware have a bug where the ADB demon falls asleep to save energy. If the connection is cut off after a few minutes, try turning off the power saving feature for system processes in the developer menu.
- 🔥 Check the firewall and add a rule for adb.exe.
- 📡 Secure the static IP-router address.
- ⚡ Turn off deep sleep Wi-Fi module in the developer settings.
If the adb device command shows the device as unauthorized, you missed the confirmation step on the TV screen. USB-primary authorization cable.
What if ADB is not connected over Wi-Fi?
Safety and Return to Factory Settings
Working with Android Shell carries increased risks, and if you accidentally delete an important system package or change the display settings so that the image is gone, don’t panic. In most cases, a full reset to the factory settings (Hard Reset) helps.
On Xiaomi TVs, you can reset via the Settings → Device → Reset menu. If the interface doesn’t respond, you can use a combination of buttons on the remote when you turn on (usually “Back” + “OK” or hold the power button), but the exact combination depends on the model.
Therefore, before actively experimenting with Android Shell, it is recommended to back up important data or simply be ready to re-set your TV.
To improve security after the ADB work is over, it is recommended to disable USB Debugging from the developer menu, which will close port 5555 to external connections and protect your local network from potential attacks if you are connected to public Wi-Fi.
💡
Disabling debugging over USB after use is a mandatory security measure to prevent unauthorized access to your TV from the local network.