public static void doInstallApk(Context context, String apkName) {
         // Copy the given asset out into a file so that it can be installed.
         // Returns the path to the file.
         byte[] buffer = new byte[8192];
         InputStream is = null;
         FileOutputStream fout = null;
         try {
             is = context.getAssets().open(apkName);
             fout = context.openFileOutput("tmp.apk", Context.MODE_WORLD_READABLE);
             int n;
             while ((n=is.read(buffer)) >= 0) {
                 fout.write(buffer, 0, n);
             }
         } catch (IOException e) {
             Log.i("InstallApk", "Failed transferring", e);
         } finally {
             try {
                 if (is != null) {
                     is.close();
                 }
             } catch (IOException e) {
             }
             try {
                 if (fout != null) {
                     fout.close();
                 }
             } catch (IOException e) {
             }
         }

        File APKFileStreamPath= context.getFileStreamPath("tmp.apk");
       
       
       
       
       
       
        Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
           intent.setData(Uri.fromFile(APKFileStreamPath));
           intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    //       intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true);
     //      intent.putExtra(Intent.EXTRA_RETURN_RESULT, true);
      //     intent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME,
       //            ContextWrapper.getApplicationInfo().packageName);
           context.startActivity(intent);
     }

 

 

 

 

 

 

 

주석처리해논 부분에서 에러납니다...

그리고 루팅이용해서 까는건 감도 안잡히네여... 도와주세요