if you have wifi in home, it is easy to share media files via nfs instead of copying files to sd card(sd card is unstable with fat filesystem, crashed if you unconnect it when copying files)

1. overview

pc:

ubuntu 10.04

phone:

htc magic android 2.2.1

kernel 2.6.35-9

mod version cyanogenmod-6.1.0-DS

android mount command do not support nfs,compile busybox for mount command using toolchains that support eabi(known as arm-eabi-*)

2. details

2.1 pc:

1. configure nfs server

1.1 #sudo apt-get install nfs-kernel-server nfs-common portmap

1.2 #sudo dpkg-reconfigure portmap

after run, choose no

1.3 edit /etc/exports

/nfs-share *(rw, sync)

1.4 update exports

#sudo exportfs -r

1.5 restart nfs service

#service portmap restart

#service /etc/init.d/nfs-kernel-server restart

1.6 test mount in local pc

#sudo mount NFS-SERVER-IP:/nfs-share /MOUNT-POINT

check by mount, if mounted, then umount it.

#umount /MOUNT-POINT

2.2 build busybox

2.2.1. download busyboxhttp://busybox.net/downloads/busybox-1.18.0.tar.bz2

2. 2.2 configure your toolchain environment, for example

#export PATH=/YOUR-CROSS-COMPILER-BIN-PATH:$PATH

2.2.3 make, asume prefix of cross compiler is "arm-linux-"

#make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig

(1) . select built option "Build BusyBox as a static binary(no shared libs)"

(2). installation options "Don't use /usr"

#make ARCH=arm CROSS_COMPILE=arm-linux-

and then make install to "./_install"

2.3 copy busybox to your phone

2.3.1 make sure you have install android sdk, if installed, put tools to your PATH

for example: export PATH=/media/develop/android-sdk/android-sdk-linux_86/tools:$PATH

2.3.2 connect phone to pc using usb cable, and enable USB debugging(Settings/Application/Development)

#adb usb

#adb shell

#mkdir /data/busybox

#exit

#adb push ./_install/ /data/busybox/

#adb shell

#export PATH=/data/busybox/bin:/data/busybox/sbin:$PATH

now, you can test in shell to mount your pc share

#mkdir /sdcard/server

#mount -t nfs NFS-SERVER-IP:/nfs-share /sdcard/server -o nolock

2.4 mount in phone

install Terminal Emulator, set initial command to export busybox bin path. same in adb shell.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. 浅谈Android中的MVP架构
  2. Android:Clipboard剪切板简单的使用
  3. Android常用设计模式(工厂设计模式)
  4. 都9102年了,Android(安卓)冷启动优化除了
  5. 赠书福利《Android(安卓)全埋点解决方案
  6. [Android] 图像处理整合之处理ColorMatri
  7. android -- sim/usim卡导联系人
  8. Android(安卓)dp,px,sp之间的转换
  9. Android如何通过parcelable实现跨进程之
  10. 【Android】27.0 UI开发(九)——Android五