How to install apk stored in private storage of android apps?

From my Android application, I download apk from the Internet, storing it in a private application store (openFileOutput(FILENAME, Context.MODE_PRIVATE))

and trying to call the installer of the Android package for this downloaded apk by,
intent.setDataAndType(Uri.fromFile(f), "application/vnd.android.package-archive");
startActivity(intent);

but i get an error Unable to open zip: /data/data/com.test/files/abc.apk : Permission denied
in logcat

and,
Parse Error: There is a problem parsing the package
on the phone screen.

Is this because the apk file is in a closed application store, so the Android package installer cannot access it? If so, is it possible to somehow somehow install apk (with the permission of the user, of course.) Or am I something wrong?

PS: Please do not assume that the phone will be rooted.

+3
source share
3 answers

Mark Allisons GUESS , , , mode_private, /. , , , , MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE.

, .

+2

, ( ) - , apk). MODE_WORLD_READABLE MODE_PRIVATE, , Android apk - . , , apk ( , , SD- apk ). , ? , () , apk , .

, -, MODE_WORLD_READABLE, , , , , () . , apk, ?

0

MODE_WORLD_READABLE , " ", , . , es-file manager, , , . apk ? , apk , , , , : http://developer.android.com/google/play/licensing/overview.html, , , , .

-1

All Articles