Skip to content

Commit

Permalink
Supporting multiple version of rootfs for v3 camera.
Browse files Browse the repository at this point in the history
  • Loading branch information
HclX committed Apr 21, 2021
1 parent acdf0dc commit c4f4248
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ functions:
6. Automatically archive the recordings.

# Release notes
## 0.5.06
* Support v3 cameras with root fs version 4.36.0.112 and 4.36.0.56.

## 0.5.05:
* Including v3 init into the default installation process.

Expand Down
Binary file added release/wyze_hacks_0_5_06.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion wyze_hack/hack_ver.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export WYZEHACK_VER=0.5.05
export WYZEHACK_VER=0.5.06
15 changes: 13 additions & 2 deletions wyze_hack/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,22 @@ init_rootfs() {
fi

ROOTFS_VER=$(grep -i AppVer /usr/app.ver | sed -E 's/^.*=[[:space:]]*([0-9.]+)[[:space:]]*$/\1/g')
ROOTFS_BIN=$1/$ROOTFS_VER.bin
if [ ! -f $ROOTFS_BIN ]; then
for x in $1/*
do
if grep -F "[$ROOTFS_VER]" $x/versions.txt; then
ROOTFS_BIN=$x/rootfs.bin
break
fi
done

if [ -z $ROOTFS_BIN ]; then
echo "WyzeHack: No root fs image found for version $ROOTFS_VER"
return 1
fi
if [ ! -f $ROOTFS_BIN ]; then
echo "WyzeHack: Root fs image $ROOTFS_BIN does not exist"
return 1
fi

# "hook_init" checks /etc/init.d/rcS to detect if rootfs is hard modified
# and it will skip the hook process if it is. However, since we bind mount
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions wyze_hack/rootfs/4.36.0.112/versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[4.36.0.112]
[4.36.0.56]

0 comments on commit c4f4248

Please sign in to comment.