Hacking Q3H (allwinner v3 - Camdroid)

Discussion in 'Firmware Modifications' started by thegamut, Jul 25, 2016.

  1. Rodrigo Emedy

    Rodrigo Emedy Member

    Messages:
    30
    Likes Received:
    7
    Country:
    Brazil
    Nope... Cygwin x86 didn't work either.. boot loop remains...
     
  2. old4570

    old4570 Well-Known Member

    Messages:
    1,494
    Likes Received:
    497
    Country:
    Australia
    Dash Cam:
    A119 , A118c, Ausdom A261, Mini 0826 , G1Wc out the back
    I have the Q3H
    Why not just run time lapse ????
    1st menu option , 0.5s should give you 2FPS ...
    Memory card should last for quite some time ...
    Or maybe 1s 1FPS , 60 frames per minute , or 3600FP hour ...
     
  3. Rodrigo Emedy

    Rodrigo Emedy Member

    Messages:
    30
    Likes Received:
    7
    Country:
    Brazil
    The timelapse has a limit, I don't remember in playing time, but on recording time was not much longer than 3 hours, and with no audio... I need to have at least a full 24hours recording, since I need it as a surveillance camera, if you read my first posts.. And as I already said, a 2fps video can't record a freaking guy passing by my car fast enough and scratching it up, I really need to have the full range of motion, as a legal proof to sue him.. I really need at least 10 to 15fps.. and a 720p would be just great, with a lower bitrate like 10kbps.

    @kizwan already made this awesome research, which I just need to know what am I missing.

    I already got the full HEX / Decimal / IDA process... just this boot loop that is hooking me up.. Maybe @nutsey could help us with this issue of the mksquashfs.exe not compile on windows command prompt..

    Once again, big shout out to @kizwan for all that reverse engineering on that process! Amazing work!
     
    Last edited: Feb 24, 2017
  4. kizwan

    kizwan Member

    Messages:
    37
    Likes Received:
    31
    Country:
    Malaysia
    Did you actually put "run" in the command? I'm not in front of my pc at the moment, so can't check.
     
  5. old4570

    old4570 Well-Known Member

    Messages:
    1,494
    Likes Received:
    497
    Country:
    Australia
    Dash Cam:
    A119 , A118c, Ausdom A261, Mini 0826 , G1Wc out the back
    I forget how my files were compiled ..
    When I played the time laps it was pretty much super fast ...
    ? Does it play 30FPS ?

    so 15 seconds might play every second .. so that's 15 x Time recorded ..
    3 Hours x 15 , so it might be 45 hours of video .. I am guessing here ..
    But it would be something like that ..

    I will have to record some time laps to be sure ...
    If I was going to hack a cam , I would want 5fps time lapse ...
     
  6. old4570

    old4570 Well-Known Member

    Messages:
    1,494
    Likes Received:
    497
    Country:
    Australia
    Dash Cam:
    A119 , A118c, Ausdom A261, Mini 0826 , G1Wc out the back
    I just did some time lapse @ 2FPS , plays @ 30FPS so = 15 x video recorded ..
    So if you got 3 hours @ 2fps , you have about 45 hours of footage ...
     
  7. kizwan

    kizwan Member

    Messages:
    37
    Likes Received:
    31
    Country:
    Malaysia
    @Rodrigo Emedy I have no idea why you get boot loop. I just tried your biRate mod (10.5kbps) & my camera boot successfully. I also tried with the "run" command.

    10485760bps_bitRate_SUCCESS.jpg

    Send me your modified sdv files; original & 10.5kbp bitRate mod.
     
  8. NMD

    NMD Member

    Messages:
    30
    Likes Received:
    27
    Location:
    PORTUGAL
    Country:
    Portugal
    Dash Cam:
    Q3H-2
    Hi @kizwan,
    Could you build a squashfs-tool on 32-bit cygwin?
    Thus, it would be possible to run squashfs-tool on both 32-bit and 64-bit machines.
    Thanks.
     
    Last edited: Feb 28, 2017
    Petesimon likes this.
  9. old4570

    old4570 Well-Known Member

    Messages:
    1,494
    Likes Received:
    497
    Country:
    Australia
    Dash Cam:
    A119 , A118c, Ausdom A261, Mini 0826 , G1Wc out the back


    4K setting = 15FPS @ 15.7mb/s
     
    NMD likes this.
  10. old4570

    old4570 Well-Known Member

    Messages:
    1,494
    Likes Received:
    497
    Country:
    Australia
    Dash Cam:
    A119 , A118c, Ausdom A261, Mini 0826 , G1Wc out the back
    I think some of the H9 Cams do 10FPS in 4k .. not sure about MB/s ... ( Reviewers don't give that information )
     
  11. NMD

    NMD Member

    Messages:
    30
    Likes Received:
    27
    Location:
    PORTUGAL
    Country:
    Portugal
    Dash Cam:
    Q3H-2
    Yes, some Eken H9 needs fw upgrade to get 4K@25fps.
     
    Petesimon likes this.
  12. kizwan

    kizwan Member

    Messages:
    37
    Likes Received:
    31
    Country:
    Malaysia
    @Rodrigo Emedy, are you using windows 7 or 8 or 10? 32-bit or 64-bit?

    @NMD , it is already compiled in 64-bit cygwin. Which windows (7 or 8 or 10) did you use? 32-bit or 64-bit?

    I'm using 64-bit cygwin in windows 10 64-bit.
     
    Last edited: Feb 28, 2017
  13. NMD

    NMD Member

    Messages:
    30
    Likes Received:
    27
    Location:
    PORTUGAL
    Country:
    Portugal
    Dash Cam:
    Q3H-2
    Sorry @kizman, but I meant to say 32-bit cygwin version.
     
  14. nutsey

    nutsey Active Member

    Messages:
    288
    Likes Received:
    124
    Country:
    Turkey
    Petesimon likes this.
  15. kizwan

    kizwan Member

    Messages:
    37
    Likes Received:
    31
    Country:
    Malaysia
    @NMD, I just uploaded 32-bit version of mksquashfs.exe & unsquashfs.exe, compiled in 32-bit cygwin over here.
     
    Petesimon and NMD like this.
  16. NMD

    NMD Member

    Messages:
    30
    Likes Received:
    27
    Location:
    PORTUGAL
    Country:
    Portugal
    Dash Cam:
    Q3H-2
    Thanks @kizwan ;)
     
    Petesimon likes this.
  17. Rodrigo Emedy

    Rodrigo Emedy Member

    Messages:
    30
    Likes Received:
    7
    Country:
    Brazil
    @kizwan I'm on Windows 10 Pro x64.. and I tried both Cygwin and Cygwin64.. At first I need to have this step of mksquashfs working.. I'm testing with the original firmware, to be sure that is working.. then I'll try to modify the sdv file.
    @nutsey I'll try those mksquashfs older versions, thanks!
     
    Petesimon likes this.
  18. Rodrigo Emedy

    Rodrigo Emedy Member

    Messages:
    30
    Likes Received:
    7
    Country:
    Brazil
    @kizwan .. I'm may be doing something wrong with the Cygwin.. you mentioned that you didn't use the "run" before the .exe.. if I just paste your command line, it gives me "
    -bash: mksquashfs.exe: command not found".. but if I add the "run" before the mksquashfs.exe, it runs and build the 2-system.img file, BUT without all the verbose text I see on your screen capture of Cygwin.

    I already tried to run it, on specific drive ie.:
    cd g:
    cd squashfs-tools

    ...and at its home directory at c:\cygwin64\home\Rodrigo

    I installed both x86 and x64 versions at their defaults options.. I saw a bunch of addons to install, but didn't choose any of it.
     
    Petesimon likes this.
  19. kizwan

    kizwan Member

    Messages:
    37
    Likes Received:
    31
    Country:
    Malaysia
    You can either copy both mksquashfs.exe & unsquashfs.exe to /usr/local/bin or run the command like this (make sure you're in the same directory where the mksquashfs.exe located):-
    Code:
    ./mksquashfs.exe squashfs-root 2-system.img -comp xz -Xbcj x86 -noappend -no-recovery -root-owned
    
    You can see that I added "./" (no space) in front of the command. This basically calling the command that is located in the same directory.
     
    Petesimon and NMD like this.
  20. Petesimon

    Petesimon Member

    Messages:
    61
    Likes Received:
    52
    Country:
    United States
    Dash Cam:
    F60B
    hello @kizwan and fellow camera connoisseurs. i edited just two lines of of the keyboard layout file in [system]/etc of this firmware Crane-(wimius-boot-logo)-2016-11-25-(shows-20161125V10)-imx179-ili9341 and normally it boot looped my F60B camera. But thanks to y'all and running squashfs tools in Cygwin (64bit), it works fine as normal now. After getting a 'full_img.fex' file, getting unfex-refex scripts pack in the same folder as full_img.fex, and installing Cygwin (64bit), and getting squashfs tools from these forums and put them in /usr/local/bin (C:\Cygwin64\usr\local\bin) (see download zip below), I can run Cygwin terminal and do lots of fun commands ;)
    Download kizwan's squashfs tools with instructions text - https://www.dropbox.com/s/8l8l1jhgeiuyn69/make_2systemimg_commands_in_cygwin.zip?dl=1

    Code:
    cd /cygdrive/c/Users/myuser/Downloads/4kbackup
    
    cygstart ./unfex.bat
    
    /usr/local/bin/unsquashfs.exe -f UNFEX/2-system.img
    
    * Now modify system files in 'squashfs-root' folder as you like...
    Code:
    /usr/local/bin/mksquashfs.exe squashfs-root system.tmp -comp xz -Xbcj x86 -noappend -no-recovery -root-owned
    
    cat system.tmp /usr/local/bin/sysdummy.bin > 02-system.tmp
    
    /usr/local/bin/sfk.exe partcopy 02-system.tmp 0 6488064 2-system.img -yes -quiet
    
    rm 02-system.tmp system.tmp
    
    mv -f UNFEX/2-system.img UNFEX/2-system.bak
    
    cp -f 2-system.img UNFEX/.
    
    mv -f full_img.fex full_img.bak
    
    cygstart ./refex.bat
    
    exit
    
    - use 'makeimg' tool, and flash in Phoenixsuit and it's good.

    So this begs the idea to make some shell (cygwin) scripts that contain all the right commands and directory names to automate the unsquash and mksquash process, by calling C:\cygwin\bin\bash -c unsquash.sh and C:\cygwin\bin\bash -c mksquash.sh from windows command prompt without mucking up the 2-system.img file. o_O
     
    Last edited: Mar 11, 2017
    kizwan, NMD and nutsey like this.

Share This Page