How do I copy an android app to an actual device? - android

I have written a simple android app and it runs in the emulator.
Now how do I actually copy it to my phone? I have HTC's Eris. When I attach it with USB it asks me If I want to mount it as a USB mass storage device. I then see it in my drive list.
the directories on the device are:
albumthumbs
amazonmp3
com.google.android.apps.listen
ComicReader
data
DCIM
download
media
music
rosie_scroll
Now what should I copy from my Project directory and where should I put it?
And is there any other process I need to run to "install" my app?

The adb tool provides a command for installing an application onto the phone, adb install .... It takes the .apk file as an arguement. adb --help has a bit more info.

If you are running Eclipse, you can setup Eclipse to publish the application to a connected device.
http://developer.android.com/guide/developing/device.html

You can also simply copy the .apk file to the sdcard and navigate to it using a file manager such as Astro. Long press on it, and Astro will install it for you.

You should be able to use HTC Sync, if you are on Windows..
At least for Hero, it will automatically install APK files on my phone, when I double click them
Download: http://www.htc.com/us/support/droid-eris-verizon/downloads/

Install ADB driver. Have your phone in USB debugging mode. In an opened eclipse code press ctrl+F11. it will show your device. Run through it

Related

ADB Install needs Root ? vs Eclipse Install?

I try to understand how this works:
When I create an android app and run it from Eclipse, Eclipse takes care of generating the apk file and uses adb to install it on the phone correct?
When I have an .apk file that I try to push on the phone and use ADB directly in a command line by calling adb install myApp.apk I can't because my phone isn't rooted?
How does Eclipse manages to install apps then?
Is there a way to install from an .apk file on a device without having it rooted ? Obviously Eclipse is able to.
Thanks for any information that may help clarifying this.
David
So the really short answer to your question; You don't need to be rooted to use ADB, all android phones can use ADB without being rooted.
Also, the only reason you would need root is to mess with things on the system level, when installing a regular app you are just installing it like a regular application (to the data partition). Eclipse installs the app using ADB actually, so pushing an app using ADB is the same as installing it through eclipse.
You don't need to be rooted to use ADB, all android phones can use ADB without being rooted. You must be rooted to push applications to /system/apps/ to make them system applications. Also if you download a file explorer like ES File Explorer to your phone, you can transfer an apk file to your phones storage and using a file explorer (I really do recommend ES File Explorer) you can install that app.
Also just a tip, to use ADB command line you must enable ADB on your phone in developer settings.
Go to the settings menu, and scroll down to "About phone." Tap it.
Scroll down to the bottom again, where you see "Build number."
Tap it seven (7) times. After the third tap, you'll see a dialog that says you're four taps away from being a developer. Keep on tapping and the developer settings will show up in the settings app. There you can turn on ADB.
Hope this helps.
Further Reading: http://developer.android.com/tools/help/adb.html
http://www.androidcentral.com/how-enable-developer-settings-android-42

Applications onto android-x86

I have android x86 froyo as live cd when i am inserting usb drive to pc it is detecting as sdcard . i want to know how to install .apk application residing into /sdcard/
Put your phone in mass storage mode - copy the .apk to the SDCard. Then use a file browser app to navigate to the SDCard, find the .apk and install it from there.
I found answer for this now want to share,put .apk package into usb drive which will detect in androidx86 as sdcard,press ALT+F1 which will take you to console from which mv .apk to /system/apps,then issue chown 1000:1000 apps,that will enable this application for you.

Install APK from SD card no file browser Android phone

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.
Enable usb debugging
Install the drivers and android sdk
Connect the phone through usb to your computer
Call the following program from the command prompt: adb install
application.apk
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)
Why not download one of the MANY file browsers in the market? May I suggest my favorite which is Astro File Manager
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.
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.

installing .apk file in actual device only for testing

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.

Upload Android Source Code into real device

I have build whole android source code...with the help of make command....for dream htc product...now i want to deploy those files(system.img,recovery.img,userdata.img,boot.img) in my real device htc t mobile g1...how can i deploy those files....?
I assume you're just starting out with Android, in which case it would be very wise to use the Android Development Tools Plugin for Eclipse, which I'm guessing you're not doing currently.
Once you install that, deploying to your application to your Android device is as simple as right clicking the project in Eclipse, and selecting "Run As -> Android Application".
Note: make sure you enable debugging on your phone: "Settings -> Applications -> Development -> USB debugging".
I guess what u wanna do is create a flashable zip file and install it via recovery,
You need to get the Android Kitchen (provided you have a Linux box or else you have to install cygwin on windows)goto http://forum.xda-developers.com/showthread.php?t=633246
and download the kitchen execute the .menu and you'll find a really long menu that may help you to package the files into a flashable zip file,
and since you are using HTC Dream install the amon ra's custom recovery(you need to root the device first,install the universal AndRoot from play store and root your device)copy the file to your sdcard and rename it as recovery.img if you have a terminal emulator app goto the prompt and type flash_image recovery /sdcard/recovery.img and if you are having trouble with the flash_image binary install busyBox from app store and that should solve the problem,
and after the recovery had been installed goto the terminal app or adb window then type reboot recovery or turn on the device by holding home key and in the recovery window do a complete wipe and select the option flash zip archive or something, browse the zip file you have created using the kitchen from the sdcard and select yes wait for the process to complete. hope this helps you

Categories

Resources