Forums - Unable to add watcher for folder /vendor/lib/rfsa/adsp : errno is Permission denied

4 posts / 0 new
Last post
Unable to add watcher for folder /vendor/lib/rfsa/adsp : errno is Permission denied
likai2
Join Date: 27 Dec 22
Posts: 24
Posted: Mon, 2023-04-03 00:14

Hi,

I'm tring to set DSP env path in Android native code,

bool SetAdspLibraryPath(std::string nativeLibPath) {
    std::stringstream path;
    path << nativeLibPath << ";/system/lib/rfsa/adsp;/system/vendor/lib/rfsa/adsp;/dsp";
    return setenv("ADSP_LIBRARY_PATH", path.str().c_str(), 1 /*override*/) == 0;
}

After that logcat output:

 E  vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:3087: Error 0xd: open_shell failed for domain 3 search paths used are /dsp/, /vendor/dsp/, /vendor/dsp/xdsp/ (errno Permission denied)

 E  vendor/qcom/proprietary/adsprpc/src/log_config.c:576:Error : Unable to add watcher for folder /vendor/lib/rfsa/adsp : errno is Permission denied

How to get permissions for these system dirs?

Thanks for reply!

 

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sat, 2023-04-08 06:21

Dear developer,

Could you pls help to disable your selinux permission with commands of "setenforce 0" and run it again?

If it works with above settings, that's to way you need to add permission to your app.

BR.

Wei

  • Up0
  • Down0
likai2
Join Date: 27 Dec 22
Posts: 24
Posted: Mon, 2023-04-10 19:27

Dear Weihuan,

Thank you for your reply.

But I have other question. Which permission(s) need be set in my Android app? Would you give me a hint please?

BR

  • Up0
  • Down0
likai2
Join Date: 27 Dec 22
Posts: 24
Posted: Sun, 2023-04-23 01:27

Dear weihuan,

I tired to disable selinux on my android device by command 'adb shell setenforce 0 '. 

The device show 'setenforce: Couldn't set enforcing status to '0': Permission denied'.

 On Android development offical site: 

Caution: Permissive mode is not supported on production devices. CTS tests confirm enforcing mode is enabled.

So how to disable selinux on released/retailed products?

Thanks 

BR

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.