Unfortunately, I’m not sure how to modify the code to get the job done. Not familiar with file system coding and not the strongest python programmer. Would you mind sharing your modifications? You can PM if you’d like.
Thanks you, IIW, I was able to recover my .product-config. I’m having a little difficulty getting it back on my device. It looks like the root of the sd is mounted at /opt on boot, but maybe it’s not because I can’t copy the file from /opt/configs/.product-config to /configs/.product-config. I tried
chmod 777 /configs/
cp /opt/configs/.product_config /configs/.product_config
sync
and
chmod 777 /configs
cp /opt/wz_mini/tmp/.product_config /configs/.product_config
sync
It should be
chmod 777 /configs/.product_config
Did you try it?
What does ls -la
return?
So, /config is empty.
total 0
drwxr-xr-x 2 1000 1000 3 Jun 11 2021 .
drwxr-xr-x 22 1000 1000 283 Jun 11 2021 ..
I can’t touch to create a file in /configs.
I can’t cp from /opt/.product-config to /configs/.product-config.
/opt/.product config is owned by root and has 777 permissions
Interesting, on my both cameras the failure was different, I had all other config files intact. You might need at least some of them recovered too to successfully boot.
I also noticed that the owner of the configs folder is 1000:1000 on your camera, while on mine it is root:root. Not sure if it is the problem though.
You could also try checking df
and mount
. On my camera I have this:
[root@WCV3:~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 46692 660 46032 1% /dev
/dev/mmcblk0p1 30277632 886432 29391200 3% /opt
/dev/mtdblock2 3840 3840 0 100% /
/dev/mmcblk0p1 30277632 886432 29391200 3% /bin/busybox
/dev/mtdblock6 384 128 256 33% /configs
/dev/mmcblk0p1 30277632 886432 29391200 3% /etc/inittab
/dev/mmcblk0p1 30277632 886432 29391200 3% /etc/profile
tmpfs 46692 4140 42552 9% /tmp
/dev/mtdblock3 3840 3840 0 100% /system
/dev/mmcblk0p1 30277632 886432 29391200 3% /system/bin/factorycheck
/dev/mmcblk0p1 30277632 886432 29391200 3% /etc/fstab
tmpfs 46692 12 46680 0% /opt/wz_mini/tmp
tmpfs 46692 12 46680 0% /etc/shadow
tmpfs 46692 660 46032 1% /dev
tmpfs 46692 8 46684 0% /run
media 46692 0 46692 0% /media
/dev/mmcblk0p1 30277632 886432 29391200 3% /lib/modules
/dev/mmcblk0p1 30277632 886432 29391200 3% /media/mmc
[root@WCV3:~]# mount
rootfs on / type rootfs (rw)
devtmpfs on /dev type devtmpfs (rw,relatime,size=46444k,nr_inodes=11611,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /opt type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mtdblock2 on / type squashfs (ro,relatime)
/dev/mmcblk0p1 on /bin/busybox type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mtdblock6 on /configs type jffs2 (rw,relatime)
/dev/mmcblk0p1 on /etc/inittab type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p1 on /etc/profile type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/mtdblock3 on /system type squashfs (ro,relatime)
/dev/mmcblk0p1 on /system/bin/factorycheck type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p1 on /etc/fstab type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /opt/wz_mini/tmp type tmpfs (rw,relatime)
tmpfs on /etc/shadow type tmpfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
media on /media type tmpfs (rw,relatime)
/dev/mmcblk0p1 on /lib/modules type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p1 on /media/mmc type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
[root@WCV3:~]# ls -la /configs/
total 7
drwxr-xr-x 3 root root 0 May 13 20:22 .
drwxr-xr-x 22 1000 1000 283 May 13 20:22 ..
-rw-r--r-- 1 root root 1928 Jun 22 2021 .grid_config
-------r-- 1 root root 428 Jul 18 07:37 .product_config
-rw-r--r-- 1 root root 46 Nov 20 2021 .rtspConfig
-rw-r--r-- 1 root root 11 Aug 4 08:02 .time_checkpoint
-rw-r--r-- 1 root root 18 May 11 2021 .timezone_config
-rw-r--r-- 1 root root 173 Aug 4 08:02 .user_config
-rw-r--r-- 1 root root 13 May 13 20:24 .wifipasswd
-rw-r--r-- 1 root root 5 May 13 20:24 .wifissid
-rwxrwxr-x 1 1000 1000 50 Aug 4 08:02 TZ
-rwxr-xr-x 1 root root 24 May 13 20:22 app.ver
-rwxrwxr-x 1 1000 1000 22 Apr 23 2021 os-release
Output of DF
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 46572 0 46572 0% /dev
/dev/mmcblk0p1 30963712 225536 30738176 1% /opt
/dev/mtdblock2 3840 3840 0 100% /
/dev/mmcblk0p1 30963712 225536 30738176 1% /bin/busybox
/dev/mmcblk0p1 30963712 225536 30738176 1% /etc/fstab
tmpfs 46812 16 46796 0% /opt/wz_mini/tmp
/dev/mmcblk0p1 30963712 225536 30738176 1% /etc/inittab
/dev/mmcblk0p1 30963712 225536 30738176 1% /etc/profile
tmpfs 46812 0 46812 0% /tmp
/dev/mtdblock3 3456 3456 0 100% /system
/dev/mmcblk0p1 30963712 225536 30738176 1% /system/bin/factorycheck
tmpfs 46812 16 46796 0% /etc/shadow
Output of mount
rootfs on / type rootfs (rw)
devtmpfs on /dev type devtmpfs (rw,relatime,size=46572k,nr_inodes=11643,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk0p1 on /opt type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mtdblock2 on / type squashfs (ro,relatime)
/dev/mmcblk0p1 on /bin/busybox type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p1 on /etc/fstab type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /opt/wz_mini/tmp type tmpfs (rw,relatime)
/dev/mmcblk0p1 on /etc/inittab type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p1 on /etc/profile type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/mtdblock3 on /system type squashfs (ro,relatime)
/dev/mmcblk0p1 on /system/bin/factorycheck type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /etc/shadow type tmpfs (rw,relatime)
You can’t write anything to /configs/ because the jffs2 partition is not mounted. So /configs/ is a normal directory created in “/”, and that filesystem is read only.
You could try to mount it by doing mount -t jffs2 /dev/mtdblock6 /configs
and saving the command output to see if there are any errors.
Ok, I think I’ve fixed it with your guidance. After mounting the file system, I was able to confirm all the configs still existed and . product_config was empty. So, I copied the good .product_config over it, and now it blinks red and blue, I’ll have to pair with my wifi as it was originally set up at my dad’s house, but I’m feeling optimistic. Thanks, for helping me turn a paperweight back into a useful tool.
Hope it works for you. Wish I knew someone who could do that to mine. I’m sure you’ll let us know the outcome.
OK, great!
Connected to my account and working . Honestly, this should be a service Wyze offers to the people affected by this.
Great news!
Yeah, they could automate this recovery if they wanted to, but they probably figured out that the cost of lost opportunity due to the delaying the release of new products (because the development team would need to spend time creating the fix) is higher than the cost of sending out free cameras here and there.
Do you have a link to the wz_mini_hacks you used? There seem to be several different versions on github etc. None I have found seem to have the “v3_init.sh” file.
I am facing the same issue with v3_init.sh missing
In the version I used it was the wz_init.sh file at
/wz_mini/etc/init.d/wz_init.sh
Yeah, it seems they changed the file structure. I used an older, GitHub - gtxaspec/wz_mini_hacks at f37d3a688027d2142340b62da7dcfc42c8ded73c version.
That would explain why there were no files in /configs/. wz_init.sh is executed too early in the boot process, before the /configs/ partition is mounted.
Yeah, I thought that might be part of it when I saw it wasn’t mounted.
Looks like Wyze FINALLY decided to do something about bricking cams firmwares!!!