0
votes

I was trying to write to /sys/class/switch/hdmi/state but i got permission denied error.

# echo 0 > /sys/class/switch/hdmi/state                                 
/system/bin/sh: can't create /sys/class/switch/hdmi/state: Permission denied

I searched online and found the below answer.

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

My question is, where do i set this permission? If android_manifest.xml, then which one? there are a lot of android_manifest files.

To your main app manifest not to any library if you are using. One more thing one app have only one manifest file until unless you use any libraryAadesh Mishra
@AadeshMishra: But I'm not using any app. I just wanted to see if my HDMI will get turned off if i gave /sys/class/switch/hdmi/state 0.Sourabrt
If you use adb shell to execute this command, maybe you should execute adb root before you enter adb shell to execute the above command.utzcoz