AnsweredAssumed Answered

Android8.0.1 permission problem

Question asked by coin du on Dec 20, 2018
Latest reply on Jan 22, 2019 by Eric Cheng

Hi ALL:

     The bluetooth turn on  need to use wcnss_filter . When i got the wcnss_filter source file and push the file to /vendor/bin after compiled succuess. I found it can`t create file on /data directory . Only read permission access.

     How to do it  if I wan`t create file on any directory 

 

init.freescale.rc

service start_hci_filter /vendor/bin/wcnss_filter
class late_start
user bluetooth
group bluetooth diag
disabled

 

wcnss_filter/main.c

 

ALOGV("%s: open: %s", __func__, PROC_PANIC_PATH);
fd_sysrq = open(PROC_PANIC_PATH, O_RDWR);     ##PROC_PANIC_PATH set to /data/sysrq-trigger
if(fd_sysrq < 0) {
ALOGE("%s: open (%s) fail - %s (%d)", __func__,
PROC_PANIC_PATH, strerror(errno), errno);
return -1;
}

Outcomes