将raw中的apk拷贝到/data/data/包名/files/中

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

    //1 拷贝raw中的apk文件  
            InputStream in = null;  
            OutputStream out = null;  
      
            try {  
                in = getResources().openRawResource(R.raw.dex_apk);  
                out = this.openFileOutput("dex_apk.apk", Context.MODE_PRIVATE);  
                copyFile(in, out);  
            } catch (FileNotFoundException e) {  
                e.printStackTrace();  
            }finally {  
                try {  
                    if (in != null) in.close();  
                }catch (IOException e){}  
      
                try{  
                    if (out != null) out.close();  
                }catch (IOException e){}  
            }