As it seems interesting, I also purchased a new device RK3566 from Aliexpress. I started at the beginning by wanting to backup what is currently on a device (just in case I fuck something up later on). After reading a few threads I embarked on a journey to dump the eMCC contents. I started with the RKDev Tool and RkDumper with various drivers in Windows 11. I did not get very far, so I gave up for now and switched to Kali. I cloned the redeveloptool git repo, tried to compile it, but it failed out of the box. There is a warning treated as an error so you need to correct the code with static pointer casting and then it compiles.
Lets try to get some info from the flash:
┌──(xxx㉿yyy)-[~]
└─$ sudo rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=102 Loader
┌──(xxx㉿yyy)-[~]
└─$ sudo rkdeveloptool rfi
Flash Info:
Manufacturer: SAMSUNG, value=00
Flash Size: 59640 MB
Flash Size: 122142720 Sectors
Block Size: 512 KB
Page Size: 2 KB
ECC Bits: 0
Access Time: 40
Flash CS: Flash<0>
┌──(xxx㉿yyy)-[~]
└─$ sudo rkdeveloptool ppt
**********Partition Info(GPT)**********
NO LBA Name
00 00002000 security
01 00004000 uboot
02 00006000 trust
03 00008000 misc
04 0000A000 dtbo
05 0000C000 vbmeta
06 0000C800 boot
07 00020800 recovery
08 00056800 backup
09 00110800 cache
10 001D0800 metadata
11 001D8800 baseparameter
12 001D9000 logo
13 001E1000 super
14 007F5000 userdata
┌──(xxx㉿yyy)-[~]
└─$ sudo rkdeveloptool rci
Chip Info: 38 36 35 33 0 0 0 0 0 0 0 0 0 0 0 0
┌──(xxx㉿yyy)-[~]
└─$ sudo rkdeveloptool rcb
Capability:15 07 00 00 00 00 00 00
Direct LBA: enabled
First 4m Access: enabled
Read Com Log: enabled
Read Secure Mode: enabled
New IDB: enabled
So we have a nice partition info with an address table. Nice. I started to read the eMMC from the first 0 sector till the end sector 122142720. It took a while and to my surprise, the .xz file was only 12ish MB large, which was nearly impossible. So I started to analyze the hex dump and to my surprise, after a while, there were only 0xCC values read from the module. After some digging around I found out that there is a protection in uBoot (I would really like to meet this guy or some stupid project lead that has come up with this idea, which is not secure nor meaningful) that prevents reading anything larger in size than 0x10000. As luck would have it uboot was completely dumped from sector 0x4000 onwards so by extracting it from the whole dump I stored the uboot.img. I found a Python script lying around somewhere that needed to be changed to my needs (offsets and length), which dumped uboot.bin. By loading it into ghidra one could search for this function and edit the branch call. I packed everything back into uboot.img and flashed it to the sector 0x4000 and dumped again. This time the .xz was something more than 2.2 GB, which is in a range of images on China Gadgat reviews page.
Just to be sure I also retried with the RkDumper as the author suggested that his tool works till driver version 4.5 (if I remember correctly) and I knew that the last time I was able to fiddle around with changing driver *.inf files was in Win7, I searched for an already available VirtualBox image and I found a torrent. With some magic, I was able to edit and add the VID and PID device IDs to the driver and install it. After some trial and error, it persuaded VB to mount the RK Loader in win7. RkDumper did its job, but way slooooower as in Linux. Anyway, I have to separate and complete dumps of the whole eMMC.
In the meantime I was also curious about the serial port connector on the board so I soldered the connector. I saw an Image @Hqnicolaswhere he soldered cables for the TTL UART converted and posted UART settings. I used the same principle, but how I was wrong the ground is on this board the middle pin, which I must say that in 20 years in the embedded world have not seen. I needed to prove this with a multimeter. From the UART log I got new information
U-Boot 2017.09-dirty #s02 (Jul 27 2023 - 21:33:25 +0800)<CR><LF>
<CR><LF>
Model: Rockchip RK3568 Evaluation Board<CR><LF>
PreSerial: 2, raw, 0xfe660000<CR><LF>
DRAM: 7.7 GiB<CR><LF>
Sysmem: init<CR><LF>
Why the use of RK3568??? I have 8 GB of DDR4 RAM running with the frequency of 1056 MHz and also that dtb files are loaded from the kernel partition. Also, the I2C frequency of the bulk converter seems to be the right one for tcs4525 (also to format is correct, but the numbers are so small that I can't read them)., what was mentioned by @Hqnicolas in the 4G thread. So the next move was to dump/extract them all. There is also one Python script somewhere in git repo that dumps them - not so perfectly though. In Linux, I converted them into dts and I am sharing them in this post.
@Hqnicolas For the card reader did you only solder the socket or you also added other components (I don't have the BOM list) as it appears that a lot of condensators were not placed on the board?
So the next steps are going to be analysis of the log files and probing out the armbian linux installation.
androidBoot_asc.txt
dts_files.7z
dtb_dump.7z