UPnP on Android Xiaomi: what is the program, how does it work and when should it be disabled

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.

๐Ÿ“Š Have you ever used UPnP on your smartphone?
Yes, for file transfer.
Yeah, for the smart home.
No, but I saw it in Task Manager.
No, and I don't know what it is.
I'm having trouble answering.

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:

  1. Sends a broadcast request to the local network (M-SEARCH) search for compatible devices.
  2. Receives answers describing the available services (e.g, urn:schemas-upnp-org:service:ContentDirectory:1 media server).
  3. 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
When analyzing the network traffic of the Xiaomi Redmi Note 10 Pro smartphone in Wireshark, it is clear that when activating Mi Share, the device sends multicast packets to the address 239.255.250 (standard for the mobile phone). SSDP) requestingly ST: urn:schemas-upnp-org:device:MediaServer:1. The answer from another smartphone contains XML description of supported protocols (HTTP, DLNA) and URL plug-in.

What applications Xiaomi uses UPnP

Not all programs explicitly report UPnP usage, but some system and third-party applications on Xiaomi actively exploit it.

AnnexPurpose of using UPnPCan I turn it off?
Mi HomeControl of smart devices (lamps, sockets, cameras)Partially (disrupts some functions)
Mi Share / ShareMeTransfer files over a local network without a cloudYes (switch to switch to) Bluetooth/Wi-Fi Direct)
Google Play GamesMultiplayer sessions in the local networkYeah (in game settings)
VLC, KodiStreaming media on DLNA-deviceYes. DLNA player-setting)
Telegram, WhatsAppOptimization 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

Done: 0 / 5

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.upnp

If 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:

  1. Open the Permissions.
  2. Turn off access to the local network or Wi-Fi.
  3. 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.

  1. Go to the routerโ€™s web interface (usually 192.168.1.1 or 192.168.0.1).
  2. Find the UPnP section (most often in Additional Settings) โ†’ NAT).
  3. 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 challengeAlternative to UPnPAdvantages
File transferLocalSend, SnapdropEncryption, no automatic port opening
Smart home.Home Assistant + VPNLocal control without cloud
Media streamingPlex, JellyfinAuthentication, access control
Online gamingManual port settingGreat 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.

FAQ: Frequent questions about UPnP on Xiaomi

Can I remove UPnP Service from Xiaomi without root?
No, it's a system application, and it requires root rights to remove it, but you can turn it off for individual programs or block network access through a firewall (like NetGuard).
Why does UPnP Service consume traffic in the background?
Chances are, one of the installed applications (such as Mi Home or messenger) uses UPnP to find devices on the network or optimize connections. Check the list of applications with access to the local network in the settings.
Is UPnP harmful to the battery?
Yes, continuous network scanning (especially in the background) can increase power consumption by 5-15%. If you notice a fast discharge, check UPnP activity in Settings โ†’ Battery โ†’ Battery utilization.
How to check which ports are open through UPnP on my Xiaomi?
Use Network Scanner or Fing apps to scan your local network. 1900/UDP (SSDP), 5000/TCP (UPnP HTTP) and 3702/TCP (WS-Discovery).
Will the Mi Band or Xiaomi Smart Lamp work without UPnP?
Most Mi Ecosystem devices can work without UPnP, but some features (such as remote access from outside the network or automatic detection) may be limited.