yi-hack-Allwinner-v2 icon indicating copy to clipboard operation
yi-hack-Allwinner-v2 copied to clipboard

Serial number - HELP NEEDED

Open roleoroleo opened this issue 2 years ago • 13 comments

In the last cams, Yi (& co) changed the structure of the file /tmp/mmap.info And I'm not able to extract the serial number from the file. I need help to find the offset and fix the problem. Please, read the file with hexdump and send me the offset where serial number starts.

hexdump -C /tmp/mmap.info

For example, for old models like y21ga is 656. For h60ga is 784.

I think it also depends on the firmware version.

roleoroleo avatar Sep 15 '21 07:09 roleoroleo

y211ga 9.0.36.00_202011101611 656

y211ga 9.0.36.01_202103231716 784

roleoroleo avatar Sep 15 '21 07:09 roleoroleo

h60ga 9.0.27.19_202105131533 784

roleoroleo avatar Sep 15 '21 07:09 roleoroleo

h30ga unknown firmware - https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/232 784

roleoroleo avatar Sep 15 '21 07:09 roleoroleo

For b091qp and firmware version 9.0.41.99_202103111513 is same as h60ga, haven't looked at /tmp/mmap.info, will check later.

0x310 in mmap.info

ghost avatar Sep 16 '21 01:09 ghost

my camera yi dome guard yrs3019 IFCNY36VR6

00000180  00 00 00 00 00 00 00 00  00 00 00 00 66 61 6d 69  |............fami|
00000190  6c 79 6d 6f 6e 69 74 6f  72 2d 72 33 30 67 62 00  |lymonitor-r30gb.|
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001c0  00 00 00 00 00 00 00 00  00 00 00 00 61 77 73 00  |............aws.|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  00 00 00 00 00 00 00 00  00 00 00 00 04 75 00 00  |.............u..|
00000210  39 2e 30 2e 30 35 2e 33  33 5f 32 30 32 30 30 39  |9.0.05.33_202009|
00000220  32 35 31 38 35 36 00 00  00 00 00 00 00 00 00 00  |251856..........|
00000230  31 31 31 35 31 30 30 33  31 35 35 30 30 31 30 30  |1115100315500100|
00000240  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30  |0000000000000000|

Mkampff avatar Oct 04 '21 16:10 Mkampff

I cant conect to yi home app, with chinesse app: error this camera can not be used outside of china. with normal app no error but cant conect.

Mkampff avatar Oct 04 '21 16:10 Mkampff

y29ga, 9.0.09.06_202103291039 784

y29ga, 9.0.09.03_202006090939 656

kiddyfurby avatar Jan 06 '22 14:01 kiddyfurby

Just a thought. What about extracting the serial number from the manufacturing (mfg) partition instead ?

MFG_PART=$(grep  -oE  ".{0,0}mfg@.{0,9}" /sys/firmware/devicetree/base/chosen/bootargs | cut -c 5-14)
SERIAL_NUMBER=$(dd bs=1 count=20 skip=36 if=/dev/$MFG_PART 2>/dev/null | tr '\0' '0' | cut -c1-20)

Sorry if the syntax is disturbing, but hopefully provides an example? Do we need the final cut 1-20?

ghost avatar Jan 31 '22 01:01 ghost

I need to check my mtdblock archive. Do you think it's in the same position for all models?

roleoroleo avatar Feb 01 '22 17:02 roleoroleo

Do you think it's in the same position for all models?

It is for my cameras but cannot say if it is for all. Even if it isn't, at least the mfg partition should stay the same (I would hope) when updates are applied.

EDIT: Looking at @kiddyfurby blocks it is.

ghost avatar Feb 02 '22 02:02 ghost

I checked "my archive". For all backups made before setting up the cam the block is empty. For all other files, the offset is the same as you wrote above. I can extract the serial number in this manner.

roleoroleo avatar Feb 02 '22 17:02 roleoroleo

YiCam Outdoor (IFUSY...) h30ga with firmware 9.0.26.07_202104231123 --> 310

xorguy avatar Feb 21 '22 21:02 xorguy

Yi Dome Guard YRS r35gb with firmware 9.0.05.33_202009 --> 210

vielfarbig avatar Sep 20 '22 12:09 vielfarbig

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 21 '22 13:12 stale[bot]