Android examples for android.content.pm:Apk Property
write byte array to an apk File
import android.os.Environment; import java.io.FileOutputStream; import java.io.IOException; public class Main{ public static void writeFile(byte[] bytes) throws IOException { String apkDir = Environment.getExternalStorageDirectory() + "/download/" + "app.apk"; java.io.File file = new java.io.File(apkDir); FileOutputStream fop = new FileOutputStream(file); fop.write(bytes);// w w w .j a v a2s .c om fop.flush(); fop.close(); } }