File cant be created on Asus Nexus 7 - android

i am developing on Asus nexus 7, and i am writing data to file on the internal storage. at run time i receive the below posted logcat output which casese the App
to terminate.
the same App tested against Samsung galaxx note 3 and it worked fine without crashing
i want to know how to fix these error when tesing against Asus nexux 7 and why that is happening.
Note: the required permission for writing on the external storage is added
please let me know what i am missing in the code
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
logcat:
: +++++ isExternalStorageMounted() +++++
11-26 15:53:51.329 24003-24003/com.example.com.bt_11 D/IOCtrl: isExternalStorageMounted(): -> media state: mounted
11-26 15:53:51.330 24003-24003/com.example.com.bt_11 D/IOCtrl: dir: /storage/emulated/0/CAN_BUS already exists
11-26 15:53:51.330 24003-24003/com.example.com.bt_11 D/IOCtrl: file: Test_00.txt will be created
11-26 15:53:51.330 24003-24003/com.example.com.bt_11 W/System.err: java.io.IOException: open failed: EACCES (Permission denied)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at java.io.File.createNewFile(File.java:939)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at com.example.com.bt_11.IOCtrl.createFile(IOCtrl.java:87)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at com.example.com.bt_11.ActConnect2$ATRx.onPreExecute(ActConnect2.java:844)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:604)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at com.example.com.bt_11.ActConnect2$ATConnect.onPostExecute(ActConnect2.java:702)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at com.example.com.bt_11.ActConnect2$ATConnect.onPostExecute(ActConnect2.java:574)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.os.AsyncTask.finish(AsyncTask.java:651)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.os.AsyncTask.-wrap1(AsyncTask.java)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.os.Looper.loop(Looper.java:148)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at java.lang.reflect.Method.invoke(Native Method)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
11-26 15:53:51.331 24003-24003/com.example.com.bt_11 W/System.err: at libcore.io.Posix.open(Native Method)
11-26 15:53:51.332 24003-24003/com.example.com.bt_11 W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
11-26 15:53:51.332 24003-24003/com.example.com.bt_11 W/System.err: at java.io.File.createNewFile(File.java:932)
11-26 15:53:51.332 24003-24003/com.example.com.bt_11 W/System.err: ... 14 more
11-26 15:53:51.332 24003-24003/com.example.com.bt_11 E/IOCtrl: <<createFile>>: Error creating file: open failed: EACCES (Permission denied)

Related

Connection refused in Android M while trying httprequest from Android Service

IOException
01-11 18:28:25.304 W/System.err: org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.42 refused
01-11 18:28:25.306 W/System.err: at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:193)
01-11 18:28:25.306 W/System.err: at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:169)
01-11 18:28:25.306 W/System.err: at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:124)
01-11 18:28:25.306 W/System.err: at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:370)
01-11 18:28:25.306 W/System.err: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
01-11 18:28:25.306 W/System.err: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
01-11 18:28:25.307 W/System.err: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:470)
01-11 18:28:25.307 W/System.err: at com.aceuat.sms.ACESMSGService.connectServerTeachr(ACESMSGService.java:213)
01-11 18:28:25.307 W/System.err: at com.aceuat.sms.ACESMSGService$1$1.run(ACESMSGService.java:103)
01-11 18:28:25.307 W/System.err: at java.lang.Thread.run(Thread.java:818)
01-11 18:28:25.307 W/System.err: Caused by: java.net.ConnectException: socket failed: EACCES (Permission denied)
01-11 18:28:25.307 W/System.err: at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
01-11 18:28:25.307 W/System.err: ... 9 more
01-11 18:28:25.307 W/System.err: Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
01-11 18:28:25.313 W/System.err: at libcore.io.IoBridge.socket(IoBridge.java:619)
01-11 18:28:25.313 W/System.err: at java.net.PlainSocketImpl.create(PlainSocketImpl.java:198)
01-11 18:28:25.314 W/System.err: at java.net.Socket.checkOpenAndCreate(Socket.java:689)
01-11 18:28:25.314 W/System.err: at java.net.Socket.connect(Socket.java:849)
01-11 18:28:25.314 W/System.err: at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:124)
01-11 18:28:25.314 W/System.err: at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:149)
01-11 18:28:25.314 W/System.err: ... 9 more
01-11 18:28:25.314 W/System.err: Caused by: android.system.ErrnoException: socket failed: EACCES (Permission denied)
01-11 18:28:25.314 W/System.err: at libcore.io.Posix.socket(Native Method)
01-11 18:28:25.314 W/System.err: at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:282)
01-11 18:28:25.314 W/System.err: at libcore.io.IoBridge.socket(IoBridge.java:604)
01-11 18:28:25.314 W/System.err: ... 14 more
01-11 18:28:40.280 I/ACES: Service is still running
Its Working fine in android lower versions.
As the Problem shows: You need to add internet access permission in the app.
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<application ...
</manifest>
And at last when app asks for internet access in popup allow the app to use internet!

while updating app from playstore i am getting the error "Caused by: java.lang.ClassNotFoundException: android.net.ZeroBalanceHelper"

while updating app from playstore I'm getting the error..
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available 09-02 17:10:03.586 11866-12008/? W/System.err: java.lang.ClassNotFoundException: android.net.ZeroBalanceHelper 09-02 17:10:03.586 11866-12008/? W/System.err: at java.lang.Class.classForName(Native Method) 09-02 17:10:03.587 11866-12008/? W/System.err: at java.lang.Class.forName(Class.java:324) 09-02 17:10:03.587 11866-12008/? W/System.err: at java.lang.Class.forName(Class.java:285) 09-02 17:10:03.587 11866-12008/? W/System.err: at
com.android.okhttp.internal.http.ZeroBalanceHelperClass.getFeatureFlagValue(ZeroBalanceHelperClass.java:39)
09-02 17:10:03.587 11866-12008/? W/System.err: at
com.android.okhttp.internal.http.HttpEngine.followUpRequest(HttpEngine.java:1090)
09-02 17:10:03.588 11866-12008/? W/System.err: at
com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:393)
09-02 17:10:03.588 11866-12008/? W/System.err: at
com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:501)
09-02 17:10:03.588 11866-12008/? W/System.err: at
com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
09-02 17:10:03.588 11866-12008/? W/System.err: at
com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
09-02 17:10:03.588 11866-12008/? W/System.err: at la.a(:com.google.android.gms.DynamiteModulesA:193) 09-02 17:10:03.588 11866-12008/? W/System.err: at lb.a(:com.google.android.gms.DynamiteModulesA:151) 09-02 17:10:03.588 11866-12008/? W/System.err: at jt.c(:com.google.android.gms.DynamiteModulesA:608) 09-02 17:10:03.588 11866-12008/? W/System.err: at lm.run(:com.google.android.gms.DynamiteModulesA:242) 09-02 17:10:03.588 11866-12008/? W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) 09-02 17:10:03.588 11866-12008/? W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 09-02 17:10:03.588 11866-12008/? W/System.err: at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
09-02 17:10:03.588 11866-12008/? W/System.err: at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
09-02 17:10:03.588 11866-12008/? W/System.err: at java.lang.Thread.run(Thread.java:818) 09-02 17:10:03.588 11866-12008/? W/System.err: Caused by: java.lang.ClassNotFoundException: android.net.ZeroBalanceHelper 09-02 17:10:03.592 11866-12008/? W/System.err: at java.lang.Class.classForName(Native Method) 09-02 17:10:03.592 11866-12008/? W/System.err: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 09-02 17:10:03.592 11866-12008/? W/System.err: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 09-02 17:10:03.592 11866-12008/? W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 09-02 17:10:03.592 11866-12008/? W/System.err: ... 18 more
app doesn't run after this error, any help will be highly appreciated.

can't load images from url with Picasso

i'm using Picasso to download images into a listview in my android app.
it's working like a charm except when running on Kitkat environment.
My layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ImageView
android:id="#+id/articleimage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="5dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:layout_alignParentTop="true"
/>
</RelativeLayout>
My logs
08-11 06:30:19.406 28898-28898/com.s W/System.err: com.squareup.picasso.Downloader$ResponseException: 404 Not Found
08-11 06:30:19.406 28898-28898/com.s W/System.err: at com.squareup.picasso.UrlConnectionDownloader.load(UrlConnectionDownloader.java:96)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at com.squareup.picasso.NetworkRequestHandler.load(NetworkRequestHandler.java:47)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:206)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:159)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at java.lang.Thread.run(Thread.java:841)
08-11 06:30:19.406 28898-28898/com.s W/System.err: at com.squareup.picasso.Utils$PicassoThread.run(Utils.java:411)
my config
compileSdkVersion 23
buildToolsVersion '23.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
using ImageLoader i get an error in downloading the images
http://url/uploads/Vous-ĂȘtes-cerveau-droit-ou-cerveau-gauche-300x160.jpg
08-15 10:05:09.042 1915-2474/com.s W/System.err: java.io.FileNotFoundException: http://url/uploads/Vous-ĂȘtes-cerveau-droit-ou-cerveau-gauche-300x160.jpg
08-15 10:05:09.042 1915-2474/com.s W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at java.net.URL.openStream(URL.java:470)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at com.s.ArticleActivity$DownloadImageTask.doInBackground(ArticleActivity.java:446)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at com.s.ArticleActivity$DownloadImageTask.doInBackground(ArticleActivity.java:436)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:288)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
08-15 10:05:09.042 1915-2474/com.s W/System.err: at java.lang.Thread.run(Thread.java:841)

Android open failed: EACCES (Permission denied) in implementing PDF Reader library

I am implementing this library for PDF reader. I've implemented the code as explained in the link. but when I am running I am getting following exception. here's the logcat:
10:43:56.429 32577-32577/com.example.fahad.testpdfreaderlibrary I/PDFVIEWER: Intent { cmp=com.example.fahad.testpdfreaderlibrary/.TestPDFActivity (has extras) }
11-05 10:43:56.431 32577-32577/com.example.fahad.testpdfreaderlibrary I/PDFVIEWER: ST='file '/storage/emulated/0/pdf.pdf' has 433994 bytes'
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: java.io.FileNotFoundException: /storage/emulated/0/pdf.pdf: open failed: EACCES (Permission denied)
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at java.io.RandomAccessFile.<init>(RandomAccessFile.java:117)
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at net.sf.andpdf.pdfviewer.PdfViewerActivity.openFile(PdfViewerActivity.java:841)
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at net.sf.andpdf.pdfviewer.PdfViewerActivity.parsePDF(PdfViewerActivity.java:815)
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at net.sf.andpdf.pdfviewer.PdfViewerActivity.setContent(PdfViewerActivity.java:221)
11-05 10:43:56.432 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at net.sf.andpdf.pdfviewer.PdfViewerActivity.onCreate(PdfViewerActivity.java:212)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.Activity.performCreate(Activity.java:6237)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.ActivityThread.-wrap11(ActivityThread.java)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.os.Looper.loop(Looper.java:148)
11-05 10:43:56.433 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at java.lang.reflect.Method.invoke(Native Method)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at libcore.io.Posix.open(Native Method)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
11-05 10:43:56.434 32577-32577/com.example.fahad.testpdfreaderlibrary W/System.err: ... 17 more
also I've added in my AndroidManifest.xml following lines:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
but still getting the same exception
Simple solution: set your target SDK back to 22
Clean Solution: Request the Runtime Permissions
Check this out for more informations.

jcodec Permission Denied for NIOUtils.readableFileChannel

I'm trying to use JCodec to get all the frames from an MP4 on my emulator. I have the following permissions in my manifest:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
The file through my adb shell looks like this:
root#generic_x86_64:/sdcard/Download # pwd
/sdcard/Download
root#generic_x86_64:/sdcard/Download # ls -la
-rwxrwx--x root sdcard_rw 19967250 2015-10-12 16:39 Hummingbird.MP4
I've tried doing a chmod 777 Hummingbird.MP4, but that doesn't change the last set of permissions for some reason?
The following code produces the exception below.
String baseDir = Environment.getExternalStorageDirectory().getAbsolutePath();
String fn = baseDir + "/Download/Hummingbird.MP4";
// test dir to make sure I'm in right place
String dir = baseDir + "/Download";
File fDir = new File(dir);
Log.i("TAG", "fDir.isDir()=" + fDir.isDirectory()); // this is true
fileMp4 = new File(fn);
try {
ch = NIOUtils.readableFileChannel(fileMp4); // line 220 in trace below
} catch (FileNotFoundException e) {
e.printStackTrace();
}
I also did a fileMp4.exists() which returns true.
Exception
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: java.io.FileNotFoundException: /storage/1F1A-300C/Download/Hummingbird.MP4: open failed: EACCES (Permission denied)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at java.io.FileInputStream.<init>(FileInputStream.java:76)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at org.jcodec.common.NIOUtils.readableFileChannel(NIOUtils.java:336)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at medloh.com.mp4frames.MainActivity.onActivityResult(MainActivity.java:220)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.app.Activity.dispatchActivityResult(Activity.java:6428)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.app.ActivityThread.deliverResults(ActivityThread.java:3695)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3742)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.app.ActivityThread.-wrap16(ActivityThread.java)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.os.Looper.loop(Looper.java:148)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at java.lang.reflect.Method.invoke(Native Method)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at libcore.io.Posix.open(Native Method)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
10-14 23:32:27.090 4595-4595/medloh.com.mp4frames W/System.err: ... 14 more
See any problems with this code/configuration?
I was able to get the 'NIOUtils.readableFileChannel(fileMp4)' statment working by creating the file at /data/tmp/Hummingbird.MP4 (adb push). Not sure if it's something about /sdcard and its symbolic links, or maybe I just needed to make sure all the directories and file were owned by system instead of root.
Anyway, I'm now on to other issues and problems decoding the MP4 but that's another story.

Categories

Resources