Closed mmendozam closed 2 years ago
@mmendozam You seem to have done everything correctly and you have a version known to work with our process. You should NOT need to use the reset button again unless we find something very different.
I'd like you to post the response for http://admin:056565099@ip:8090/proc/self/root/etc/init.d/S90PPStrong so I can see if there's anything odd.
Can you also check if you have a response for http://admin:056565099@ip:8090/proc/self/root/tmp/hack ?
The above should tell us more and in the mean time if you want to try something you can try adding this line to your initrun.sh:
mkdir -p /opt/pps
(immediately after the if [ ! -e /mnt/mmc01/home ]; then
line) and just powering up the device normally without using reset button again (with SD card inserted).
It is obvious the SD card is working based on the information you provided, so I'm not sure why the initrun.sh script isn't running. As long as you have a 'home' folder created by the device during boot everything should work (even if you don't get the 'hack' response like you mentioned).
Kindly find below the additional details:
http://192.168.0.13:8090/proc/self/root/etc/init.d/S90PPStrong
#!/bin/sh
export PATH=/usr/bin:/sbin/:/usr/sbin:/bin
RED="[1;31m"
NORMAL="[0;39m"
echo "${GREEN} 2015 PPStrong Tech Cop.Ltd.${NORMAL}"
mkdir -p /opt/pps
MTDNUM=`cat /proc/cmdline | sed 's/.*ppsAppParts=\([0-9]\).*/\1/'`
# debug
MTDNUM=5
case $MTDNUM in
5)
mount -t cramfs /dev/mtdblock$MTDNUM /opt/pps
break
;;
7)
mount -t cramfs /dev/mtdblock$MTDNUM /opt/pps
break
;;
0)
sleep 10
mount -t vfat /dev/mmcblk0p1 /opt/pps
break
;;
*)
MTDNUM=5
mount -t cramfs /dev/mtdblock$MTDNUM /opt/pps
;;
esac
echo "/opt/pps/" > /tmp/PPStrong.runpath
[ -e /opt/pps/initrun.sh ] && cp /opt/pps/initrun.sh /tmp/PPStart && chmod +x /tmp/PPStart && /tmp/PPStart
http://192.168.0.13:8090/proc/self/root/tmp/hack
Thu Jan 1 08:00:13 CST 1970
Also, I tried adding the mkdir
command as you suggested (no luck):
http://192.168.0.13:8090/proc/self/root/mnt/mmc01/initrun.sh
#!/bin/sh
# Copy app partition if not already done
if [ ! -e /mnt/mmc01/home ]; then
mkdir -p /opt/pps
MTDNUM=`cat /proc/cmdline | sed 's/.*ppsAppParts=\([0-9]\).*/\1/'`
mount -t cramfs /dev/mtdblock$MTDNUM /opt/pps
tar xf /opt/pps/app.* -C /mnt/mmc01/
fi
# Now flag the hack is done
echo done > /mnt/mmc01/hack
# Try to run custom.sh
while true; do
if [ -e /mnt/mmc01/custom.sh ]; then
/mnt/mmc01/custom.sh
fi
sleep 10
done
@mmendozam the hack line indicates the command is running (good) but the fact that initrun.sh isn't running is the problem.
Can you post a zip of your your SD card files so I can check ? I would like to rule out something like Windows formatting of the files, etc -- depending on how you created/edited the files this could be the issue.
Here is the zip with my sd card files, I only omitted ppsFactoryTool.txt
file.
mmc.zip
@mmendozam it seems like all your files are saved in windows format -- this is likely why it isn't working. I recommend you use this link to download initial files: https://github.com/guino/Merkury720/archive/refs/heads/main.zip then use this link to download the 3 additional files for your device (overwriting existing files): https://github.com/guino/Merkury1080P/archive/refs/heads/main.zip then finally download busybox (the previous links may overwrite it): https://github.com/guino/Merkury720/blob/main/mmc/busybox?raw=true and after placing all files on SD card (without making changes to them) and booting (without reset button) the device you should get the home directory created.
Let me know how that goes, and if it doesn't work, zip the files again so I can review.
Thanks @guino! It looks like the problem was the file format! I copied your zipped files to my sdcard and it worked. Then, I looked at what was different between your files and my files. You were absolutely right, the issue was the file format:
I initially used Notepad++ to edit the files, after you mentioned the OS file format I simply did Edit > EOL Conversion > Unix (LF)
in Notepad++ to change the format and it worked, too. I only transformed the initrun.sh
file.
Thanks for your help!
@mmendozam glad to help, thanks for the feedback.
Hi @guino, I'd like to thank you for your great job doing this project to root Merkury cams. I have a Merkury 1080 cam I tried to root following your instructions but it looks like I'm missing something. I took the files from this post and then replaced the 3 files as described here before copying them all over to my sd card. Then I turned my cam on while holding the reset button. At this point everything looked good to me, I was able to hit
cmdline
anddeviceinfo
URLs with the expected responses in my browser. The problem came when I tried to hit thehack
one, I got no response. I read that some users do not get any response at all but still the root worked, so I extracted the sd card from the cam and I found no hack file nor home folder. I tried reformatting the sd card using Windows default formatter as well as AOMEI software with no luck (I didn't try using Linux yet). I even tried changing the value 30 in theenv
file to 60 as described here, I saw thecmdline
with the updated value but it didn't help.What could I be missing?
Please find below some outputs that may help you to figure out what is happening.
http://admin:056565099@192.168.0.13:8090/proc/cmdline
http://admin:056565099@192.168.0.13:8090/devices/deviceinfo
http://admin:056565099@192.168.0.13:8090/proc/self/root/mnt/mmc01/hack
http://admin:056565099@192.168.0.13:8090/proc/mounts
http://admin:056565099@192.168.0.13:8090/proc/self/root/mnt/mmc01/initrun.sh
http://admin:056565099@192.168.0.13:8090/proc/self/root/etc/init.d/S80network