Buggy code:
public class Config { public static String LOG_TAG = "DroidIncUpdate" ; public static String PACKAGE_NAME = null ; public static boolean DEBUG = true ; public static boolean FORCE_EXTRACT = false ; public static String INCUPDATE_LIBS_DIR_FROM_ASSETS = "incupdatelibs" ; public static String INCUPDATE_RES_DIR_FROM_ASSETS = "res" ; public static String INCUPDATE_CONFIG_FILE_FROM_ASSETS = "incupdate.conf" ; public static String INCUPDATE_PARENT_DIR = null ; public static String INCUPDATE_BASE_DIR = "incupdate" ; public static String INCUPDATE_LIBS_DIR = ( ( Config . INCUPDATE_BASE_DIR ) + ( File . separator ) ) + "libs" ; public static String INCUPDATE_RES_DIR = ( ( Config . INCUPDATE_BASE_DIR ) + ( File . separator ) ) + "assets_res" ; public static String INCUPDATE_TMP_DIR = ( ( Config . INCUPDATE_BASE_DIR ) + ( File . separator ) ) + "tmp" ; public static String UPDATE_INFO_FILE_PATH = ( ( Config . INCUPDATE_BASE_DIR ) + ( File . separator ) ) + "update" ; private static JSONObject updateInfo = null ; private static JSONObject assetUpdateInfo = null ; public static String UPDATE_URL = "http:////172.16.11.8:38000//incupdate//update" ; public static String UPDATE_CONF_PATH_IN_UPDATE_ZIP = "updateConf.json" ; public static float minAvailSpaceRatio = 3.0F ; public static void init ( Context context ) throws IOException , JSONException { <START_BUG> Config . INCUPDATE_PARENT_DIR = context . getDir ( "" , MODE_PRIVATE ) . getCanonicalPath ( ) ; <END_BUG> String assetUpdateInfoRaw = null ; InputStream is = null ; try { is = context . getAssets ( ) . open ( Config . INCUPDATE_CONFIG_FILE_FROM_ASSETS ) ; Config . PACKAGE_NAME = context . getPackageName ( ) ; assetUpdateInfoRaw = FileUtils . readStreamAsString ( is ) ; if ( Config . DEBUG ) { Log . d ( Config . LOG_TAG , ( "assetUpdateInfoRaw:<seq2seq4repair_space>" + assetUpdateInfoRaw ) ) ; } if ( assetUpdateInfoRaw == null ) { throw new IOException ( ( "config<seq2seq4repair_space>file<seq2seq4repair_space>in<seq2seq4repair_space>assets<seq2seq4repair_space>not<seq2seq4repair_space>found:<seq2seq4repair_space>" + ( Config . INCUPDATE_CONFIG_FILE_FROM_ASSETS ) ) ) ; } else { Config . assetUpdateInfo = new JSONObject ( assetUpdateInfoRaw ) ; } } finally { IOUtils . closeQuietly ( is ) ; } String updateInfoRaw = null ; try { updateInfoRaw = FileUtils . readFileAsString ( Config . getIncUpdateUpdateInfoFilePath ( ) ) ; if ( Config . DEBUG ) { Log . d ( Config . LOG_TAG , ( "updateInfoRaw:<seq2seq4repair_space>" + updateInfoRaw ) ) ; } if ( updateInfoRaw == null ) { Config . updateInfo = new JSONObject ( ) ; } else { Config . updateInfo = new JSONObject ( updateInfoRaw ) ; } } catch ( Exception e ) { Log . w ( Config . LOG_TAG , ( "new<seq2seq4repair_space>JSONObject<seq2seq4repair_space>failed<seq2seq4repair_space>from<seq2seq4repair_space>string" + updateInfoRaw ) ) ; Config . updateInfo = new JSONObject ( ) ; } } public static String getIncUpdateLibsDir ( ) { } public static String getIncUpdateResDir ( ) { } public static String getIncUpdateUpdateInfoFilePath ( ) { } public static String getIncUpdateLibFilePath ( String filePath ) { } public static String getIncUpdateResFilePath ( String filePath ) { } public static String getIncUpdateTmpDirPath ( ) { } private static Object getFromUpdateInfo ( String key ) { } private static Object getFromAssetUpdateInfo ( String key ) { } public static long getAssetsLibSize ( ) { } public static long getAssetsResSize ( ) { } static boolean isExtracted ( ) { } static void setExtracted ( ) { } static void setUpdated ( String version ) { } static String getResVersion ( ) { } static void flushUpdateInfo ( ) throws IOException { } public static native int load ( String libpath ) { } public static native int unload ( String libpath ) { } }

Fix:
Config . INCUPDATE_PARENT_DIR = context . getFilesDir ( ) . getAbsolutePath ( ) ;