{"id":18860033,"url":"https://github.com/duhow/xiaoai-patch","last_synced_at":"2026-02-08T18:30:15.682Z","repository":{"id":36955716,"uuid":"321107461","full_name":"duhow/xiaoai-patch","owner":"duhow","description":"Patching for XiaoAi Speakers (小爱音箱), add custom binaries and open source software. Tested on LX06, LX01, LX05, L09A","archived":false,"fork":false,"pushed_at":"2025-01-06T19:52:06.000Z","size":18778,"stargazers_count":205,"open_issues_count":9,"forks_count":32,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-01-29T21:17:19.492Z","etag":null,"topics":["alexa","custom-firmware","hardware","lx06","mico","personal-assistant","smart-speaker","speaker","voice-assistant","xiaoai","xiaoai-speaker"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duhow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"duhow","custom":["https://paypal.me/duhow"]}},"created_at":"2020-12-13T16:21:40.000Z","updated_at":"2025-01-29T06:59:01.000Z","dependencies_parsed_at":"2024-06-18T20:16:48.085Z","dependency_job_id":"79a1567b-cd71-47b3-9bb6-bb0c44767476","html_url":"https://github.com/duhow/xiaoai-patch","commit_stats":{"total_commits":335,"total_committers":3,"mean_commits":"111.66666666666667","dds":"0.011940298507462699","last_synced_commit":"c35a35fe88a55c7c786bed80bc7aaddd2cd65109"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duhow%2Fxiaoai-patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duhow%2Fxiaoai-patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duhow%2Fxiaoai-patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duhow%2Fxiaoai-patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duhow","download_url":"https://codeload.github.com/duhow/xiaoai-patch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239800487,"owners_count":19699127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa","custom-firmware","hardware","lx06","mico","personal-assistant","smart-speaker","speaker","voice-assistant","xiaoai","xiaoai-speaker"],"created_at":"2024-11-08T04:20:40.193Z","updated_at":"2026-02-08T18:30:15.641Z","avatar_url":"https://github.com/duhow.png","language":"Makefile","funding_links":["https://ko-fi.com/duhow","https://paypal.me/duhow"],"categories":["Makefile"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"research/speakers.jpg\" alt=\"XiaoAi Speakers\" style=\"height: 150px;\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eXiaoAi Speakers patched\u003c/i\u003e\n\u003c/p\u003e\n\n------------\n\nThis repo contains custom scripts and patches, to make a custom rootfs image free of propietary software, and installing open source programs.  \nPatches and scripts can be tweaked, so if really want, you can keep the original functions of the Chinese XiaoAi assistant, and install new programs as well.\n\nThe main purpose of this toolset is to have your DIY Voice Assistant (Alexa-like) and Smart Speaker, with lots of integrations for music and automation.\n\nBy using [MPD], [Snapcast], [Shairport-Sync], [Upmpdcli], [Squeezelite], you can make your speaker a full media player compatible with multiple cast protocols,\nand also have a voice assistant powered by [Porcupine] and [Whisper] that can interact with your [Home Assistant].  \nEverything powered by Open Source Software!\n\n[MPD]: https://www.musicpd.org/\n[Snapcast]: https://github.com/badaix/snapcast\n[Shairport-Sync]: https://github.com/mikebrady/shairport-sync\n[Upmpdcli]: https://www.lesbonscomptes.com/upmpdcli/\n[Squeezelite]: https://github.com/ralph-irving/squeezelite\n[Porcupine]: https://github.com/Picovoice/porcupine\n[Whisper]: https://github.com/home-assistant/addons/tree/master/whisper\n[Home Assistant]: https://www.home-assistant.io/\n\n## Compatibility\n\n🛒 *The page contains affiliated links, if you would like to purchase the speaker and support this project, feel free to use it!*\n\n| Model | Name | Target version |\n|-------|------|------------------------------|\n| [![LX06 - supported][LX06]](./research/lx06/) | 🛒 [Xiaoai Speaker Pro (black, infrared)](https://s.click.aliexpress.com/e/_on7C0gx) ⭐[📝](./research/lx06/) | 1.74.10 |\n| [![L06A - supported][L06A]](./research/lx06/) | 🛒 [Xiaoai Speaker (white, no infrared)](https://s.click.aliexpress.com/e/_oC8xwNH) [📝](./research/lx06/) | 1.74.10 |\n| [![LX01 - supported][LX01]](./research/lx01/) | Xiaomi Mi AI Speaker Mini | 1.32.6 |\n| ![L09A - supported][L09A] | Xiaoai Speaker Art (China, white) | 1.76.4 |\n| ![L09B - supported][L09B] | Xiaoai Speaker Art Battery (Black) - untested | 1.69.54 |\n| [![L09G - not supported][L09G]](./research/l09g/) | Xiaomi Mi Smart Speaker (Global, Google Assistant) | |\n| ![LX05 - encrypted, supported][LX05] | 🛒 [Xiaoai Speaker Play](https://s.click.aliexpress.com/e/_onGQ8af) 🔐 | |\n| ![L05B - not supported][L05B] | Xiaoai Speaker Play Enhanced Edition, no Clock LED (NuttX) - [details](https://github.com/duhow/xiaoai-patch/issues/19) | |\n| ![L05C - not supported][L05C] | 🛒 [Xiaoai Speaker Play Enhanced Edition, with Clock LED (NuttX)](https://s.click.aliexpress.com/e/_oFox6UT) | |\n| ![L05G - not supported][L05G] | Xiaomi Smart Speaker IR Control (Global, Google Assistant) | |\n| ![L15A - encrypted, not fully supported][L15A] | 🛒 [Xiaomi Mi AI Speaker 2 Gen](https://s.click.aliexpress.com/e/_oldb5I7) 🔐 | |\n| ![L16A - not tested][L16A] | 🛒 [Xiaomi Sound by HARMAN AudioEFX](https://s.click.aliexpress.com/e/_oDdCwl9) | |\n| ![L17A - not tested][L17A] | 🛒 [Xiaomi Sound Pro](https://s.click.aliexpress.com/e/_omC5yLv) | |\n| ![L07A - not tested][L07A] | Redmi XiaoAI Speaker Play | |\n| ![M03A - not tested][M03A] | Xiaomi Sound Move | |\n| ![MDZ-25-DT - not tested][MDZ-25-DT] | Xiaomi Mi AI Speaker 1 Gen (?) - S12 | |\n| ![XMYX01JY - not tested][XMYX01JY] | Xiaomi XiaoAI HD | |\n| ![YLAI01YL - blocked (not tested)][YLAI01YL] | Yeelight Voice Control Assistant | |\n\n[LX06]: https://img.shields.io/badge/LX06-green?style=for-the-badge\n[L06A]: https://img.shields.io/badge/L06A-green?style=for-the-badge\n[LX01]: https://img.shields.io/badge/LX01-green?style=for-the-badge\n[L09A]: https://img.shields.io/badge/L09A-green?style=for-the-badge\n[L09B]: https://img.shields.io/badge/L09B-green?style=for-the-badge\n[L09G]: https://img.shields.io/badge/L09G-red?style=for-the-badge\n[LX05]: https://img.shields.io/badge/LX05-yellowgreen?style=for-the-badge\n[L05B]: https://img.shields.io/badge/L05B-red?style=for-the-badge\n[L05C]: https://img.shields.io/badge/L05C-red?style=for-the-badge\n[L05G]: https://img.shields.io/badge/L05G-red?style=for-the-badge\n[L15A]: https://img.shields.io/badge/L15A-yellow?style=for-the-badge\n[L16A]: https://img.shields.io/badge/L16A-lightgrey?style=for-the-badge\n[L17A]: https://img.shields.io/badge/L17A-lightgrey?style=for-the-badge\n[L07A]: https://img.shields.io/badge/L07A-lightgrey?style=for-the-badge\n[M03A]: https://img.shields.io/badge/M03A-lightgrey?style=for-the-badge\n[MDZ-25-DT]: https://img.shields.io/badge/MDZ--25--DT-lightgrey?style=for-the-badge\n[XMYX01JY]: https://img.shields.io/badge/XMYX01JY-lightgrey?style=for-the-badge\n[YLAI01YL]: https://img.shields.io/badge/YLAI01YL-lightgrey?style=for-the-badge\n\n### 🔐 Encrypted speaker partitions\n\nSome speakers such as **LX05** or **L15A**, change the rootfs partition and include a **DER** certificate to verify the system.\nThis **may block** any changes on non-signed squashfs. **Recommended to NOT flash**, you may have an invalid rootfs and potentially lock yourself!\nYou can check this by running `binwalk` if it contains a Certificate entry:\n\n```\nDECIMAL       HEXADECIMAL     DESCRIPTION\n--------------------------------------------------------------------------------\n0             0x0             Squashfs filesystem, little endian, version 4.0, compression:xz, size: 32240378 bytes,\n                              2430 inodes, blocksize: 262144 bytes, created: 2021-04-28 06:34:34\n32243716      0x1EC0004       Certificate in DER format (x509 v3), header length: 4, sequence length: 830\n```\n\n\n## Requirements\n\n\u003e [!WARNING]  \n\u003e Supported and Tested setup is **Linux** OS with `amd64` arch.\n  Other hosts (Apple M1, Windows) are **not tested nor supported**.\n  Feel free to make a PR if you have a fix for this.\n\n\u003e [!IMPORTANT]  \n\u003e If using WSL, be sure to enable `setCaseSensitiveInfo`.\n\nYou will also need the following tools:\n\n- `squashfs-tools`, provides `unsquashfs` and `mksquashfs`\n- `mtd-utils` (Only for model S12), provides utils for UBI images\n- `make`\n- `rsync`\n- `shasum`\n- Docker\n- patience - package build takes more than 1 hour. :)\n\n## Usage\n\nGet a copy of your `rootfs` filesystem from your speaker. It can also be from a system upgrade file.\nIt should be something similar as this:\n\n```bash\nnc -vlp 8888 \u003e $HOME/backup-image\n# -----\ndd if=/dev/mtd4 of=/tmp/image\nnc $IP_ADDR 8888 \u003c /tmp/image\n```\n\nSince the speakers filesystem is read-only format, we have to reflash it to add the new applications and patches.\nThere are three steps to perform this: **extract, patch, build**.\n\nOptionally but recommended, prepare the packages you want to install by editing the [packages.sh] script.\n\n[packages.sh]: https://github.com/duhow/xiaoai-patch/blob/master/packages.sh#L657\n\nBuild the docker image and run it to build all the packages. Probably it will take more than an hour.\n\n\u003e [!CAUTION]  \n\u003e Run the **build packages.sh** process with Docker, since the package build performs some patching to the system, otherwise it could harm your GNU/Linux installation.\n\n```bash\ndocker build -t xiaoai-patch packages\ndocker run -it -v $PWD:/xiaoai xiaoai-patch\n```\n\nYou can now run the commands to prepare the new image.\n\n```bash\nsudo make clean\nsudo make extract FILE=image-mtd4\nsudo make patch MODEL=lx06\nsudo make build MODEL=lx06\n\n# or all at once :)\nsudo make clean all FILE=image-mtd4 MODEL=lx06\n```\n\n\u003e [!TIP]  \n\u003e Ensure the image format is correct, by comparing the original and new images. Use `file` or other commands to check info.\n\nAfter you have the new image ready, send it to the speaker, and **flash the not-in-use** `rootfs` partition, boot it and test.\n\n## :warning: Unbricking\n\nYou should have some wires soldered to the board to perform TTL in case it is required.  \nAs long as you perform steps as described and not flashing content in wrong partitions, you can reverse failed boot with Uboot safely.\n\nIn order to enable Uboot menu, check in the environment partition that you have the setting `bootdelay=3`.  \nIf is set to `bootdelay=0` then Uboot will continue normal boot process and you won't be able to stop it unless you get into fastboot or recovery mode. (?)  \nIn most cases, binary program is `fw_setenv` or `fw_env` and data is set into first partition as string.\n\nEnsure you can access Uboot before writing changes, it is your rescue!\n\n```\nHit any key to stop autoboot:  0\n```\n\n# DISCLAIMER\nYOU are responsible for any use or damage this software may cause. This repo and its content is intended for educational purposes only. Use at your own risk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduhow%2Fxiaoai-patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduhow%2Fxiaoai-patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduhow%2Fxiaoai-patch/lists"}