博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

关于sip的研究----关于模拟器调试sip

Posted on 2012-01-16 10:19  Mr_Su  阅读(873)  评论(0编辑  收藏  举报

根据项目需要,最近在研究sip协议和sipdroid的源码

我看很多朋友提到使用2.3以上模拟器调试的时候,SipManager为空

 

if (manager == null) {
manager = SipManager.newInstance(this);//manager 为null
}

 

 

是因为模拟器不支持sip,所以只有用以下办法修改framework 重新编译IMG文件

 

1. Make the system partition writeable. Open a cmd window and enter these:

emulator -avd <avdname> -partition-size 128
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system

2. Enable SIP support:

Copy 2 XMLs from AOSP into text files: android.software.sip.xmlandroid.software.sip.voip.xml, and copy XMLs to the emulator:

adb push android.software.sip.voip.xml /system/etc/permissions
adb push android.software.sip.xml /system/etc/permissions

3. Disable config_sip_wifi_only in config.xml: <bool name="config_sip_wifi_only">false</bool>

The repacked resource file can be found here (for SDK 2.3.3, API level: 10). Copy it to the emulator:

adb push framework-res.apk /system/framework

4. Close emulator and start it again in normal mode.

 

或者这里直接下载编译好的IMG文件 

http://xilard.hu/emulator233_sip_files/system.img

然后拷贝到你建的2.3的模拟器目录里  \.android\avd\<avdname>.avd  



继续研究sip...以后还会陆续更新.