Chinaunix首页 | 论坛 | 博客
  • 博客访问: 446526
  • 博文数量: 145
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1060
  • 用 户 组: 普通用户
  • 注册时间: 2013-08-22 11:52
个人简介

专注计算机技术: Linux Android 云计算 虚拟化 网络

文章分类

全部博文(145)

文章存档

2016年(3)

2015年(21)

2014年(75)

2013年(46)

我的朋友

分类: Android平台

2015-03-28 07:39:59

On Feb 11, 7:07 am, Mike Edenfield <kut@kutulu.org> wrote:

A fault address of deadbaad is a signal that your problem is a corrupt
memory heap.  The error's going to come from libc, but that's just
because libc's memory management routines are what ultimately triggered
the fault, not because libc itself is buggy.  The most likely cause is
somewhere in your code that you're calling free() or delete on something
you don't own, or have already released.  That's causing heap corruption
that breaks things later on down the road.


Actually, deadbaad is what the libc abort() function uses to kill the
process.  99% of the time the code calling abort() is in malloc/free,
but it's certainly possible that something else could be calling it.

My recommendation to anyone doing native development is to make sure
CheckJNI is enabled (it's on by default in the emulator, and you can
turn it on with "setprop dalvik.vm.checkjni true ; stop ; start" on a
rooted device).  You can also try some of the enhanced memory checking
modes.  "setprop libc.debug.malloc 10" will turn on some native heap
malloc guards, and "setprop dalvik.vm.jniopts forcecopy" will add some
memory buffer protection to CheckJNI.

           

在android系统中,有一些初始化的配置文件,例如:

/init.rc

/default.prop

/system/build.prop

文件里面里面配置了开机设置的系统属性值,

 

这些属性值,可以通过getprop获取,setprop设置,

它的格式如下:

getprop [key]

获取指定key的配置值,如果不带参数,只是getprop则是显示系统所有的配置值。


[dalvik.vm.heapsize]: [24m]

[curlockscreen]: [1]

[ro.sf.hwrotation]: [0]

[ro.config.notification_sound]: [OnTheHunt.ogg]

[ro.config.alarm_alert]: [Alarm_Classic.ogg]

setprop [key] [value]
设置指定key的属性值,
watchprops
监听系统属性的变化,如果期间系统的属性发生变化则把变化的值显示出来
/system # watchprops 
1307501833 sys.settings_system_version = '37'
1307501836 sys.settings_system_version = '38'
1307501862 persist.sys.timezone = 'Asia/Hong_Kong'
其实这三个命令都是toolbox的子命令,如果有兴趣的可以看在android源码中看到其对应的源码:
system/core/toolbox/
阅读(679) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~