EXTERNAL_STORAGE doesn't match with "df" output on Samsung Arndale Android.

Bug #1295559 reported by Botao
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Android
Won't Fix
Undecided
HariGopal

Bug Description

For the SD MMC test on Samsung Arndale board, with Linaro Android build #386:

https://android-build.linaro.org/builds/~linaro-android/linux-linaro-arndale/#build=386

The value of EXTERNAL_STORAGE doesn't match with the output of "df":

root@arndale:/ # df
Filesystem Size Used Free Blksize
/dev 1000.6M 164.0K 1000.4M 4096
/mnt/asec 1000.6M 0.0K 1000.6M 4096
/mnt/obb 1000.6M 0.0K 1000.6M 4096
/system 739.9M 371.1M 368.8M 4096
/cache 243.9M 2.0M 241.9M 1024
/data 487.8M 51.4M 436.4M 1024
/mnt/media_rw/sdcard0 5.8G 12.0K 5.8G 4096
/mnt/secure/asec 5.8G 12.0K 5.8G 4096

root@arndale:/ # echo $EXTERNAL_STORAGE
/storage/sdcard0
root@arndale:/ #

"/storage/sdcard0" is not in the output of "df". According to the output, the storage seems locates at "/mnt/media_rw/sdcard0", and I couldn't see there is any symbol link between them:

root@arndale:/ # busybox ls -ld /mnt/media_rw/sdcard0
drwxrwx--- 4 media_rw media_rw 4096 Jan 1 00:01 /mnt/media_rw/sdcard0

root@arndale:/ # busybox ls -ld /storage/sdcard0
drwx------ 2 root root 0 Jan 1 00:00 /storage/sdcard0
root@arndale:/ #

However, data can be successfully written to /storage/sdcard0:

root@arndale:/ # written_message="abcdefghijklmn"
root@arndale:/ # echo $written_message > $EXTERNAL_STORAGE/sd-mmc-test.txt
root@arndale:/ # echo $?
0
root@arndale:/ # cat $EXTERNAL_STORAGE/sd-mmc-test.txt
abcdefghijklmn
root@arndale:/ # cd /storage/sdcard0
root@arndale:/storage/sdcard0 # ls
sd-mmc-test.txt
root@arndale:/storage/sdcard0 #

Though file "sd-mmc-test.txt" doesn't exist under "/mnt/media_rw/sdcard0"

root@arndale:/storage/sdcard0 # cd /mnt/media_rw/sdcard0
root@arndale:/mnt/media_rw/sdcard0 # ls
LOST.DIR
root@arndale:/mnt/media_rw/sdcard0 #

The output from "mount" are:

root@arndale:/data # mount
rootfs / rootfs rw,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
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mmcblk1p3 /system ext4 rw,relatime,data=ordered 0 0
/dev/block/mmcblk1p5 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,data=ordered 0 0
/dev/block/mmcblk1p6 /data ext4 rw,nosuid,nodev,noatime,errors=panic,data=ordered 0 0
/dev/block/vold/179:39 /mnt/media_rw/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime0
/dev/block/vold/179:39 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=00200
root@arndale:/data #

"/mnt/media_rw/sdcard0" is in output but no "/storage/sdcard0".

Something wrong in the output of these storage partitions?

#####################################
For Samsung Arndale Android, this issue reproduced on following images:
https://android-build.linaro.org/builds/~linaro-android/linux-linaro-arndale/#build=386
https://android-build.linaro.org/builds/~linaro-android/arndale-linaro-14.03-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/linux-linaro-arndale/#build=415
https://android-build.linaro.org/builds/~linaro-android/arndale-linaro-14.04-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/linux-linaro-arndale/#build=447
https://android-build.linaro.org/builds/~linaro-android/arndale-linaro-14.05-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/linux-linaro-arndale/#build=473
https://android-build.linaro.org/builds/~linaro-android/arndale-linaro-14.06-release/#build=1
https://android-build.linaro.org/builds/~linaro-android/linux-linaro-arndale/#build=502

Revision history for this message
Soumya Basak (soumya-basak) wrote :

The issue reproduced with Linaro Android kitkat 14.03 Release Candidate for Galaxy Nexus builds:

https://android-build.linaro.org/builds/~linaro-android/galaxynexus-linaro-14.03-release/#build=1

verified SD-MMC test cases:

https://wiki.linaro.org/Platform/QA/TestCases/Android#SD_.2F_MMC

root@maguro:/ # df
Filesystem Size Used Free Blksize
/dev 346.9M 136.0K 346.8M 4096
/sys/fs/cgroup 346.9M 12.0K 346.9M 4096
/mnt/asec 346.9M 0.0K 346.9M 4096
/mnt/obb 346.9M 0.0K 346.9M 4096
/system 503.9M 359.5M 144.4M 4096
/factory 19.7M 8.1M 11.6M 4096
/cache 425.2M 7.1M 418.1M 4096
/data 13.3G 424.1M 12.9G 4096
/mnt/shell/emulated 13.3G 424.1M 12.9G 4096
root@maguro:/ #

root@maguro:/ # echo $EXTERNAL_STORAGE
/storage/emulated/legacy
root@maguro:/ #

/storage/emulated/legacy is not in the output of "df".

However, data can be successfully written to /storage/emulated/legacy

root@maguro:/ # written_message="abcdefghijklmn"
 root@maguro:/ # echo $written_message > $EXTERNAL_STORAGE/sd-mmc-test.txt
 root@maguro:/ # echo $?
0
root@maguro:/ # cat $EXTERNAL_STORAGE/sd-mmc-test.txt
abcdefghijklmn
root@maguro:/ # cd $EXTERNAL_STORAGE
root@maguro:/storage/emulated/legacy # ls

sd-mmc-test.txt

df output Filesystem does not match with $EXTERNAL_STORAGE Partitions.

Reproduced the issue with:

https://android-build.linaro.org/builds/~linaro-android/galaxynexus-linaro-14.01-release/#build=2
https://android-build.linaro.org/builds/~linaro-android/galaxynexus-linaro-14.02-release/#build=11

Botao (botao-sun)
description: updated
vishal (vishalbhoj)
Changed in linaro-android:
status: New → Confirmed
assignee: nobody → HariGopal (harigopal-gollamudi)
description: updated
description: updated
Revision history for this message
Soumya Basak (soumya-basak) wrote :

the issue reproduced with Linaro Android 14.04 galaxy nexus build:

https://android-build.linaro.org/builds/~linaro-android/galaxynexus-14.04-release/#build=1

as described on comment #1.

Botao (botao-sun)
description: updated
Botao (botao-sun)
description: updated
Botao (botao-sun)
description: updated
Botao (botao-sun)
description: updated
Botao (botao-sun)
description: updated
Revision history for this message
Milosz Wasilewski (mwasilew) wrote :

Botao,
Please move this bug to Linaro bugzilla and close here.

Revision history for this message
Botao (botao-sun) wrote :

Done, bug has been moved to this one:

https://bugs.linaro.org/show_bug.cgi?id=244

Changed in linaro-android:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.