mnakada / atomcam_tools

Hack tool for atomcam and wyzecam.
Other
183 stars 22 forks source link

fix update directory path #14

Closed thematrixdev closed 2 years ago

thematrixdev commented 2 years ago

fix update directory path

mnakada commented 2 years ago

fix update directory creation

Thanks.

remove unnecessary unzip

The atomcam_tools.zip release contains hostname and authorized_keys files as initial values. If a user has set hostname and authorized_keys, they will be overwritten, so only kernel and roofs are extracted.

thematrixdev commented 2 years ago

fix update directory creation

Thanks.

remove unnecessary unzip

The atomcam_tools.zip release contains hostname and authorized_keys files as initial values. If a user has set hostname and authorized_keys, they will be overwritten, so only kernel and roofs are extracted.

As I see in configs/initramfs_skeleton/init only factory_t31_ZMC6tiIDQN and rootfs_hack.ext2 are extracted, so I wanted to unify the unzip function location.

thematrixdev commented 2 years ago

I am looking at the update script because I have found a problem.

Now the camera is on 1.2.17 official version. I have git cloned, made changes, changed configs/atomhack.ver to 0.0.0, and ./rebuild_rootfs.sh. Enabled custom ZIP update, and clicked "update", my web server shown the download request. However, after reboot, the version is not 0.0.0. Even stranger, it is 1.2.16.

Putting the zip on the camera media/mmc/update, # reboot, the version is 0.0.0.

What might be possibly wrong?

mnakada commented 2 years ago

As I see in configs/initramfs_skeleton/init only factory_t31_ZMC6tiIDQN and rootfs_hack.ext2 are extracted, so I wanted to unify the unzip function location.

You are correct. I checked and even the initramfs script only expanded kernel and rootfs.

However, after reboot, the version is not 0.0.0. Even stranger, it is 1.2.16.

I have the same phenomenon. It seems to be an error in the curl get.

My web server is an https server authenticated with Let'sEncrypt, but the root-key may not be registered in the AtomCam rootfs.

thematrixdev commented 2 years ago

I just installed Nginx mounting the root to atomcam_tools so http://192.168.x.x/atomcam_tools.zip points to the compiled file. I $ watch -n 1 ls -la /media/mmc/update/ and clicked update on web interface, there are really files extracted. So the download progress should have finished correctly.

Let'sEncrypt should be valid for SSL verification. What "root-key" do you mean? CA cert?

mnakada commented 2 years ago

Maybe disabling force HTTPS / SSL verification should fix?

yes. Maybe there is some other problem.

What "root-key" do you mean? CA cert?

yes.

I am getting the following error when I run the curl command.

curl: (60) SSL certificate problem: certificate has expired
mnakada commented 2 years ago

I have posted CA certs to the renew_certs branch.

thematrixdev commented 2 years ago

But fetching from github.com works. Strange.

Could you test if updating custom zip again afterwards? I think these are two different problems.

mnakada commented 2 years ago

Sorry. The docker environment has disappeared due to other factors, so it will take time to build, so it will be after tomorrow.

thematrixdev commented 2 years ago

No hurry. Just an interest.

mnakada commented 2 years ago

I updated the CA certs and was able to successfully update the custom.