* @Title: changeDatabasesDir * @Des cription: TODO: Change default location of sqlite databases. * @param @param mContext * @return void * @throws public static void changeDatabasesDir(Context mContext) { try { Field field; field = ContextWrapper.class.getDeclaredField("mBase"); field.setAccessible(true); // 取得mBase变量 Object obj = field.get(mContext); field = obj.getClass().getDeclaredField("mDatabasesDir"); field.setAccessible(true); // 树立自界说途径 File file = new File(Path.DATABASES); field.set(obj, file); } catch (NoSuchFieldException e) { // TODO Auto-generated catch block MyLog.e(e.toString()); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block MyLog.e(e.toString()); } catch (IllegalAccessException e) { // TODO Auto-generated catch block MyLog.e(e.toString()); }