AndroidAudioConverter icon indicating copy to clipboard operation
AndroidAudioConverter copied to clipboard

error=13, Permission denied (Android Q)

Open assuricare opened this issue 6 years ago • 12 comments

Android Q has introduced some breaking changes with folder/file permissions. I get the following error when using the converter on Android:

java.io.IOException: Cannot run program "/data/user/0/com.ltcfastpay.timecard.debug/files/ffmpeg": error=13, Permission denied

I had the same problem with the AndroidAudioRecorder and found that the following method of getting the file path was deprecated in Android Q:

Environment.getExternalStorageDirectory().getPath() To fix I had to change this to:

this.getActivity().getFilesDir().getAbsolutePath()

So now I am able to record and save as wav but when I try to convert to mp3 I get the permission denied.

I have tried to make changes to the AndroidAudioConverter.java file but its locked in Android Studio which tells me that I probably should not be tampering with it.

assuricare avatar Oct 11 '19 15:10 assuricare

hello, I have got the same issue with same exception.... any news about the fix ?

beinghassandar1 avatar Oct 21 '19 09:10 beinghassandar1

Same here Caused by: java.io.IOException: error=13, Permission denied

fmiguelmmartins avatar Feb 15 '20 22:02 fmiguelmmartins

Did anyone find the solution ? stuck at 29 level android....

Ravipatel401 avatar Jun 03 '20 13:06 Ravipatel401

I encountered the same problem as you, have you solved it?

jhui20130703 avatar Jul 23 '20 03:07 jhui20130703

Not Found solution yet... if anybody found then... share with us...

Ravipatel401 avatar Jul 25 '20 05:07 Ravipatel401

From Android Q onwards, you cannot execute binaries in your app's private data directory. From the issuetracker: https://issuetracker.google.com/issues/128554619

Change only on Build.gradle file targetSdkVersion 29 to 28 and Re-Install your app on your device - It is resolved your permission issue for temporary because of the targetSdkVersion 29 is required platform for released build on play store so I suggest to you use this library

Wisdozzh avatar Sep 23 '20 07:09 Wisdozzh

still I am getting this error Caused by: java.io.IOException: error=13, Permission denied
after executing from android Application. If i run from command line its working. But running on rooted device it not working

ajaykeshri03 avatar Mar 08 '21 13:03 ajaykeshri03

Android Q has introduced some breaking changes with folder/file permissions. I get the following error when using the converter on Android:

java.io.IOException: Cannot run program "/data/user/0/com.ltcfastpay.timecard.debug/files/ffmpeg": error=13, Permission denied

I had the same problem with the AndroidAudioRecorder and found that the following method of getting the file path was deprecated in Android Q:

Environment.getExternalStorageDirectory().getPath() To fix I had to change this to:

this.getActivity().getFilesDir().getAbsolutePath()

So now I am able to record and save as wav but when I try to convert to mp3 I get the permission denied.

I have tried to make changes to the AndroidAudioConverter.java file but its locked in Android Studio which tells me that I probably should not be tampering with it.

I solved the same problem as below. I solved the problem by using a different library.

https://github.com/tanersener/mobile-ffmpeg

yyms3275 avatar May 13 '21 05:05 yyms3275

Android Q has introduced some breaking changes with folder/file permissions. I get the following error when using the converter on Android: java.io.IOException: Cannot run program "/data/user/0/com.ltcfastpay.timecard.debug/files/ffmpeg": error=13, Permission denied I had the same problem with the AndroidAudioRecorder and found that the following method of getting the file path was deprecated in Android Q: Environment.getExternalStorageDirectory().getPath() To fix I had to change this to: this.getActivity().getFilesDir().getAbsolutePath() So now I am able to record and save as wav but when I try to convert to mp3 I get the permission denied. I have tried to make changes to the AndroidAudioConverter.java file but its locked in Android Studio which tells me that I probably should not be tampering with it.

I solved the same problem as below. I solved the problem by using a different library.

https://github.com/tanersener/mobile-ffmpeg

How you have solved this i am using library suggested by You.. Not Working

sammi06 avatar May 27 '21 09:05 sammi06

Kindly Tell how u have solved? Using https://github.com/tanersener/mobile-ffmpeg

sammi06 avatar May 27 '21 09:05 sammi06

Yes, it has been resolved using https://github.com/tanersener/mobile-ffmpeg

On Thu, May 27, 2021 at 3:11 PM sammi06 @.***> wrote:

Kindly Tell how u have solved? Using https://github.com/tanersener/mobile-ffmpeg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adrielcafe/AndroidAudioConverter/issues/31#issuecomment-849492023, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2RM3LEBLJCHSN7MCGBQYDTPYHSZANCNFSM4I727RIA .

Ravipatel401 avatar May 27 '21 11:05 Ravipatel401

Android Q高版本二进制无法运行解决方案:

Android Q 内部运行二进制文件

zwc456baby avatar Mar 19 '22 03:03 zwc456baby