original link : http://techqa.info/programming/question/28285850/Opensuse-13-1-build-envsetup-sh--syntax-error-near-unexpected-token------r--



Error:

bash: build/envsetup.sh: line 1: syntax error near unexpected token $'{\r'' 'ash: build/envsetup.sh: line 1:function hmm() {


Solve:

The problem comes from Windows end-of-lines (EOL) so you'll have to convert all scripts to unix-style EOL through dos2unix (run apt-get install dos2unix on Ubuntu) and then convert your scripts:

dos2unix build/envsetup.sh sdk/bash_completion/adb.bash

Then all vendorsetup.sh (that will prevent the "command not found" error you get):

find device/ -name vendorsetup.sh -exec dos2unix {} \;

And one last to run the choosecombo script:

dos2unix build/core/find-jdk-tools-jar.sh

EDIT: In order to finish the overall compilation, the exhaustive conversion:

find . -name '*.sh' -exec dos2unix {} \;
find . -name '*.py' -exec dos2unix {} \;
find . -name '*.c' -exec dos2unix {} \;
find . -name '*.h' -exec dos2unix {} \;
find . -name '*.cpp' -exec dos2unix {} \;
find . -name '*.hpp' -exec dos2unix {} \;
find . -name '*.txt' -exec dos2unix {} \;
find . -name 'Config.in' -exec dos2unix {} \;
find . -name 'Config.src' -exec dos2unix {} \;
find . -name 'Makefile' -exec dos2unix {} \;
find . -name 'mkmakefile' -exec dos2unix {} \;
find . -name 'Kconfig*' -exec dos2unix {} \;
find . -name rmtypedefs -exec dos2unix {} \;
find . -name apicheck -exec dos2unix {} \;
find . -name seapp_contexts -exec dos2unix {} \;
dos2unix external/busybox/scripts/* external/busybox/applets/* kernel/scripts/* dalvik/dx/etc/* prebuilts/sdk/tools/*

The *.sh for all shell scripts, and *.py for all python scripts (used during make compilation), as well as .c and .cpp file (obviously) and other files used by makefiles.

Of course you could go the over-overkill find . -type f -exec dos2unix -s -k -o {} \; and let dos2unix decide which files are text and which are binary.

There might be other. I'll edit this answer as I find new ones...

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

Error:


Checking API: checkapi-last

out/target/common/obj/PACKAGING/public_api.txt:23556: error 12: Class android.telephony.gsm.SmsMessage changed static qualifier

prebuilts/sdk/api/19.txt:23513: error 9: Removed public constructor SmsMessage()

prebuilts/sdk/api/19.txt:23514: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength

prebuilts/sdk/api/19.txt:23515: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength

prebuilts/sdk/api/19.txt:23516: error 9: Removed public method android.telephony.gsm.SmsMessage.createFromPdu

prebuilts/sdk/api/19.txt:23517: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayMessageBody

prebuilts/sdk/api/19.txt:23518: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayOriginatingAddress

prebuilts/sdk/api/19.txt:23519: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailBody

prebuilts/sdk/api/19.txt:23520: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailFrom

prebuilts/sdk/api/19.txt:23521: error 9: Removed public method android.telephony.gsm.SmsMessage.getIndexOnSim

prebuilts/sdk/api/19.txt:23522: error 9: Removed public method android.telephony.gsm.SmsMessage.getMessageBody

prebuilts/sdk/api/19.txt:23523: error 9: Removed public method android.telephony.gsm.SmsMessage.getMessageClass

prebuilts/sdk/api/19.txt:23524: error 9: Removed public method android.telephony.gsm.SmsMessage.getOriginatingAddress

prebuilts/sdk/api/19.txt:23525: error 9: Removed public method android.telephony.gsm.SmsMessage.getPdu

prebuilts/sdk/api/19.txt:23526: error 9: Removed public method android.telephony.gsm.SmsMessage.getProtocolIdentifier

prebuilts/sdk/api/19.txt:23527: error 9: Removed public method android.telephony.gsm.SmsMessage.getPseudoSubject

prebuilts/sdk/api/19.txt:23528: error 9: Removed public method android.telephony.gsm.SmsMessage.getServiceCenterAddress

prebuilts/sdk/api/19.txt:23529: error 9: Removed public method android.telephony.gsm.SmsMessage.getStatus

prebuilts/sdk/api/19.txt:23530: error 9: Removed public method android.telephony.gsm.SmsMessage.getStatusOnSim

prebuilts/sdk/api/19.txt:23531: error 9: Removed public method android.telephony.gsm.SmsMessage.getSubmitPdu

prebuilts/sdk/api/19.txt:23532: error 9: Removed public method android.telephony.gsm.SmsMessage.getSubmitPdu

prebuilts/sdk/api/19.txt:23533: error 9: Removed public method android.telephony.gsm.SmsMessage.getTPLayerLengthForPDU

prebuilts/sdk/api/19.txt:23534: error 9: Removed public method android.telephony.gsm.SmsMessage.getTimestampMillis

prebuilts/sdk/api/19.txt:23535: error 9: Removed public method android.telephony.gsm.SmsMessage.getUserData

prebuilts/sdk/api/19.txt:23536: error 9: Removed public method android.telephony.gsm.SmsMessage.isCphsMwiMessage

prebuilts/sdk/api/19.txt:23537: error 9: Removed public method android.telephony.gsm.SmsMessage.isEmail

prebuilts/sdk/api/19.txt:23538: error 9: Removed public method android.telephony.gsm.SmsMessage.isMWIClearMessage

prebuilts/sdk/api/19.txt:23539: error 9: Removed public method android.telephony.gsm.SmsMessage.isMWISetMessage

prebuilts/sdk/api/19.txt:23540: error 9: Removed public method android.telephony.gsm.SmsMessage.isMwiDontStore

prebuilts/sdk/api/19.txt:23541: error 9: Removed public method android.telephony.gsm.SmsMessage.isReplace

prebuilts/sdk/api/19.txt:23542: error 9: Removed public method android.telephony.gsm.SmsMessage.isReplyPathPresent

prebuilts/sdk/api/19.txt:23543: error 9: Removed public method android.telephony.gsm.SmsMessage.isStatusReportMessage

prebuilts/sdk/api/19.txt:23544: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_16BIT

prebuilts/sdk/api/19.txt:23545: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_7BIT

prebuilts/sdk/api/19.txt:23546: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_8BIT

prebuilts/sdk/api/19.txt:23547: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_UNKNOWN

prebuilts/sdk/api/19.txt:23548: error 10: Removed field android.telephony.gsm.SmsMessage.MAX_USER_DATA_BYTES

prebuilts/sdk/api/19.txt:23549: error 10: Removed field android.telephony.gsm.SmsMessage.MAX_USER_DATA_SEPTETS

prebuilts/sdk/api/19.txt:23550: error 10: Removed field android.telephony.gsm.SmsMessage.MAX_USER_DATA_SEPTETS_WITH_HEADER


******************************

You have tried to change the API from what has been previously released in

an SDK.  Please fix the errors listed above.

******************************


Solution:


1. change javadoc

$sudo update-alternatives --install "/usr/bin/javadoc" "javadoc" "/usr/local/jdk1.6.0_45/bin/javadoc" 1;


$sudo update-alternatives --config javadoc


2. update API

$make update-api



저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

target Generated: libwebcore <= external/webkit/Source/WebCore/dom/make_names.pl

Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.

BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.



solution:

sudo apt-get install libswitch-perl

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

https://source.android.com/source/building-devices.html


Building fastboot and adb

$make fastboot adb

out/host/linux-x86/bin$ ls fastboot



fastboot mode on target device

Booting into fastboot mode


DeviceKeys
hammerheadPress and hold both Volume Up and Volume Down, then press and hold Power
floPress and hold Volume Down, then press and hold Power
debPress and hold Volume Down, then press and hold Power
mantaPress and hold both Volume Up and Volume Down, then press and hold Power
makoPress and hold Volume Down, then press and hold Power
grouperPress and hold Volume Down, then press and hold Power
tilapiaPress and hold Volume Down, then press and hold Power
phantasmPower the device, cover it with one hand after the LEDs light up and until they turn red
maguroPress and hold both Volume Up and Volume Down, then press and hold Power
toroPress and hold both Volume Up and Volume Down, then press and hold Power
toroplusPress and hold both Volume Up and Volume Down, then press and hold Power
pandaPress and hold Input, then press Power
wingrayPress and hold Volume Down, then press and hold Power
crespoPress and hold Volume Up, then press and hold Power
crespo4gPress and hold Volume Up, then press and hold Power




find ID for target device

$ ./fastboot devices



Unlock bootloader

$ fastboot oem unlock


Upload all image

 $ cd ./framework
 $ fastboot flashall


Upload each image

$ cd out/target/product/manta

 $ fastboot flash boot boot.img
 $ fastboot flash system system.img
 $ fastboot flash userdata userdata.img
 $ fastboot flash recovery recovery.img


done!!




************************************

On Nexus 10, after unlocking the bootloader, the internal storage is left unformatted and must be formatted with

$ fastboot format cache
$ fastboot format userdata


Cleaning up when adding proprietary binaries

In order to make sure that the newly installed binaries are properly taken into account after being extracted, the existing output of any previous build needs to be deleted with

$ make clobber


저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23. BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23. make: * [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2



Solve

$sudo apt-get install libswitch-perl


I have solve this, actually i was using 14.04LTS for android 4.2jellybean source code. In 14.04LTS have to install the switch module. Below is the procedure to install

1:use below command and configure as automatic $cpan App::cpanminus

2:install switch $cpanm Switch

Note:By using these two commands that problem solved in my Ubuntu 14.04LTS....



ref : http://stackoverflow.com/questions/23314652/cant-locate-switch-pm

thank you stackoverflow

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

make iso_img TARGET_PRODUCT=android_x86 

하면서 만난 에러들 처리


Error : 

Notice file: frameworks/base/libs/androidfw/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libandroidfw.a.txt

Notice file: system/core/libutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libutils.a.txt

Notice file: system/core/libcutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libcutils.a.txt

Notice file: system/core/liblog/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/liblog.a.txt

prebuilts/tools/gcc-sdk/gcc: line 40: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/i686-linux-gcc: No such file or directory


solution :
$ apt-get install build-essential

$ apt-get install g++-multilib


$ apt-get install git gnupg flex bison gperf zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 u-boot-tools minicom libncurses5-dev uuid-dev:i386 liblzo2-dev:i386


apt-get install 하는 도중에 다시 다음과 같은 에러를 만남

Error : 

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-30.54_amd64.deb  404  Not Found [IP: 91.189.88.153 80]


E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-30.54_i386.deb  404  Not Found [IP: 91.189.88.153 80]


solution :

  $ vi /etc/apt/sources.list

- deb http://security.ubuntu.com/ubuntu trusty-security main restrict

+ deb http://security.ubuntu.com/ubuntu trusty-security main

   $ apt-get update


   $ apt-get install git gnupg flex bison gperf zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 u-boot-tools minicom libncurses5-dev uuid-dev:i386 liblzo2-dev:i386


다시 다음과 같은 Error를 만남
Error :

target Export Resources: framework-res (out/target/common/obj/APPS/framework-res_intermediates/package-export.apk)

/bin/bash: jar: command not found

make: *** [out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 127


solution:
 $ sudo update-alternatives --install "/usr/bin/jar" "jar" "/usr/local/java/jdk1.7.0_60/bin/jar" 1;
 $ sudo update-alternatives --set jar /usr/local/java/jdk1.7.0_60/bin/jar;

Error :

libpng warning: Ignoring attempt to set cHRM RGB triangle with zero area

libcore/libdvm/src/main/java/java/lang/Enum.java:150: error: ordinal has private access in Enum

        return ordinal - o.ordinal;


solution : 
https://android.googlesource.com/platform/libcore/+/9c8864d39704b3d264ef9dfbdc1bfcfd8f1b6bb9%5E!/#F0

149     public final int compareTo(E o) {
-150         return ordinal - o.ordinal;
+150         return ordinal - o.ordinal();
151     }

Error : 
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [out/target/product/x86/obj/GYP/shared_intermediates/templates/org/chromium/base/ActivityState.java] Error 1

solution : 
  $ vi ~/.bashrc
added following lines in end
JAVA_HOME=/usr/lib/jvm/jdk1.7.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH

  $ source ~/.bashrc

Error : 
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.util.ExceptionWithContext
at com.android.dex.util.ExceptionWithContext.withContext(ExceptionWithContext.java:45)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:377)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:139)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:94)
at com.android.dx.command.dexer.Main.processClass(Main.java:682)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
at com.android.dx.command.dexer.Main.access$600(Main.java:78)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:596)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
Caused by: java.lang.NullPointerException
at com.android.dx.cf.code.ConcreteMethod.<init>(ConcreteMethod.java:87)
at com.android.dx.cf.code.ConcreteMethod.<init>(ConcreteMethod.java:75)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:277)
... 15 more
...while processing <init> (Lcom/android/internal/telephony/gsm/GSMPhone;)V
...while processing com/android/internal/telephony/gsm/GSMPhone$1.class

1 error; aborting

solution : 
java가 맞지 않는 것 같으니 guide 대로 다시 설치해보자
  $ sudo apt-get install openjdk-7-jdk
   개선사항 없음

source build/envsetup.sh
export ARCH=x86
lunch android_x86-eng


저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

기본적으로 linux는 ubuntu 14.04(64bit desktop)를 VM에 설치했다.


hard disk : 30G

memory : 1G


android-x86 용 가이드가 잘 되어 있어서 따라하기만 하면 됨


http://www.android-x86.org/getsourcecode


  $ repo init -u http://git.android-x86.org/manifest -b kitkat-x86

  $ repo sync



install JAVA : 최신버전인 1.8 설치했더니 맞지 않단다 1.6 or 1.7을 설치하라고 해서 다시 설치함

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

download : jdk-7u60-linux-x64.tar.gz


  $ mkdir /usr/local/java/

  $ mv jdk-7u60-linux-x64.tar.gz /usr/local/java/

  $ tar xvfz /usr/local/java/jdk-7u60-linux-x64.tar.gz

  $ sudo vi /etc/profile


마지막 부분에 내용 추가

export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")


명령어에 새로 설치한 java를 등록

  $ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_60/bin/java" 1;


  $ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_60/bin/javac" 1;

 

  $ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_60/bin/javaws" 1;


  $ sudo update-alternatives --set java /usr/local/java/jdk1.7.0_60/bin/java;

  $ sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_60/bin/javac;

  $ sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_60/bin/javaws;


변경사항 적용

  $ source /etc/profile


설치 확인

  $ java -version




저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:

external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]

make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1




SOLUTION

external/oprofile/libpp/format_output.h
Fix/Work-around:
- mutable counts_t & counts;
+ counts_t & counts;


저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

external/mesa3d/src/glsl/linker.cpp:623:33: warning:   by ‘virtual ir_visitor_status remap_variables(ir_instruction*, gl_shader*, hash_table*)::remap_visitor::visit(ir_dereference_variable*)’ [-Woverloaded-virtual]

external/mesa3d/src/glsl/linker.cpp: In function ‘void assign_varying_locations(gl_shader_program*, gl_shader*, gl_shader*)’:

external/mesa3d/src/glsl/linker.cpp:1394:49: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1394:50: error: ‘varyings’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1394:58: error: ‘offsetof’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1395:48: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1412:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1412:48: error: ‘position’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1414:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1414:48: error: ‘pointSize’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1424:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1424:48: error: ‘position’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1428:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1428:48: error: ‘frontFacingPointCoord’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1431:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1431:48: error: ‘frontFacingPointCoord’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp: In function ‘void link_shaders(const gl_context*, gl_shader_program*)’:

external/mesa3d/src/glsl/linker.cpp:1734:49: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1734:50: error: ‘fragColor’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope

make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1




SOLUTION

Problem comes from host libstdc++. Since version 4.6 <cstdio> does not include <cstddef> anymore.

Downgrade host package to libstdc++ 4.5 or add '#include <cstddef>' into linker.cpp

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

https://source.android.com/source/build-numbers.html


Code name

Version

API level

(no code name)

1.0

API level 1

(no code name)

1.1

API level 2

Cupcake

1.5

API level 3, NDK 1

Donut

1.6

API level 4, NDK 2

Eclair

2.0

API level 5

Eclair

2.0.1

API level 6

Eclair

2.1

API level 7, NDK 3

Froyo

2.2.x

API level 8, NDK 4

Gingerbread

2.3 - 2.3.2

API level 9, NDK 5

Gingerbread

2.3.3 - 2.3.7

API level 10

Honeycomb

3.0

API level 11

Honeycomb

3.1

API level 12, NDK 6

Honeycomb

3.2.x

API level 13

Ice Cream Sandwich

4.0.1 - 4.0.2

API level 14, NDK 7

Ice Cream Sandwich

4.0.3 - 4.0.4

API level 15, NDK 8

Jelly Bean

4.1.x

API level 16

Jelly Bean

4.2.x

API level 17

Jelly Bean

4.3

API level 18


Source Tree


├── bionic                        : bionic libc(BSD의 libc 수정)를 포함

├── bootable                       : bootloader, recovery mode 관련 코드

├── build                          : 빌드 관련 스크립트를 저장

│   ├── envsetup.sh           : 환경 정보 설정 파일, 제조사의 Flag들에 대한 설정

   │                                           ( source build/envsetup.sh 로 반영)

│   ├── core

│   │       └── prelink-linux-arm.map : shared library들이 로딩되는 번지를 

   │                                                     미리 지정한 파일

│   └── target

│            └── board

│               └── generic

│                           ├── AndroidBoard.mk    : 최상위 directive 파일, 

│                               │                                     Android 최종 결과물 구성서 

│                               │                                     자동 포함 bin에 대한 install을 결정

│                           │                              init.rc, init%hw%.rc 들을 install

│                           ├── BoardConfig.mk   : HAL의 en/disable 등을 결정, 

│                               │                      Android.mk파일들에서 사용되는 define을 선언

│                           └── device.mk   : 최종 결과물에 대해 filesystem설정 및 

                                                      포함시키고 싶은 binary들을 copy/install 결정

├── cts                 : Compatibility Test Suite, GMS를 탑재 위해 통과해야 하는 Test

├── dalvik               : dalvik VM 관련 소스 코드

├── development           : 개발용 application을 저장 

                                   (하위에 samples directory에 참고할만한 source가 많이 있다)

├── device               : 칩 관련 설정 파일 및 디버깅을 위한 cmm 파일 등을 포함

├── external                 : 기존 작성된 library, binary등의 소스 코드를 포함

│       └── synergy : CSR synergy source 

├── frameworks

│      ├── base      : Android Framework Source Code

│      ├── cmds      : binder 관련된 service manager 소스코드 및 여러 가지 command

│      ├── libs        : Android base library(AudioFlinger,SurfaceFlinger,util,binder 등)

│      ├── media     : media 관련 Client & Service 라이브러리

│      │                      (media관련된 부분이 양이 많고 독립적이라 따로 빼서 관리함)

│      └── policies : Android 시스템을 background에서 제어하는 최상위 application

│                            KeyGuard 관련, 화면 제어(rotation..),event 관리 등의 작업 처리

├── hardware         : Android에서 사용하는 h/w 관련 소스 코드 포함(HAL, include..)

│      ├── libhardware     : Board H/W 의존성이 높은 하드웨어 모듈 포함

│      └── libhardware_legacy: 일반적으로 Android에 반드시 있어야 하는 H/W 모듈

├── packages               : Android 기본 Application 소스 코드를 포함

├── prebuilt                 : 툴체인과 미리 빌드되어 들어가는 바이너리 파일 포함

├── system             : Android의 기본 바이너리 소스 코드(init…)

│      ├── core

│      │      ├── init           : Android init 소스 코드

│      │      └── vold         : external storage 제어 모듈 (Eclair)

│      └── vold                 : external storage 제어 모듈 (Froyo/Gingerbread)

├── vendor               : vendor specific code(HAL, product list 관리…)

└── ndk                 : Native Development Kit (docs directory를 참고하면 

도움이 많이 된다. : ANDROID-MK.html, SYSTEM-ISSUES.html, NDK-BUILD.html등)



저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn


LogFilter.exe



JAVA version은 지원하는데 MFC버전은 더이상 지원하지 않는다고 한다.

완전히 사라지기 전에 일단 백업!


atd-bundle-windows/sdk/platform-toos/

adb.exe와 같은 경로에 넣어주고 실행하면

sdk/tools/ddms.bat 를 실행했을 때 나오는 log를 함께 볼 수 있다.


이 툴은 보고 싶은 메시지와 지우고 싶은 메시지를 선택하여 볼 수 있어서 편리함.

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

build error

Programming/android 2013.07.02 13:20

external/mesa3d/src/glsl/linker.cpp: In function ‘void assign_varying_locations(gl_shader_program*, gl_shader*, gl_shader*)’:

external/mesa3d/src/glsl/linker.cpp:1395:8: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1395:9: error: ‘varyings’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1395:17: error: ‘offsetof’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1398:48: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1415:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1415:48: error: ‘position’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1417:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1417:48: error: ‘pointSize’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1427:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1427:48: error: ‘position’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1431:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1431:48: error: ‘frontFacingPointCoord’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1434:47: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1434:48: error: ‘frontFacingPointCoord’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp: In function ‘void link_shaders(const gl_context*, gl_shader_program*)’:

external/mesa3d/src/glsl/linker.cpp:1737:49: error: expected primary-expression before ‘,’ token

external/mesa3d/src/glsl/linker.cpp:1737:50: error: ‘fragColor’ was not declared in this scope

external/mesa3d/src/glsl/linker.cpp:1737:59: error: ‘offsetof’ was not declared in this scope

make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1


./external/mesa3d/src/glsl/linker.cpp

linker.cpp 파일에 "#include <stddef.h>" 을 추가하는 것으로 해결할 수 있다.



out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Threading.o): In function `llvm::llvm_execute_on_thread(void (*)(void*), void*, unsigned int)':

/work/john/android-x86/external/llvm/lib/Support/Threading.cpp:96: undefined reference to `pthread_create'

/work/john/android-x86/external/llvm/lib/Support/Threading.cpp:91: undefined reference to `pthread_attr_setstacksize'

/work/john/android-x86/external/llvm/lib/Support/Threading.cpp:100: undefined reference to `pthread_join'

out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `MutexImpl':

/work/john/android-x86/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'

/work/john/android-x86/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'

/work/john/android-x86/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'

/work/john/android-x86/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'

out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':

/work/john/android-x86/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'


vi external/llvm/lib/Support/Android.mk -> add "LOCAL_C_INCLUDES += system/core/include/cutils" "LOCAL_SHARED_LIBRARIES := libcutil" at 2 positions; 

and add "#include <threads.h>" in "external/llvm/lib/Support/Mutex.cpp,Threading.cpp"




host Executable: test-librsloader (out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader)

out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Signals.o): In function `PrintStackTrace':

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Unix/Signals.inc:219: undefined reference to `dladdr'

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Unix/Signals.inc:231: undefined reference to `dladdr'

out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Threading.o): In function `llvm::llvm_execute_on_thread(void (*)(void*), void*, unsigned int)':

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Threading.cpp:96: undefined reference to `pthread_create'

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Threading.cpp:91: undefined reference to `pthread_attr_setstacksize'

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Threading.cpp:100: undefined reference to `pthread_join'

out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `MutexImpl':

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'

out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':

/home/yarang/a10_works/gihub/android4.0.1/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'

collect2: ld returned 1 exit status

make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] 오류 1


에러에 대한 처리는 -lpthread 옵션을 추가하여 pthread를 참조할 수 있도록 한다.


수정해야할 파일은 /home/yarang/a10_works/gihub/android4.0.1/external/llvm/llvm-host-build.mk 이며, 다음의 내용을 추가한다.


LOCAL_LDLIBS := -lpthread -ldl 





external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: ‘ptrdiff_t’ does not name a type


external/gtest/include/gtest/internal/gtest-param-util.h

 #include <vector> 

+#include <cstddef> 

 #include <gtest/internal/gtest-port.h> 

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

bluez scan

Programming/android 2013.04.03 16:36

소스코드 참고

http://people.csail.mit.edu/albert/bluez-intro/c404.html#simplescan.c



$apt-get install libbluetooth-dev

simplescan.c


simplescan.c


$gcc -o scantest simplescan.c -lbluetooth


$bccmd -t BCSP -d /dev/ttyUSB0 psload -r ./test/csr_4841.psr


Loading PSKEY_LM_TEST_SEND_ACCEPTED_TWICE ... done

Loading PSKEY_PMALLOC_SIZES ... done

...


$hciattach -s 921600 /dev/ttyUSB0 bcsp 921600 noflow


Device setup complete


$hciconfig hci0 reset


$ ./scantest

==> 실행은 되는데 결과가 나오지 않는다.

hcidump로 확인해봐도 hci command는 정상적으로 result를 받는데 inquriy result가 없다.


blueZ를 이용한 hfp 예제를 다운받아 test해보기로 함.

nohands

http://nohands.svn.sourceforge.net/viewvc/nohands/?view=tar


$ apt-get install ed

$ sudo apt-get install autotools-dev

$ sudo apt-get install automake

$ apt-get install libspeexdsp-dev


1: In libhfp/Makefile.am:

Add "-fpermissive" to the AM_CXXFLAGX line.

Next, rerun autogen.sh


2: In include/libhfp/events.h:

Replace all references to Invoke() with this->Invoke() and RegisterDirect() with this->RegisterDirect().



$ ./configure

$ make


$ data/hfconsole

를 실행시켜 놓고 해봐도 동일한 결과

hcitool scan을 해봐도 동일


help.....



sloved : 

//PSKEY_ANA_FREQ

&01fe = 6590


이걸 psr에 추가해줘야 해결되는 문제였다.

USB로 되고 BC05로도 되는데 rom type의 chip으로 해결되지 않는 문제


저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

$ apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 


libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev libglapi-mesa:i386
mesa관련 설치하니까 재부팅이 안된다.ㅡㅡ;

이거 지우니 됨

$ ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so


http://www.jusuchyne.com/codingforme/2012/05/installing-oracle-java-jdk-6-or-7-on-ubuntu/

$ apt-get install git

wget http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
$ ./configure; make; make install

wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tar.bz2
$ ./configure; make; make install

## download blueZ
$wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.2.tar.xz
$ tar xf bluez-5.2.tar.xz
$ cd bluez-5.2
$ ./configure

### ERROR: configure: error: GLib >= 2.28 is required
$ apt-get install libglib2.0-dev

### ERROR: configure: error: D-Bus >= 1.4 is required
$ apt-get install dbus-*dev

### ERROR: configure: error: USB library support is required
$ apt-get install libusb-dev

### ERROR: configure: error: libudev >= 143 is required
$ apt-get install libudev-dev

### ERROR: configure: error: libical is required
$ apt-get libical-dev

$./configure --disable-systemd
$ make

### ERROR: /usr/bin/ld: cannot find -lreadline
$apt-get install libreadline-dev

$ make
$ make install


저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

blueZ를 우선 linux에 설치해보기로 함

http://www.bluez.org/download/


checking for GLIB... no

configure: error: GLib >= 2.28 is required

에러를 만남


GLIB를 설치하기로 함

https://launchpad.net/glib/+milestone/2.28.7


*** You must have either have gettext support in your C library, or use the

*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html

에러를 만남


$apt-get install gettext

cd glib-2.28.7

$./configure

$make

$make install


GLIB 설치 완료됨


configure: error: D-Bus >= 1.4 is required

에러를 만남


$apt-get install dbus

1.4.14 설치 되나 제대로 해결되지 않음

configure: error: D-Bus >= 1.4 is required

동일한 에러를 만남


source를 받아서 설치하기로 함

https://launchpad.net/ubuntu/+source/dbus/1.4.6-1ubuntu6


checking for XML_ParserCreate_MM in -lexpat... no

configure: error: Could not find expat.h, check config.log for failed attempts

에러를 만남


http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz

$cd expat-2.0.1

$./configure

$make

$make install


$cd dbus-1.4.6

$./configure

$make

$make install

D-BUS 설치 됨


checking for USB... no

configure: error: USB library support is required

에러를 만남


$apt-get install libusb-dev

http://sourceforge.net/projects/libusb/files/

받아서 설치함

libusb-1.0.9


checking for UDEV... no

configure: error: libudev >= 143 is required

에러를 만남


$apt-get install libudev-dev


checking for ICAL... no

configure: error: libical is required

에러를 만남


$apt-get install libical-dev


checking for readline/readline.h... no

configure: error: readline header files are required

에러를 만남


http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html

leadline download


$cd readline-6.2

$./configure

$make

$make install

readline 설치함


checking sytemd system unit dir... configure: error: systemd system unit directory is required

에러를 만남


./configure --disable-systemd


힘겨운 configure 지나감


$make


/usr/local/lib/libreadline.so: undefined reference to `tputs'

/usr/local/lib/libreadline.so: undefined reference to `tgoto'

/usr/local/lib/libreadline.so: undefined reference to `tgetflag'

/usr/local/lib/libreadline.so: undefined reference to `UP'

/usr/local/lib/libreadline.so: undefined reference to `tgetent'

/usr/local/lib/libreadline.so: undefined reference to `tgetnum'

/usr/local/lib/libreadline.so: undefined reference to `PC'

/usr/local/lib/libreadline.so: undefined reference to `tgetstr'

/usr/local/lib/libreadline.so: undefined reference to `BC'

collect2: ld returned 1 exit status

에러를 만남


./configure --disable-systemd

$apt-get install libreadline-gplv2-dev

$apt-get build-dep libreadline-gplv2-dev


$cd /usr/local/lib

$ln -s /usr/lib/libreadline.so ./libreadline.so


드이어 make 됨


저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

목표 : blueZ proting

1차 target : Mango64 board, csr bc06


환경 : 

vmware 7.0.0

linux ubuntu 11.04


linux 설치 후 

http://source.android.com/source/initializing.html

참조하여 기본적인 tool들 설치

Python, GNU Make는 별도로 down 받아서 설치



$ sudo apt-get install git-core gnupg flex bison gperf build-essential \

  zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \

  x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev \

  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \

  libxml2-utils xsltproc


$ sudo apt-get install libx11-dev:i386


sun-java6-jdk설치 도중 오류 발생
Package 'sun-java6-jdk' has no installation candidate
Solution :
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ferramroberto/java
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk sun-java6-plugin

http://source.android.com/source/downloading.html

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1
적용하여 Download

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn

문제 : eclipse실행 시 Failed to create the Java Virtual Machine

 

해결 : eclipse.ini 수정

-vm 및  javaw.exe 경로 추가

 

256M을 128M으로 수정(2군데) : 256으로 했더니 start up 할때 멈추는 증상이 있었다.

 

eclipse.ini원본

 

eclipse.ini 수정본

저작자 표시 비영리 동일 조건 변경 허락
신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by bluelimn
1

bluelimn

달력

최근에 달린 댓글

최근에 받은 트래백

글보관함


티스토리 툴바