You are tired of the standard topics in MIUI You want to make your smartphone Xiaomi, Redmi or POCO Creating a custom theme is not only a way to stand out, it's also an opportunity to optimize the interface for your needs, from color palettes to animations. Unlike the Themes, the theme allows you to control every pixel, from application icons to system notification fonts.
This article is suitable for both beginners and experienced users, and we will discuss two main approaches: manually creating a theme through editing. APK (For advanced ones, and using themes (beginners), you'll also learn how to get around the limitations. MIUI when installing uncertified themes and what tools will be required to work with graphics and XML-Ready to turn your Xiaomi into a masterpiece!
What to Know Before Creating a Xiaomi Theme
Before getting involved, it is important to understand how the topics are arranged in the MIUI. Unlike standard Android, where theme is often limited to wallpaper and icons, MIUI use full-fledged APK-packets with the.mtz extension (for older versions) or.apk extension (for newer ones:
- π¨ Graphic resources: icons, wallpaper, interface elements (buttons, sliders, backgrounds)
- π XML-files: description of color schemes, fonts, animations
- π Theme Manifesto: Metadata (title, version, version compatibility) MIUI)
Creating a theme from scratch requires basic knowledge in:
- ποΈ Work with graphic editors (Adobe Photoshop, GIMP, Figma)
- π Editing XML (Notepad++, Android Studio)
- π§ Use of decompilation tools APK (APKTool, JADX)
β οΈ Attention: Themes created for MIUI 12, may not be correctly displayed in MIUI 14 due to changes in system file structure. Always check compatibility on the test device!
If you are not ready to dive into the code, you can use designers such as MIUI Theme Editor or Hex Installer, which allows you to assemble a theme from pre-made elements, but with limited customization.
Tools and programmes required
To create a theme from scratch, prepare the following:
| Tool. | Appointment | Download link |
|---|---|---|
| APKTool | Decompilation and compilation APK-file | Official website |
| MIUI Theme Editor | Visual Theme Editor for Beginners | XDA Developers |
| GIMP Photoshop | Editing graphics (icons, wallpaper) | gimp.org |
| Android Studio | Review and editing XML-file | developer.android.com |
| MT Manager | Editing APK without decompilation (for experienced) | XDA Developers |
The testing of topics will require:
- π± Smartphone Xiaomi/Redmi/POCO with an unlocked loader (for installation through TWRP)
- π Root rights (optional, but simplifies installation)
- πΎ Backup of the current firmware (in case of failures)
β οΈ Warning: Installing uncertified themes may result in the device being locked during the boot phase if files are corrupted.Always check the theme on a secondary device or via an emulator!
If you are planning to spread your topic, register with the MIUI Theme Store as a developer. It's free, but it requires you to verify your account through your Mi Account.
Step 1: Assembling the structure of the topic
Any topic for MIUI It consists of three key components:
- Resources (res/) β images, colors, styles
- Manifesto (AndroidManifest.xml) β metadata
- Configuration (theme_values/) β compatibility
The easiest way to start is to copy the structure of an existing topic.
- Download any free theme from the theme β Online.
- Remove the.mtz file (it's renamed.apk) through the archiver.
- Decompile. APK using APKTool: apktool d theme.apk -o theme_folder
In the file received theme_folder you will find:
- π res/drawable β icons and graphic elements
- π res/values β color-schematic (colors.xml)
- π AndroidManifest.xml β information about the topic (title, version, author)
βοΈ Preparation of the basic structure of the topic
For convenience, rename the folder and update the data to AndroidManifest.xml:
<manifest android:versionName="1.0" android:versionCode="1" package="com.example.mytheme">
<application android:label= "My Theme" android:icon="@mipmap/ic_launcher">
</application>
</manifest>Where com.example.mytheme is the unique identifier of your topic (replace it with yours).
Step 2: Designing graphic elements
Graphics are the basis of any topic. MIUI There are over 500 different icons for system and third-party applications, and you don't have to draw them all from scratch, you can modify existing ones or use templates.
The main elements that need to be customized:
- π± Application icons (size) 192Γ192 px, format PNG)
- π Wallpaper (permission not less than 2160Γ3840 px AMOLED-screen)
- ποΈ Interface elements: buttons, sliders, background notifications
- π Animation (optional, requires knowledge of Lottie or After Effects)
Design recommendations:
- π¨ Use vector icons (format) SVG), avoid pixelation.
- π Stick to the same color palette for all elements.
- π Observe the size of the grid: icons should be aligned in the center in the square 192Γ192 px.
To speed up the process, you can use ready-made sets of icons from:
- π Flaticon (free icons)
- π Material Design Icons (official icons from Google)
β οΈ Note: Icons for system applications (e.g. com.android.settings) must have the exact file name, otherwise they wonβt be loaded into the file. MIUI. The list of required icon names can be found in the file theme_values/strings.xml decompiled.
After creating the graphics, save the files to the appropriate folders:
- res/drawable-xxhdpi/ β icons
- res/drawable-nodpi/ β wallpaper
Step 3: Editing Colors and Styles
The color scheme of the theme is determined in files colors.xml and styles.xml, file res/values/. Here's the color set for:
- π± System window background
- π Text of notifications and menus
- π Buttons and switches
- π Charts in Battery and Storage
Example of structure colors.xml:
<resources>
<color name="miui_color_primary">#FF5722</color>
<color name="miui_color_secondary">#FF9800</color>
<color name="miui_color_text_primary">#212121</color>
<color name="miui_color_background">#FFFFFF</color>
</resources>To change the fonts, edit the file fonts.xml (If you have one, add your fonts to the res/font/. MIUI Supports.ttf and.otf formats.
Tip: Use contrasting colors for text and background to keep the theme readable in bright sunshine. Check the pairings through the WebAIM Contrast Checker tool.
π‘
To quickly pick up a palette, use Coolors. Generate a scheme and export colors to the HEX-format colors.xml.
Step 4: Compilation and signature of the theme
After editing all files, you need to compile the theme back to the APK. For that:
- Open the terminal in the folder with APKTool and execute the command: apktool b theme_folder -o mytheme.apk
- Sign the result. APK via Uber APK Signer or Java Keytool: jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mykey.keystore mytheme.apk alias_name (Replace mykey.keystore and alias_name data).
If you donβt want to get a signature, you can use it. MT Manager:
- Open the compiled APK into MT Manager.
- Choose Sign. APK and confirm the action.
File ready. mytheme.apk You can rename it mytheme.mtz (for compatibility with older versions). MIUI) and load it into the device.
β οΈ Note: Unsigned themes will not be installed through a standard Theme Installer. TWRP or ADB.
Step 5: Installing a theme on Xiaomi
There are three ways to set a custom theme:
- Through TWRP (recommended for power users: Copy.mtz or.apk to a memory card. TWRP (Loudness up + Select Install. β Select a theme file β Swipe to confirm.
- Through ADB (without root: adb install mytheme.apk Then apply the theme to Settings β Topics β Local.
- Through MIUI Theme Editor (the easiest way): Open up MIUI Theme Editor on PC. Import a theme folder. Export to.mtz and send it to your phone.
If the topic does not apply:
- π Check compatibility with your version MIUI (indicated theme_values/config.xml).
- π Make sure that all the resources are available in XML correctly.
- π§ Try to clear the theme app cache (Settings) β Annexes β Application management β Topics β Clear the cache).
π‘
Installation through TWRP β It's the most reliable way, but it requires an unlocked bootloader. ADB or MIUI Theme Editor.
Distribution and monetization of your topic
If you want to share your topic with other users, there are a few ways to do this:
- π MIUI Theme Store: Register as a developer on the official website. Download the.mtz file and fill out the description. Wait for moderation (may take up to 7 days).
β οΈ Note: Xiaomi charges 30% commission on the sales of themes. Free themes are distributed without restrictions.
Own website or Telegram channel
- π Post the theme on GitHub, 4PDA or in Telegram-chats on customization.
- π³ Use Donation Alerts or Boosty to monetize.
Platforms for custom themes
- π XDA Developers
- π Theme section for Xiaomi
To make your topic popular:
- πΈ Take high-quality screenshots on different devices.
- π Write a detailed description with the supported versions MIUI.
- π Update theme regularly, adding support for new devices.