Search code examples
androidlinuxfile-permissionsfedoraandroid-sdcard

MP3 file not getting pushed into Android SD card in Fedora Linux


I am developing an android app in which I am developing an content observer for Audio.Media.EXTERNAL_CONTENT_URI.

I am using Fedora 17 with Eclipse and API level 17 Android Jelly Bean.

Now the problem is that for debugging purposes when while the application is running on emulator I am pushing some mp3 files in /mnt/sdcard. So here it is giving problem mentioned below.

I know this problem is related to file permissions, but how to target it? I am not understanding it.

[2013-04-11 23:14:06 - Unexpected error while launching logcat. Try reselecting the device.] device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
    at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:752)
    at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
    at com.android.ddmlib.Device.executeShellCommand(Device.java:462)
    at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:110)
    at java.lang.Thread.run(Thread.java:722)

[2013-04-11 23:18:46 - ddms] transfer error: Read-only file system
[2013-04-11 23:18:46] Failed to push selection: Read-only file system
[2013-04-11 23:25:43 - ddms] transfer error: Read-only file system
[2013-04-11 23:25:43] Failed to push selection: Read-only file system
[2013-04-11 23:26:26 - ddms] transfer error: Read-only file system
[2013-04-11 23:26:26] Failed to push selection: Read-only file system

Solution

  • Try to do an adb remount.

    In case it does not work, the ro.secure property might be the problem, in this case try :

    adb shell
    su
    # In root user mode
    mount -o rw,remount /mnt/sdcard