XiaoMi / nnlib

Fork of https://source.codeaurora.org/quic/hexagon_nn/nnlib
BSD 3-Clause Clear License
54 stars 11 forks source link

CANNOT LINK EXECUTABLE "/data/local/tmp/hexagon_nn/controller_test": library "libhexagon_controller.so" not found" #12

Open bbd2015 opened 4 years ago

bbd2015 commented 4 years ago

I follow the read me to run all the command, and I get the "cannot link ..." error when run "adb shell "LD_LIBRARY_PATH=/data/local/tmp/hexagon_nn /data/local/tmp/hexagon_nn/controller_test", is any possible problem here to fix it? Thanks.

lee-bin commented 4 years ago

@bbd2015 libhexagon_controller.so should be pushed to the phone in /data/local/tmp/hexagon_nn

bbd2015 commented 4 years ago

@lee-bin After I pushed libhexagon_controller.so, I run adb shell another time, it failed. Any idea I can trace this problem. Thanks.

lee-bin commented 4 years ago

@bbd2015 Is it the same error?

bbd2015 commented 4 years ago

@lee-bin Not the same error, the new error is 'failed.'

lee-bin commented 4 years ago

@bbd2015 Please copy/paste the full log here.

bbd2015 commented 4 years ago

@lee-bin Please refer to all information as below, thanks!

~/Qualcomm/Hexagon_SDK/nnlib$ adb shell "LD_LIBRARY_PATH=/data/local/tmp/hexagon_nn /data/local/tmp/hexagon_nn/controller_test" Failed.

lee-bin commented 4 years ago

Please copy/paste the log of adb logcat

bbd2015 commented 4 years ago

--------- beginning of main 05-31 23:57:55.499 831 831 W health@2.0-serv: type=1400 audit(0.0:4818): avc: denied { search } for name="wireless" dev="sysfs" ino=78406 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs_wireless_supply:s0 tclass=dir permissive=0 05-31 23:57:55.507 830 987 I LocSvc_BatteryListener: operator():153] healthInfo cb thread: cb CHARGING 05-31 23:57:55.507 816 2186 I audio_hw::BatteryListener: healthInfo cb thread: cb CHARGING 05-31 23:57:55.507 816 2186 I audio_hw_primary: adev_on_battery_status_changed: battery status changed to charging 05-31 23:57:55.507 816 2186 D sound_trigger_hw: handle_battery_status_change: battery status changed to 1 05-31 23:57:55.508 2790 2790 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0 05-31 23:57:55.508 4008 4008 I BatteryInfoReceiver: ACTION_BATTERY_CHANGED 05-31 23:57:55.509 5086 5248 D PowerCheckerService: onBatteryChanged, mBatteryLevel = 100, status = 5, level = 100, plug = 1, scale = 100 05-31 23:57:55.509 5086 5086 D PowerChecker_DayPower: battery status = 5 plug = 1 level = 100 05-31 23:57:55.509 5086 5272 D ThermalTempInfoHelper: thermal sensor board temp is 30731 --------- beginning of system 05-31 23:57:55.510 2457 2457 I MiuiChargeManager: notifyBatteryStatusChanged: status: 5 isPlugged: 1 level: 100 wireState: 11 chargeSpeed: 0 mWiredChargeType: 1 mWirelessChargeType: 0 chargeDeviceType: -1 05-31 23:57:55.509 5086 5272 D ThermalTempInfoHelper: thermal sensor board temp is 30731 05-31 23:57:55.510 2457 2457 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED 05-31 23:57:55.510 2457 2457 D KeyguardUpdateMonitor: handleBatteryUpdate 05-31 23:57:55.511 2457 2457 I MiuiChargeController: checkBatteryStatus: chargeType 11 status 5 plugged 1 isRapidCharge false isSuperCharge false isCarMode false mChargeDeviceType -1 mChargeDeviceForAnalytic -1 05-31 23:57:55.511 2457 2457 I KeyguardIndication: updateIndication: mVisible false mDozing false mTransientIndication null mPowerPluggedIn true mUpArrowIndication Swipe up to unlock 05-31 23:58:00.001 2457 2457 D KeyguardUpdateMonitor: handleTimeUpdate 05-31 23:58:00.022 944 1698 D BufferQueueLayer: Launcher new frame Arrived 05-31 23:58:00.033 944 1698 D BufferQueueLayer: Launcher new frame Arrived 05-31 23:58:00.519 15880 15880 W controller_test: type=1400 audit(0.0:4819): avc: denied { search } for name="nativetest" dev="dm-5" ino=8 scontext=u:r:shell:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0 05-31 23:58:00.519 15880 15880 W controller_test: type=1400 audit(0.0:4820): avc: denied { search } for name="nativetest64" dev="dm-5" ino=9 scontext=u:r:shell:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0 05-31 23:58:00.519 15880 15880 W controller_test: type=1400 audit(0.0:4821): avc: denied { search } for name="nativetest" dev="dm-5" ino=8 scontext=u:r:shell:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0 05-31 23:58:00.519 15880 15880 W controller_test: type=1400 audit(0.0:4822): avc: denied { search } for name="nativetest64" dev="dm-5" ino=9 scontext=u:r:shell:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0 05-31 23:58:00.519 15880 15880 W controller_test: type=1400 audit(0.0:4823): avc: denied { search } for name="nativetest" dev="dm-5" ino=8 scontext=u:r:shell:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0 05-31 23:58:00.519 15880 15880 W controller_test: type=1400 audit(0.0:4824): avc: denied { search } for name="nativetest64" dev="dm-5" ino=9 scontext=u:r:shell:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=dir permissive=0 05-31 23:58:00.530 15880 15880 E adsprpc : remote.c:35:Invoking stubbed routine - Return failure 05-31 23:58:00.530 15880 15880 E adsprpc : remote.c:40:Invoking stubbed routine - Return failure

lee-bin commented 4 years ago

hexnn_controller_request_unsigned_pd() should be called to use unsigned PD on phone with secure boot on.

bbd2015 commented 4 years ago

@lee-bin After updating MIUI, controller_test finally succeeded. Thanks!