android root以后,把一个sqlite数据库文件放到根目录下,怎么才能读取到它?

这是代码
应用已经获取了root权限
在尝试读取数据库的时候老是读不到。

给应用申请root权限

错误提示里也看不出什么东西
图片说明

有人能解答一下么。。。。

1.首先查看你的权限,是否有读取存储和写存储的权限
2.进行测试,如果还是出现这种情况,检查你的代码是否指定了正确的路径,不妨读取一个txt文件试试,因为你的报错是没有打开db文件
3.如果上面没有解决,你先把db文件放在assets下进行读操作
这里是个工具类

 public class AssetsManager {

    /**
     * 文件复制到内存中-->将assets中的文件复制到内存中
     * 
     * @param is
     *            输入流 is =getAssets().open("db/commonnum.db");
     * @param FileName
     *            文件名称 如:db/dsd.db
     */
    public static void copyAssets2File(InputStream is, String FileName) {
        BufferedInputStream bis = new BufferedInputStream(is);

        File FileDir = DbConfig.TO_FILEDIR;

        if (!FileDir.exists()) {
            FileDir.mkdirs();
        }
        File file = new File(FileDir, FileName);
        OutputStream os = null;
        BufferedOutputStream bos = null;
        try {
            os = new FileOutputStream(file);
            bos = new BufferedOutputStream(os);
            int len = 0;
            byte[] buff = new byte[1024];
            while ((len = bis.read(buff)) != -1) {
                bos.write(buff, 0, len);
            }
            bos.flush();
            bos.close();
            os.close();
            bis.close();
            is.close();

        } catch (IOException e) {
            e.printStackTrace();
        } finally {

        }

    }

}

4.等到你测试完成,db文件能够读写之后重新回到这里,我们来看你是为什么打不开文件
5.好了,基本你做完这些,你就能都解决问题了

苍天诶 没有人知道么。。。。