Solved

Installing Android application without internet connection

Posted on 2011-03-12
29
1,127 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:xRalf
  • 15
  • 14
29 Comments
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
>> 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?
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
My apologies, I forgot the link to the SDK itself.  Here it is.

http://developer.android.com/sdk/installing.html
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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."
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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?
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
>>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"?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
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.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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

0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
OK now I understand, that I forgot to place the idVendor, but my vendor (Archos) has not id on that page.
0
 
LVL 2

Accepted Solution

by:
PortableTech earned 500 total points
Comment Utility
Here is from the Archos website, and shows it's vendor id.  It is 0e79, though as shown below, they do not put in the preceeding zero, just e79.  Hope that helps.

For Linux users only: You need to add a udev rule if ADB only works as root:
Create a file /etc/udev/rules.d/51-android.rules that contains the following lines:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="e79", MODE="0666"
Make the rule known to udev with the following command:
udevadm control --reload-rules (or udevcontrol reload_rules on older systems)
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
I tried it, but it still doesn not work
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
Did you do the reload or try a reboot?
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
Yes I reloaded and rebooted.

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

correct?
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
yes

as well as

SUBSYSTEM=="usb", SYSFS{idVendor}=="e79", MODE="0666"
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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?
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
Can you verify exactly what model Archos this is?
0
 
LVL 2

Expert Comment

by:PortableTech
Comment Utility
Oh, I just saw your last post, so now if you type

adb devices

you can see your device?
0
 
LVL 6

Author Closing Comment

by:xRalf
Comment Utility
I'm glad that finally something worked.
0
 
LVL 6

Author Comment

by:xRalf
Comment Utility
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)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
A short article about a problem I had getting the GPS LocationListener working.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now