Android SDK - adb : How to install apk file on simulator
Test on: Mac OS X Yosemite
1. it's too easy but you should have eclipse and your android project.
2. open eclipse, right-click on your project goto "Run As > Run Configurations..."
3. see on Android tab, check "Do Nothing" and click "Run", it's will run android simulator without install your project in eclipse.
4. open Terminal and goto your "platform-tools" folder in android sdk path.
Test on: Mac OS X Yosemite
1. it's too easy but you should have eclipse and your android project.
2. open eclipse, right-click on your project goto "Run As > Run Configurations..."
3. see on Android tab, check "Do Nothing" and click "Run", it's will run android simulator without install your project in eclipse.
4. open Terminal and goto your "platform-tools" folder in android sdk path.
*please change android sdk path base on your machine.
Mac:~ poraweeraksasin$ cd "/Applications/adt-bundle-mac-x86_64-20140702/sdk/platform-tools"
5. press enter, then test active devices by type as below
Mac:platform-tools poraweeraksasin$ adb devices
List of devices attached
if the result show as above, it's mean no devices connect. let's check on step (3.)
the simulator was run correctly or not? try to run android simulator again.
6. type "adb devices" again and press enter.
Mac:platform-tools poraweeraksasin$ adb devices
List of devices attached
emulator-5554 device
if the result show as above "emulator-5554 device" the number emulator-xxxx should match as header of simulator window.
7. install your apk file that build from any other tools, you need to test on simulator.
copy your apk file and paste to folder "platform-tools" it's easy for type a short name,
let's type as below and press enter
*change file name base on your apk file name
Mac:platform-tools poraweeraksasin$ adb install SA_lite_v1.4.apk
copy your apk file and paste to folder "platform-tools" it's easy for type a short name,
let's type as below and press enter
*change file name base on your apk file name
Mac:platform-tools poraweeraksasin$ adb install SA_lite_v1.4.apk
2166 KB/s (18137061 bytes in 8.175s)
pkg: /data/local/tmp/SA_lite_v1.4.apk
Success
rm failed for -f, Read-only file system
Mac:platform-tools poraweeraksasin$
let see above result, if anything are correct, your apk file should installed "Success".
8. unlock your android and find your app/game and test it.
It's work.

Nice to see this article
ReplyDelete