Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Xiaomi AX6000 SSH Unlock, OpenWrt Flashing, and ShellClash Setup

**Languages:** [简体中文](README.md) | [English](README.en.md) | [Русский](README.ru.md)

This guide shows how to unlock SSH on the Xiaomi AX6000 without using another soft router. The process is quite long, so please watch the video tutorial carefully as you go.

AX6000 SSH unlock video tutorial: https://youtu.be/cLSEmZ6ufE4

## Downloads

Tools package: [Download here](https://github.com/aews/lyq/releases/download/AX6000/AX6000-SSH.zip)

## Step 1. Configure a mobile hotspot

Set the hotspot parameters like this:

- Network name: `OpenWrt`
- Password: `12345678`
- Band: `2.4GHz`

Check the Wi-Fi channel as well, usually channel `1`. You can verify it with another computer or a phone app connected to that hotspot.

## Step 2. Flash the AX6000 firmware and downgrade

Follow the linked video tutorial for the downgrade and flashing part.

## Step 3. Install VMware and deploy OpenWrt

OpenWrt default credentials:

- Address: `192.168.5.1`
- Username: `root`
- Password: `password`

## Step 4. Upload `xqsystem.lua` with WinSCP

Upload `xqsystem.lua` to this directory inside OpenWrt:

```text
/usr/lib/lua/luci/controller/admin/
```

## Step 5. Change the OpenWrt LAN IPv4 address

Set the OpenWrt LAN IPv4 address to:

```text
169.254.31.1
```

## Step 6. Re-enable the mobile hotspot and adjust adapter settings

Turn the hotspot back on, open the hotspot network connection settings, and disable `Internet Protocol Version 4 (IPv4)`.

## Step 7. Edit the VMware bridged network

Open:

```text
Edit > Virtual Network Editor > Change Settings
```

## Step 8. Sign in to the Xiaomi AX6000

Open the following URL after you get the latest `stok` value from the router admin panel:

```text
http://192.168.31.1/cgi-bin/luci/;stok=XXXXXX/api/xqsystem/extendwifi_connect_inited_router?ssid=OpenWrt&password=12345678&encryption=WPA2PSKenctype=CCMP&channel=1&band=2g&admin_username=root&admin_password=admin&admin_nonce=xxx
```

Replace `XXXXXX` and `xxx` with the actual values from your session.

## Step 9. Generate the default root password from the device SN

You can find the SN on the bottom label of the router or in the web UI at `192.168.31.1`.

Password generator:

```text
https://miwifi.dev/ssh
```

If the password generator website is unavailable, use this offline package instead: [Download here](https://github.com/aews/lyq/releases/download/AX6000/SN.zip)

SN format example:

```text
30212/F1ZD22032
```

## Common Issues

Important notes:

1. The `stok` value changes every time you sign in to the Xiaomi router admin panel. Always use the newest one.
2. After SSH is unlocked successfully, there may be no visible confirmation. Use PuTTY to test the login. If you see `ARE U OK`, the unlock worked.
3. If the first attempt fails, sign in to the Xiaomi router admin panel again, copy the latest `stok`, and retry.

### Cannot sign in to OpenWrt at `192.168.5.1`

1. Restart OpenWrt manually or run `reboot`.
2. Confirm whether the OpenWrt IP has been changed to `169.254.31.1`. If it has, use that IP to sign in.
3. Change your local network adapter IP range to match the OpenWrt subnet.
4. In VMware, shut down the running OpenWrt VM, then go to `Edit > Virtual Network Editor > Change Settings > Restore Defaults`.
5. Open the current OpenWrt IP in your browser.

### If you get `{"msg":"一键换机过程中请求对端接口失败","code":1643}`

Inside the virtual machine, run:

```bash
vim /etc/config/dhcp
```

Then:

1. Hold `d` to delete all content.
2. Press `Esc`.
3. Type `:wq`.
4. Press `Enter`.
5. Reboot the VM with `reboot`.

## Install ShellClash

Xiaomi AX6000 ShellClash video tutorial: https://youtu.be/vn5QdyDlTtI

Primary install command:

```bash
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && . /etc/profile &> /dev/null
```

If it does not install, try one of these fallback sources:

```bash
# 1
export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && . /etc/profile &> /dev/null

# 2
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null

# 3
export url='https://gh.jwsc.eu.org/master' && sh -c "$(curl -kfsSl $url/install.sh)" && . /etc/profile &> /dev/null

# 4
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && . /etc/profile &> /dev/null

# 5
export url='http://t.jwsc.eu.org' && wget -q -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && . /etc/profile &> /dev/null

# 6
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' \
&& sh -c "$(curl -kfsSl $url/install.sh)" \
&& . /etc/profile &> /dev/null
```

## Extra Links

- [PuTTY download](https://github.com/aews/lyq/releases/download/AX6000/putty.zip)
- [ShellClash web UI](http://192.168.31.1:9999/ui)
- Preferred provider: http://www.txyun.xyz/
- Telegram: https://t.me/kjfxlyq
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**Languages:** [简体中文](README.md) | [English](README.en.md) | [Русский](README.ru.md)

# 小米AX6000解锁ssh,刷机openwrt固件 clash翻墙,AX6000 科学上网
本教程解锁 AX6000 SSH 不需要借助其它软路由,教程有点长,请大家仔细看视频教程<br>
AX6000解锁SSH 视频教程:https://youtu.be/cLSEmZ6ufE4
Expand Down Expand Up @@ -89,4 +91,3 @@ vim /etc/config/dhcp<br>

- 我使用的机场:http://www.txyun.xyz/
- 电报:https://t.me/kjfxlyq

162 changes: 162 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Xiaomi AX6000: разблокировка SSH, прошивка OpenWrt и установка ShellClash

**Languages:** [简体中文](README.md) | [English](README.en.md) | [Русский](README.ru.md)

Это руководство показывает, как разблокировать SSH на Xiaomi AX6000 без использования дополнительного soft router. Процесс довольно длинный, поэтому лучше внимательно идти по видеоинструкции шаг за шагом.

Видео по разблокировке SSH на AX6000: https://youtu.be/cLSEmZ6ufE4

## Загрузки

Пакет с инструментами: [Скачать](https://github.com/aews/lyq/releases/download/AX6000/AX6000-SSH.zip)

## Шаг 1. Настройка мобильной точки доступа

Задайте параметры точки доступа:

- Имя сети: `OpenWrt`
- Пароль: `12345678`
- Диапазон: `2.4GHz`

Также проверьте канал Wi-Fi, обычно это `1`. Его можно посмотреть с другого компьютера или через приложение на телефоне, подключившись к этой точке доступа.

## Шаг 2. Прошивка и даунгрейд AX6000

Для даунгрейда и прошивки следуйте видеоинструкции по ссылке выше.

## Шаг 3. Установка VMware и OpenWrt

Стандартные данные для входа в OpenWrt:

- Адрес: `192.168.5.1`
- Логин: `root`
- Пароль: `password`

## Шаг 4. Загрузка `xqsystem.lua` через WinSCP

Загрузите файл `xqsystem.lua` в каталог OpenWrt:

```text
/usr/lib/lua/luci/controller/admin/
```

## Шаг 5. Изменение IPv4-адреса LAN в OpenWrt

Установите для LAN в OpenWrt следующий IPv4-адрес:

```text
169.254.31.1
```

## Шаг 6. Снова включите мобильную точку доступа и измените настройки адаптера

Включите точку доступа снова, откройте настройки сетевого подключения этой точки и отключите `Internet Protocol Version 4 (IPv4)`.

## Шаг 7. Настройка bridged network в VMware

Откройте:

```text
Edit > Virtual Network Editor > Change Settings
```

## Шаг 8. Войдите в Xiaomi AX6000

После получения актуального `stok` из панели управления роутером откройте этот URL:

```text
http://192.168.31.1/cgi-bin/luci/;stok=XXXXXX/api/xqsystem/extendwifi_connect_inited_router?ssid=OpenWrt&password=12345678&encryption=WPA2PSKenctype=CCMP&channel=1&band=2g&admin_username=root&admin_password=admin&admin_nonce=xxx
```

Замените `XXXXXX` и `xxx` на реальные значения из своей сессии.

## Шаг 9. Получение пароля root по серийному номеру устройства

Серийный номер можно найти на наклейке снизу роутера или в веб-интерфейсе по адресу `192.168.31.1`.

Генератор пароля:

```text
https://miwifi.dev/ssh
```

Если сайт генерации пароля недоступен, используйте офлайн-пакет: [Скачать](https://github.com/aews/lyq/releases/download/AX6000/SN.zip)

Пример формата SN:

```text
30212/F1ZD22032
```

## Частые проблемы

Важные замечания:

1. Значение `stok` меняется при каждом новом входе в админку Xiaomi. Всегда используйте самое свежее значение.
2. После успешной разблокировки SSH может не появиться никакого уведомления. Проверьте вход через PuTTY. Если видите `ARE U OK`, значит всё прошло успешно.
3. Если с первого раза не получилось, заново войдите в админку Xiaomi, скопируйте новый `stok` и повторите попытку.

### Не получается открыть OpenWrt по адресу `192.168.5.1`

1. Перезапустите OpenWrt вручную или выполните `reboot`.
2. Убедитесь, что IP OpenWrt действительно изменён на `169.254.31.1`. Если да, входить нужно уже по нему.
3. Измените IP-диапазон локального сетевого адаптера так, чтобы он соответствовал подсети OpenWrt.
4. В VMware выключите работающую виртуальную машину OpenWrt и откройте `Edit > Virtual Network Editor > Change Settings > Restore Defaults`.
5. Откройте текущий IP OpenWrt в браузере.

### Если появляется ошибка `{"msg":"一键换机过程中请求对端接口失败","code":1643}`

Внутри виртуальной машины выполните:

```bash
vim /etc/config/dhcp
```

Далее:

1. Зажмите `d`, чтобы удалить всё содержимое.
2. Нажмите `Esc`.
3. Введите `:wq`.
4. Нажмите `Enter`.
5. Перезагрузите виртуальную машину командой `reboot`.

## Установка ShellClash

Видео по настройке ShellClash на Xiaomi AX6000: https://youtu.be/vn5QdyDlTtI

Основная команда установки:

```bash
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && . /etc/profile &> /dev/null
```

Если установка не проходит, попробуйте один из резервных источников:

```bash
# 1
export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && . /etc/profile &> /dev/null

# 2
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null

# 3
export url='https://gh.jwsc.eu.org/master' && sh -c "$(curl -kfsSl $url/install.sh)" && . /etc/profile &> /dev/null

# 4
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && . /etc/profile &> /dev/null

# 5
export url='http://t.jwsc.eu.org' && wget -q -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && . /etc/profile &> /dev/null

# 6
export url='https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master' \
&& sh -c "$(curl -kfsSl $url/install.sh)" \
&& . /etc/profile &> /dev/null
```

## Дополнительные ссылки

- [Скачать PuTTY](https://github.com/aews/lyq/releases/download/AX6000/putty.zip)
- [Веб-интерфейс ShellClash](http://192.168.31.1:9999/ui)
- Рекомендуемый провайдер: http://www.txyun.xyz/
- Telegram: https://t.me/kjfxlyq