سؤال

I do android development, and i open coredump and set core file dump path to sdcard in file init.rc, use below code:

setrlimit 4 -1 -1
write /proc/sys/kernel/core_pattern /sdcard/core.%e.%p
write /proc/sys/fs/suid_dumpable 1

it do generates core file , but its size is 0. As below:

 mtk        0 2013-07-12 14:48 core.b2g.127

and i modify the code as below :

setrlimit 4 -1 -1
chmod 0777 /data/core/
write /proc/sys/kernel/core_pattern /data/core/core.%e.%p
write /proc/sys/fs/suid_dumpable 1

it can work well,as below:

mtk        280055 2013-07-12 15:28 core.b2g.127

why i store core file to sdcard occur the issue?

هل كانت مفيدة؟

المحلول

check the sd card mount correct or not and check also its properties about the sdcard (755), we may mount the sdcard to /mnt or something else when system boot up. method as below, in init.rc file , before below setting

setrlimit 4 -1 -1
write /proc/sys/kernel/core_pattern /mnt/sdcard/core.%e.%p
write /proc/sys/fs/suid_dumpable 1

do below setting:

mount /dev/mmcblk0p1 /mnt/sdcard
chmod 755 /mnt/sdcard.

i think it should be OK.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top