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.