I'd like to copy my whole emulator install to another computer with a desktop shortcut which will start it so that my friend can test my app. Has anyone done this?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Prerequisites: Your friend must have android SDK installed, with required API level, i.e. if you are developing in Android 1.6 your friend should have atleast 1.6 installed
Well considering you situation I will Recommend you should give your friend the
<application-name>.apk
file that gets generated in yourproject\bin
folder, since any method would either require a device or SDK installed on machine.You can then ask your friend to install that
.apk
file with asking him\her to navigate to tools directory of sdk and executingabd install "<.apk folder directory>.<apk-file-name>.apk"
when some avd is running, and can be created usingandroid create avd -n <name> -t <targetID>
from tools directory of sdk. Complete tutorial on how to create avd is here.But if you insist on doing a transfer of your entire AVD heres a quick untested tutorial.
Yes you can surely do that, I think. I haven't tried this on some other machine but hope this will help you.
Now
.android\avd
directory, well I don't know about the other OS but in Windows 7 its atC:\Users\<user-name>\.android\avd
<Android Virtual Device Name>.ini
file and<Android Virtual Device Name>.avd
folder. Which you can paste it in may be your flash drive or do some online sharing I dont know you choose your way of transferring this data.<Android Virtual Device Name>.ini
with any text editor and changepath=C:\Users\<your-user-name>\.android\avd\<Android Virtual Device Name>.avd
withpath=C:\Users\<your-friends-name>\.android\avd\<Android Virtual Device Name>.avd
basically you are changing the path where the folder.avd
lies.Now to create a desktop short-cut
Create a blank text file with:
and save it as
emulator_shortcut.bat
Now when you start the bat file your emulator will start.
Some notes:
Make sure you edit
<friends-sdk-directory>
,<Android Virtual Device Name>
,<your-user-name>
,<your-friends-name>
,<.apk folder directory>
,<apk-file-name>
with appropriate values.Well, it's not true that you need the complete SDK to run the emulator. If you copy only these files from the Android SDK installation and from your AVD (i.e
~/.android/avd/my.avd
)you will be able to start the emulator as
and any APK installed and configuration set will persist. Your friend would only need to run this command line which you can put in a script.
To run the emulator properly, you‘ll need three components
The emulator.exe in the
SDK_folder/tools/
Android System images and emulator skins
images are at
<SDK folder>/platforms/<specific platform>/images
skins are at
<SDK folder>/platforms/<specific platform>/skins
Make sure the images and skins are under the same folder.
If you use google apis as your target system, the images are at
<SDK folder>/add-ons/<specific google api version>/images
User images which are also known as avds. You could create them with the AVD manager and the default location of the created AVDs depends on your OS.
For Win7, it is under
C:\Users\<user-name>\.android\avd
.OK. Now you could move these three components to anywhere you want.
Say you've copied the emulator into
<My Emulator Dir>
,copied the system images and skins into<System Image Dir>
, copied you specific avd into<User Image Dir>
.Now You could write a batch file to run the emulator.
<My Emulator Dir>\emulator.exe -sysdir <System Image Dir> -datadir <User Image Dir> -cache <User Image Dir>\cache.img
Here is a good article how to copy already created AVD devices to new machine:
http://blahti.wordpress.com/2011/08/24/how-to-export-and-import-android-virtual-device-avd-files/
A short description:
Find your avd folder on you machine, check your user directory. For me, with user name “blahti”, those locations are:
Windows 7: \users\blahti.android
Windows XP: C:\Documents and Settings\blahti.android\
Linux/Mac: ~/.android
In avd folder do: Compress the device.avd folder and the device.ini file. (Replace “device” with the name of the device you want to copy. For example: Evo4g.avd, Evo4g.ini.)
Edit the ini file and make corrections, as needed: (a) user name could be different; (b) change slash in path to Windows or Unix slash.