『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 6147|回复: 13

[智能音箱] XiaoAi Smart Speaker Patcher - Add open source software

[复制链接]

1

主题

5

帖子

155

积分

论坛技术达人

积分
155
金钱
145
HASS币
20
发表于 2021-6-6 20:53:06 | 显示全部楼层 |阅读模式
Hello everyone!
Since I discovered the CVE-2020-10263 report regarding XiaoAi Pro LX06, I thought there would be lots of possibilities with the speaker, and so I ordered some speakers and begin testing them.
I'm based at Spain, and I can't speak Chinese, so the speaker as-is is useless for me, since I cannot interact with it.
So I'm currently working in a public repository to add new software that allows me to have my own smart speaker, without having to connect to the Cloud Internet Services, and extending functionality, by adding MPD music player, multi-room audio with Snapcast, and more!


As I see this forum has lots of posts regarding Mi Speakers, I thought it would be good to share the repository with you, so you can test it if you want and provide some feedback and improvements.
[/!\] Please be aware that this will patching will remove all MiBrain and related Mi Services, so you will not be able to use the default voice assistant.

Link: https://github.com/duhow/xiaoai-patch

Default patching includes following changes:
- Enable SSH and ssh-keys in /data/ssh, so you can login without password
- Remove mico, MiBrain services
- Allow change Bluetooth name
- Remove Dolby DTS library reference
- Update time NTP after boot finishes
- Update hostname to match the speaker SN, for example LX06-1420 .
- Update SSL CA certificates
- Add custom sounds for different notification sounds
- Custom binaries, volume control, Google TTS

In order to install this patch, you need to extract the rootfs squashfs file - for example on LX06 this is done with dd if=/dev/mtd4 of=/tmp/root.img , then use this as a original file to perform patching.
Once you have build a patched image, apply it on the unused root partition (if you're running on boot0/rootfs0, flash rootfs1), and boot it.

For LX06 I'm currently testing with base image 1.58.15 , newer versions may have different changes and patching may require some additional changes.

Hope you like it, and let me know your opinion. Thanks!

评分

参与人数 3金钱 +48 HASS币 +20 收起 理由
whxciotw + 20 膜拜大神!
+ 20 + 20 fantastic!
XCray + 8 it sounds cool!

查看全部评分

回复

使用道具 举报

11

主题

313

帖子

1324

积分

金牌会员

Rank: 6Rank: 6

积分
1324
金钱
1011
HASS币
10
发表于 2021-6-6 22:46:09 | 显示全部楼层
Amazing!Let me tell you how to say it in chinese -- niubi!
回复

使用道具 举报

123

主题

4661

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16412
金钱
11666
HASS币
45
发表于 2021-6-6 23:00:45 | 显示全部楼层
firelion 发表于 2021-6-6 22:46
Amazing!Let me tell you how to say it in chinese -- niubi!

Niubility!
回复

使用道具 举报

10

主题

106

帖子

1617

积分

金牌会员

Rank: 6Rank: 6

积分
1617
金钱
1511
HASS币
0
发表于 2021-6-6 23:16:31 | 显示全部楼层
ni hao qing wen neng fan yi xia ma?
回复

使用道具 举报

11

主题

313

帖子

1324

积分

金牌会员

Rank: 6Rank: 6

积分
1324
金钱
1011
HASS币
10
发表于 2021-6-7 00:29:50 | 显示全部楼层

No,this is a chinglish word. I said chinese.
回复

使用道具 举报

4

主题

84

帖子

909

积分

高级会员

Rank: 4

积分
909
金钱
825
HASS币
10
发表于 2021-6-7 10:16:55 | 显示全部楼层
this is awsome, i think more stuffs shall say "NiuBi" if you can post it in chines.
回复

使用道具 举报

1

主题

38

帖子

736

积分

高级会员

Rank: 4

积分
736
金钱
698
HASS币
0
发表于 2021-6-7 14:08:50 | 显示全部楼层
在线翻译了一下,我发现我就是个渣渣,愣是没看懂怎么使用
回复

使用道具 举报

32

主题

1066

帖子

4952

积分

论坛元老

Rank: 8Rank: 8

积分
4952
金钱
3871
HASS币
90
发表于 2021-6-8 15:47:18 | 显示全部楼层
本帖最后由 relliky 于 2021-6-9 04:27 编辑

就是这人找到了小爱音箱的一个漏洞,用它重新刷了系统,移除了小米的服务(可以留下小米的服务和小爱同学,但是有可能剩余容量就不够自由发挥了),然后自己可以向里面添加功能, 比如用snapcast做全屋音乐等。楼主想把它变成一个hub,可以跑自动化和有很多像亚马逊/谷歌音箱的插件。想让大家都去尝试探索这个刷了以后的系统可以干的事情
回复

使用道具 举报

32

主题

1066

帖子

4952

积分

论坛元老

Rank: 8Rank: 8

积分
4952
金钱
3871
HASS币
90
发表于 2021-6-8 15:59:01 | 显示全部楼层
本帖最后由 relliky 于 2021-6-8 20:19 编辑

Thanks for sharing the firmware/patch. It sounds like a big project. IMHO it could be a dealbreaker for most of Chinese users that this patch removes all Mi services. It's like you have a smart speaker and but its voice assistant and relevant features removed without having anything useable to replace with. Voice assistant is quite importatnt to smart speakers nowadays, especially for those non-protable ones so it might be hard to promote that in the Chinese forum unless you can leave the Mi services intact inside. If not, maybe https://community.home-assistant.io/ is a better place to share it and probably could have more feedback there.


回复

使用道具 举报

1

主题

5

帖子

155

积分

论坛技术达人

积分
155
金钱
145
HASS币
20
 楼主| 发表于 2021-6-9 02:38:03 | 显示全部楼层
relliky 发表于 2021-6-8 15:59
Thanks for sharing the firmware/patch. It sounds like a big project. IMHO it could be a dealbreaker  ...

Really appreciate it @relliky!
The patching repository is very modular and allows to add and remove changes, so for example, in case you want to keep the Voice Assistant service from Xiaomi, you can delete the following files:
- patches/21_disable_services.patch
- scripts/20_disable_services.sh
- scripts/24_remove_property_bin.sh

And edit the file to not delete the libs:
- scripts/92_copy_build_packages.sh

The thing is, with all the factory content, there's less space available to use, so that limits the amount of programs you can install inside the speaker.

On the other hand, I'm still trying to setup both Home Assistant and some custom application to have a Voice Assitant available. Unfortunately, Mycroft is discarded, since it requires Python and that application itself exceeds the space available in the system drive! So my next options are to have some STT service provided by Vosk via Home Assistant, and Almond to run the commands.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-27 06:31 , Processed in 1.086619 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表