Mock-ril:
Install:
The protoc is now part of the Android build but its
called "aprotoc" so it doesn't conflict with versions
already installed. If you wish to install it permanetly
see external/protobuf/INSTALL.txt and
external/protobuf/python/README.txt. If you get
"from google.protobuf import xxxx" statements that
google.protobuf is not found, you didn't install the
python support for protobuf. Also on Mac OSX I got an
error running the protoc tests but installing was fine.
Running/testing:
See "Testing a new ril:" below for general instructions but
for the mock-ril I've added some targets to the Makefile to
ease testing. Also Makefile needs to know the device being
used as this determines the directory where files are found
and stored. ANDROID_DEVICE is an environment variable and
maybe either exported:
$ export ANDROID_DEVICE=stingray
or it can be passed on the command line:
$ make clean ANDROID_DEVICE=stingray
If it's not set "passion" is the default.
Execute the "first" target first to setup appropriate
environment:
$ cd hardware/ril/mock-ril
$ make first
If changes made to ".proto" files run make with the default
"all" target:
$ make
If changes are made to "c++" file create a new library and
run the "test" target:
$ mm
$ make test
If changes to only the execute "js" target:
$ make js
To run the test control server:
$ make tcs
Implementation:
The mock-ril is a library where the ril is implemented primarily
in javascript, mock-ril.js. In addition it can be controlled by
sending messages from another computer to port 54312 (TODO make
programmable) to the ctrlServer, a Worker in In mock-ril.js.
See mock_ril.js for additional documentation.
files:
ctrl.proto Protobuf messages for the control server
ctrl.* Protobuf generated files.
ctrl_pb2.py Python files generated from ctrl.proto
ctrl_server.* Cpp interface routines between ctrlServer
in javascript and the controller.
experiments.* Early experiments
js_support.* Java script support methods. Exposes various
routines to javascript, such as print, readFile
and include.
logging.h LOG_TAG and include utils/log.h
mock_ril.[cpp|h] Main module inteface code.
mock_ril.js The mock ril
node_buffer.* A Buffer for communicating between c++ and js.
This was ported from nodejs.org.
node_object.* An object wrapper to make it easier to expose
c++ code to js. Ported from nodejs.org.
node_util.* Some utilities ported from nodejs.org.
protobuf_v8.* Protobuf code for javascript ported from
http://code.google.com/p/protobuf-for-node/.
requests.* Interface code for handling framework requests.
responses* Interface code for handling framework responses.
ril.proto The protobuf version of ril.h
ril_vars.js Some additional variables defined for enums in
ril.h.
ril_pb2.py Python files generated from ril.proto.
status.h STATUS constants.
tcs.py Test the ctrlServer.
util.* Utility routines
worker.* Define WorkerThread and WorkerQueue.
worker_v8.* Expose WorkerQueue to js.
TODO: more documentation.
Testing a new ril:
The Makefile is used to generate files and make testing easier.
and there are has several targets:
all runs protoc and generates files, ril.desc ril.pb.*
clean target removes generated files.
first changes to root, remounts r/w and copies some files.
test copies the latest libmock_ril.so and kills rild
to run the new mockril
General instructions for testing ril's:
1) On the device login in as root and remount file system so it's read/write:
$ adb root
restarting adbd as root
$ adb remount
remount succeeded
2) Set rild.libpath to the name of the ril:
adb shell setprop rild.libpath /system/lib/libmock_ril.so
Using setprop makes the change temporary and the old ril will be
used after rebooting. (Another option is to set rild.libpath in
/data/local.prop, but don't forget to reboot for it to take effect).
3) Compile and copy the ril to /system/lib/:
adb push out/target/product/passion/system/lib/libmock_ril.so /system/lib/
4) To restart the ril, kill the currently running ril and the new one
will automatically be restarted. You can use the ps command to find
/system/bin/rild PID, 3212 below and kill it:
$ adb shell ps | grep rild
radio 3212 1 3224 628 ffffffff afd0e4fc S /system/bin/rild
$ adb shell kill 3212
or
$ adb shell setprop ctl.restart ril-daemon
5) Make modifications, go to step 3.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Android 源码 RIL层 (101个子文件)
reference-ril.c 65KB
atchannel.c 25KB
rild.c 8KB
at_tok.c 4KB
radiooptions.c 3KB
misc.c 974B
config 347B
ril.cpp 104KB
responses.cpp 21KB
node_buffer.cpp 20KB
protobuf_v8.cpp 20KB
requests.cpp 18KB
ctrl_server.cpp 16KB
msgheader.pb.cpp 13KB
js_support.cpp 12KB
worker.cpp 11KB
ril_event.cpp 10KB
experiments.cpp 10KB
mock_ril.cpp 10KB
worker_v8.cpp 7KB
node_util.cpp 4KB
util.cpp 3KB
description 73B
exclude 240B
.gitignore 15B
ril.h 124KB
ril_cdma_sms.h 30KB
ril_commands.h 8KB
msgheader.pb.h 7KB
atchannel.h 4KB
node_buffer.h 4KB
worker.h 4KB
node_object_wrap.h 3KB
ril_unsol_commands.h 3KB
requests.h 2KB
node_util.h 2KB
js_support.h 2KB
responses.h 2KB
ril_event.h 1KB
status.h 1KB
util.h 1KB
at_tok.h 1004B
worker_v8.h 995B
ctrl_server.h 917B
protobuf_v8.h 821B
experiments.h 821B
logging.h 817B
mock_ril.h 795B
misc.h 794B
ril.h 32B
ril.h 26B
HEAD 216B
HEAD 216B
HEAD 32B
HEAD 23B
pack-ba9c7b75a3e4957af72bd5b1ff7f1047cb0305f2.idx 50KB
index 7KB
Msg.java 9KB
RilChannel.java 4KB
simulated_radio.js 46KB
simulated_radio_tests.js 15KB
ril_vars.js 14KB
mock_ril.js 10KB
ctrl_server.js 7KB
simulated_icc.js 6KB
simulated_icc_tests.js 658B
mock_ril_tests.js 658B
ctrl_server_tests.js 658B
Makefile 5KB
master 216B
master 41B
CleanSpec.mk 2KB
Android.mk 2KB
Android.mk 1KB
Android.mk 785B
Android.mk 627B
MODULE_LICENSE_APACHE2 0B
MODULE_LICENSE_APACHE2 0B
MODULE_LICENSE_APACHE2 0B
MODULE_LICENSE_APACHE2 0B
NOTICE 12KB
NOTICE 11KB
NOTICE 11KB
NOTICE 11KB
pack-ba9c7b75a3e4957af72bd5b1ff7f1047cb0305f2.pack 1.33MB
packed-refs 7KB
ril.proto 14KB
ctrl.proto 2KB
msgheader.proto 333B
tcs.py 6KB
pre-rebase.sample 5KB
update.sample 4KB
pre-commit.sample 2KB
prepare-commit-msg.sample 1KB
commit-msg.sample 896B
post-receive.sample 552B
applypatch-msg.sample 452B
pre-applypatch.sample 398B
post-update.sample 189B
post-commit.sample 160B
共 101 条
- 1
- 2
资源评论
- steviey2012-12-01调试数据卡,参考一下
- M--2012-12-05不错的资源 现在需要ril的资料 还不错
- 红尘六欲2013-01-25调试3G模块,参考一下.
- foxsnowdm2012-12-05非常好的资源,正好需要这个。
- 981011st2015-04-26做AT命令需要这个作参考,谢谢
wangyistudy
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于STM32使用HAL库实现USB组合设备之多路CDC源码+说明文档.zip
- 金融贸易项目springboot
- mybatis动态sqlSQL 映射 XML 文件是所有 sql 语句
- 基于基于STM32的智能家居系统源码+qt上位机源码.zip
- 深圳房地产资源数据报告
- 基于stm32的智能门禁系统源码+设计文档+演示视频.zip
- cef + chromium 完整源码支持h265和h264
- 基于SpringBoot的API管理平台源代码+数据库,以项目的形式管理API文档,可以进行API的编辑、测试、Mock等操作
- protobuf 3.11版本,静态编译
- 2023NOC创客智慧编程赛项真题图形化-选拔赛(有解析)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功