What do I need to do to use my Kindle Fire for android development? (Specifically for testing my apps on the device.)
You can find the instructions for connecting Kindle Fire to the ADB in a PDF of instructions provided by Amazon.
Paraphrased from the document:
Edit the adb_usb.ini file (located in ~/.android/)
Add the lines:
0x1949
0x0006
Save the file.
Run these commands to restart adb:
adb kill-server
adb start-server
adb devices
NOTE: For Windows 7 users you need to download an additional driver.
Linux uses a different way to set up the device. According to Using Hardware Devices, you need to set up your Linux system as follows:
Edit /etc/udev/rules.d/51-android.rules as root, and add the following line (create this file if it does not exist):
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666"
Change the permission of this file by executing the following command as root:
chmod a+r /etc/udev/rules.d/51-android.rules
Reload the rules by executing the following command as root:
udevadm control --reload-rules
Run these commands to restart adb:
adb kill-server
adb devices
If everything is ok, you will see your Kindle Fire listed as a device.
I was also looking forward how to connect Kindle on the ADB, so what I had to do is:
Go to Settings->Security and Enable ADB.
I use a Mac, this probably works similarly from a Windows box.
First I configured the Kindle Fire to allow sideloaded apps. This isn't the default behavior, you have to click a checkbox in the settings.
From the Fire, I went to the app store and downloaded a DropBox app (free.)
From my dev machine, I registered on the DropBox website (also free.)
This gives you a dropbox folder on your dev box that will be synced automagically to your dropbox folder on the web.
Then, to develop, I compile the app to make a new apk, drag it to the dropbox folder, and use the DropBox app on the Fire fetch the apk file. It loads with the click of a button. It takes about 15 seconds tops to get the apk to the Fire. I don't need any extra cables, etc.
You must add a user defined site in Android SDK Manager:
Launch Android SDK Manager >> Tools >> Manager Add-on Site >> User
defined>> add http://kindle-sdk.s3.amazonaws.com/addon.xml
Then download the Amazon Kindle drivers from Android SDK Manager
Then then enable ADB from kindle settings.
Settings >> Device >> Enable ADB
And run \extras\amazon\kindle_fire_usb_driver, run KindleDrivers.exe
More info
Follow the PDF
In eclipse go to android SDK manager, select Tools -> Manage Add-on Sites -> select User Defined sites.
Select New and add the url as http://kindle-sdk.s3.amazonaws.com/addon.xml.
After adding that go to packages->Extras
Download Kindle Fire USB Driver.
Go to android SDK folder->amazon->install the drivers.
Last step: You can see the device at In Device Manager, under Kindle Fire, verify that the device appears as Android Composite ADB Interface.
Related
I need to set nox emulator as my default emulator, but I need to set first adb connection, but I don't know where I can find the directory of nox app player.
Fortunately, as a Mac user, you don't have to worry too much about the directory of the Nox app player, because you don't have to use the executable nox_adb.exe, as do Windows users. Instead, you can, with a slight change, follow the steps in the Nox connection guide, but just look out, as a Mac user, for step 6, (according to vandebergz) :
Download & install Nox.
Start a project in Android Studio.
Start Nox App Player, and in Nox go to Nox system settings and turn
root mode to on, then save changes and restart Nox.
In Nox, go to Android settings and scroll down to About Tablet. Keep clicking on Build number until it shows that, "You are now a developer". In Android settings the Developer options will now be visible.
In Developer options, tick USB debugging.
(Mac only) Depending on whether or not adb and other tools are in your PATH (see below), type
adb connect 127.0.0.1:62001
from a suitable location. (This will connect localhost through port 62001 to the Android Debug Bridge.)
Android Studio should now detect Nox Player as a connectable device (although it may not appear named as Nox).
Please bear in mind that for this to work, if you're using Android Studio with default installation settings, you should either do step 6 from the directory of adb , which is usually ~/Library/Android/sdk/platform-tools ; or else you can do this from any location if you have adb and the other platform tools on your PATH. To add them to your PATH, if not done already, you'll need to open your hidden ~/.bash_profile file and add the lines:
export PATH=~/Library/Android/sdk/tools:$PATH
export PATH=~/Library/Android/sdk/platform-tools:$PATH
as described here.
Worked ok for me. :)
I've installed the appropriate .apk file, however when trying to install it the app it gives me the error 'Application not installed'. I've tried to put a simple Hello World .apk file on there and I receive the same message.
Here's what I have tried:
1. Adding the following to Application Manifest
android:debuggable="true"
2. I have installed multiple File Managers including Astro, Android File Manager and ES File Explorer
3. I have enabled all of the correct settings on the Sony Xperia U (running Android 2.3.7)
4. Tried installation whilst the device is plugged in, and whilst it isn't
I'm using a Unsigned Android Application. Everything runs accordingly on the Eclipse emulator
Logcat is reporting the following:
This is displayed even when my device is connected via USB.
Locate your myapp.apk file on your hard drive:
Install it via command line:
C:\android\android-sdk\platform-tools\adb.exe install myapp.apk
List of connected devices:
adb devices
Connecting a device (if its number is 5554):
adb connect 127.0.0.1:5554
Restarting ADB:
adb kill-server
adb start-server
Your APK is having an expired or mis-configured certificate.
You need to resign the apk using the following tools.
https://play.google.com/store/apps/details?id=kellinwood.zipsigner2&hl=en
or
https://code.google.com/p/apk-signer/
Sign the APK with output filename as HelloWorld_signed.apk
Then go to my files you Will see your signed apk.
Install HelloWorld_signed.apk.
The app Will install successfully..
I believe there is a constraint of permission to prevent you to do so, I have worked around and find a simple solution for my Sony Xperia 1, OS version 5.1.1
Go through these steps:
Settings
Apps
Download Tab
Scroll down to find your app there
Press the menu and select Uninstall for all users
I want to test my application on actual device, so how can I go for it? And is it accessory to sign in and use zipalign for this purpose, or they are useful when preparing for publish my application? And is there any way to test my application on actual device without using eclipse?
download and install Android SDK
Make usb debugging enabled in your device
Connect your device to computer
go to command prompt and write: "adb devices" this will list all the devices connected
adb install "path/App.apk"
and you are done. Please note that adb command will run correctly from anywhere if you are having a correct path pointing to android sdk / plateform-tools direcory
I hope this will help you
Yes u can directly install your application into actual device without signing and zipalign. You can install the drivers for your software into your computer and use you device directly for debugging alternative to Emulator
Refer Using Hardware Devices
or you can install using Android adb tool Refer Installing an Application
or you can directly copy your application package file to you sdcard and install
The easy steps to install your apk using File manager :
Copy the APK
file you want to install to your phone's memory card.
And disconnect Phone from USB.
Go to Android Market and search and download Astro File Manager.
Click on the Install button.
After it is installed, open the app (Astro).
It will show you your application APK file stored directly in the root directory of your memory card.
Just tap on the application you want to install
Tap on “Open App Manager”
Click Install
You are done!
P.S: Don't forget to enable Unknown sources in Settings > Security.
And when installing via Eclipse enable USB Debugging > Developer Options
Some tips:
http://developer.android.com/distribute/open.html
You can install .apk files directly to your android device using the following steps:
Write click on your .apk file and choose send to -> your device
You can access it using "Astro File Manager" (downloadable app from play store) also you can click phone menue button
go to "My Files"
Select your .apk file to install it.
I made an Android Hello world app and I'm trying to load it onto my HTC Incredible. I believe it has 2.2 (how do I confirm that?)
Anyway, Eclipse gives me this message and then brings up the window in the screenshot below.
Automatic Target Mode: Unable to
detect device compatibility. Please
select a target device.
I'm on Ubuntu 64bit if that matters. I did turn on USB debugging on the phone. I told the phone to connect as a disk drive.
Any ideas how to get my app onto the phone?
Update: Do I need to perform these steps since I'm on Ubuntu? I doesn't mention what to do for Ubuntu 8.10 though.
Ok, it turns out I did have to follow all the instructions from this page. (The sudo stuff mentioned in other answers above didn't help.)
Here are the exact commands I ran for Ubuntu 8.10
You need to run the adb server in superuser mode (i.e. sudo adb start-server).
Try what EboMike said, run sudu adb start-server.
To answer your question "how do I confirm my phone is V2.2?" Press your phone's menu key, then settings, about phone, software information. The Android version is the number you're looking for. This shouldn't be important though for your hello world example.
Also, it's not important that you have the phone connect as a disk drive; this causes the SD card to be dismounted. It will actually cause problems if you run or debug an application that tries to access the SD card. You can just select charge only and use ADB/Eclipse's DDMS perspective to move files to and from the phone.
Here's an update answer in case anyone finds this thread from Google.
http://dimitar.me/how-to-connect-your-android-phone-to-ubuntu-to-do-developmenttestinginstallations-or-tethering/
The easiest way to this: Go to www.dropbox.com and sign up for a free account. Copy your .apk file from your project's /bin directory to your Dropbox. Download and install the free Dropbox app from the Android Market. Navigate to your .apk file on the Dropbox app and click it to download and install on your phone.
These are the steps I took on Arch Linux to resolve the same problem:
As mentioned in some of the other replies you will need a udev rule for the device. In this example I am using an HTC Desire.
(for HTC you'll need to use "0bb4")
Get the correct Vendor and Product IDs
run lsusb with the handset plugged in and you should see something like Bus 001 Device 004: ID 0bb4:0c87 High Tech Computer Corp. Desire (debug)
'0bb4' is the Vender ID: HTC
'0c87' is the Product ID
Make a udev rule using the values you've just retrieved
Now make a udev rule as root using:
$ sudo vim /etc/udev/rules.d/51-android.rules
Add the following (this is for HTC Desire - edit accordingly):
## Rule for an HTC Desire Android Phone
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c87", MODE="0666", GROUP="users", NAME="HTC Desire"
GROUP defines which Unix group owns the device node.
At this point I rebooted and found that my handset was detected. Supposedly you can reload udev rules using the following but if this doesn't work try rebooting.
$ sudo udevadm control --reload-rules
in eclipse: go to Run menu -> Run configuration. Right click on android application on the right side and click new. Fill the corresponding details like project name under the android tab. Then under the target tab. Select launch on all compatible devices and then select active devices from the drop down list. Save the configuration and run it by either clicking run on the run button on the bottom right side of the window or close the window and run again
Cheers !
I developed an application. Now I want to deploy it on real device. Can any body please tell me the steps and the requirements to deploy it on a real device.
Thanks
Deepak
There are multiple ways:
If you don't use eclipse, you can use adb tool. adb -d install PATH_TO_YOUR_APK_FILE
If you use eclipse, you can click run application in eclipse's launch menu. If this doesn't work, make sure you have "USB Debugging Mode" checked on your android phone. It's in the application menu.
You can export your package and sign it! And then browse to it to install.
I just copy the APK for my project out of the /workspace/project/bin folder, and use Dropbox to send it to my device. Then I install the APK from Dropbox client on the device. (No need for cables!)
Hook up your SmartPhone through USB-cable and set your phone i debug mode found in Settings > Applications > Development > USB debugging. Next - run your project in eclipse and chose your device.
make sure 'Run configurations' is set to manual, or this will fail if set to automatic and the target is a emulator. To change this behaviour, go to 'Run > Run configurations > Target' and set 'Deployment Target Selection Mode' to manual. Click 'Close' and try again.
FYI, if you're on a Galaxy Nexus, you need to fish around Samsung's website to find the driver installer. Here it is : http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW
Note: If you're using adb -d install PATH_TO_YOUR_APK_FILE to install the apk on to your device,
you will need to run it from the adt-bundle-[magic]/sdk/platform-tools/ folder.
Better yet, add adb.exe to your $PATH, and you can run adb from your windows command line/ terminal.
Also, you have to set up your system to detect your device.
If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
If you're developing on Mac OS X, it just works. Skip this step.
If you're developing on Linux see official Android guide here