Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsmasq fixes and giving firmware spoofing its own option. #804

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\C:\\Users\\Vincent\\Source\\Repos\\wz_mini_hacks",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/wz_mini_hacks/v17/.wsuo
Binary file not shown.
11 changes: 7 additions & 4 deletions SD_ROOT/wz_mini/etc/network.d/S09dnsmasq
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ dnsmasq_launch() {

if [[ "$ENABLE_LOCAL_DNS" == "true" ]]; then
echo "wait for resolv.conf creation from iCamera"
sleep 5
while [ ! -f /tmp/resolv.conf ]
do
sleep .2
done
#kill the system dnsmasq if present
dmon_pid=$(pgrep -f "dmon.*dnsmasq")
if [ -n "$dmon_pid" ]; then
Expand All @@ -28,9 +31,9 @@ dnsmasq_launch() {
else
/opt/wz_mini/bin/dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf
fi
sleep 3
rm -f /tmp/resolv.conf
cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
#mount the resolv.conf file as read only. Something (ICamera?) randomly seems to change it.
mount --bind /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
mount -o bind,remount,ro /tmp/resolv.conf
echo "dnsmasq enabled"
fi
}
Expand Down
17 changes: 0 additions & 17 deletions SD_ROOT/wz_mini/etc/rc.d/S10firmware
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@ case "$1" in
#echo -e "127.0.0.1 localhost \n127.0.0.1 wyze-upgrade-service.wyzecam.com" > /opt/wz_mini/tmp/.storage/hosts
#mount --bind /opt/wz_mini/tmp/.storage/hosts /etc/hosts
/opt/wz_mini/bin/busybox inotifyd /opt/wz_mini/usr/bin/watch_up.sh /tmp:n > /dev/null 2>&1 &

if [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
# v3
printf "[VER]\nappver=4.36.13.0416\n" > /opt/wz_mini/tmp/patched_app.ver
elif [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
# v2
printf "[VER]\nappver=4.9.9.3006\n" > /opt/wz_mini/tmp/patched_app.ver
elif [ -f /opt/wz_mini/tmp/.WYZECP1_JEF ]; then
# pan v1
printf "[VER]\nappver=4.10.9.3006\n" > /opt/wz_mini/tmp/patched_app.ver
elif [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
# pan v2
printf "[VER]\nappver=4.49.13.0653\n" > /opt/wz_mini/tmp/patched_app.ver
fi

mount --bind /opt/wz_mini/tmp/patched_app.ver /system/bin/app.ver

echo "Firmware updates disabled"
else
echo "Firmwware updates enabled, monitor script running"
Expand Down
37 changes: 37 additions & 0 deletions SD_ROOT/wz_mini/etc/rc.d/S11spoofing
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Short-Description: FW Version Spoof
# Description: Spoofs firmware version of ICamera
### END INIT INFO

. /opt/wz_mini/wz_mini.conf

case "$1" in
start)
echo "#####$(basename "$0")#####"

if [[ "$SPOOF_FW_VER="true" ]]; then
if [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
# v3
printf "[VER]\nappver=4.36.13.0416\n" > /opt/wz_mini/tmp/patched_app.ver
elif [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
# v2
printf "[VER]\nappver=4.9.9.3006\n" > /opt/wz_mini/tmp/patched_app.ver
elif [ -f /opt/wz_mini/tmp/.WYZECP1_JEF ]; then
# pan v1
printf "[VER]\nappver=4.10.9.3006\n" > /opt/wz_mini/tmp/patched_app.ver
elif [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
# pan v2
printf "[VER]\nappver=4.49.13.0653\n" > /opt/wz_mini/tmp/patched_app.ver
fi
mount --bind /opt/wz_mini/tmp/patched_app.ver /system/bin/app.ver
echo "Firmware version spoofed"
fi

;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac
1 change: 1 addition & 0 deletions SD_ROOT/wz_mini/etc/wz_mini.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ ENABLE_USB_STORAGE="false"
ENABLE_EXT4="false"
ENABLE_CIFS="false"
DISABLE_FW_UPGRADE="true"
SPOOF_FW_VER="true"
AUDIO_PROMPT_VOLUME="50"
ENABLE_MP4_WRITE="false"
NIGHT_DROP_DISABLE="false"
Expand Down
1 change: 1 addition & 0 deletions SD_ROOT/wz_mini/wz_mini.conf
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ ENABLE_USB_STORAGE="false"
ENABLE_EXT4="false"
ENABLE_CIFS="false"
DISABLE_FW_UPGRADE="true"
SPOOF_FW_VER="true"
AUDIO_PROMPT_VOLUME="50"
ENABLE_MP4_WRITE="false"
NIGHT_DROP_DISABLE="false"
Expand Down