Wykonaj kopię zapasową całego pliku instalacyjnego apk na karcie SD programowo w systemie Android [duplikat]

To pytanie ma już odpowiedź tutaj:

Jak uzyskać programowo plik .apk aplikacji 3 odpowiedzi

Chcę wykonać kopię zapasową wszystkich moich aplikacji instalacyjnych na karcie SD, więc piszę poniżej kodu

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
    mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
    final List pkgAppsList = getPackageManager().queryIntentActivities( mainIntent, 0);
    for (Object object : pkgAppsList) {
        ResolveInfo info = (ResolveInfo) object;
        File file =new File( info.activityInfo.applicationInfo.publicSourceDir);
        InputStream myInput;
        System.out.println("SDSD "+file.toString());

        String sdpath = Environment.getExternalStorageDirectory().getPath();
        try {
            File exist=new File(Environment.getExternalStorageState()+file.toString());
            System.out.println("1 "+ exist.exists());
            // Set the output folder on the Scard
            File directory = new File(sdpath + "/Back");
            // Create the folder if it doesn't exist:
            if (!directory.exists()) {
            directory.mkdirs();
            }
            // Set the output file stream up:
            myInput = new FileInputStream(Environment.getExternalStorageState()+ file.toString());
            OutputStream myOutput = new FileOutputStream(directory.getPath()+ file.toString());
            // Transfer bytes from the input file to the output file
            byte[] buffer = new byte[1024];
            int length;
            while ((length = myInput.read(buffer)) > 0) {
            myOutput.write(buffer, 0, length);
            }
            // Close and clear the streams
            myOutput.flush();
            myOutput.close();
            myInput.close();
            Toast.makeText(MainActivity.this, "Backup Done Succesfully!", Toast.LENGTH_LONG)
            .show();
            } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            }
       }
}

}

kiedy uruchamiam powyżej kodu, wyświetla mi się komunikat

01-11 09:52:35.296: W/System.err(966): java.io.FileNotFoundException: /mounted/data/app/com.example.gridwithcheckbox-1.apk (No such file or directory)
01-11 09:52:35.315: W/System.err(966):  at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
01-11 09:52:35.315: W/System.err(966):  at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
01-11 09:52:35.315: W/System.err(966):  at java.io.FileInputStream.<init>(FileInputStream.java:80)
01-11 09:52:35.315: W/System.err(966):  at java.io.FileInputStream.<init>(FileInputStream.java:132)
01-11 09:52:35.315: W/System.err(966):  at com.example.backupdemo.MainActivity.onCreate(MainActivity.java:46)
01-11 09:52:35.315: W/System.err(966):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-11 09:52:35.315: W/System.err(966):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-11 09:52:35.315: W/System.err(966):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-11 09:52:35.315: W/System.err(966):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-11 09:52:35.315: W/System.err(966):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-11 09:52:35.315: W/System.err(966):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-11 09:52:35.315: W/System.err(966):  at android.os.Looper.loop(Looper.java:123) 
01-11 09:52:35.315: W/System.err(966):  at android.app.ActivityThread.main(ActivityThread.java:3683)
01-11 09:52:35.315: W/System.err(966):  at java.lang.reflect.Method.invokeNative(Native Method)
01-11 09:52:35.315: W/System.err(966):  at java.lang.reflect.Method.invoke(Method.java:507)
01-11 09:52:35.315: W/System.err(966):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-11 09:52:35.315: W/System.err(966):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-11 09:52:35.315: W/System.err(966):  at dalvik.system.NativeStart.main(Native Method)

i wspominam również o zezwoleniu na manifest pliku

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

tak jakiś pomysł, jak mogę to rozwiązać?

Korzystając z Tamilan Code, otrzymuję logcat jak

01-11 10:46:19.685: V/file--(14637):  com.example.tabpager-2.apk----TabPAger
01-11 10:46:19.685: D/file_name--(14637):  TabPAger
01-11 10:46:19.685: I/System.out(14637): No such file or directory
01-11 10:46:19.685: V/file--(14637):  it.anddev.tutorial-1.apk----KeyboardWidgetTutorial
01-11 10:46:19.695: D/file_name--(14637):  KeyboardWidgetTutorial
01-11 10:46:19.695: I/System.out(14637): No such file or directory
01-11 10:46:19.695: V/file--(14637):  com.example.crudopration-2.apk----CrudOpration
01-11 10:46:19.695: D/file_name--(14637):  CrudOpration
01-11 10:46:19.695: I/System.out(14637): No such file or directory
01-11 10:46:19.705: V/file--(14637):  net.leolink.android.simpleinfinitecarousel- 1.apk----SimpleInfiniteCarousel
01-11 10:46:19.705: D/file_name--(14637):  SimpleInfiniteCarousel

questionAnswers(1)

yourAnswerToTheQuestion