天天看點

Android4.0開發新晶片遇到問題總結

1.Q:spi rx pin is leakage ofelectricity

A:  First of all,we should know to check HW schematic accuracy.

Forexample,we use spi fuction,we should verify the spi tx and spi rx commucationok with spidev_test.c .If not,we can request help from HW colleague for testingwave of tx/rx and power and so on.

Generallyspeaking,I think leakage of electricity is caused by HW schematic or SW timing.

2. Q: error log:XXX JNI: failed to get XXX stub module.

A: we should check the file of xxx.xxxxx.so in this

path: out/target/product/sama5d3/system/lib/hw/.

Generally speaking,the xxx.c of HAL layer file can generate the xxx.xxxxx.so.The path of generating xxx.xxxxx.so is out/target/product/sama5d3/obj/lib/.Then,android system copy xxx.xxxxx.so to out/target/product/sama5d3/system/lib/hw/ by LOCAL_MODULE_TAGS:=eng from Android.mk.

Ps:The name of xxx.xxxxx.so is defined by Android.mk.

3. Q:can’t open linux ops interface

A: we should check the fileof ueventd.rc and init.rc to add pemission.

4.Q:build android error in default

A:Because of adding newAPI for android application,we should excute

make update-api command.

5.How to generate the apk of systemin android source code

A:(1).establish a new product in eclipse,modify four folder:source code(src/shy/luo/hello/Hello.java)、Interface layout file(res/layout/main.xml)、

The string file(res/values/strings.xml)、Program description file(AndroidManifest.xml)

(2). add Android.mk file:

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := Hello

include $(BUILD_PACKAGE)

(3).copy total file to packages/apps/

(4).excute mmm packages/apps/Hello command

(5).after compiling successfully,youcan find the Hello.apk in this path:out/target/product/sama5d3/system/app

6.Q:How to use special class from SDK

A:If we add new interfacefor android application,we need to provide special SDK to AP team that will usethe special SDK to develop new fuction in eciplse.But there are some class notpermitted to use by android system from SDK,such as servermanager package.

We should add external jar to eclipse to fulfill the specialrequirement.For example,we add the servermanager package to ecilplse.we need tofind the javalib.jar in this path:out/target/product/sama5d3/obj/JAVA_LIBRARIES/framework_intermediates/javalib.jar,thenloading the javalib.jar to eclipse.