Hide Navigation Bar.
edit build.prop
qemu.hw.mainkeys=1
or
setprop qemu.hw.mainkyes 1
killall system_server
If sdk version is API Level 11(Android 4.2.2), add setSystemUiVisibility function in your Activity.
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
2013년 7월 24일 수요일
2013년 7월 18일 목요일
"couldn't install on usb storage or sd card"
Modify or delete the contents of yours SD card.
couldn't install on usb storage or sd card
Device mapper debugging message
[ 193.421463] device-mapper: table: 254:0: crypt: Error allocating crypto tfm
[ 193.421471] device-mapper: ioctl: error adding target to table
set Twofish cipher algorithm feature.
make menuconfig
< > TEA, XTEA and XETA cipher algorithms
<*> Twofish cipher algorithm
*** Compression ***
┌───────────────────────────────────────────────────────────────────────────────────────── Twofish cipher algorithm ──────────────────────────────────────────────────────────────────────────────────────────┐
│ CONFIG_CRYPTO_TWOFISH: │
│ │
│ Twofish cipher algorithm. │
│ │
│ Twofish was submitted as an AES (Advanced Encryption Standard) │
│ candidate cipher by researchers at CounterPane Systems. It is a │
│ 16 round block cipher supporting key sizes of 128, 192, and 256 │
│ bits. │
│ │
│ See also: │
│ <http://www.schneier.com/twofish.html> │
│ │
│ Symbol: CRYPTO_TWOFISH [=y] │
│ Type : tristate │
│ Prompt: Twofish cipher algorithm │
│ Defined at crypto/Kconfig:841 │
│ Depends on: CRYPTO [=y] │
│ Location: │
│ -> Cryptographic API (CRYPTO [=y]) │
│ Selects: CRYPTO_ALGAPI [=y] && CRYPTO_TWOFISH_COMMON [=y]
2013년 7월 12일 금요일
Portrait HDMI for ODROID(Exynos4412)
for Exynos4412(mali)
edit build.prop and add this.
ro.sf.hwrotation=90
http://codewalkerster.blogspot.kr/2013/06/hdmi-screen-rotation-issue-for-odroid.html
edit device/samsung/exynos4/libhdmi/libhdmiservice/SecTVOutService.cpp
#include <cutils/properties.h>
void SecTVOutService::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer)
{
//codewalker
return;
---------------------------------------------------------------------------------------------------------
char value[PROPERTY_VALUE_MAX];
property_get("ro.sf.hwrotation", value, NULL);
if (value != NULL)
angle = atoi(value);
mSecHdmi.setUIRotation(globalRotate, angle);
edit build.prop and add this.
ro.sf.hwrotation=90
http://codewalkerster.blogspot.kr/2013/06/hdmi-screen-rotation-issue-for-odroid.html
edit device/samsung/exynos4/libhdmi/libhdmiservice/SecTVOutService.cpp
#include <cutils/properties.h>
{
//codewalker
return;
---------------------------------------------------------------------------------------------------------
void SecTVOutService::setHdmiStatus(uint32_t status)
{
LOGD("%s HDMI cable status = %d", __func__, status);
{
Mutex::Autolock _l(mLock);
bool hdmiCableInserted = (bool)status;
if (mHdmiCableInserted == hdmiCableInserted)
return;
if (hdmiCableInserted == true) {
if (mSecHdmi.connect() == false) {
LOGE("%s::mSecHdmi.connect() fail", __func__);
hdmiCableInserted = false;
}
#if 1 //yqf, 2012-6-18, keep it, first plug in cable with device landscape mode
else{
//added yqf, STAR00030984 & update roate value to hdmi after connect->disconnect->connect
//codewalker
int angle = 0;property_get("ro.sf.hwrotation", value, NULL);
if (value != NULL)
angle = atoi(value);
if(mSecHdmi.mRotateInfoChange)
mSecHdmi.mRotateInfoChange=false;
}
2013년 7월 10일 수요일
ramdisk rootfs를 system.img에 포함 시키기
http://codewalkerster.blogspot.kr/2013/05/boot-from-system-partition-instead.html
위에 설명에 수동으로 ramdisk의 rootfs를 system에 복사하는 방법이 였습니다.
이번에는 ramdisk의 rootfs를 포함 하여 system.img를 만들어 보겠습니다.
system/core/init/Android.mk를 보면 TARGET_ROOT_OUT 변수가 out/target/product/xxx/root를 의미합니다. 그리고 out/target/product/xxx/root/init에 복사 됩니다.
그래서 전체 Android.mk에서 TARGET_ROOT_OUT를 찾아 TARGET_OUT으로 변경하면 out/target/product/xxx/system으로 복사됩니다. 하지만 코드를 여러 군데 수정 해야 합니다.
그래서 build후 copy하는 방식으로 처리 하였습니다.
build_android.sh를 수정합니다.
SYSTEMIMAGE_PARTITION_SIZE=$(grep "BOARD_SYSTEMIMAGE_PARTITION_SIZE " device/hardkernel/$SEC_PRODUCT/BoardConfig.mk | awk '{field=$NF};END{print field}')
function copy_root_2_system()
{
#root의 내용을 permission 그대로 system 폴더에 복사한다.
cp -arp $OUT_DIR/root/* $OUT_DIR/system/
mv $OUT_DIR/system/init $OUT_DIR/system/bin/
mv $OUT_DIR/system/sbin/adbd $OUT_DIR/system/bin/
cd $OUT_DIR/system
ln -s bin/init init
cd $OUT_DIR/system/sbin
ln -s ../bin/adbd adbd
#make_ext4fs로 system 폴더를 system.img로 만든다.
#SYSTEMIMAGE_PARTITION_SIZE 는 BoardConfig.mk의 BOARD_SYSTEMIMAGE_PARTITION_SIZE의 값을 읽어서 설정한다.
$OUT_HOSTBIN_DIR/make_ext4fs -s -l $SYSTEMIMAGE_PARTITION_SIZE -a system $OUT_DIR/system.img $OUT_DIR/system
sync
}
odroidx2)
build_android
copy_root_2_system
make_uboot_img
kernel의 defconfing를 수정합니다. (ODROID-U2)
CONFIG_CMDLINE="root=/dev/mmcblk0p2 rw rootfstype=ext4 init=/init console=ttySAC1,115200n8 androidboot.console=ttySAC1 mem=2047M"
위에 설명에 수동으로 ramdisk의 rootfs를 system에 복사하는 방법이 였습니다.
이번에는 ramdisk의 rootfs를 포함 하여 system.img를 만들어 보겠습니다.
system/core/init/Android.mk를 보면 TARGET_ROOT_OUT 변수가 out/target/product/xxx/root를 의미합니다. 그리고 out/target/product/xxx/root/init에 복사 됩니다.
그래서 전체 Android.mk에서 TARGET_ROOT_OUT를 찾아 TARGET_OUT으로 변경하면 out/target/product/xxx/system으로 복사됩니다. 하지만 코드를 여러 군데 수정 해야 합니다.
그래서 build후 copy하는 방식으로 처리 하였습니다.
build_android.sh를 수정합니다.
SYSTEMIMAGE_PARTITION_SIZE=$(grep "BOARD_SYSTEMIMAGE_PARTITION_SIZE " device/hardkernel/$SEC_PRODUCT/BoardConfig.mk | awk '{field=$NF};END{print field}')
function copy_root_2_system()
{
#root의 내용을 permission 그대로 system 폴더에 복사한다.
cp -arp $OUT_DIR/root/* $OUT_DIR/system/
#init과 sbin/adbd를 755로 넣어도 644로 바뀌기 때문에 symbolic link 해결
#init과 adbd를 bin으로 복사합니다.mv $OUT_DIR/system/init $OUT_DIR/system/bin/
mv $OUT_DIR/system/sbin/adbd $OUT_DIR/system/bin/
cd $OUT_DIR/system
ln -s bin/init init
cd $OUT_DIR/system/sbin
ln -s ../bin/adbd adbd
#make_ext4fs로 system 폴더를 system.img로 만든다.
#SYSTEMIMAGE_PARTITION_SIZE 는 BoardConfig.mk의 BOARD_SYSTEMIMAGE_PARTITION_SIZE의 값을 읽어서 설정한다.
$OUT_HOSTBIN_DIR/make_ext4fs -s -l $SYSTEMIMAGE_PARTITION_SIZE -a system $OUT_DIR/system.img $OUT_DIR/system
sync
}
odroidx2)
build_android
copy_root_2_system
make_uboot_img
kernel의 defconfing를 수정합니다. (ODROID-U2)
CONFIG_CMDLINE="root=/dev/mmcblk0p2 rw rootfstype=ext4 init=/init console=ttySAC1,115200n8 androidboot.console=ttySAC1 mem=2047M"
2013년 7월 9일 화요일
iperf로 android 장비 속도 측정하기
1. Ubuntu PC와 android 장비를 direct cable 연결한다.
2. Ubuntu PC의 network 설정을 확인한다.
PC의 설정을 그대로 사용할 것이다.
3. android 장비에 연결된 터미날로 ip 설정을 한다.
ifconfig eth0 192.168.10.191 up
route add default gw 192.168.10.126 dev eth0
PC의 ip에서 마지막 한자리만 1을 더한다.
여기서 gateway는 PC의 그것과 동일하게 한다.
4. pc에 iperf server를 구동한다.
[~]$ iperf -s -f M
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 0.08 MByte (default)
------------------------------------------------------------
5. android에 iPerf for Android를 설치한다.
6. iperf app의 입력란에 아래 값을 넣고 off를 toggle 한다.
-c 192.168.10.190 -P 4 -f M -w 256k -t 60
7. 결과가 아래와 같이 PC에서 출력된다.
[ 8] 0.0-60.0 sec 412 MBytes 6.86 MBytes/sec
[ 6] 0.0-60.0 sec 368 MBytes 6.13 MBytes/sec
[ 5] 0.0-60.1 sec 420 MBytes 7.00 MBytes/sec
[ 4] 0.0-60.1 sec 388 MBytes 6.45 MBytes/sec
[SUM] 0.0-60.1 sec 1588 MBytes 26.4 MBytes/sec
아래 사이트 참조 하였습니다.
http://forum.falinux.com/zbxe/index.php?document_srl=533076&mid=lecture_tip
2. Ubuntu PC의 network 설정을 확인한다.
PC의 설정을 그대로 사용할 것이다.
3. android 장비에 연결된 터미날로 ip 설정을 한다.
ifconfig eth0 192.168.10.191 up
route add default gw 192.168.10.126 dev eth0
PC의 ip에서 마지막 한자리만 1을 더한다.
여기서 gateway는 PC의 그것과 동일하게 한다.
4. pc에 iperf server를 구동한다.
[~]$ iperf -s -f M
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 0.08 MByte (default)
------------------------------------------------------------
6. iperf app의 입력란에 아래 값을 넣고 off를 toggle 한다.
-c 192.168.10.190 -P 4 -f M -w 256k -t 60
7. 결과가 아래와 같이 PC에서 출력된다.
[ 8] 0.0-60.0 sec 412 MBytes 6.86 MBytes/sec
[ 6] 0.0-60.0 sec 368 MBytes 6.13 MBytes/sec
[ 5] 0.0-60.1 sec 420 MBytes 7.00 MBytes/sec
[ 4] 0.0-60.1 sec 388 MBytes 6.45 MBytes/sec
[SUM] 0.0-60.1 sec 1588 MBytes 26.4 MBytes/sec
아래 사이트 참조 하였습니다.
http://forum.falinux.com/zbxe/index.php?document_srl=533076&mid=lecture_tip
2013년 7월 4일 목요일
Use USB GPS for ODROID
android에 외장형 USB GPS를 연결하여 보자.
아래 보이는 USB 타입 GPS는 ACM 드라이버로 붙습니다.
http://www.ascenglobal.com/info.asp?id=139
kernel에서 ACM을 추가한다.
*** USB Device Class drivers ***
<*> USB Modem (CDC ACM) support
< > USB Printer support
아래 링크에서 gps 소스를 다운 받는다.
https://www.dropbox.com/s/tp8zp5grnpis51r/libodroid-gps.tar.gz
device/hardkernel/proprietary/libodroid-gps에 압축을 푼다.
device.mk에 gps가 포함이 되도록 수정한다.
# gps
PRODUCT_PACKAGES += \
gps.$(TARGET_PRODUCT)
BoardConfig.mk
# GPS
BOARD_HAVE_ODROID_GPS := true
BOARD_SUPPORT_EXTERNAL_GPS := true
uevent.odroid[X].rc
62 #for gps
63 /dev/ttyACM0 0666 gps gps
64 /dev/ttyUSB0 0666 gps gps
hardware/libhardware/hardware.c
91 /* Check that the id matches */
92 if (strcmp(id, hmi->id) != 0) {
93 ALOGE("load: id=%s != hmi->id=%s", id, hmi->id);
94 status = -EINVAL;
95 goto done;
96 }
97
98 //codewalker
99 if(hmi->dso)
100 hmi->dso = handle;
101
102 /* success */
103 status = 0;
아래 보이는 USB 타입 GPS는 ACM 드라이버로 붙습니다.
http://www.ascenglobal.com/info.asp?id=139
kernel에서 ACM을 추가한다.
*** USB Device Class drivers ***
<*> USB Modem (CDC ACM) support
< > USB Printer support
아래 링크에서 gps 소스를 다운 받는다.
https://www.dropbox.com/s/tp8zp5grnpis51r/libodroid-gps.tar.gz
device/hardkernel/proprietary/libodroid-gps에 압축을 푼다.
device.mk에 gps가 포함이 되도록 수정한다.
# gps
PRODUCT_PACKAGES += \
gps.$(TARGET_PRODUCT)
BoardConfig.mk
# GPS
BOARD_HAVE_ODROID_GPS := true
BOARD_SUPPORT_EXTERNAL_GPS := true
62 #for gps
63 /dev/ttyACM0 0666 gps gps
64 /dev/ttyUSB0 0666 gps gps
hardware/libhardware/hardware.c
91 /* Check that the id matches */
92 if (strcmp(id, hmi->id) != 0) {
93 ALOGE("load: id=%s != hmi->id=%s", id, hmi->id);
94 status = -EINVAL;
95 goto done;
96 }
97
98 //codewalker
99 if(hmi->dso)
100 hmi->dso = handle;
101
102 /* success */
103 status = 0;
How to support NTFS fs with External Storage.
안드로이드의 external storage(USB Mass Storage)에 NTFS 파일 시스템을 지원하기
android_4.2.2 (BUILD_ID=JDQ39E)
storage_list.xml에 item을 추가한다.
device/hardkernel/odroid/overlay/frameworks/base/core/res/res/xml/storage_list.xml
<storage android:mountPoint="/storage/usb1"
android:storageDescription="@string/storage_usb"
android:primary="false"
android:removable="true" />
USB Mass Storage를 연결 하면 발생하는 노드를 vold.fstab에 추가 한다.
device/hardkernel/odroid/conf/vold.fstab
dev_mount usb /storage/usb1 auto /devices/platform/xxx
init.odroid.rc에 node를 만든다.
device/hardkernel/odroid/conf/init.odroid.rc
mkdir /storage/usb1 0000 system system
system/vold를 수정 한다.
$ svn diff
Index: Volume.cpp
===================================================================
--- Volume.cpp (revision 21)
+++ Volume.cpp (working copy)
@@ -44,6 +44,7 @@
#include "VolumeManager.h"
#include "ResponseCode.h"
#include "Fat.h"
+#include "Ntfs.h"
#include "Process.h"
#include "cryptfs.h"
@@ -401,7 +402,13 @@
if (Fat::check(devicePath)) {
if (errno == ENODATA) {
SLOGW("%s does not contain a FAT filesystem\n", devicePath);
- continue;
+ if (Ntfs::doMount(devicePath, getMountpoint(), false, false, false,
+ 1000, 1015, 0702, false)) {
+ SLOGE("%s failed to mount via NTFS (%s)\n", devicePath, strerror(errno));
+ } else {
+ SLOGE("NTFS mounted");
+ continue;
+ }
}
errno = EIO;
/* Badness - abort the mount */
Index: Android.mk
===================================================================
--- Android.mk (revision 21)
+++ Android.mk (working copy)
@@ -12,6 +12,7 @@
Process.cpp \
Ext4.cpp \
Fat.cpp \
+ Ntfs.cpp \
Loop.cpp \
Devmapper.cpp \
ResponseCode.cpp \
Ntfs.h
1 /*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef _NTFS_H
18 #define _NTFS_H
19
20 #include <unistd.h>
21
22 class Ntfs {
23 public:
24 static int doMount(const char *fsPath, const char *mountPoint,
25 bool ro, bool remount, bool executable,
26 int ownerUid, int ownerGid, int permMask,
27 bool createLost);
28 };
29
30 #endif
Ntfs.cpp
1 /*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <stdio.h>
18 #include <fcntl.h>
19 #include <unistd.h>
20 #include <errno.h>
21 #include <string.h>
22 #include <dirent.h>
23 #include <errno.h>
24 #include <fcntl.h>
25
26 #include <sys/types.h>
27 #include <sys/stat.h>
28 #include <sys/types.h>
29 #include <sys/mman.h>
30 #include <sys/mount.h>
31
32 #include <linux/kdev_t.h>
33
34 #define LOG_TAG "Vold"
35
36 #include <cutils/log.h>
37 #include <cutils/properties.h>
38
39 #include "Ntfs.h"
40
41 static char FSCK_MSDOS_PATH[] = "/system/bin/fsck_msdos";
42 static char MKDOSFS_PATH[] = "/system/bin/newfs_msdos";
43 extern "C" int logwrap(int argc, const char **argv, int background);
44 extern "C" int mount(const char *, const char *, const char *, unsigned long, const void *);
45
46 int Ntfs::doMount(const char *fsPath, const char *mountPoint,
47 bool ro, bool remount, bool executable,
48 int ownerUid, int ownerGid, int permMask, bool createLost) {
49 int rc;
50 unsigned long flags;
51 char mountData[255];
52
53 flags = MS_NODEV | MS_NOSUID | MS_DIRSYNC;
android_4.2.2 (BUILD_ID=JDQ39E)
storage_list.xml에 item을 추가한다.
device/hardkernel/odroid/overlay/frameworks/base/core/res/res/xml/storage_list.xml
<storage android:mountPoint="/storage/usb1"
android:storageDescription="@string/storage_usb"
android:primary="false"
android:removable="true" />
USB Mass Storage를 연결 하면 발생하는 노드를 vold.fstab에 추가 한다.
device/hardkernel/odroid/conf/vold.fstab
dev_mount usb /storage/usb1 auto /devices/platform/xxx
init.odroid.rc에 node를 만든다.
device/hardkernel/odroid/conf/init.odroid.rc
mkdir /storage/usb1 0000 system system
system/vold를 수정 한다.
$ svn diff
Index: Volume.cpp
===================================================================
--- Volume.cpp (revision 21)
+++ Volume.cpp (working copy)
@@ -44,6 +44,7 @@
#include "VolumeManager.h"
#include "ResponseCode.h"
#include "Fat.h"
+#include "Ntfs.h"
#include "Process.h"
#include "cryptfs.h"
@@ -401,7 +402,13 @@
if (Fat::check(devicePath)) {
if (errno == ENODATA) {
SLOGW("%s does not contain a FAT filesystem\n", devicePath);
- continue;
+ if (Ntfs::doMount(devicePath, getMountpoint(), false, false, false,
+ 1000, 1015, 0702, false)) {
+ SLOGE("%s failed to mount via NTFS (%s)\n", devicePath, strerror(errno));
+ } else {
+ SLOGE("NTFS mounted");
+ continue;
+ }
}
errno = EIO;
/* Badness - abort the mount */
Index: Android.mk
===================================================================
--- Android.mk (revision 21)
+++ Android.mk (working copy)
@@ -12,6 +12,7 @@
Process.cpp \
Ext4.cpp \
Fat.cpp \
+ Ntfs.cpp \
Loop.cpp \
Devmapper.cpp \
ResponseCode.cpp \
Ntfs.h
1 /*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef _NTFS_H
18 #define _NTFS_H
19
20 #include <unistd.h>
21
22 class Ntfs {
23 public:
24 static int doMount(const char *fsPath, const char *mountPoint,
25 bool ro, bool remount, bool executable,
26 int ownerUid, int ownerGid, int permMask,
27 bool createLost);
28 };
29
30 #endif
Ntfs.cpp
1 /*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <stdio.h>
18 #include <fcntl.h>
19 #include <unistd.h>
20 #include <errno.h>
21 #include <string.h>
22 #include <dirent.h>
23 #include <errno.h>
24 #include <fcntl.h>
25
26 #include <sys/types.h>
27 #include <sys/stat.h>
28 #include <sys/types.h>
29 #include <sys/mman.h>
30 #include <sys/mount.h>
31
32 #include <linux/kdev_t.h>
33
34 #define LOG_TAG "Vold"
35
36 #include <cutils/log.h>
37 #include <cutils/properties.h>
38
39 #include "Ntfs.h"
40
41 static char FSCK_MSDOS_PATH[] = "/system/bin/fsck_msdos";
42 static char MKDOSFS_PATH[] = "/system/bin/newfs_msdos";
43 extern "C" int logwrap(int argc, const char **argv, int background);
44 extern "C" int mount(const char *, const char *, const char *, unsigned long, const void *);
45
46 int Ntfs::doMount(const char *fsPath, const char *mountPoint,
47 bool ro, bool remount, bool executable,
48 int ownerUid, int ownerGid, int permMask, bool createLost) {
49 int rc;
50 unsigned long flags;
51 char mountData[255];
52
53 flags = MS_NODEV | MS_NOSUID | MS_DIRSYNC;
54
55 flags |= (executable ? 0 : MS_NOEXEC);
56 flags |= (ro ? MS_RDONLY : 0);
57 flags |= (remount ? MS_REMOUNT : 0);
58
59 /*
60 * Note: This is a temporary hack. If the sampling profiler is enabled,
61 * we make the SD card world-writable so any process can write snapshots.
62 *
63 * TODO: Remove this code once we have a drop box in system_server.
64 */
65 char value[PROPERTY_VALUE_MAX];
66 property_get("persist.sampling_profiler", value, "");
67 if (value[0] == '1') {
68 SLOGW("The SD card is world-writable because the"
69 " 'persist.sampling_profiler' system property is set to '1'.");
70 permMask = 0;
71 }
72
73 sprintf(mountData,
74 "utf8,uid=%d,gid=%d,fmask=%o,dmask=%o",
75 ownerUid, ownerGid, permMask, permMask);
76
77 rc = mount(fsPath, mountPoint, "ntfs", flags, mountData);
78
79 if (rc && errno == EROFS) {
80 SLOGE("%s appears to be a read only filesystem - retrying mount RO", fsPath);
81 flags |= MS_RDONLY;
82 rc = mount(fsPath, mountPoint, "ntfs", flags, mountData);
83 }
84
85 if (rc == 0 && createLost) {
86 char *lost_path;
87 asprintf(&lost_path, "%s/LOST.DIR", mountPoint);
88 if (access(lost_path, F_OK)) {
89 /*
90 * Create a LOST.DIR in the root so we have somewhere to put
91 * lost cluster chains (fsck_msdos doesn't currently do this)
92 */
93 if (mkdir(lost_path, 0755)) {
94 SLOGE("Unable to create LOST.DIR (%s)", strerror(errno));
95 }
96 }
97 free(lost_path);
98 }
99
100 return rc;
101 }
Ntfs는 read-only만 지원 됩니다.
shell@android:/ $ mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,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
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p2 /system ext4 ro,relatime,data=ordered 0 0
/dev/block/mmcblk0p4 /cache ext4 rw,nosuid,nodev,noatime,nomblk_io_submit,errors=panic,data=ordered 0 0
/dev/block/mmcblk0p3 /data ext4 rw,nosuid,nodev,noatime,nomblk_io_submit,discard,noauto_da_alloc,errors=panic,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 00
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/vold/179:9 /mnt/ext_sd vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 00
/dev/block/vold/8:1 /storage/usb1 ntfs ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,umask=0702,nls=utf8,errors=continue,mft_zone_multiplier=1 0 0
shell@android:/ $
피드 구독하기:
글 (Atom)