How to Implement flash partition private data in A20 is not cleared during firmware upgrade

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.