Showing posts with label ANDROID. Show all posts
Showing posts with label ANDROID. Show all posts

Android Development Overview ...

Android is a Linux-based operating system designed primarily for touchscreen mobile devices such as smartphones and tablet computers. Initially developed by Android, Inc., which Google backed financially and later bought in 2005, Android was unveiled in 2007 along with the founding of the Open Handset Alliance: a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices. 

Android software development is the process by which new applications are created for the Android operating system. Applications are usually developed in the Java programming language using the Android Software Development Kit, but other development tools are available. 


ref:

Android Wiki - 

Android Source - http://source.android.com/

Android Platform Developer's guide - http://www.kandroid.org/online-pdk/guide/index.html





Downloading and building Android - http://source.android.com/source/building.html

Android SDK ADT bundle - http://developer.android.com/sdk/index.html#download


Android Development Intelpedia Wiki - https://intelpedia.intel.com/SFF_Android_Development



Intel for Android Developers Learning Series Landing Page - http://software.intel.com/en-us/blogs/2012/11/28/intel-for-android-developers-learning-series

Development and Optimization for NDK-based Android Game Application on Platforms based on Intel® Architecture - http://software.intel.com/en-us/articles/development-and-optimization-for-ndk-based-android-game-application-on-platforms-based-on

Installing the Android SDK for Intel® Architecture - http://software.intel.com/en-us/articles/installing-the-android-sdk-for-ia/
Remote Application Debug on Android OS - http://software.intel.com/en-us/articles/application-debug-android/


Intel ships high-powered C++ compiler for native Android apps - http://www.theregister.co.uk/2013/08/28/intel_cpp_compiler_for_android/

Intel compilers for Windows and Linux are available for internal use here - softwareproducts.intel.com/ILC


How to add a native lib to apk - http://stackoverflow.com/questions/4365227/add-a-native-lib-to-an-apkhttp://stackoverflow.com/questions/8295728/how-to-add-a-shared-library-to-my-apk


Where can I browse Android source code on-line - http://stackoverflow.com/questions/449763/where-can-i-browse-android-source-code-on-line


Linux Device Drivers - ttp://lwn.net/Kernel/LDD3/


Porting Unix to Windows - http://msdn.microsoft.com/en-us/library/y23kc048.aspx


Windows to Unix Porting - 

Porting Windows to Unix - http://www.woodtennis.com/win2unix.html

Porting Windows to Unix - http://www.woodtennis.com/win2unix.html


Unix man pages - http://www.unix.com/man-page/All/3/libm/

Android Development Tips ...

Note:
    All tips/commands are written w.r.t Linux(Ubuntu) OS ...

1. Command to start Android AVD manager from commandline

    $ android avd

2. Command to start Android SDK manager from commandline

    $ android sdk

3. An android emulator device is always rooted. Remount /system partition on the device

    $ adb remount
    (or)
    $ adb shell 
    # mount -o rw,remount /system

note:
    Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. 

4. To avoid the Out of memory error when trying to copy the any file from host to device(guest) /system/bin, you need to start the emulator manually with a large –partion-size argument:

    $ emulator -avd MYNAME -partition-size 300

5. Android Development Tools on host OS(Linux, Windows)

    $ monitor => device monitor ( logcat, file_manager, push, pull)

    $ lint => static analysis

    $ proguard => code obfuscation (makes difficult to reverse engineer)

    $ monkey => gui testing tool

6. Build android ANT projects

    $ ant debug => debug build & create ,apk file
       (This creates your debug .apk file inside the project bin/ directory, named -debug.apk)

    $ ant release => release build & create ,apk file

    $ ant debug install => debug build & create .apk file and install in the active AVD device

7. Install .apk file on the AVD

    $ adb install .apk

    $ adb -s emulator-5554 install path/to/your/app.apk

    $ adb -d install path/to/your/app.apk
      (note: The -d flag specifies that you want to use the attached device (in case you also have an emulator running)

8. ADB commands

To know the android device API version => 
    $ adb shell getprop ro.build.version.release

To start a application from commandline => 
    $ adb shell am start -n com.google.android.contacts/.ContactsActivity

To terminate the application => 
    $ adb shell am kill com.google.android.contacts
    $ adb shell am force-stop com.google.android.contacts

To start the android Service => 
    $ adb shell am startservice -n packageName/.ServiceClass

9. Debug native code on the emulator (or) device using gdbclient(host), gdbserver(device)

a. First you need to run gdbserver on the device =>

    $ gdbserver :5039 /system/bin/executable       
(note: The :5039 tells gdbserver to listen on port 5039 on the localhost, which adb bridges from the host to the device. executable represents the command to debug, a common one being runtime -s which starts the entire system all running in a single process.)

b. Launch gdb on the desktop. This can be done easily with the following command in the shell from which you built =>

    $ gdbclient executable

ref: 

10. Android Source code

    a. Android GIT repositories - https://android.googlesource.com/

    c. Android AOSP bionic source code - https://github.com/android/platform_bionic

    d. Download Android AOSP source code - http://source.android.com/source/downloading.html