Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error=13, Permission denied (Android Q) #31

Open
assuricare opened this issue Oct 11, 2019 · 12 comments
Open

error=13, Permission denied (Android Q) #31

assuricare opened this issue Oct 11, 2019 · 12 comments

Comments

@assuricare
Copy link

assuricare commented Oct 11, 2019

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.

@beinghassandar1
Copy link

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

@fmiguelmmartins
Copy link

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

@Ravipatel401
Copy link

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

@jhui20130703
Copy link

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

@Ravipatel401
Copy link

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

@Wisdozzh
Copy link

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

@ajaykeshri03
Copy link

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

@yyms3275
Copy link

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

@sammi06
Copy link

sammi06 commented May 27, 2021

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
Copy link

sammi06 commented May 27, 2021

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

@Ravipatel401
Copy link

Ravipatel401 commented May 27, 2021 via email

@zwc456baby
Copy link

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

Android Q 内部运行二进制文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants