adrielcafe / AndroidAudioConverter

Convert audio files inside your Android app easily. Supported formats: AAC, MP3, M4A, WMA, WAV and FLAC.
1.33k stars 254 forks source link

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

Open assuricare opened 4 years ago

assuricare commented 4 years ago

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 commented 4 years ago

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

fmiguelmmartins commented 4 years ago

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

Ravipatel401 commented 4 years ago

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

jhui20130703 commented 4 years ago

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

Ravipatel401 commented 4 years ago

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

Wisdozzh commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Ravipatel401 commented 3 years ago

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 .

zwc456baby commented 2 years ago

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

Android Q 内部运行二进制文件