All Projects → duhow → xiaoai-patch

duhow / xiaoai-patch

Licence: GPL-3.0 license
Patching for XiaoAi Speakers, add custom binaries and open source software. Tested on LX06, LX01, LX05, L09A

Programming Languages

Makefile
30231 projects
shell
77523 projects
python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to xiaoai-patch

Mycroft Core
Mycroft Core, the Mycroft Artificial Intelligence platform.
Stars: ✭ 5,489 (+9363.79%)
Mutual labels:  personal-assistant, voice-assistant
leon
🧠 Leon is your open-source personal assistant.
Stars: ✭ 8,560 (+14658.62%)
Mutual labels:  personal-assistant, voice-assistant
sepia-assist-server
Core server of the SEPIA Framework responsible for NLU, conversation, smart-service integration, user-accounts and more.
Stars: ✭ 81 (+39.66%)
Mutual labels:  personal-assistant, voice-assistant
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+4837.93%)
Mutual labels:  alexa, voice-assistant
Hoobs
Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
Stars: ✭ 325 (+460.34%)
Mutual labels:  alexa, hardware
Bluetooth-Speaker
MouDio: a compact and portable Bluetooth speaker with high-quality components for powerful, clear sound. Moudio is built using four PCBs and laser-cut acrylic grills with 3D printed parts, and it can be easily assembled using the provided instructions.
Stars: ✭ 27 (-53.45%)
Mutual labels:  hardware, speaker
AshTech-AI Personal Voice Assistant
One great friend in our gadgets 💻📳📱
Stars: ✭ 37 (-36.21%)
Mutual labels:  personal-assistant, voice-assistant
cala
Cross-platform system interface for hardware IO
Stars: ✭ 46 (-20.69%)
Mutual labels:  hardware, speaker
Ha4iot
Open Source Home Automation system for .NET
Stars: ✭ 146 (+151.72%)
Mutual labels:  alexa, hardware
Wukong Robot
🤖 wukong-robot 是一个简单、灵活、优雅的中文语音对话机器人/智能音箱项目,还可能是首个支持脑机交互的开源智能音箱项目。
Stars: ✭ 3,110 (+5262.07%)
Mutual labels:  alexa, speaker
yastack
YAStack: User-space network-stack based on DPDK, FreeBSD TCP/IP Stack, EnvoyProxy
Stars: ✭ 90 (+55.17%)
Mutual labels:  hardware
skill-sample-nodejs-berry-bash
Demonstrates the use of interactive render template directives through multi modal screen design.
Stars: ✭ 22 (-62.07%)
Mutual labels:  alexa
spc-player
SNES music player in your browser with original hardware and Arduino.
Stars: ✭ 37 (-36.21%)
Mutual labels:  hardware
edgeai-lab-microcontroller-series
This repository is to share the EdgeAI Lab with Microcontrollers Series material to the entire community. We will share documents, presentations and source code of two demo applications.
Stars: ✭ 15 (-74.14%)
Mutual labels:  hardware
Jarvis-personal-assistant
Comfort of a personal assistant for Linux systems. Currently features native google, yahoo, bing searches, weather conditions, videos from youtube and looking up for images as well, all in a very reliable structure and UI.
Stars: ✭ 45 (-22.41%)
Mutual labels:  personal-assistant
Big Honking Button
A simple Eurorack sampler and performance module in a silly package.
Stars: ✭ 45 (-22.41%)
Mutual labels:  hardware
espism
A low cost ISM radio to wifi gateway
Stars: ✭ 38 (-34.48%)
Mutual labels:  hardware
dekk
👁 A presentation tool written in react.js
Stars: ✭ 33 (-43.1%)
Mutual labels:  speaker
TENET
An analytical framework that models hardware dataflow of tensor applications on spatial architectures using the relation-centric notation.
Stars: ✭ 53 (-8.62%)
Mutual labels:  hardware
hardware
Get CPU, Memory and Network informations of the running OS and its processes
Stars: ✭ 70 (+20.69%)
Mutual labels:  hardware

XiaoAi Speakers


Introduction

This repo contains custom scripts and patches, to make a custom rootfs image free of propietary software, and installing open source programs.
Patches 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.

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

By using MPD, Snapcast, Shairport-Sync, Upmpdcli you can make your speaker a full media player compatible with multiple cast protocols, and also have a voice assistant powered by Porcupine and Vosk that can interact with your Home Assistant.
Everything powered by Open Source Software!

⚠️ Warning

Looks like some new speakers or firmware upgrades change the rootfs partition and include a DER certificate to verify the system. This may block any changes on non-signed squashfs. Recommended to NOT flash, you may have an invalid rootfs and potentially lock yourself! You can check this by running binwalk if it contains a Certificate entry:

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             Squashfs filesystem, little endian, version 4.0, compression:xz, size: 32240378 bytes,
                              2430 inodes, blocksize: 262144 bytes, created: 2021-04-28 06:34:34
32243716      0x1EC0004       Certificate in DER format (x509 v3), header length: 4, sequence length: 830

Compatibility

Model Name Target version (recommended)
LX06 - supported Xiaoai Speaker Pro (black, infrared) 1.74.10
L06A - supported Xiaoai Speaker (white, no infrared) 1.74.10 (build as LX06)
LX01 - supported Xiaomi Mi AI Speaker Mini 1.32.6
L09A - supported Xiaoai Speaker Art (China)
L09G - not supported Xiaomi Mi Smart Speaker (Global, Google Assistant)
LX05 - encrypted, supported Xiaoai Speaker Play
L05B - not supported Xiaoai Speaker Play Enhanced Edition, no Clock LED (NuttX) - details
L05C - not supported Xiaoai Speaker Play Enhanced Edition, with Clock LED (NuttX)
L05G - not supported Xiaomi Smart Speaker IR Control (Global, Google Assistant)
L15A - encrypted, not fully supported Xiaomi Mi AI Speaker 2 Gen
L16A - not tested Xiaomi Sound by HARMAN AudioEFX
L07A - not tested Redmi XiaoAI Speaker Play
MDZ-25-DT - not tested Xiaomi Mi AI Speaker 1 Gen (?) - S12
XMYX01JY - not tested Xiaomi XiaoAI HD
YLAI01YL - blocked (not tested) Yeelight Voice Control Assistant

ℹ️ NOTE: Target version is the recommended version to ensure all patches are working, but other versions may be still supported and working.
🔧 This is still Work in Progress.

Requirements

You need a computer with Linux and:

  • squashfs-tools, provides unsquashfs and mksquashfs
  • mtd-utils (Only for model S12), provides utils for UBI images
  • make
  • rsync
  • shasum
  • Docker
  • patience. :)

Usage

Get a copy of your rootfs filesystem from your speaker. It can also be from a system upgrade file. It should be something similar as this:

nc -vlp 8888 > $HOME/backup-image
# -----
dd if=/dev/mtd4 of=/tmp/image
nc $IP_ADDR 8888 < /tmp/image

Since the speakers filesystem is read-only format, we have to reflash it to add the new applications and patches. There are three steps to perform this: extract, patch, build.

Optionally but recommended, prepare the packages you want to install by editing the packages.sh script.

Build the docker image and run it to build all the packages. Probably it will take more than an hour.
NOTE: 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.

docker build -t xiaoai-patch packages
docker run -it -v $PWD:/xiaoai xiaoai-patch

You can now run the commands to prepare the new image.

sudo make clean
sudo make extract FILE=image-mtd4
sudo make patch MODEL=lx06
sudo make build MODEL=lx06

# or all at once :)
sudo make clean all FILE=image-mtd4 MODEL=lx06

NOTE: Ensure the image format is correct, by comparing the original and new images. Use file or other commands to check info.

After you have the new image ready, send it to the speaker, and flash the not-in-use rootfs partition, boot it and test.

⚠️ Unbricking

You should have some wires soldered to the board to perform TTL in case it is required.
As long as you perform steps as described and not flashing content in wrong partitions, you can reverse failed boot with Uboot safely.

In order to enable Uboot menu, check in the environment partition that you have the setting bootdelay=3.
If 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. (?)
In most cases, binary program is fw_setenv or fw_env and data is set into first partition as string.

Ensure you can access Uboot before writing changes, it is your rescue!

Hit any key to stop autoboot:  0

DISCLAIMER

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].