Android file system obtains root permission

Source: Internet
Author: User
Recently, after porting android2.3 to the cloud6410 platform and successfully mounting the file system, some commands on the Super Terminal fail to be executed, such as mkdir. After reading the materials, you do not have the root permission. You only need to specify the program (shell program) as the root user when starting the shell and modify init. the RC file is as follows:

Original init. RC settings:

Service Console/system/bin/sh
Console
Disabled
User sh
Group log

Set after modification:

Service Console/system/bin/sh
Console
Disabled
User Root
Group log

In this way, the sh program has the root permission and can execute commands with the root permission on the console. Similarly, if your service requires the root permission, specify that your service belongs to the root user, in this way, it will serve you very well, isn't it very simple.

If mkdir still fails, check whether the root directory is a readable/writable attribute.

# Mount

Rootfs/rootfs Ro 0 0 // Ro represents the read-only attribute

Run the mount command again:

# Mount-O remount, RW rootfs/

Rootfs/rootfs RW 0 0 // RW indicates that the read/write operation belongs

In this way, the root directory can be written.

Related Article

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.