在sbox X86下面编译通过了PA的编译。但是PA比较古怪,不让在root下运行。
虽说 ~ # su -p - mobile -c pulseaudio& 可以跑
但是内部的检查机制,还是让PA当在了半道上
warning: cannot change to home directory
~ # Customer env set up.
E: core-util.c: Failed to stat home directory : No such file or directory
process 1635: dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
core-util.c中的代码,作祟。试图手动修改这些代码来绕过检查机制是行不通的,这样的检查函数有很多处。
看来得建立用户,在模拟器环境中,有些麻烦
static char *get_pulse_home(void) {
char *h;
struct stat st;
char *ret = NULL;
if (!(h = pa_get_home_dir_malloc())) {
pa_log_error("Failed to get home directory.");
return NULL;
}
if (stat(h, &st) < 0) {
pa_log_error("Failed to stat home directory %s: %s", h, pa_cstrerror(errno));
goto finish;
}
if (st.st_uid != getuid()) {
pa_log_error("Home directory %s not ours.", h);
errno = EACCES;
goto finish;
}
ret = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h);
finish:
pa_xfree(h);
return ret;
}