2008年9月5日 星期五

[Android] 如何把檔案丟到Emulator上

1. mksdcard 2147483648 sdcard.img,建立一個sdcard的影像檔(容量自訂)
2. 在eclipse的run config裡面,Target頁籤的Addition Emulator Options裡面加上「-sdcard sdcard.img」(路徑自己搞定)
3. adb push <你要上傳的檔案> /sdcard/<手機上的路徑名>

完工,Android可以用"/sdcard/"這個path找到他
順帶一提,「adb shell」可以當command line用
####

沒有留言:

CODE { display: block; /* fixes a strange ie margin bug */ font-family: Courier New; font-size: 8pt; overflow:auto; background: #f0f0f0 url(http://klcintw.images.googlepages.com/Code_BG.gif) left top repeat-y; border: 1px solid #ccc; padding: 10px 10px 10px 21px; max-height:200px; height:200px; // for IE6 line-height: 1.2em; } #quote { display: block; /* fixes a strange ie margin bug */ font-family: Verdana; font-size: 10pt; overflow:auto; background: #f7f7f7 url(http://lh5.ggpht.com/_z-VThISftkI/SXUlpyfw9ZI/AAAAAAAABYY/e3GUx9_Z4TE/s288/quote-l.gif) left top no-repeat; border: 4px dotted #ccc; padding: 15px 15px 15px 31px; /*up right bottom left*/ max-height:300px; line-height: 1.2em; }