0

Hello my issue starts like that, I'm trying to install the facebook.apk. my error is "Failed to create secure container" and I got to this page: http://forum.xda-developers.com/showpost.php?p=58409922&postcount=4845 which told me to get to Settings > Apps > Open the menu > Preferred install location > set it to "Internal device storage"! but I don't know where is it.. which setting should I click? in the emulator I can't find this options.. and no ethier in the eclipse! help

Noyisme
  • 37
  • 9
  • no code, I've just added the facebook.apk to to platform-tools and tryied to install it by the command prompt, during using the emulator – Noyisme Apr 30 '15 at 08:50
  • recreate the emulator and assign more storage space to it. You will find the option over there regarding internal storage or else try genymotion emulator which is very easy and lightweight. – Ajinkya S Apr 30 '15 at 08:59
  • I already have 2000 MiB in the internal storage. I tryied every emulator and it still writes me the container error – Noyisme Apr 30 '15 at 09:06

2 Answers2

0

In order to install an apk that doesn't come from the store, you need to enable the "unknown sources" options, it will allow you to install apps manually, and then you can install you apk using adb with the following command: adb install {your APK name}

k3v1n4ud3
  • 2,904
  • 1
  • 15
  • 19
  • where this 'unknown sources' option is ? – Noyisme Apr 30 '15 at 09:07
  • Depends which ROM you're running, but it's in Settings. You may see something like Security or Device administration. – k3v1n4ud3 Apr 30 '15 at 09:12
  • listen, I've have facebook as a lib, and I moved the apk to the platform-tools, ive run the emulator and then I wrote the adb install facebook.apk... it started to install and then said "install failed container error", I've got this error like 40 times in the last 2 days. I search in all the internet, and nothing helped me. – Noyisme Apr 30 '15 at 09:33
0

Open an blank activity and from the terminal of the project run the install line. Have the following line in manifest file before installing apk file and try:

android:installLocation="auto"

If your aim is only to use Facebook sdks you need not install apk file I feel check the following link and follow the steps to setup Facebook ask in android:

https://developers.facebook.com/docs/android/getting-started

hope it helps.

keshav kowshik
  • 2,354
  • 4
  • 22
  • 45
  • what's the terminal? I'm using an apk, I've no project in the eclipse. Did you mean I need to create new project or what? – Noyisme Apr 30 '15 at 09:40
  • yes create a new project, terminal is nothing but command prompt. – keshav kowshik Apr 30 '15 at 09:42
  • ok, created. now what to do ? to write in this new project the "android:installLocation="auto"" in this manifest? – Noyisme Apr 30 '15 at 09:44
  • yes in the manifest file add that line, in Android Studio in Tools we have option for opening command prompt try where it is in eclipse, run the install line from the command prompt. – keshav kowshik Apr 30 '15 at 09:50
  • ok thank you but I didnt understand yet. after I write the installlocation in the black activity manifest. I have to go to the command prompt and install the facebook.apk and it'll work? that's it? – Noyisme Apr 30 '15 at 09:58
  • yes, I think it will work, trial and error method. Please let me know what happened. Try to install the apk file to real device and see what happens. – keshav kowshik Apr 30 '15 at 10:00
  • If my suggestion helped you please up vote it and accept it as an answer. – keshav kowshik Apr 30 '15 at 10:14
  • When? Can you accept and up vote it now.. I am telling the answer which I have posted. – keshav kowshik Apr 30 '15 at 10:49
  • I created a new project added the android:installLocation="auto" line to the project's manifest, and run it..... after that I tryied to install the apk again and its still shows me the same error. sorry – Noyisme Apr 30 '15 at 10:54
  • did you try to install the apk in real device? – keshav kowshik Apr 30 '15 at 11:08
  • you mean in the emulator? I don't need to run it on real device because I need the facebook in my emulator to use my app with facebook-sdk\apk – Noyisme Apr 30 '15 at 11:13
  • Make sure you are following all the steps specified in this link: http://stackoverflow.com/questions/3480201/how-do-you-install-an-apk-file-in-the-android-emulator – keshav kowshik Apr 30 '15 at 11:21
  • I did that exactly (maybe in the 50th time).. I'm stack on that like 2 days. It writes me the 'INSTALL_FAILED_CONTAINER_ERROR' time after time :( – Noyisme Apr 30 '15 at 11:32
  • nooo.. I already added the facebook-sdk, and used it. but I want to use the facebook apk either. because ive facebook uses in my app and only with the emulator(who has facebook(apk)) i can find if my app works good with facebook. – Noyisme Apr 30 '15 at 11:49