2012-08-10

[Android] remount하여 RO->RW 권한 변경


android /system/파티션이 mount되어 있을때 remount하여 권한 변경 방법

/system/lib에 있는 library를 변경하여 테스트 해야 할 일이 발생하였다.
이전에 저장해둔 문서가 없어서 다시 작성한다.

root shell을 얻어야한다. (rooting을 하던.. 아님 device로 adb shell를 했을때 기본으로 root shell로 접속되던..)

1. 파티션 정보 확인

# mount
mount
rootfs / rootfs rw 0 0
/dev/root / ext4 ro,relatime,barrier=1,data=ordered 0 0
tmpfs /dev tmpfs rw,relatime,size=4096k,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /var tmpfs rw,relatime,mode=755 0 0
/dev/block/mmcblk0p10 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p13 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p11 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
 0 0
/dev/block/mmcblk0p12 /data/chrome ext4 rw,nosuid,nodev,noatime,barrier=1,data=o
rdered 0 0
/dev/mmcblk0p5 /factory_setting ext4 ro,relatime,barrier=1,data=writeback 0 0


2. rw권한 부여
# mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /system

3. 권한 확인

# mount
mount
rootfs / rootfs rw 0 0
/dev/root / ext4 ro,relatime,barrier=1,data=ordered 0 0
tmpfs /dev tmpfs rw,relatime,size=4096k,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /var tmpfs rw,relatime,mode=755 0 0
/dev/block/mmcblk0p10 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p13 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p11 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
 0 0
/dev/block/mmcblk0p12 /data/chrome ext4 rw,nosuid,nodev,noatime,barrier=1,data=o
rdered 0 0
/dev/mmcblk0p5 /factory_setting ext4 ro,relatime,barrier=1,data=writeback 0 0


댓글 없음:

댓글 쓰기