这个是自己写的demo学习的时候可以看下写法
1.
首先是在手机上安装cydia框架:
2.导入这个包
![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A52%3A2.png?version=1&modificationDate=1419321464892&api=v2)
3.配置android mainfast.xml文件(参考我的demo)
4.已知我的扫雷里面有一个类,类下面有一方法getblocknumbe r![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A53%3A49.png?version=1&modificationDate=1419321464908&api=v2)
![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A53%3A49.png?version=1&modificationDate=1419321464908&api=v2)
5.开始编写我们的代码
①
关键点1 包名,类名
![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A54%3A24.png?version=1&modificationDate=1419321464908&api=v2)
②
方法名
![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A54%3A59.png?version=1&modificationDate=1419321464923&api=v2)
③
得到原返回值,改值,返回
![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A55%3A30.png?version=1&modificationDate=1419321464923&api=v2)
④ 看一下手机上的substrate 点击 unlink substrate files 再点击 link substrate files 再点restart system
⑤然后看下效果![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A57%3A48.png?version=1&modificationDate=1419321464939&api=v2)
![](http://192.168.0.244:8090/download/attachments/18220397/image2014-12-23%2015%3A57%3A48.png?version=1&modificationDate=1419321464939&api=v2)