포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.
Code: |
cp ${android_sdk}/tools/lib/images/ramdisk.img ${android_sdk}/tools/lib/images/ramdisk.img.old |
Code: |
mkdir ramdisk
cd ramdisk cat ${android_sdk}/tools/lib/images/ramdisk.img | gunzip | sudo cpio -i |
Code: |
sudo vim etc/qemu-init.sh |
Code: |
#!/system/bin/sh
# Some special case stuff for running under emulation qemu=`getprop ro.kernel.qemu` case "$qemu" in "1" ) ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up route add default gw 10.0.2.2 dev eth0 radio_ril=`getprop ro.kernel.android.ril` case "$radio_ril" in ttyS*) # a modem is emulated as a serial device ;; *) # no need for the radio interface daemon # telephony is entirely emulated in Java setprop ro.radio.noril yes stop ril-daemon ;; esac setprop net.eth0.dns1 10.0.2.3 setprop net.gprs.local-ip 10.0.2.15 setprop ro.radio.use-ppp no setprop ro.config.nocheckin yes setprop status.battery.state Slow setprop status.battery.level 5 setprop status.battery.level_raw 50 setprop status.battery.level_scale 9 stop dund stop usbd ;; esac |
Code: |
#!/system/bin/sh
# Some special case stuff for running under emulation qemu=`getprop ro.kernel.qemu` case "$qemu" in "1" ) if ifconfig eth1 up; then ifconfig eth1 down # Should we really check for eth1 that way? # DHCP - broken? # netcfg eth1 dhcp ifconfig eth1 192.168.1.2 netmask 255.255.255.0 up route add default gw 192.168.1.1 dev eth1 ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up setprop net.eth0.dns1 10.0.2.3 setprop net.eth1.dns1 10.0.2.3 setprop net.gprs.local-ip 192.168.1.2 else ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up route add default gw 10.0.2.2 dev eth0 setprop net.eth0.dns1 10.0.2.3 setprop net.gprs.local-ip 10.0.2.15 fi # Proxy support - broken too? # setprop net.gprs.http-proxy http://proxy:8080/ # No longer needed # ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up # route add default gw 10.0.2.2 dev eth0 radio_ril=`getprop ro.kernel.android.ril` case "$radio_ril" in ttyS*) # a modem is emulated as a serial device ;; *) # no need for the radio interface daemon # telephony is entirely emulated in Java setprop ro.radio.noril yes stop ril-daemon ;; esac # no longer needed # setprop net.eth0.dns1 10.0.2.3 # setprop net.gprs.local-ip 10.0.2.15 setprop ro.radio.use-ppp no setprop ro.config.nocheckin yes setprop status.battery.state Slow # Interresting - is this the way to check battery status? setprop status.battery.level 5 setprop status.battery.level_raw 50 setprop status.battery.level_scale 9 stop dund stop usbd ;; esac |
Code: |
sudo find | sudo cpio -o -H newc | gzip -9 > ${android_sdk}/tools/lib/images/ramdisk.img |
Code: |
sudo brctl addbr br0
sudo tunctl -u $USER -t net_android sudo ifconfig eth0 0.0.0.0 promisc up sudo ifconfig net_android 0.0.0.0 promisc up sudo brctl addif br0 eth0 sudo brctl addif br0 net_android sudo dhclient3 br0 |
Code: |
${android_sdk}/tools/emulator -debug-kernel -qemu -net nic -net user -net nic -net tap,ifname=net_android |
Code: |
ping 192.168.2.2
adb shell |