title: ACCESS PERMISSION to read "/sys/class/power_supply/Battery/current_now" in Android Studio (Huawei P20)
body: <p>everyone. I tried to access file "/sys/class/power_supply/Battery/current_now" to retrieve the battery current in Huawei P20.</p>
  
  <pre><code>f =  File("/sys/class/power_supply/Battery/current_now");
  if (f.exists()) {
    return OneLineReader.getValue(f, true)
  </code></pre>
  
  <p>However i get the error of </p>
  
  <p><strong>java.io.FileNotFoundException: /sys/class/power_supply/Battery/current_now: open failed: EACCES (Permission denied)</strong></p>
  
  <p>i already grant permission of read and write to storage.</p>
  
  <pre><code>private val PERMISSIONS_STORAGE = arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)
  
  fun verifyStoragePermissions(activity: Activity) {
      // Check if we have write permission
      val permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE)
  
      if (permission != PackageManager.PERMISSION_GRANTED) {
          // We don't have permission so prompt the user
          ActivityCompat.requestPermissions(
                  activity,
                  PERMISSIONS_STORAGE,
                  REQUEST_EXTERNAL_STORAGE
          )
      }
  }
  </code></pre>
  
  <p>Anyone has the hint for this problem?</p>