android open failed: EACCES (Permission denied)
<p>I am getting open failed: <code>EACCES (Permission denied)</code> on the line <code>OutputStream myOutput = new FileOutputStream(outFileName);</code> </p>

<p>I checked the root,
I tried <code>android.permission.WRITE_EXTERNAL_STORAGE</code></p>

<p>thanks for your help</p>

<pre><code>        try {
            InputStream myInput;

                myInput = getAssets().open("XXX.db");

            // Path to the just created empty db
            String outFileName = "/data/data/XX/databases/"
                    + "XXX.db";

            // Open the empty db as the output stream
            OutputStream myOutput = new FileOutputStream(outFileName);

            // transfer bytes from the inputfile to the outputfile
            byte[] buffer = new byte[1024];
            int length;
            while ((length = myInput.read(buffer)) &gt; 0) {
                myOutput.write(buffer, 0, length);
            }

            // Close the streams
            myOutput.flush();
            myOutput.close();
            myInput.close();
            buffer = null;
            outFileName = null;
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
</code></pre>
