Hacking the Silvercrest (Lidl/Tuya) Smart Home Gateway

Hi there. Our local Aldi were selling starter kits (Lightway Smart Home starter kit) containing a Zigbee gateway. I opened it up and found the standard Tuya gateway hardware inside and eventually found this thread. Now I’m hoping to work your magic and free the device from the cloud too. But unfortunately the root password extraction method does not work: I get a password but it is not accepted at the terminal prompt on the device or via ssh.

The tuya-label partition seems to contain the same data regions as Paul observed. I found the script in the github repository to dump the squashfs contents, so I’ll try that next.

Hmm, it was paired with the Sonoff, but that is turned off, it there a procedure for unpairing a device?

Any chance someone have time + interest to add auto-discovery to the Tuya/Lidl/Silvercrest gateway?

Hi @bool2 , first thank you for this great tutorial, you made it so easy for us!
I’m having an issue with my Gateway, and would like to ask for your help.
After hacking my gateway, and it was working as expected with home assistant, I tried to create a new user using the adduser command. After rebooting the device, the root password won’t work anymore.
So I dumped my SPI using your script to understand what was going on.
I found out that the passwd file was corrupted: instead of inserting a new line with the new user info, it appended it on the same line.

I would like to ask you if you could explain how to recreate the squashFS blob as you said you did the first time you tried to hack the gateway.
I already used binwalk to extract/unsquash it and was able to replace the /etc/passwd symlink with a file containing a known password.
I tried to recreate the blob using this command:
mksquashfs squashfs-root new.squashfs -comp xz -all-root
Then I used TFTP to write it on RAM and FLW to write it to the flash.
After that my device keeps on booting directly to the bootloader.

I think it may have to do with the new length and the checksum.
Could you point me to some documentation, or explain briefly how you recreated the blob ?

Thanks

@chepo @challs - I’ll document the process of squash-fs regneration and then update this post. Watch this space! :slight_smile:

3 Likes

@bool2 Thanks for promising to help us out! I’m now at the same stage as @chepo, where my device no longer boots after recreating the squashfs and uploading.

I started looking at the bootloader code in an online copy of the development kit and saw there is some checking of checksums there which would stop the boot process. But it looks like if there is a problem with that root filesystem, I should have seen an error message on the console. But if you have already worked out how the filesystem should look, I’d be really grateful for you to share that. Thank you!

These are the steps I followed:

Prepare the root image

  • Make an image of the complete flash memory contents using dump_flash.py

  • Extract the root filesystem image:

dd if=spiflash.bin of=rootfs.bin bs=1 \
   skip=$((0x000000200000)) count=$((0x000000400000-0x000000200000))`
unsquashfs rootfs.bin
  • Edit /etc/passwd, removing the link and replacing with a new password that I know:
mkpasswd -m descrypt NewPassword
  • Create a new image:
mksquashfs squashfs-root newroot.squashfs -noappend -always-use-fragments -all-root -comp xz

Upload the image

On the serial console, set the IP address you wish to use on your network, and disable auto flashing the tftp image (this only works if you transfer an image starting with a new linux kernel)

<Realtek> ipconfig 192.168.10.10
Target Address=192.168.10.10
<RealTek>autoburn 0
AutoBurning=0

Then start the TFTP transfer in binary mode. I needed to use this command:

$ tftp 172.28.1.6 -m binary -c put newroot.squashfs

On the console I observed:

**TFTP Client Upload, File Name: newroot.squashfs
**TFTP Client Upload File Size = 000E1000 Bytes at 80500000

I then needed to write the transferred image to flash memory:

<RealTek>FLW 200000 80500000 000E1000
Write 0x000e1000 Bytes to SPI flash#1, offset 0x00200000<0xbd200000>, from RAM 0x80500000 to 0x805e1000
(Y)es, (N)o->y
<RealTek>

Boot from within the bootloader prompt

At this point, the device does not boot any more and remains in the bootloader.

I found a way to manually boot the device from here by looking at where the boot image is expected to be placed in memory and the code is executed:

FLR 80500000 20000 001E0000
J 80c00000

@chepo you can try the above commands on your box.

Entering the above commands results in the kernel booting:

<RealTek>FLR 80500000 20000 001E0000
Flash read from 00020000 to 80500000 with 001E0000 bytes	?
(Y)es , (N)o ? --> y
<RealTek>J 80c00000
---Jump to address=80C00000
decompressing kernel:
Uncompressing Linux... done, booting the kernel.
done decompressing kernel.
start address: 0x80003780
Linux version 3.10.90 (dingsl@dingsl-pc) (gcc version 4.6.4 (Realtek RSDK-4.6.4 Build 2080) ) #27 Mon Oct 12 20:33:38 CST 2020

From there, I was able to follow the rest of the instructions, disable tuya, install the serial gateway and connect Homeassistant. However, the box still ends up in the bootloader when power cycled.

Hi @challs ,
I tried to boot into kernel using the commands you provided, I get a kernel panic…
Is it possible to restore the device using the previously dumped flash content ?

With the command FLW 0 80500000 201C0C

Do you have a copy of the log of it booting normally before you flashed it? I got the address 80c00000 from there - maybe yours used a different address? See the line marked with >>> <<< below:

---RealTek(RTL8196E)at 2020.10.12-20:27+0800 v3.4T-pre2 [16bit](400MHz)
P0phymode=01, embedded phy
check_image_header  return_addr:05010000 bank_offset:00000000
no sys signature at 00010000!
P0phymode=01, embedded phy

---Ethernet init Okay!
tuya:start receive production test frame ...
>>> Jump to image start=0x80c00000... <<<<
decompressing kernel:

Also, are you sure you uploaded the tftp image in binary mode? I got that wrong first time around. What log messages do you get before the panic?

Is it possible to restore the device using the previously dumped flash content ?
With the command FLW 0 80500000 201C0C

No I wouldn’t recommend you try that!!

If you start writing from address 0, you will overwrite the bootloader (the one giving you the prompt… and if you break that, the box will be bricked unless you desolder the flash chip and flash it again.

Here’s the flash memory map dumped by the LInux kernel when it boots:

Creating 5 MTD partitions on "flash_bank_1":
0x000000000000-0x000000020000 : "boot+cfg"
0x000000020000-0x000000200000 : "linux"
0x000000200000-0x000000400000 : "rootfs"
0x000000400000-0x000000420000 : "tuya-label"
0x000000420000-0x000001000000 : "jffs2-fs"

The boot+cfg part is the bootloader which you do not want to touch.

You could try cutting the image and uploading from 0x000000020000 onwards. I did start trying that but I’m not sure whether I actually wrote it back to flash.

Here are dd commands I wrote to split the image up according to the layout above:

 dd if=spiflash.bin of=boot_cfg.bin bs=1 skip=$((0x00)) count=$((0x000000020000-0x000000000000)) 
 dd if=spiflash.bin of=linux.bin    bs=1 skip=$((0x000000020000)) count=$((0x000000200000-0x000000020000)) 
 dd if=spiflash.bin of=rootfs.bin   bs=1 skip=$((0x000000200000)) count=$((0x000000400000-0x000000200000)) 
 dd if=spiflash.bin of=tuya.bin     bs=1 skip=$((0x000000400000)) count=$((0x000000420000-0x000000400000)) 
 dd if=spiflash.bin of=jffs2.bin    bs=1 skip=$((0x000000420000)) count=$((0x000001000000-0x000000420000)) 

No I didn’t specify binary mode, this may be the reason for my failures (except for the checksum).
As for the memory map, I had the same as you before trying to flash it.
I’ll retry with binary mode tomorrow.

I also have an idea on how you could complete your hack if you can boot and login as root:

  • Copy you /etc/passwd file to /tuya/passwd

  • Reflash your original rootfs.bin

As the tuya-start.sh script and the passwd files are in the tuya partition, reflashing the original rootfs won’t revert your changes and the /etc/passwd symlink will point to the file you modified with your own root password.
I hope this helps you.

I also don’t know if the autoburn 0 command has any use in the process. It seems like, using it, you can directly upload to the flash instead of uploading to the RAM then writing to flash.

Thanks. I was actually already able to complete the hack and get it working with HomeAssistant… as long as it is not rebooted :slight_smile:

I disabled it to have more control over the start address that the image is written to.

Normally, you simply need to restart the pairing process or reset the device. If it was a Hue device, this information on the Zigbee page might help.

@challs @chepo

This tool can be used to create an RTL compatible rootfs with checksum. Enjoy.

Run like this:

python rootfs_tool.py build newroot.squashfs newroot.bin

Then upload the newly created newroot.bin instead.

1 Like

That works! Thanks @bool2! Now my box will boot on power on. So that means that the bootloader will silently fail if a rootfs image is written to flash that does not include a modified squashfs image including checksum.

@chepo I think it will probably solve your problem too.

This worked for me too, thank you @bool2 and @challs for your help!

@JeromeT - What settings dod you add to the Zigbee2Mqtt configuration from Edge to allow it start and connect to your rebranded Tuya Gateway?

set adapter to “ezsp”

See here

I am new here, don’t have any knowledge about coding. However, it’s just work well.
Thank for your info.

ps. Anyone has instruction to config TX radio and Zigbee Channel. I already read some info. above but still blurred.

Thanks in advance

Hi challs,
I’m trying to get root access to my device but not quite success yet.
I follow the instruction on Hacking the Silvercrest (Lidl) Smart Home Gateway - Paul Banks DOT Org as followed

  • Execute: python dump_flash.py --serial-port /dev/ttyUSB0 --output-file rootfs.bin --start-addr 0x200000 --end-addr 0x400000 ==> This step took me around 40 Minutes
  • Execute: sudo unsquashfs rootfs.bin
  • Execute: mkpasswd -m descrypt MyPassword
  • Execute: unlink etc/passwd in the directory squashfs-root/etc
  • Create a new file named passwd using vi with the following content in directory squashfs-root/etc
    root:GfA8dj418kOCc:0:0:root:/:/bin/bash
  • Execute: sudo mksquashfs squashfs-root newroot.sqfs -comp xz
  • Execute: python rootfs_tool.py build newroot.sqfs newroot.bin
  • Enter command: ipconfig 172.16.10.101
    in bootloader screen
  • Enter command autoburn=0 in bootloader screen
  • Upload the file newroot.bin in binary format using tftp
  • Enter command FLW 200000 80500000 000E1000 in bootloader screen after file sucessfully uploaded
    After that I disconnect and reconnect the power to the device again
    I got struck in the bootloader screen and I can not logon with my root password that was entered in the passwd file.
    following is the log captured during boot and manually boot
Booting...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ chip__no chip__id mfr___id dev___id cap___id size_sft dev_size chipSize
@ 0000000h 0c84018h 00000c8h 0000040h 0000018h 0000000h 0000018h 1000000h
@ blk_size blk__cnt sec_size sec__cnt pageSize page_cnt chip_clk chipName
@ 0010000h 0000100h 0001000h 0001000h 0000100h 0000010h 000004eh GD25Q128

@ 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
DDR1:32MB
 
---RealTek(RTL8196E)at 2019.01.23-17:03+0800 v3.4T-pre2 [16bit](400MHz)
P0phymode=01, embedded phy
check_image_header  return_addr:05010000 bank_offset:00000000
no sys signature at 00010000!
rootfs checksum error at 00200000!
no rootfs signature at 00210000!
no rootfs signature at 00250000!
no rootfs signature at 00201000!
......
.......
no rootfs signature at 003FF000!
no rootfs signature at 00400000!
P0phymode=01, embedded phy

---Ethernet init Okay!
tuya:start receive production test frame ...
P0phymode=01, embedded phy

---Ethernet init Okay!
<RealTek>
<RealTek>FLR 80500000 20000 001E0000
Flash read from 00020000 to 80500000 with 001E0000 bytes        ?
(Y)es , (N)o ? --> y
Flash Read Successed!
<RealTek>J 80c00000
---Jump to address=80C00000
decompressing kernel:
Uncompressing Linux... done, booting the kernel.
done decompressing kernel.
start address: 0x80003780
Linux version 3.10.90 (huangxh@zp-VirtualBox) (gcc version 4.6.4 (Realtek RSDK-9
CPU revision is: 0000cd01
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Zone ranges:
  Normal   [mem 0x00000000-0x01ffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x00000000-0x01ffffff]
icache: 16kB/16B, dcache: 8kB/16B, scache: 0kB/0B
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  console=ttyS0,38400 root=/dev/mtdblock2 
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 27700k/32768k available (2479k kernel code, 5068k reserved, 525k data, )
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:128
console [ttyS0] enabled
Calibrating delay loop... 398.13 BogoMIPS (lpj=1990656)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 512
reg e0=0
reg e1=0
reg e2=0
reg e3=0
reg e4=0
reg e5=0
reg e6=0
reg e7=0
reg f0=0
reg f1=0
reg f2=0
reg f3=0
reg f4=0
reg f5=0
reg f6=0
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) 2001-2006 Red Hat, Inc.
msgmni has been set to 54
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x18002000 (irq = 9) is a 16550A
serial8250: ttyS1 at MMIO 0x18002100 (irq = 13) is a 16550A
Realtek GPIO Driver for Flash Reload Default
tuya_gpio_init ok, scan expire time:50
SPI INIT
 ------------------------- Force into Single IO Mode ------------------------ 
|No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
| 0 c84018h  0h 1000000h  10000h  10000h     100h   84    0          GD25Q128|
 ---------------------------------------------------------------------------- 
SPI flash(GD25Q128) was found at CS0, size 0x1000000
boot+cfg offset=0x0 size=0x20000 erasesize=0x10000
linux offset=0x20000 size=0x1e0000 erasesize=0x10000
rootfs offset=0x200000 size=0x200000 erasesize=0x10000
tuya-label offset=0x400000 size=0x20000 erasesize=0x10000
jffs2-fs offset=0x420000 size=0xbe0000 erasesize=0x10000
5 rtkxxpart partitions found on MTD device flash_bank_1
Creating 5 MTD partitions on "flash_bank_1":
0x000000000000-0x000000020000 : "boot+cfg"
0x000000020000-0x000000200000 : "linux"
0x000000200000-0x000000400000 : "rootfs"
0x000000400000-0x000000420000 : "tuya-label"
0x000000420000-0x000001000000 : "jffs2-fs"
PPP generic driver version 2.4.2
nf_conntrack version 0.5.0 (432 buckets, 1728 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: cubic registered
NET: Registered protocol family 17
l2tp_core: L2TP core driver, V2.0
8021q: 802.1Q VLAN Support v1.8
Realtek FastPath:v1.03

Probing RTL819X NIC-kenel stack size order[1]...
eth0 added. vid=9 Member port 0x10f...
eth1 added. vid=8 Member port 0x10...
[peth0] added, mapping to [eth1]...
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 192K (802f0000 - 80320000)
init started: BusyBox v1.13.4 (2019-01-23 17:02:04 CST)
udhcpc (v1.13.4) started
Sending discover...
Sending select for 172.16.1.167...
Lease of 172.16.1.167 obtained, lease time 43200
deleting routers
route: SIOCDELRT: No such process
adding dns 172.16.1.1

Please press Enter to activate this console. SELF_PWD=/
run /tuya/tuya_start.sh
udhcpc (v1.13.4) started
chpasswd: an error occurred updating password for root
start.conf is exist
Sending discover...
Sending select for 172.16.1.167...
Lease of 172.16.1.167 obtained, lease time 43200
current run dir:/tuya/tuya_user1
deleting routers
route: SIOCDELRT: No such process
adding dns 172.16.1.1
killall: tyZ3Gw: no process killed

tuya-linux login: root
Password: 
Tuya Linux versi
Please press Enter to activate this console. nlRecvFromAppSock sg_netlinkKeyPid1
nlRecvFromAppSock port link sg_netlinkPid:181

tuya-linux login: root
Password: 
Login incorrect
tuya-linux login: root
Password: 
Tuya Linux versi
Please press Enter to activate this console. 
tuya-linux login:

Please Help mw Identify what went wrong in my device. How fo I get to the device with root password.

Thanks very much
***** EDIT With Solutions *******

  1. First Issue is my passwd file using /bin/bash as default shell for root which is not avaliable in the image the correct one should be root:<Result from mkpasswd -m descrypt MyPassword>:0:0:root:/:/bin/sh
  2. Last Issue is my flash image that include checksum not properly write into flash after tftp. It’s was write with FLW 200000 80500000 000E1000 which result in 2 bytes checksum of the image not included. the correct command would be FLW 200000 80500000 000E1002

Your passwd file is using a shell of /bin/bash but there’s no /bin/bash on the device. Try /bin/sh instead! :slight_smile:

Thanks very much. I can access root now but power cycle still struck in bootloader
i did * Execute: python rootfs_tool.py build newroot.sqfs newroot.bin before tftp the newroot.bin but it seem no signature can be found in the image uploaded that may cause the bootloader not boot it.

Booting...

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ chip__no chip__id mfr___id dev___id cap___id size_sft dev_size chipSize
@ 0000000h 0c84018h 00000c8h 0000040h 0000018h 0000000h 0000018h 1000000h
@ blk_size blk__cnt sec_size sec__cnt pageSize page_cnt chip_clk chipName
@ 0010000h 0000100h 0001000h 0001000h 0000100h 0000010h 000004eh GD25Q128
@ 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
DDR1:32MB
 
---RealTek(RTL8196E)at 2019.01.23-17:03+0800 v3.4T-pre2 [16bit](400MHz)
P0phymode=01, embedded phy
check_image_header  return_addr:05010000 bank_offset:00000000
no sys signature at 00010000!
rootfs checksum error at 00200000!
no rootfs signature at 00210000!
no rootfs signature at 00250000!
no rootfs signature at 00201000!
.....
.....
.....
no rootfs signature at 003FE000!
no rootfs signature at 003FF000!
no rootfs signature at 00400000!
P0phymode=01, embedded phy

---Ethernet init Okay!
tuya:start receive production test frame ...
P0phymode=01, embedded phy

---Ethernet init Okay!
<RealTek>
<RealTek>
<RealTek>FLR 80500000 20000 001E0000
Flash read from 00020000 to 80500000 with 001E0000 bytes        ?
(Y)es , (N)o ? --> y
Flash Read Successed!
<RealTek>J 80c00000
---Jump to address=80C00000
decompressing kernel:
Uncompressing Linux... done, booting the kernel.
done decompressing kernel.
start address: 0x80003780
Linux version 3.10.90 (huangxh@zp-VirtualBox) (gcc version 4.6.4 (Realtek RSDK-9
CPU revision is: 0000cd01
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Zone ranges:
  Normal   [mem 0x00000000-0x01ffffff]
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x00000000-0x01ffffff]
icache: 16kB/16B, dcache: 8kB/16B, scache: 0kB/0B
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  console=ttyS0,38400 root=/dev/mtdblock2 
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 27700k/32768k available (2479k kernel code, 5068k reserved, 525k data, )
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:128
console [ttyS0] enabled
Calibrating delay loop... 398.13 BogoMIPS (lpj=1990656)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 512
reg e0=0
reg e1=0
reg e2=0
reg e3=0
reg e4=0
reg e5=0
reg e6=0
reg e7=0
reg f0=0
reg f1=0
reg f2=0
reg f3=0
reg f4=0
reg f5=0
reg f6=0
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) 2001-2006 Red Hat, Inc.
msgmni has been set to 54
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x18002000 (irq = 9) is a 16550A
serial8250: ttyS1 at MMIO 0x18002100 (irq = 13) is a 16550A
Realtek GPIO Driver for Flash Reload Default
tuya_gpio_init ok, scan expire time:50
SPI INIT
 ------------------------- Force into Single IO Mode ------------------------ 
|No chipID  Sft chipSize blkSize secSize pageSize sdCk opCk      chipName    |
| 0 c84018h  0h 1000000h  10000h  10000h     100h   84    0          GD25Q128|
 ---------------------------------------------------------------------------- 
SPI flash(GD25Q128) was found at CS0, size 0x1000000
boot+cfg offset=0x0 size=0x20000 erasesize=0x10000
linux offset=0x20000 size=0x1e0000 erasesize=0x10000
rootfs offset=0x200000 size=0x200000 erasesize=0x10000
tuya-label offset=0x400000 size=0x20000 erasesize=0x10000
jffs2-fs offset=0x420000 size=0xbe0000 erasesize=0x10000
5 rtkxxpart partitions found on MTD device flash_bank_1
Creating 5 MTD partitions on "flash_bank_1":
0x000000000000-0x000000020000 : "boot+cfg"
0x000000020000-0x000000200000 : "linux"
0x000000200000-0x000000400000 : "rootfs"
0x000000400000-0x000000420000 : "tuya-label"
0x000000420000-0x000001000000 : "jffs2-fs"
PPP generic driver version 2.4.2
nf_conntrack version 0.5.0 (432 buckets, 1728 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: cubic registered
NET: Registered protocol family 17
l2tp_core: L2TP core driver, V2.0
8021q: 802.1Q VLAN Support v1.8
Realtek FastPath:v1.03

Probing RTL819X NIC-kenel stack size order[1]...
eth0 added. vid=9 Member port 0x10f...
eth1 added. vid=8 Member port 0x10...
[peth0] added, mapping to [eth1]...
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 192K (802f0000 - 80320000)
init started: BusyBox v1.13.4 (2019-01-23 17:02:04 CST)
udhcpc (v1.13.4) started
Sending discover...
Sending select for 172.16.1.167...
Lease of 172.16.1.167 obtained, lease time 43200
deleting routers
route: SIOCDELRT: No such process
adding dns 172.16.1.1

Please press Enter to activate this console. SELF_PWD=/
run /tuya/tuya_start.sh
udhcpc (v1.13.4) started
chpasswd: an error occurred updating password for root
start.conf is exist
Sending discover...
Sending select for 172.16.1.167...
Lease of 172.16.1.167 obtained, lease time 43200
current run dir:/tuya/tuya_user1
deleting routers
route: SIOCDELRT: No such process
adding dns 172.16.1.1
killall: tyZ3Gw: no process killed

tuya-linux login: nlRecvFromAppSock sg_netlinkKeyPid:180
nlRecvFromAppSock port link sg_netlinkPid:180

tuya-linux login: root
Password: 
Tuya Linux version 1.0
Jan  1 00:00:58 login[123]: root login on 'console'
# ls
bin   etc   init  mnt   root  sys   tuya  var
dev   home  lib   proc  sbin  tmp   usr
#