Halium / projectmanagement

143 stars 32 forks source link

[device-port] [clovertrail] Port to ASUS Zenfone 5 (T00F/T00J) #25

Open IlyaBizyaev opened 7 years ago

IlyaBizyaev commented 7 years ago

Currently I have a working rootfs and a running Android in the LXC container. However, all of the tests result in a segfault. I attach strace of test_audio and test_vibrator, as well as logcat and dmesg output of the running system, including when the tests where launched.

logs_audio_vib.tar.gz

IlyaBizyaev commented 7 years ago

Any ideas?

jbruechert commented 7 years ago

I rebuilt libhybris again to make sure it's built against the correct and latest android-headers from Halium. I added the build configuration below to check if anything is not correct.

libhybris-xenial-i386.zip

------------------------------------------------------------------------
libhybris 0.1.0
------------------------------------------------------------------------

Configuration Options:

  debug build.............: no

  trace...................: no

  experimental features...: yes

  prefix..................: /usr

  arch  ..................: x86

  headers path ...........: 

  Android version.........: 7.1.1

  default egl platform ...: null

  default ld_library_path.: /vendor/lib:/system/lib

Features:

  stub linker.............: no

  Ubuntu linker overrides.: no
IlyaBizyaev commented 7 years ago

This build seems to be worse as it uses jb.so and manages to open less files than the previous one.

jbruechert commented 7 years ago

I would really like to know what the difference there is... I haven't really changed anything.

IlyaBizyaev commented 7 years ago

Last time you patched it to build new features on non-ARM. Have you used that patch this time?

jbruechert commented 7 years ago

Yes, experimental features are enabled in the build configuration.

IlyaBizyaev commented 7 years ago

Weird...

IlyaBizyaev commented 7 years ago

Logs (you can diff them): libhybris-rebuild.zip

bhush9 commented 7 years ago

Pasting individual log here just for reference:

root@localhost:~# strace test_vibrator
execve("/usr/bin/test_vibrator", ["test_vibrator"], [/* 15 vars */]) = 0
brk(NULL)                               = 0x93fa000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77b4000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=27515, ...}) = 0
mmap2(NULL, 27515, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77ad000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libvibrator.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\4\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=5380, ...}) = 0
mmap2(NULL, 8236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb77aa000
mmap2(0xb77ab000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xb77ab000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260O\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=134864, ...}) = 0
mmap2(NULL, 115296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb778d000
mmap2(0xb77a6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0xb77a6000
mmap2(0xb77a8000, 4704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb77a8000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\207\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1786484, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb778c000
mmap2(NULL, 1792540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75d6000
mmap2(0xb7786000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1af000) = 0xb7786000
mmap2(0xb7789000, 10780, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7789000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libhybris-common.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340^\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=71576, ...}) = 0
mmap2(NULL, 74992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75c3000
mmap2(0xb75d3000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb75d3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13828, ...}) = 0
mmap2(NULL, 16488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75be000
mmap2(0xb75c1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb75c1000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\30\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30660, ...}) = 0
mmap2(NULL, 33304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75b5000
mmap2(0xb75bc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0xb75bc000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libandroid-properties.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\r\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13716, ...}) = 0
mmap2(NULL, 24676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75ae000
mmap2(0xb75b1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb75b1000
mmap2(0xb75b3000, 4196, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb75b3000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ad000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ac000
set_thread_area({entry_number:-1, base_addr:0xb75ac740, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 (entry_number:6)
mprotect(0xb7786000, 8192, PROT_READ)   = 0
mprotect(0xb75b1000, 4096, PROT_READ)   = 0
mprotect(0xb77a6000, 4096, PROT_READ)   = 0
mprotect(0xb75bc000, 4096, PROT_READ)   = 0
mprotect(0xb75c1000, 4096, PROT_READ)   = 0
mprotect(0xb75d3000, 4096, PROT_READ)   = 0
mprotect(0xb77ab000, 4096, PROT_READ)   = 0
mprotect(0x8049000, 4096, PROT_READ)    = 0
mprotect(0xb77d9000, 4096, PROT_READ)   = 0
munmap(0xb77ad000, 27515)               = 0
set_tid_address(0xb75ac7a8)             = 2147
set_robust_list(0xb75ac7b0, 12)         = 0
rt_sigaction(SIGRTMIN, {0xb77919c0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7791a40, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sysname="Linux", nodename="localhost.localdomain", ...}) = 0
brk(NULL)                               = 0x93fa000
brk(0x941b000)                          = 0x941b000
socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/socket/property_service"}, 31) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/system/build.prop", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3190, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3190, ...}) = 0
read(3, "\n# begin build properties\n# auto"..., 4096) = 3190
read(3, "", 4096)                       = 0
open("/proc/cmdline", O_RDONLY)         = 4
read(4, "init=/init pci=noearly console=t"..., 1023) = 487
close(4)                                = 0
close(3)                                = 0
futex(0xb75c2040, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/i386-linux-gnu/libhybris/linker/mm.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 `\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=157988, ...}) = 0
mmap2(NULL, 162732, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7584000
mprotect(0xb75a9000, 4096, PROT_NONE)   = 0
mmap2(0xb75aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0xb75aa000
close(3)                                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=27515, ...}) = 0
mmap2(NULL, 27515, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77ad000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\303\6\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1521032, ...}) = 0
mmap2(NULL, 1532512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb740d000
mprotect(0xb757a000, 4096, PROT_NONE)   = 0
mmap2(0xb757b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16d000) = 0xb757b000
mmap2(0xb7581000, 8800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7581000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200 \0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=114560, ...}) = 0
mmap2(NULL, 117652, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73f0000
mmap2(0xb740c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0xb740c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220E\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=341948, ...}) = 0
mmap2(NULL, 344144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb739b000
mmap2(0xb73ee000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0xb73ee000
close(3)                                = 0
mprotect(0xb73ee000, 4096, PROT_READ)   = 0
mprotect(0xb757b000, 20480, PROT_READ)  = 0
mprotect(0xb75aa000, 4096, PROT_READ)   = 0
munmap(0xb77ad000, 27515)               = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb77b3000
prctl(0x53564d41 /* PR_??? */, 0, 0xb77b3000, 0x1000, 0xb759f538) = 0
open("/vendor/lib/libhardware_legacy.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libhardware_legacy.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34324, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libhardware_legacy.s"..., 4096) = 33
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b2000
mmap2(NULL, 45056, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7390000
mmap2(0xb7390000, 28148, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7390000
mmap2(0xb7398000, 4133, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0xb7398000
mmap2(0xb739a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb739a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb77b1000
prctl(0x53564d41 /* PR_??? */, 0, 0xb77b1000, 0x1000, 0xb759f538) = 0
munmap(0xb77b2000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libcutils.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libcutils.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=124772, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libcutils.so", 4096) = 24
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b2000
mmap2(NULL, 131072, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7370000
mmap2(0xb7370000, 117488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7370000
mmap2(0xb738e000, 4476, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1d000) = 0xb738e000
munmap(0xb77b2000, 4096)                = 0
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb77b2000
prctl(0x53564d41 /* PR_??? */, 0, 0xb77b2000, 0x1000, 0xb759f538) = 0
open("/vendor/lib/liblog.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/liblog.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=63280, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/liblog.so", 4096) = 21
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb735f000
mmap2(0xb735f000, 59324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb735f000
mmap2(0xb736e000, 4428, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0xb736e000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libwpa_client.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libwpa_client.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17852, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libwpa_client.so", 4096) = 28
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 24576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7359000
mmap2(0xb7359000, 13640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7359000
mmap2(0xb735d000, 4104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0xb735d000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libnetutils.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libnetutils.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=30204, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libnetutils.so", 4096) = 26
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 36864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7350000
mmap2(0xb7350000, 24072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7350000
mmap2(0xb7357000, 4116, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0xb7357000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libc++.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libc++.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=984696, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libc++.so", 4096) = 21
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 995328, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb725d000
mmap2(0xb725d000, 965420, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb725d000
mmap2(0xb734a000, 16424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xec000) = 0xb734a000
mmap2(0xb734f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb734f000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libc.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1150748, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libc.so", 4096) = 19
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 1044480, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb715e000
mmap2(0xb715e000, 984964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb715e000
mmap2(0xb7250000, 18376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf1000) = 0xb7250000
mmap2(0xb7255000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7255000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libm.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libm.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=222724, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libm.so", 4096) = 19
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 229376, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7126000
mmap2(0xb7126000, 216896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7126000
mmap2(0xb715c000, 4148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x35000) = 0xb715c000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
sysinfo({uptime=412, loads=[99488, 61856, 28800], totalram=2073436160, freeram=1601695744, sharedram=0, bufferram=16494592, totalswap=0, freeswap=0, procs=222, totalhigh=1242509312, freehigh=842981376, mem_unit=1}) = 0
mprotect(0xb7398000, 4096, PROT_READ)   = 0
mprotect(0xb738e000, 4096, PROT_READ)   = 0
mprotect(0xb736e000, 4096, PROT_READ)   = 0
mprotect(0xb735d000, 4096, PROT_READ)   = 0
mprotect(0xb7357000, 4096, PROT_READ)   = 0
mprotect(0xb734a000, 16384, PROT_READ)  = 0
mprotect(0xb7250000, 12288, PROT_READ)  = 0
mprotect(0xb715c000, 4096, PROT_READ)   = 0
futex(0xb7257078, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mprotect(0xb77b1000, 4096, PROT_READ)   = 0
mprotect(0xb77b2000, 4096, PROT_READ)   = 0
socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/socket/property_service"}, 31) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/system/build.prop", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|064Segmentation fault
root@localhost:~# strace test_vibrator
execve("/usr/bin/test_vibrator", ["test_vibrator"], [/* 15 vars */]) = 0
brk(NULL)                               = 0x93fa000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77b4000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=27515, ...}) = 0
mmap2(NULL, 27515, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77ad000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libvibrator.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\4\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=5380, ...}) = 0
mmap2(NULL, 8236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb77aa000
mmap2(0xb77ab000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xb77ab000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260O\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=134864, ...}) = 0
mmap2(NULL, 115296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb778d000
mmap2(0xb77a6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0xb77a6000
mmap2(0xb77a8000, 4704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb77a8000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\207\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1786484, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb778c000
mmap2(NULL, 1792540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75d6000
mmap2(0xb7786000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1af000) = 0xb7786000
mmap2(0xb7789000, 10780, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7789000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libhybris-common.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340^\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=71576, ...}) = 0
mmap2(NULL, 74992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75c3000
mmap2(0xb75d3000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0xb75d3000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13828, ...}) = 0
mmap2(NULL, 16488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75be000
mmap2(0xb75c1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb75c1000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\30\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30660, ...}) = 0
mmap2(NULL, 33304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75b5000
mmap2(0xb75bc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0xb75bc000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libandroid-properties.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\r\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13716, ...}) = 0
mmap2(NULL, 24676, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb75ae000
mmap2(0xb75b1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xb75b1000
mmap2(0xb75b3000, 4196, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb75b3000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ad000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ac000
set_thread_area({entry_number:-1, base_addr:0xb75ac740, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 (entry_number:6)
mprotect(0xb7786000, 8192, PROT_READ)   = 0
mprotect(0xb75b1000, 4096, PROT_READ)   = 0
mprotect(0xb77a6000, 4096, PROT_READ)   = 0
mprotect(0xb75bc000, 4096, PROT_READ)   = 0
mprotect(0xb75c1000, 4096, PROT_READ)   = 0
mprotect(0xb75d3000, 4096, PROT_READ)   = 0
mprotect(0xb77ab000, 4096, PROT_READ)   = 0
mprotect(0x8049000, 4096, PROT_READ)    = 0
mprotect(0xb77d9000, 4096, PROT_READ)   = 0
munmap(0xb77ad000, 27515)               = 0
set_tid_address(0xb75ac7a8)             = 2147
set_robust_list(0xb75ac7b0, 12)         = 0
rt_sigaction(SIGRTMIN, {0xb77919c0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7791a40, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sysname="Linux", nodename="localhost.localdomain", ...}) = 0
brk(NULL)                               = 0x93fa000
brk(0x941b000)                          = 0x941b000
socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/socket/property_service"}, 31) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/system/build.prop", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3190, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3190, ...}) = 0
read(3, "\n# begin build properties\n# auto"..., 4096) = 3190
read(3, "", 4096)                       = 0
open("/proc/cmdline", O_RDONLY)         = 4
read(4, "init=/init pci=noearly console=t"..., 1023) = 487
close(4)                                = 0
close(3)                                = 0
futex(0xb75c2040, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/i386-linux-gnu/libhybris/linker/mm.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 `\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=157988, ...}) = 0
mmap2(NULL, 162732, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7584000
mprotect(0xb75a9000, 4096, PROT_NONE)   = 0
mmap2(0xb75aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0xb75aa000
close(3)                                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=27515, ...}) = 0
mmap2(NULL, 27515, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77ad000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\303\6\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1521032, ...}) = 0
mmap2(NULL, 1532512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb740d000
mprotect(0xb757a000, 4096, PROT_NONE)   = 0
mmap2(0xb757b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16d000) = 0xb757b000
mmap2(0xb7581000, 8800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7581000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200 \0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=114560, ...}) = 0
mmap2(NULL, 117652, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb73f0000
mmap2(0xb740c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0xb740c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220E\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=341948, ...}) = 0
mmap2(NULL, 344144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb739b000
mmap2(0xb73ee000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0xb73ee000
close(3)                                = 0
mprotect(0xb73ee000, 4096, PROT_READ)   = 0
mprotect(0xb757b000, 20480, PROT_READ)  = 0
mprotect(0xb75aa000, 4096, PROT_READ)   = 0
munmap(0xb77ad000, 27515)               = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb77b3000
prctl(0x53564d41 /* PR_??? */, 0, 0xb77b3000, 0x1000, 0xb759f538) = 0
open("/vendor/lib/libhardware_legacy.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libhardware_legacy.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34324, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libhardware_legacy.s"..., 4096) = 33
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b2000
mmap2(NULL, 45056, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7390000
mmap2(0xb7390000, 28148, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7390000
mmap2(0xb7398000, 4133, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0xb7398000
mmap2(0xb739a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb739a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb77b1000
prctl(0x53564d41 /* PR_??? */, 0, 0xb77b1000, 0x1000, 0xb759f538) = 0
munmap(0xb77b2000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libcutils.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libcutils.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=124772, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libcutils.so", 4096) = 24
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b2000
mmap2(NULL, 131072, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7370000
mmap2(0xb7370000, 117488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7370000
mmap2(0xb738e000, 4476, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1d000) = 0xb738e000
munmap(0xb77b2000, 4096)                = 0
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0xb77b2000
prctl(0x53564d41 /* PR_??? */, 0, 0xb77b2000, 0x1000, 0xb759f538) = 0
open("/vendor/lib/liblog.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/liblog.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=63280, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/liblog.so", 4096) = 21
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb735f000
mmap2(0xb735f000, 59324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb735f000
mmap2(0xb736e000, 4428, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xe000) = 0xb736e000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libwpa_client.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libwpa_client.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=17852, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libwpa_client.so", 4096) = 28
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 24576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7359000
mmap2(0xb7359000, 13640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7359000
mmap2(0xb735d000, 4104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0xb735d000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libnetutils.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libnetutils.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=30204, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libnetutils.so", 4096) = 26
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 36864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7350000
mmap2(0xb7350000, 24072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7350000
mmap2(0xb7357000, 4116, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0xb7357000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libc++.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libc++.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=984696, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libc++.so", 4096) = 21
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 995328, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb725d000
mmap2(0xb725d000, 965420, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb725d000
mmap2(0xb734a000, 16424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xec000) = 0xb734a000
mmap2(0xb734f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb734f000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libc.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1150748, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libc.so", 4096) = 19
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 1044480, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb715e000
mmap2(0xb715e000, 984964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb715e000
mmap2(0xb7250000, 18376, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf1000) = 0xb7250000
mmap2(0xb7255000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7255000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
open("/vendor/lib/libm.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/system/lib/libm.so", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=222724, ...}) = 0
readlink("/proc/self/fd/3", "/system/lib/libm.so", 4096) = 19
pread64(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\0\0\0004\0\0\0"..., 52, 0) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77b0000
mmap2(NULL, 229376, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7126000
mmap2(0xb7126000, 216896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7126000
mmap2(0xb715c000, 4148, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x35000) = 0xb715c000
munmap(0xb77b0000, 4096)                = 0
close(3)                                = 0
sysinfo({uptime=412, loads=[99488, 61856, 28800], totalram=2073436160, freeram=1601695744, sharedram=0, bufferram=16494592, totalswap=0, freeswap=0, procs=222, totalhigh=1242509312, freehigh=842981376, mem_unit=1}) = 0
mprotect(0xb7398000, 4096, PROT_READ)   = 0
mprotect(0xb738e000, 4096, PROT_READ)   = 0
mprotect(0xb736e000, 4096, PROT_READ)   = 0
mprotect(0xb735d000, 4096, PROT_READ)   = 0
mprotect(0xb7357000, 4096, PROT_READ)   = 0
mprotect(0xb734a000, 16384, PROT_READ)  = 0
mprotect(0xb7250000, 12288, PROT_READ)  = 0
mprotect(0xb715c000, 4096, PROT_READ)   = 0
futex(0xb7257078, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mprotect(0xb77b1000, 4096, PROT_READ)   = 0
mprotect(0xb77b2000, 4096, PROT_READ)   = 0
socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/dev/socket/property_service"}, 31) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/system/build.prop", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3190, ...}) = 0
close(3)                                = 0
open("/sys/class/timed_output/vibrator/enable", O_RDWR) = 3
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV +++
Segmentation fault4, st_size=3190, ...}) = 0
close(3)                                = 0
open("/sys/class/timed_output/vibrator/enable", O_RDWR) = 3
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
+++ killed by SIGSEGV +++
Segmentation fault

We at least know that it loads the HAL libraries correctly, because it at least reaches to point till it writes the sysfs file.

IlyaBizyaev commented 7 years ago

@JBBgameich I'll try to build those packages myself. Could you please send me your local changes?

jbruechert commented 7 years ago

I think the source package is included in the zip file (it's the DSC file)

IlyaBizyaev commented 7 years ago

Oh cool, how do I create a dsc from modified sources?

jbruechert commented 7 years ago

The debian build system does it automatically when building from the source directory. If you want to build only the source package, use dpkg-buildpackage -S. I don't know if you already extracted the dsc, but in case you haven't, it can be done using dpkg-source -x file.dsc

IlyaBizyaev commented 7 years ago

I have all of the DSCs extracted and tweaked, which command should I issue to build the .deb's?

jbruechert commented 7 years ago

dpkg-buildpackage, but if you aren't building on I386 ubuntu xenial, use dpkg-buildpackage -S and build the generated dsc using pbuilder or sbuild. It automatically creates a chroot for the target system and builds inside.

IlyaBizyaev commented 7 years ago

Sources extracted from repo.halium.org DSCs seem to be a lot older than yours. Where can I get newer sources?

jbruechert commented 7 years ago

Just download a newer version of the source code http://github.com/libhybris/libhybris as tarball. Place the tarball in the parent directory of the extracted source, where the old tarball already is. Rename it to libhybris_0.1.0+git$DATE.orig.tar.gz the go to the source code dir, run dch and add the new version to the changelog.

IlyaBizyaev commented 7 years ago

When building libhybris, pbuilder installs android-headers-19, so I guess that's where the problem is.

jbruechert commented 7 years ago

You need to add the Halium repository to it, or install the headers package manually. pbuilder login --save-after-exec --save-after-login

bhush9 commented 7 years ago

Btw, mind you, you don't want to use repo.halium.org directly, but http://repo.halium.org/generic for your build.

IlyaBizyaev commented 7 years ago

Thank you for your help! :) I managed to build libhybris and got the functionality restored to JBB's previous build. However, I still need help progressing further.

IlyaBizyaev commented 7 years ago

I tried getting more debug information, but this is all I can get: libSegFault.txt

jbruechert commented 7 years ago

I think I used the libhybris/libhybris repo for the last build, which didn't have all the Halium patches merged at the time. That was the reason for the wrong linker. The patches are now merged upstream, so you can use the sources from there without problems

IlyaBizyaev commented 7 years ago

It's interesting that I used --enable-debug and --enable-trace for libhybris, but there are no debug symbols :)

jbruechert commented 7 years ago

They should be built as a separate package, is there some with -dbg or -dpgsym in the build folder?

IlyaBizyaev commented 7 years ago

No, there are no such packages...

IlyaBizyaev commented 7 years ago

I think the problem is there are no files that specify how debug packages should be built and where to put the debug symbols.

jbruechert commented 7 years ago

Newer versions of debhelper do the debug package creation themselves, but the one in Ubuntu Xenial maybe not.

IlyaBizyaev commented 7 years ago

Finally got the debug packages built and installed (apt install pkg-create-dbgsym solved the issue). Better stack traces:

1)

#3  0x0804852b in vibrator_open (device=0xbffff72c, module=<optimized out>) at /usr/include/android/hardware/vibrator.h:68
#4  main (argc=1, argv=0xbffff7e4) at test_vibrator.c:41

2) return module->methods->open(module, VIBRATOR_DEVICE_ID_MAIN, (struct hw_device_t**)device);

3)

test_lights.c:43
notifications->set_light(notifications, &notification_state) == 0);
android_input_stack_initialize (n1=0xbffff728, n2=0xbffff730) at is.c:39

4) The best I have is

#0  0xb7ba2840 in soinfo::call_constructors (this=0xb77ca23c) at linker.cpp:2228

for test_egl_configs.

How do I move on?

IlyaBizyaev commented 7 years ago

As I mentioned on Telegram, I fixed the main issue and got test_vibration and test_lights` working. Graphics is now a priority.

Today with some help from others I got a lot further in troubleshooting. I found out that there is a tool named pvrsrvctl that enables me to control PowerVR services and is seemingly responsible for launching them.

root@localhost:~# /system/vendor/bin/pvrsrvctl --start            
Failed to load /system/modules/pvrsrvkm.ko: No such file or directory

root@localhost:~# /system/vendor/bin/pvrsrvctl --start --no-module
/system/vendor/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)

root@localhost:~# /system/vendor/bin/pvrsrvctl --stop              
Failed to unload drmlfb: No such file or directory

It searches for modules in /system/modules (while they are built into the kernel or in /system/lib/modules), but the required modules are still launched when the container starts, so I'm not sure if it is a problem.

Most importantly, after this strace log:

open("/dev/card0", O_RDWR)              = -1 ENOENT (No such file or directory)
clock_gettime(CLOCK_REALTIME, {1507830819, 871601407}) = 0
getuid32()                              = 0
gettid()                                = 11706
writev(3, [{"\0\272-#\254\337Y\377\224\3633", 11}, {"\6", 1}, {"IMGSRV\0", 7}, {":0: OpenServices: drmOpen failed"..., 34}], 4) = 53
nanosleep({0, 500000000}, 0xbf9bc278)   = 0

 - I got advice to try creating a symlink from /dev/dri/card0 to /dev/card0. And it works! test_egl_config manages to print the configuration, and EGL_PLATFORM=hwcomposer test_hwcomposer clears the screen, prints OpenGL ES 2.0 ((null)) and then enters a loop with this log:

10-12 18:24:48.656     0 18580 E IMGSRV  : :0: gralloc_module_createfence: Failed to alloc fence
10-12 18:24:48.656     0 18580 E IMGSRV  : :0: QueueCancelBufferWrapper: Failed to create buffer sync object
10-12 18:24:48.657     0 18580 E IMGSRV  : :0: AllocNativeFence: PVR_SYNC_IOC_ALLOC_FENCE ioctl failed

With fbdev, I get a segfault (fbDev=NULL dereferenced, and it doesn't seem to be initialized anywhere indeed).

So yeah, big news! :D

IlyaBizyaev commented 7 years ago

The problematic ioctl is DRM_IOCTL_RADEON_GEM_SET_DOMAIN.

Also, new logs.

logcat:

10-13 06:55:27.977     0  8422 W hwcomposer: _drmModeConnector* IntelHWComposerDrm::getConnector(int): fail to get required connector
10-13 06:55:27.978     0  8422 W hwcomposer: bool IntelHWComposerDrm::detectDisplayConnection(int): fail to get drm connector

hwcomposer: virtual bool IntelHDMIDisplayDevice::commit(hwc_display_contents_1_t*, const native_handle_t**, int*, int**, int&): HDMI does not connected (printed constantly)

dmsg:

[ 2532.537134] [drm:psb_unlocked_ioctl] *ERROR* Invalid drm cmnd 35 ioctl->cmd 0, cmd c00c6463 (printed constantly)

strace (in a loop):

connect(239, {sa_family=AF_LOCAL, sun_path="/dev/socket/property_service"}, 31) = -1 ENOENT (No such file or directory)
...
ioctl(6, DRM_IOCTL_RADEON_GEM_SET_DOMAIN, 0xbf8676a4) = -1 EINVAL (Invalid argument)
IlyaBizyaev commented 7 years ago

Reverting to LineageOS's settings for graphics does not change anything. The kernel keeps blaming incoming ioctls for a while, then says there are no fd's to connect to left, and then the test returns desperately.

To me it seems that the problem is related to some permission limits that prevent Android from creating required folders, files and opening sockets.

IlyaBizyaev commented 7 years ago

After studying the init files, I'm now sure there is a problem preventing Android from working with files. For example, there are lines that are expected to create a /dev/card0 symlink for /dev/dri/card0 and set proper permissions, but I actually had to create a udev rule for that, as the target did not exist. I don't not understand why performing all these actions works when using /system/bin/sh inside the container, though.

IlyaBizyaev commented 7 years ago

Also, I have OpenGL string printed as (null) by the test, which is quite unusual...

IlyaBizyaev commented 7 years ago

I think the blobs may be a problem, trying different combinations with Moorefield blobs. Also, got Intel Houdini, ARM translator, working.

IlyaBizyaev commented 7 years ago

I finally moved a bit forward — fixed that ioctl. It turned out it was related to HDMI: libs were trying to use ioctl that is only defined when HDMI support is enabled in the kernel. However, HDMI is not something I want to use now :)

I think the device is trying to get some information, thus reading /dev/socket/property_service and failing. Maybe it doesn't know HDMI should not be used :)

As it is trying to flush image to HDMI, the process fd's exceed some limit, and test_hwcomposer cannot do anything meaningful.

The logs are same, apart from the gone error that was replaced by this:

[  140.985639] MRSTLFBFlipTimerFn: swapchain is not empty, flush queue
[  140.985711] [drm] 
               1.level1 interrupt status
[  140.985730] [drm] PSB_INT_MASK_R mask 0x1f279fbd
[  140.985759] [drm] PSB_INT_ENABLE_R mask 0x180040
[  140.985795] [drm] dev_priv->vdc_irq_mask = 0x180040

[  140.985837] [drm] 2.level2 interrupt register
[  140.985853] [drm] pipe 0 config 0xf9100000 status 0x607
[  140.985861] [drm] pipe 1 config 0x0 status 0x0

[  140.985876] [drm] 3.check irq and workqueue relationship
[  140.985884] [drm] vsync_te trouble: [  140.985629]
[  140.985893] [drm] pipe 0 last vsync_te irq: [  140.738258]
[  140.985903] [drm] pipe 0 last vsync_te workqueue : [  140.738271]
[  140.985914] [drm] pipe 0 workqueue be delayed : [    0.000013]
[  140.985925] [drm] pipe 0 vsync te missing 247ms !

[  140.985938] [drm] pipe 1 last vsync_te irq: [    0.000000]
[  140.985948] [drm] pipe 1 last vsync_te workqueue : [    0.000000]
[  140.985964] [drm] pipe 1 workqueue be blocked : [  140.985960]

[  140.985976] [drm] pipe 1 vsync te missing 140985ms !

Seems to me I have to dive into kernel sources again... But enough for the weekend :)

IlyaBizyaev commented 6 years ago

So, graphics works now! A bunch of patches was needed, currently hanging are: https://github.com/libhybris/libhybris/pull/370 https://github.com/libhybris/libhybris/pull/369 https://github.com/libhybris/libhybris/pull/363 https://github.com/halium-packaging/libhybris/pull/3 https://github.com/Halium/android_bionic/pull/3 https://github.com/Halium/android_bionic/pull/4 https://github.com/Halium/android_external_busybox/pull/1

IlyaBizyaev commented 6 years ago

Remaining are: https://github.com/libhybris/libhybris/pull/370 https://github.com/libhybris/libhybris/pull/369 https://github.com/libhybris/libhybris/pull/363 https://github.com/Halium/android_bionic/pull/4

IlyaBizyaev commented 6 years ago

All of the changes have been merged; the port is in a state when the device is ready for real distribution testing. The target is Plasma Mobile, but KDE Neon Mobile CI does not provide i386 builds. My current study load does not let me build all the necessary packages, so I'll probably have to wait for official builds or distribute efforts in a larger time span...

Gorbulya commented 5 years ago

How is it going? Did something happen or was your job terminated?

jbruechert commented 5 years ago

This issue wasn't updated, but later debian was used on the device instead of KDE Neon. You can find the i386 rootfs here: https://archive.kaidan.im/debian-pm/images/halium/plasma-mobile/

Gorbulya commented 5 years ago

Have a video review?

Gorbulya commented 5 years ago

How much do you rate usability?

IlyaBizyaev commented 5 years ago

Don't expect much of this port, it was done just to get Plasma Mobile running. It is nowhere near a daily driver, and as the device is old now (mine has some hardware problems), I am unlikely to invest much more time into it.

Gorbulya commented 5 years ago

I am understand, thanks. Do you think ubuntu mobile have a perspective?