Have you ever noticed the mysterious UPnP Service process on your Xiaomi list of running apps and wondered what it is? This system service often raises questions from users โ especially when it suddenly appears in the menu of active processes or begins to consume traffic in the background. In this article, we will take a detailed look at what UPnP (Universal Plug and Play) is on Xiaomi Android devices, how it relates to the operation of your smartphone on the local network, and why some cybersecurity experts recommend treating it with caution.
The UPnP concept was originally designed to make it easier to connect devices on home networks, from printers to smart TVs. MIUI, This protocol behaves differently, and here it can be used for legitimate purposes (for example, to transfer files over the local network or work with Mi Home), and become a potential vulnerability, POCO Xiaomi, what apps are using it, and what to do if you want to limit its performance.
What is UPnP and why it is needed on Xiaomi smartphones
UPnP (Universal Plug and Play) is a set of network protocols that allows devices to automatically detect each other on the local network, exchange data and configure connections without manual user intervention. On desktop computers and routers, this protocol has been used for a long time, but on Android devices, including Xiaomi smartphones, its role is often left behind.
In the context of MIUI UPnP Service performs several key functions:
- ๐ Automatic port configuration for applications that need external access (e.g. remote control or remote control) P2P-compound).
- ๐ฑ Integration with the Xiaomi ecosystem: synchronization with smart devices via Mi Home, transfer of files between smartphones over the local network.
- ๐ฎ Multimedia support: streaming video / audio on DLNA-devices (e.g. on Mi TVs) TV).
- ๐ Facilitating connection to network printers or NAS-manually-input IP-address.
However, here lies an important nuance: on smartphones Xiaomi UPnP is often activated implicitly through third-party applications or system services, and the user does not even suspect it. For example, messengers like Telegram or Viber can use UPnP to optimize voice calls, and games can use it to organize multiplayer sessions. MIUI There is no direct switch to disable UPnP globally โ only options for individual applications.
How UPnP works for Xiaomi: Technical details
To understand why UPnP Service appears on the list of active processes, you need to understand its architecture at the Android level. MIUI This service is implemented as part of the system component of com.android.upnp, which interacts with the system:
- ๐ก Local router (through protocol) SSDP โ Simple Service Discovery Protocol).
- ๐ฑ Other devices on the network (exchange) XML-service-writer).
- ๐ Android Firewall (for dynamic port opening).
When an application (such as Mi Share or Google Photos) requests a network resource, UPnP performs the following steps:
- Sends a broadcast request to the local network (M-SEARCH) search for compatible devices.
- Receives answers describing the available services (e.g, urn:schemas-upnp-org:service:ContentDirectory:1 media server).
- Establishes a direct connection, bypassing NAT (If the router supports UPnP).
In practice, this means that your Xiaomi can automatically โbreak throughโ ports on the router to share data with other gadgets. For example, if you transfer photos through Mi Share, UPnP makes it easier to create a new device. P2P-But this same mechanism can be exploited by attackers to scan for vulnerabilities in your network.
Example of UPnP traffic in Wireshark
What applications Xiaomi uses UPnP
Not all programs explicitly report UPnP usage, but some system and third-party applications on Xiaomi actively exploit it.
| Annex | Purpose of using UPnP | Can I turn it off? |
|---|---|---|
| Mi Home | Control of smart devices (lamps, sockets, cameras) | Partially (disrupts some functions) |
| Mi Share / ShareMe | Transfer files over a local network without a cloud | Yes (switch to switch to) Bluetooth/Wi-Fi Direct) |
| Google Play Games | Multiplayer sessions in the local network | Yeah (in game settings) |
| VLC, Kodi | Streaming media on DLNA-device | Yes. DLNA player-setting) |
| Telegram, WhatsApp | Optimization P2P-call-ups (rarely) | No (embedded in protocol) |
UPnP is used particularly in the Xiaomi smart home ecosystem, for example, if you have a Mi Home Security Camera installed, UPnP helps you connect directly to your device bypassing cloud servers when watching a live stream through a mobile app, which speeds up video transfer, but also opens up a potential attack vector if the router is vulnerable.
โ ๏ธ Warning: Some viruses and spyware are disguised as legitimate UPnP services. If you see the com.android.upnp process in Task Manager but donโt use smart home or file transfer features, thatโs a reason to check for malware using Google Play Protect or Malwarebytes.
Risks and vulnerabilities of UPnP on Android
Despite its convenience, UPnP carries a few serious risks, especially on mobile devices:
- ๐ต๏ธ Unauthorized access: Vulnerabilities in the implementation of UPnP (e.g, CVE-2013-0229 or CVE-2020-12695) Allow attackers to redirect traffic or access local resources.
- ๐ Circumvention NAT: Attackers can use UPnP to โbreak throughโ ports on your router, bypassing the firewall.
- ๐ก Data Leakage: Some applications transmit device information via UPnP (model, MAC-address, list of installed programs).
- ๐ Increased power consumption: Continuous network scanning in the background drains the battery.
Research company Rapid7 (2020 showed that more than 80 million devices on the Internet are vulnerable due to improper implementation of UPnP. MIUI (starting MIUI 12) include improved security mechanisms, the risk remains โ especially if you are connected to a public Wi-Fi network (e.g., in a cafe or airport).
Example of UPnP attacks:
The attacker sends a fake SSDP- response to the smartphone request.
Indicate the malicious URL in the field.
The device connects to this URL by downloading malware.๐ก
If you frequently connect to public Wi-Fi, turn off UPnP in your router settings (even if you canโt see it on your smartphone) and this will reduce the risk of man-in-the-middle attacks" (MITM).
How to check if UPnP is active on your Xiaomi
Unlike Windows or routers, where UPnP can be turned on/off with a single switch, on Android (and on the other hand, on the other hand). MIUI In particular, it's decentralized, and here's how you test it:
โ๏ธ Diagnostics of UPnP on Xiaomi
A more advanced way of using ADB (Android Debug Bridge. Connect your smartphone to your PC and execute the command:
adb shell dumpsys package com.android.upnpIf the service is active, you'll see information about the running components, and alternatively, you can use applications like NetAnalyzer or Fing to scan open ports on the device.
Note the following signs of active UPnP:
- ๐ถ Appearance of the com.android.upnp process in Settings โ Annexes โ Launched.
- ๐ Unexpected traffic at ports 1900/UDP (SSDP) or 5000/TCP (UPnP HTTP).
- ๐ Automatic connection to network devices without your request (e.g. a printer or a printer) NAS).
How to Disable or Limit UPnP on Xiaomi
Deactivate UPnP at the system level MIUI It is impossible without root rights, but you can limit your use of root rights in several ways:
1. Disconnection for individual applications
Go to Settings. โ Annexes โ App management, select a program (e.g. Mi Home) and:
- Open the Permissions.
- Turn off access to the local network or Wi-Fi.
- In the section, find options related to UPnP or DLNA.
2.Blocking through the firewall
Install the NetGuard app (no root required) and create a rule to block outbound connections for com.android.upnp:
- ๐ก๏ธ Ban access to ports 1900/UDP and 5000/TCP.
- ๐ Monitor suspicious activity in the logs.
3. Router setup
A more radical method is to disable UPnP on the router itself.
- Go to the routerโs web interface (usually 192.168.1.1 or 192.168.0.1).
- Find the UPnP section (most often in Additional Settings) โ NAT).
- Turn off the option and save the changes.
๐ก
Disabling UPnP on a router will not disrupt the internet, but may require manually configuring ports for online gaming or torrent clients.
โ ๏ธ Note: If you use Xiaomi smart devices (such as a robot vacuum cleaner or camera), their functionality may deteriorate after you turn off UPnP. In this case, consider alternatives like static routes or a new model. VPN securely.
UPnP Alternatives for File Transfer and Device Management
If you decide to disable UPnP but need its features, use safer alternatives:
| The challenge | Alternative to UPnP | Advantages |
|---|---|---|
| File transfer | LocalSend, Snapdrop | Encryption, no automatic port opening |
| Smart home. | Home Assistant + VPN | Local control without cloud |
| Media streaming | Plex, Jellyfin | Authentication, access control |
| Online gaming | Manual port setting | Great security, but requires knowledge |
For example, to transfer files between Xiaomi smartphones, instead of Mi Share (which uses UPnP), you can use LocalSend. This open source application creates a temporary local area network over Wi-Fi Direct without opening ports on the router. And to manage a smart home without UPnP suitable Home Assistant with setting through YAML-configuration VPN-tunnel.