Link to home
Start Free TrialLog in
Avatar of xRalf
xRalf

asked on

Installing Android application without internet connection

Hello,

I downloaded apk file of DroidReader from here http://slideme.org/en/application/droidreader and copied it to to directory of my tablet System/APK/COMMON where are other APK files.
I could see the copied file there in the OS. Then I disconnected USB and look to that directory in tablet, but the droidreader.apk is not there. Am I doing something wrong?

thank you
Avatar of PortableTech
PortableTech

Yes, you need to actually in install the APK, and this can either be done from the PC using the Android SDK from google, or more easily I would think using "apkInstaller" app which you can find in the Android Marketplace.  

Also, as this is not from the marketplace itself, you will need to enable this option on your tablet before you install it.

Settings > Applications > Unknown Sources

If you have issues with this let me know and I will endeavor to provide more details.
Avatar of xRalf

ASKER

Settings > Applications > Unknown Sources is enabled

but the file droidreader.apk is not in System/APK/COMMON directory, but it should be there because I copied it there (When I copy file.avi I can see it in my tablet, but file.apk is not there.
try just copying the .apk file to the root of your SD Card and use the apkInstaller app to install it from there.  The location of where the apk is placed is not really important for purposes of copying it to your phone prior to installation.
Avatar of xRalf

ASKER

There are two problems
1) I don't have SD Card, so I have to copy it to the tablet storage
2) There is not apkInstaller app, so I need to install this app first, and I can't do that because I have this problem.
You can find apkInstaller in the Android Market, or do you not have access to it?  You do not have to use the SD card, you can put it on the main storage and install it from there as well as long as you know where you put it.  

If you can not access the android market at all, we will need to use the Android SDK or some other side loader to get the apk installed.
Avatar of xRalf

ASKER

>> You can find apkInstaller in the Android Market, or do you not have access to it?

There is only AppsLib application and it needs internet connection which I don't have.

>>You do not have to use the SD card, you can put it on the main storage and install it from there as well as long as you know where you put it.  

I put it exactly in System/APK/COMMON directory but I can't see it there.

>>If you can not access the android market at all, we will need to use the Android SDK or some other side loader to get the apk installed.

Could you please explain it more in detail?
Here are the directions for downloading and using the SDK to install apk files.  This should work and is how I install all my non-market apk files.  

Using the Android SDK

There is one more method that can be used, you can install APK files into your phone using the Android SDK. Download the Android SDK.

First of all, install the Android SDK on your computer. You will also need to install the Android USB drivers to connect the SDK to your phone via USB. You can download it from here - http://dl.google.com/android/android_usb_windows.zip .

To install applications from other sources, you also need go to Settings -> Application Settings and enable Unknown Sources. Also go to Settings -> SD Card and Phone Storage -> Disable Use for USB Storage. You can enable it again later.

Next, just open Command Prompt and type: adb install path/file.apk

Where path is the full path to the APK file and file is the name of the APK application file. Your application is now installed. This is all you need to do, now just open the application on your phone and use it.
My apologies, I forgot the link to the SDK itself.  Here it is.

http://developer.android.com/sdk/installing.html
Avatar of xRalf

ASKER

It would be great if it worked, but I'm using Linux (Xubuntu) and they write on that page

"The Google USB driver is a downloadable component for Windows developers, available for download from the AVD and SDK Manager."
ahhh, let me see if there is a linux option there must be I would think, I just have nit tried it yet.  I suppose if worse come to worse, we could always setup a VM through something like VirtualBox if needed, but let me see if I can get a linux option up and running.  I will get back to you.
Are you on a rooted device, with a hacked recovery boot loader on it by chance?  Might give us another option if that is the case.
Ok, I have not been able to try it yet, but here are the instructions for getting it setup for linux.  This is the sort of universal device setup page for android developers, and there is an excerpt below.

http://developer.android.com/guide/developing/device.html

=============================================

Setting up a Device for Development

With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator. Before you can start, there are just a few things to do:

    Declare your application as "debuggable" in your Android Manifest.

    In Eclipse, you can do this from the Application tab when viewing the Manifest (on the right side, set Debuggable to true). Otherwise, in the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.
    Turn on "USB Debugging" on your device.

    On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.
    Setup your system to detect your device.
        If you're developing on Windows, you need to install a USB driver for adb. If you're using an Android Developer Phone (ADP), Nexus One, or Nexus S, see the Google Windows USB Driver. Otherwise, you can find a link to the appropriate OEM driver in the OEM USB Drivers document.
        If you're developing on Mac OS X, it just works. Skip this step.
        If you're developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.
            Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

            For Gusty/Hardy, edit the file to read:
            SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

            For Dapper, edit the file to read:
            SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
            Now execute:
            chmod a+r /etc/udev/rules.d/51-android.rules

You can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."

If using Eclipse, run or debug as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device upon which you want to install and run the application.

If using the Android Debug Bridge (adb), you can issue commands with the -d flag to target your connected device.
Avatar of xRalf

ASKER

I created the file  /etc/udev/rules.d/51-android.rules
I'm using Xubuntu 10.04 (Lucid Lynx), so I'm not sure if the contents of the file will be OK.
I used
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"

>> You can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory.

Could you please explain this? Where can I find adb devices and SDK platform-tools/ directory?
Avatar of xRalf

ASKER

>>Are you on a rooted device, with a hacked recovery boot loader on it by chance?  Might give us another option if that is the case.

What is "rooted devices" and "hacked recovery boot loader"?
As for the rooted devices/bootloader, do not worry about that, if you are unsure, you do not have it.

As for the "adb devices" command, that is part of the SDK, that can be downloaded here

http://developer.android.com/sdk/index.html

you may already have downloaded and unpacked it, I am unsure.  Sadly, they do not package adb with the tgz file directly, but the SDK manager that comes with it can download the rest of the platform tools.  Once it is downloaded, and your device it plugged in, the

adb devices

command will show you all the attached android devices on your computer

once you have that done, the

adb install whatever.apk

can install apk files on your device.
Avatar of xRalf

ASKER

I downloaded http://dl.google.com/android/android-sdk_r10-linux_x86.tgz

I ran tools/android update sdk
I started platform_tools/adb devices
with output
List of devices attached

then I tried
adb install whatever.apk
error: device not found

My tablet is in USB. It has USB debugging turned on and Settings -> Applications -> Unknown sources is turned on

Avatar of xRalf

ASKER

OK now I understand, that I forgot to place the idVendor, but my vendor (Archos) has not id on that page.
ASKER CERTIFIED SOLUTION
Avatar of PortableTech
PortableTech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xRalf

ASKER

I tried it, but it still doesn not work
Did you do the reload or try a reboot?
Avatar of xRalf

ASKER

Yes I reloaded and rebooted.

Is the "e79/*" in line
ENV{PRODUCT}=="e79/*", MODE="0666"

correct?
yes

as well as

SUBSYSTEM=="usb", SYSFS{idVendor}=="e79", MODE="0666"
Avatar of xRalf

ASKER

Is it possible that the device is not correctly mounted? Sometimes the Archos directory won't appear in /media,
but when I click on the directory in windows manager it's there.

I mounted the device as follows
sudo mkdir /media/mytablet
sudo chmod 777 /media/mytablet
sudo mount /dev/sdc/ /media/mytablet

but this still didn't help.
Avatar of xRalf

ASKER

I also created
~/.android/adb_usb.ini file with contents
0x0e79
according to this page
http://www.androidtablets.net/forum/archos-tablets/7079-connecting-archos-via-adb.html

could the problem be in firmware?
Avatar of xRalf

ASKER

Now I used
./adb kill-server
./adb start-server
according to this http://androidtobe.blogspot.com/2009/12/archoss-solution-to-adb-connection-bug.html

this helped, so I can continue
Can you verify exactly what model Archos this is?
Oh, I just saw your last post, so now if you type

adb devices

you can see your device?
Avatar of xRalf

ASKER

I'm glad that finally something worked.
Avatar of xRalf

ASKER

Yes, I installed droidreader and it works. I had to install some file manager yet, but I'm dissapointed that the application will crash when I try to zoom in on pdf file. (but that's another thing)