In recent projects, it is a problem to store the factory body uid. There was an sn_weriter tool in the SDK toolkit. After several attempts, I found that the software was faulty. Then I called quanzhi developers and they confirmed that the tool had stopped maintenance.
Then nandj is directly used as an unerasable partition in the Flash partition:
Change the nandj partition in Lichee \ tools \ pack \ chips \ sun7i \ configs \ Android \ wing-k70 \ sys_partition.fex to the following settings:
[Partition]
Name = private
Size = 32768
Keydata = 1 // Private Data Partition, no loss of mass production data
RO = 0
But how to use this partition on the application layer, You need to mount this partition:
View the partition status of/dev/block/in the ADB shell;
The nandj partition is linked to private. Now you need to mount the private link to the root directory:
Add the following actions in Android \ device \ softwinner \ wing-k70 \ init. sun7i. RC:
Create the directory private1 in on early-init
Mkdir/private1 0000 System
And add the Mount operation:
# Try to mount/private1
Wait/dev/block/private
Mount ext4/dev/block/private/private1 wait noatime nosuid nodev barrier = 0
Setupfs/dev/block/private
Umount/private1
Exec/system/bin/logwrapper/system/bin/e2fsck-y/dev/block/private
Exec/system/bin/busybox Mount-T ext4-O noatime, nosuid, nodev, barrier = 0, journal_checksum, noauto_da_alloc/dev/block/private/private1
Save and re-compile and package. After the firmware is installed, the private1 directory will appear in the root directory:
Later, I tried to create a file in private1 and then update the firmware again. After the file was restarted, it was not deleted!
How to Implement flash partition private data in A20 is not cleared during firmware upgrade