
It all started with the need to fix the hosts on an emulator from
Intel . Only here all the found instructions did not lead to a positive result, as it turned out, because of the read-only system image. Since the task of editing hosts described by me is not so popular, it was decided to replace it with a more relevant and interesting one.
As a result, you will get an emulator with an open file system and access to Google Play.
')
Well, we will enrich our emulator with various Google services!
All actions are described for
Android 4.2 Intel Emulator and performed under OS X. In the course of the article I will provide direct links to the files, just in case, I will indicate the pages where they can be downloaded.
The steps for Linux users will be almost identical, Windows users will need to find the binaries themselves.
To begin, we will return the package manager to our OS.
Homebrew is ideal as a solution:
how to install and refuse l to start using brew in OS X.
Warning: additional installation of Command Line Tools may be required.a) simply via Xcode:
b) difficult via the Apple Developer site (but there is no need for Xcode):
developer.apple.com/downloads
Set unyaffs
For his sake, the package manager was installed, and unyaffs are needed to extract the
insides of the system image of the emulator.
In the terminal:
brew install --HEAD unyaffs
In advance we will worry about the inverse operation of packaging in the image
a) download the source code (
yaffs2-source.tar ) from this page
code.google.com/p/fatplus/downloads/list
b) extract
c) add 2 lines at the end of the devextras.h file before the last #endif
typedef long long __kernel_loff_t; typedef __kernel_loff_t loff_t;
d) run the make command in the utils directory
e) copy the mkyaffs2image file to the / usr / local / bin folder (for UI lovers. Finder: cmd + shift + G)
Source: nookdevs.com/Yaffs2OSX
By giblets
In the terminal:
cd ~/android-sdk-macosx/system-images/android-17/x86/ mkdir image cd image/ unyaffs ../system.img
Note: we change the path to the SDK according to your location.
We start
a) download
gapps.ics.20120703-2-aroma.zip from this page
code.google.com/p/android-google-apps/downloads/list
b) unpack
c) just copy 4 apk'shki and delete one. In the terminal, go to the unpacked folder, then execute:
cp system/app/GoogleLoginService.apk ~/android-sdk-macosx/system-images/android-17/x86/image/app/ cp system/app/GoogleServicesFramework.apk ~/android-sdk-macosx/system-images/android-17/x86/image/app/ cp custom/market/Vending.apk ~/android-sdk-macosx/system-images/android-17/x86/image/app/ cp custom/market/MarketUpdater.apk ~/android-sdk-macosx/system-images/android-17/x86/image/app/ rm ~/android-sdk-macosx/system-images/android-17/x86/image/app/SdkSetup.apk
Note: we change the path to the SDK according to your location.
We sew
In the terminal:
cd ~/android-sdk-macosx/system-images/android-17/x86/ mv system.img system_original.img mkyaffs2image image system.img
Note: we change the path to the SDK according to your location.
And so, it remains only to test the performance of our Frankenstein
In the terminal:
emulator @4.2.x86 &> /dev/null &
or more familiar way
android avd
Note: change the name of the emulator to your
As you can see, the range on Google Play is a bit lame. But it does not matter:
edit as you like the build.prop file , which is in the root of the system image, should help!
UPD: still need to
add the necessary permissions . Thanks
sergeyotro !
PS All the manipulations are adequate not only for the Intel emulator with the latest version of Android, but also for the previous ones, starting with ICS. Just do not forget to fix the path to the folder with the system image inside the SDK in the commands.