This article describes the basics of the Android Primer tutorial. Share to everyone for your reference, specific as follows:
After downloading the Android source, the next step is to learn or develop.
Before developing, talk about some development necessary knowledge or tool, 工欲善其事 its prerequisite!
The previous "Android approach to using Eclipse for source code development" basically says development tools.
But how do we use simulators to develop?!
Of course you go to delete or add app to the simulator can not be operated as usual, take 5-10 minutes to understand if you need.
0. Compile the source code
Directly under the downloaded source root directory, execute:
SOURCE build/envsetup.sh
Make -j4
1. Set Variable
Set the environment variables for the Android emulator so that you can use the emulator, ADB commands under any path.
Create an emulator device, here for HVGA2.3
2. Start simulator
EMULATOR-AVD hvga2.3-partition-size 256
Note: Do not write the emulator device name that you created earlier, otherwise you will get the error:
Panic:could not open:/home/mark/.android/avd/hvga2.3.ini
The terminal executes the above command to start the emulator. Then execute:
3. Push APK
This assumes that the gallery3d.apk push to the specified directory.
ADB-E push
/out/target/product/generic/system/app/gallery3d.apk /system/app
4. Delete a file
Use the ADB shell and then enter the relevant directory, RM can!
5. Compile Module
If you modify a module, such as modifying the Gallery3d, then do so:
Mmm -j4 /source2.3.7/packages/apps/gallery3d
Or:
CD Source2.3/packages/apps/gallery3d
mm -j4
6. Compile Source code import emulator
After the module is compiled or the system compiles, you need to look at the effects of your own modifications, and you need to import the ximg file into the emulator.
After the successful compilation, in the source directory will produce an out directory, under the/out/target/product/generic can see a lot of img files,
You can import emulator by executing the following command:
CD src/out/target/product/generic
emulator-system system.img-data userdata.img-ramdisk ramdisk.img
For more information on Android-related content readers can view the site topics: "Android Development Introduction and Advanced Course", "Android Multimedia operating skills Summary (audio, video, recording, etc.)", "Android Basic Components Usage Summary", " Android View tips Summary, Android layout layout tips and a summary of Android controls usage
I hope this article will help you with the Android program.