=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.07.04 10:45:07 =~=~=~=~=~=~=~=~=~=~=~=
root@x86:/data # cat /proc/sys/kernel/core_pattern /data/77/%e-%p-%t.core
root@x86:/data # ls -al |grep 77drwxrwxrwx root root 2017-07-04 01:54 77
root@x86:/data # cat /proc/sys/fs/suid_dumpable 1
root@x86:/data # ulimit -atime(cpu-seconds) unlimited
file(blocks) unlimitedcoredump(blocks) 0data(KiB) unlimitedstack(KiB) 8192lockedmem(KiB) 64nofiles(descriptors) 1024processes 23853sigpending 23853msgqueue(bytes) 819200maxnice 40maxrtprio 0resident-set(KiB) unlimitedaddress-space(KiB) unlimited
root@x86:/data # dfFilesystem Size Used Free Blksize/ 1.5G 2.4M 1.5G 4096/system 37.4G 1.3G 36.1G 4096/data 37.4G 1.3G 36.1G 4096/dev 1.5G 24.0K 1.5G 4096/sys/fs/cgroup 1.5G 12.0K 1.5G 4096/mnt/asec 1.5G 0.0K 1.5G 4096/mnt/obb 1.5G 0.0K 1.5G 4096/cache 1.5G 0.0K 1.5G 4096/mnt/shell/emulated 37.4G 1.3G 36.1G 4096/data/77 37.4G 47.9M 37.4G 4096
root@x86:/data # /system/bin/testcore
Hello test core.Segmentation fault 139|root@x86:/data # ls /data/77/*/data/77/1.txt
root@x86:/data # mounttmpfs / tmpfs ro,relatime 0 0
/dev/block/sda1 /system ext4 rw,relatime,data=ordered 0 0/dev/block/sda1 /data ext4 rw,relatime,data=ordered 0 0tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0devpts /dev/pts devpts rw,relatime,mode=600 0 0proc /proc proc rw,relatime 0 0sysfs /sys sysfs rw,relatime 0 0debugfs /sys/kernel/debug debugfs rw,relatime 0 0none /acct cgroup rw,relatime,cpuacct 0 0none /sys/fs/cgroup tmpfs rw,relatime,mode=750,gid=1000 0 0tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0none /dev/cpuctl cgroup rw,relatime,cpu 0 0pstore /sys/fs/pstore pstore rw,relatime 0 0none /cache tmpfs rw,nosuid,nodev,noatime 0 0/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0/dev/block/sda7 /data/77 ext4 rw,relatime,data=ordered 0 0
root@x86:/data # dfFilesystem Size Used Free Blksize
/ 1.5G 2.4M 1.5G 4096/system 37.4G 1.3G 36.1G 4096/data 37.4G 1.3G 36.1G 4096/dev 1.5G 24.0K 1.5G 4096/sys/fs/cgroup 1.5G 12.0K 1.5G 4096/mnt/asec 1.5G 0.0K 1.5G 4096/mnt/obb 1.5G 0.0K 1.5G 4096/cache 1.5G 0.0K 1.5G 4096/mnt/shell/emulated 37.4G 1.3G 36.1G 4096/data/77 37.4G 47.9M 37.4G 4096root@x86:/data # exit
root@x86:/ #
I've solved it. I'll give you the idea
Meet a friend who has a similar problem
1,kernel config
CONFIG_ELF_CORE =y CONFIG_COREDUMP=y
2, android executable program should include liblog,libcutils,libutils
I don't know the real reason, but if you write a very simple program that doesn't have a core file generated, you should add the library just mentioned.