Android Training Course (4)

Source: Internet
Author: User

To run Android, you must not only compile the kernel correctly, but also install the root file system correctly. The first step is to extract data from the data directory of the simulator. Maybe you will ask, why is it extracted from the simulator? This is the most convenient method. You do not need to create a directory or file on your own. Run the simulator on a terminal and the android system runs normally. Then open a terminal and run adb on the terminal to obtain the simulator file. The following command is used:

Adb pull/data/nfsboot/data

In this way, the data and system directories can be downloaded from the simulator to the local directory.

 

Step 2: copy the data directory from the simulator to the directory compiled by android:

Android-2.0/out/target/product/generic/root directory, and overwrite the same directory.

 

Step 3: Copy all the files in the Android-2.0/out/target/product/generic/system directory to the directory:

Android-2.0/out/target/product/generic/root/system directory.

 

Step 4: Modify the init. rc file under the Android-2.0/out/target/product/generic/root/directory and comment out the following sentence:

Mount rootfs/ro remount

Mount yaffs2 mtd @ system/system

Mount yaffs2 mtd @ system/system ro remount

Mount yaffs2 mtd @ userdata/data nosuid nodev

Mount yaffs2 mtd @ cache/cache nosuid nodev

Because my system does not use the yaffs2 file system, comment out these annotations.

At this point, the content under root is a complete and available android root file system. The Development Board can be loaded through nfs, but you need to set this directory to the 777 permission attribute, otherwise, the startup will fail.

 

To burn the root file system to the Development Board, You need to package the root file system and run the following command on the terminal:

Tar-zcvf android.tar.gz *

In this case, you have to go to the android.tar.gz file, and you can press the previous method to solidify it into flash.

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.