AnsweredAssumed Answered

unable to execute ioctl in android oreo

Question asked by susangrace rapaka on Apr 23, 2018
Latest reply on May 11, 2018 by susangrace rapaka

Hi,

I am trying to execute a command using system call in Android oreo,in wifi_hal_common.cpp file, inside "int wifi_load_driver() {" function

system("./onebox_util rpine0 enable_protocol 1");

or

execl("/system/bin/onebox_util","onebox_util","rpine0","enable_protocol", "1",NULL);

both are not working.Please see the following logcat.

My module .ko's got inserted while booting, but I am unable to enable my custom wifi protocol.

Please anyone help me.

 

The logcat is:

 

01-01 00:02:05.490  1199  1199 I sh      : type=1400 audit(0.0:37): avc: denied { execute_no_trans } for path="/system/bin/onebox_util" dev="mmcblk2p3" ino=304 scontext=u:r:hal_wifi_default:s0 tcontext=u1
01-01 00:02:06.510   778   778 E android.hardware.wifi@1.0-service: Redpine in wifi_load_driver enabling protocol execl: Success
init: Service 'wifi_hal_legacy' (pid 778) exited with status 2
init: Sending signal 9 to service 'wifi_hal_legacy' (pid 778) process group...
01-01 00:02:06.541   402   461 E binder: release 778:778 transaction 30887 in, still active
HalDeviceManager: IWifi HAL servibinder: send failed reply for transaction 30887 to 402:474
ce died! Have a listener for it .init: kill(-778, 9) failed: No such process
.. cookie=0
01-01 00:02:06.541  init: Successfully killed process cgroup uid 1010 pid 778 in 6ms
 402   474 E HalDeviceManager: executeChipReconfiguration exceptiinit: starting service 'wifi_hal_legacy'...
on: android.os.RemoteException: HwBinder Error: (-32)
01-01 00:0init: property_set("ro.boottime.wifi_hal_legacy", "121656472346") failed: property already set
2:06.542   402   474 E HalDeviceManager: stopWifi exception: android.os.RemoteException: HwBinder Error: (-32)
01-01 00:02:06.542   402   474 E WifiNative-wlan0: Failed to start HAL for client mode
01-01 00:02:06.543   402   402 E WifiController: WifiControllerWifi turn on failed
01-01 00:02:06.545   402   474 W HalDeviceManager: stopWifi called but mWifi is null!?
01-01 00:02:06.545   402   474 I WifiVendorHal: Vendor Hal stopped
01-01 00:02:06.545   402   474 D WificondControl: tearing down interfaces in wificond
01-01 00:02:06.560   402   474 W HalDeviceManager: startWifi called but mWifi is null!?
01-01 00:02:06.560   402   474 W HalDeviceManager: stopWifi called but mWifi is null!?
01-01 00:02:06.560   402   474 E WifiNative-wlan0: Failed to start HAL for client mode
01-01 00:02:06.561   402   402 E WifiController: WifiControllerWifi turn on failed
01-01 00:02:06.570   402   474 W HalDeviceManager: stopWifi called but mWifi is null!?
01-01 00:02:06.570   402   474 I WifiVendorHal: Vendor Hal stopped

 

Regards

Susan

Outcomes