포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.

hello android :)
안드로이드 서비스 bin/lib 제작의 예

#] su -
passwd: a

안드로이드 TOP 디렉토리로 이동
#] cd /root/origen_dual-ics

1. 프로젝트 디렉토리 생성
#] mkdir -p external/helloandroid

2. 안드로이드 Makefile 작성
#] gedit external/helloandroid/Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
helloandroid.c
LOCAL_MODULE := helloandroid
LOCAL_MODULE_TAGS := eng # lunch insingal_origen-eng
LOCAL_C_INCLUDES := frameworks/base/include \
system/core/include
#LOCAL_CFLAGS := -G
include $(BUILD_EXECUTABLE)


3. 프로젝트 소스 작성
#] gedit external/helloandroid/helloandroid.c

#include <stdio.h>

char * krrr_func(){
printf("Krrrrrrrrrrrr ..... :-) \n");
return "chlrbgh0";
}

int main()
{
printf("Hello, Android!!\n");
printf("Hello %s!!\n", krrr_func());
return 0;
}


4. 빌드 환경 설정 compile
-> 안드로이드 TOPDIR로 이동
#] cd /root/origen_dual-ics
#] source origen_envsetup.sh

#] cd external/helloandroid
#] mm

-> out/target/product/origen/system/bin/helloandroid 확인

5. 실행
안드로이드 TOP 디렉토리로 이동
#] cd /root/origen_dual-ics
#] adb remount
#] adb push ./out/target/product/origen/system/bin/helloandroid /system/bin/.
#] adb shell
#  helloandroid


List of Articles
번호 제목 글쓴이 날짜sort 조회 수
4 [자료] Android build system(안드로이드 빌드 시스템) for ICS file [7] 고도리 2012-04-16 7455
3 DRM(Digital Rights Management) on Android file [1] 고도리 2012-07-06 5440
» [android] hello android application 작성법 관리자 2013-12-11 2440
1 [android] mouse right button을 back key 처럼 동작시키는 방법 [1] 고도리 2017-05-28 267

사용자 로그인