For a long time , I decided to have a good study ;

Reference material

1. Modify file system permissions

1. View permissions for each system : especially /system

root@sabresd_6dq:/ # mount
rootfs / rootfs ro,size=345444k,nr_inodes=
tmpfs /dev tmpfs rw,nosuid,relatime,mode= ...
pstore /sys/fs/pstore pstore rw,relatime
/dev/block/mmcblk3p5 /system ext4 ro,relatime,data=ordered 0 0
/dev/block/mmcblk3p4 /data ext4 rw,nosuid,nodev,noatime,nodiratime,noauto_da_alloc,errors=panic,data=ordered
/dev/block/mmcblk3p6 /cache ext4 rw,nosuid,nodev,relatime,data=ordered
/dev/block/mmcblk3p7 /device ext4 ro,nosuid,nodev,relatime,data=ordered

You can see it's a read-only file system , If you want to change it to rw, There are two ways :

1. Reattach to the file system ( Disadvantage : Turn it off and it's gone , There is no image file , It's like a temporary variable , Temporary debugging can use this method )

2. Modify source code fstab file ( Permanent , Compile into image file )

1. Reattach to the file system

root@sabresd_6dq:/ # mount -o remount /dev/block/mmcblk3p5 /system

Again mount It is found that rw 了

2. Modify the source code, change the file system properties

Method 1 :

Direct view out/target/product/sabresd_6dq/root/fstab.freescale

find /system Make changes , then make, But if it's removed, it's gone

Method 2 :

see device/fsl/sabresd_6dq/

include device/fsl/imx6/ ifeq ($(BUILD_TARGET_DEVICE),sd)
ifneq ($(BUILD_TARGET_FS),f2fs)
TARGET_RECOVERY_FSTAB = device/fsl/sabresd_6dq/fstab_sd.freescale
# build for ext4
TARGET_RECOVERY_FSTAB = device/fsl/sabresd_6dq/fstab_sd-f2fs.freescale
# build for f2fs
ifneq ($(BUILD_TARGET_FS),f2fs)
TARGET_RECOVERY_FSTAB = device/fsl/sabresd_6dq/fstab.freescale
# build for ext4
TARGET_RECOVERY_FSTAB = device/fsl/sabresd_6dq/fstab-f2fs.freescale
# build for f2fs

It can be seen that , Different media use different file systems

You can know about us fstab by :device/fsl/sabresd_6dq/fstab.freescale

open device/fsl/sabresd_6dq/fstab.freescale

# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK /devices/soc0/soc/.aips-bus/.usdhc/mmc_host* auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata
/devices/soc0/soc/.aips-bus/.usb/ci_hdrc.* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
/devices/soc0/soc/.aips-bus/.usb/ci_hdrc.* auto auto defaults voldmanaged=usb1:auto,encryptable=userdata
/dev/block/mmcblk3p5 /system ext4 ro,barrier=1 wait,verify
/dev/block/mmcblk3p4 /data ext4 nosuid,nodev,nodiratime,noatime,nomblk_io_submit,noauto_da_alloc,errors=panic wait,encryptable=/dev/block/mmcblk3p9
/dev/block/mmcblk3p6 /cache ext4 nosuid,nodev,nomblk_io_submit wait
/dev/block/mmcblk3p7 /device ext4 ro,nosuid,nodev wait
/dev/block/mmcblk3p1 /boot emmc defaults defaults
/dev/block/mmcblk3p2 /recovery emmc defaults defaults
/dev/block/mmcblk3p8 /misc emmc defaults defaults
/dev/block/mmcblk3boot0 /bootloader emmc defaults defaults
/dev/block/zram0 none swap defaults zramsize=

Change the red above ro by rw

Burn after modification , You can see that it's really changed

2. Modify system layer file properties

The properties in the source code are the same as those after compilation out The attributes in the directory may be different , Even if it's a script copy of the past .

For example /system/bin It can be executed under the following conditions , But in /out/xxx/system/etc You can't go directly through chmod modify . If you want to modify, you have to modify the code ;

See in detail canopen To transplant to Android6.0 Of the 4.4 section

3. Modify the frame layer file properties (framework layer )( I didn't see it , Use it and write it again )

4. Modify application layer file properties

android More related articles on the management of system permissions

  1. Android System authority and signature

    Android System authority and signature   2015-03-23 19:13:33CSDN-chen52671- clicks :50     Android Authority and signature Introduction The phenomenon : A customization in the system Service, Service is ...

  2. Yes Android Understanding of system authority

    Android The system is running on Linux On the kernel ,Android And Linux Each has its own set of strict security and permission mechanisms Android System permissions related content ( One )linux Permissions on the file system -rwxr-x--x ...

  3. Android System permissions and root jurisdiction

    Android System permissions and root jurisdiction

  4. Android System permissions and root Authority

    tyle="margin:20px 0px 0px; font-size:14.285714149475098px; line-height:26px; font-family:Arial; ...

  5. android System permissions SET_PREFERRED_APPLICATIONS How to get

    Recently, I wrote a demo, Need to use SET_PREFERRED_APPLICATIONS jurisdiction I have been searching online for a long time , There are probably two ways : 1. Mobile phone root after , hold apk Force push To system/app Under the table of contents , restart ...

  6. Android—— System permissions

    Android It's a privilege separated operating system , Each application runs in a different system identity (Linux Of user ID and group ID). Parts of the system are isolated from different identities . therefore ,Linux Isolated applications ( And other programs ...

  7. [ turn ] adopt apk Signing gives the application system permissions

    [ turn ] adopt apk Signing gives the application system permissions (2013-01-08 13:40:50) Reprint ▼ label : it classification : Android Source : ...

  8. [Android Pro] android 4.4 Android Native rights management :AppOps

    reference : reference : ...

  9. Android Application rights management summary

      Access registration properties android.permission.ACCESS_CHECKIN_PROPERTIES , Read or write registration check-in Database property table permissions Get the wrong position android.permi ...

Random recommendation

  1. html Up and down structure ( The upper fixed height , The bottom is tiled )

    html Top and bottom structure of the page : The upper part is fixed , The bottom is tiled <div id="page_header"></div> <div id="page_conte ...

  2. in_array The third parameter of strict Set to true

    var_dump(in_array(0, array('s' )); The result of this sentence is bool(true). because in_array Will 0 and 's' Compare ,0 yes number type ,'s' yes string class ...

  3. 10 Golden Rules of Project Risk Management

    The benefits of risk management in projects are huge. You can gain a lot of money if you deal with u ...

  4. Windows Keyboard operation shortcut accumulation

    Copy . Paste : CTRL+C Copy the selected items to the clipboard CTRL+V Paste the contents of the clipboard to the current location CTRL+X Cut the selected items to the clipboard Alt+ space + E + P CMD Window quick paste Turn off ...

  5. Spark operator

    0.parallelize 2.mapValues 3.flatMap 4.mapPartitions 5.mapPartitionsWithIndex 6.filter 7.reduce ...

  6. Python Handling of documents

    Simply read the file   Is to read all the contents of this file f.readline()   It's a line that reads the file .write()   Will check if this file exists , Create if it does not exist , exist , Then write the content in the way of overlay ...

  7. 6.26 Study Asynchronous delegate callback function VS Multithreading VS parallel processing

    describe : I'm now polling to build instances , Then this instance executes a method , But it takes about 10s Time , It's going to take a long time for all the polling to come down . So I'm going to change , Head gave me two ways ,1 Multithreading 2 Asynchronous delegate callback function . Asynchronous delegate callback letter ...

  8. android in xml tools Properties, ( turn )

    The first part Android Development , When writing layout code ,ide You can see a preview of the layout . But some effects can only be seen after running , For example, in this case :TextView stay xml There are no characters set in , But in activity Set up in ...

  9. IISExpress When running a website ,Service Fabric newspaper Could not load file or assembly &#39;Microsoft.ServiceFabric.Data&#39; or one of its dependencies. An attempt was made to load a program with an incorrect format.

    open VS   TOOLS > OPTIONS > Projects and Solutions > WEB PROJECTS, Choose "Use the 64 bit vers ...

  10. 【MySQL】-2 function 、 grouping 、 Subquery 、 The joint query

    function Mysql The function property of has no SQL Strong portability . Most of the supported functions : Functions that handle text strings : RTrim(): Handle the space to the right of the column value LTrim(): Handle the space to the left of the column value   Trim(): Handle the left and right of column values ...