6

I need to install an APK on a phone with no built in file browser, and no connection (wifi/mobile). The LG Optimus M has no built in file browser... Not sure why, but it is making things very difficult. I was thinking if I could put an app in a special place on an SD card, or auto-run an APK install.

ADB is also not an option due to usb driver issues. I know this is pretty limited...

EDIT: I got down voted because you didn't read? There is no wifi/mobile connection available. Downloading a file manager etc. from market not an option.

jhnclvr
  • 9,137
  • 5
  • 50
  • 55
  • Why can't you use ADB? ADB doesn't require any special drivers for your phone, you simply put the device in development mode and it should work. – slayton Sep 15 '11 at 01:16
  • The windows drivers are preventing us in this specific case with the current requirements – jhnclvr Sep 15 '11 at 01:22
  • If you don't have a market connection and you can't get ADB working then you are stuck. It would be a HUGE security issue if your phone started installing random APKs without user input. – slayton Sep 19 '11 at 15:21
  • It is possible we are stuck. We are working with broken phones as part of the requirements, and so the requirements are a bit restrictive indeed. I was hoping there was a key folder or something where you could put an APK that would somehow show up as an option to install. Or there would be a folder that would show up on the desktop etc. Thanks for your help. – jhnclvr Sep 20 '11 at 13:36
  • Can better you describe what happens when you plug in the phone in Debug mode – slayton Sep 20 '11 at 13:49
  • Hi Slayton, we are trying to avoid the usb debugging route. We can get it working, but windows is sketchy at best with the device drivers. We can get around this but our end users cannot always. It is just very inconsistent, and there are a number of problems with it. We went down the ADB road pretty far, and we are still searching for alternatives. It is our last resort, and we are hoping to find another way. thanks again for your help. – jhnclvr Sep 26 '11 at 19:26

4 Answers4

5
  1. Enable usb debugging

  2. Install the drivers and android sdk

  3. Connect the phone through usb to your computer

  4. Call the following program from the command prompt: adb install application.apk

  5. Adb will now install your application

According to the about of just running adb, you can use the following command line arguments:

adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
    - push this package file to the device and install it
                ('-l' means forward-lock the app)
                ('-r' means reinstall the app, keeping its data)
                ('-s' means install on SD card instead of internal storage)
                ('--algo', '--key', and '--iv' mean the file is encrypted already)
Ferrybig
  • 18,194
  • 6
  • 57
  • 79
  • I always get this error: `Error: failed to write; ES (No such file or directory)` for any APK file – vsync May 22 '17 at 07:27
0

If you have a terminal emulator app on the device, you can put MyApp.apk on the SD card and run this, which should open the package installer:

am start -a "android.intent.action.VIEW" -d "file:///mnt/sdcard/external_sd/MyApp.apk" -t "application/vnd.android.package-archive"

You might need to change that path depending on your device — see How can I determine storage directory from ADB?

You will also need to enable the Unknown Sources option in the device settings.

Matthew Read
  • 1,365
  • 1
  • 30
  • 50
0

Why not download one of the MANY file browsers in the market? May I suggest my favorite which is Astro File Manager

slayton
  • 20,123
  • 10
  • 60
  • 89
-2

Why not download astro file manager? it works great. Other than that I would host the apk on a server and download it from the phone.

ghostbust555
  • 2,040
  • 16
  • 29