Hi Diego,
Thanks for the information.
But my issue is different, I have disabled the BCM Wifi modules which comes with the android BSP and loaded my Custom driver modules successfully,then I am using custom compiled binary[ onebox_util ]for enabling Wifi protocol but, I am unable to execute that binary from .cpp file.
The same "onebox_util" is working when I am trying to execute from android terminal.But I want to excute this utility when I turn "ON" Wi-Fi from GUI.
My Code in "wifi_hal_common.cpp" file is :
FILE *fp;
const char *wifi_get_fw_path(int fw_type) {
switch (fw_type) {
case WIFI_GET_FW_PATH_STA:
PLOG(ERROR) << "****************In WIFI_GET_FW_PATH_STA*********";
fp=fopen("/system/lib/onebox_util rpine0 enable_protocol 1","r");
if(fp==NULL)
{
PLOG(ERROR) << "could not open onebox_util...fp is NULL";
}
fclose(fp);
PLOG(ERROR) << "Trying to execute the same with system call";
system("onebox_util rpine0 enable_protocol 1");
return NULL;
case WIFI_GET_FW_PATH_AP:
return WIFI_DRIVER_FW_PATH_AP;
case WIFI_GET_FW_PATH_P2P:
return WIFI_GET_FW_PATH_P2P;
}
return NULL;
}
When I am trying to "ON" Wi-Fi from GUI, I am getting the following prints:
android.hardware.wifi@1.0-service: Rtype=1400 audit(280.710:41): avc: denied { execute_no_trans } for pid=1552 comm="sh" path="/system/bin/onebox_util" dev="mmcblk2p3"
01-01 00:05:01.531 280 280 I android.hardware.wifi@1.0-service: Wifi HAL started
01-01 00:05:01.540 280 280 E android.hardware.wifi@1.0-service: ****************In WIFI_GET_FW_PATH_STA*********: No such device
01-01 00:05:01.540 280 280 E android.hardware.wifi@1.0-service: could not open onebox_util...fp is NULL: No such file or directory
01-01 00:05:01.540 280 280 E android.hardware.wifi@1.0-service: Trying to execute the same with system call: No such file or directory
and in BoardConfig.mk I have given the following:
BOARD_KERNEL_CMDLINE := console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,fbpix=RGB32,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=128M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=448M galcore.contiguousSize=33554432 enforcing=0 androidboot.selinux=permissive androidboot.dm_verity=disable
Do you any idea about this?
Regards
Susan