构建android源码

发布于 2025-01-05 08:15:25 字数 1677 浏览 0 评论 0原文

我要从源代码构建 Android 映像,但支持智能卡 API。

我列出了我已完成的步骤和我遇到的错误。

Patching Smart card API with android source

1. Downloaded android source “android-2.3.5_r1” from the “source.android.com”
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ mkdir ANDROID2.3.5_r1
$ cd ANDROID2.3.5_r1
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.5_r1
$ repo sync

The download was successful and complete

2. Downloaded the Smart card patch “smartcard-api-2_3_0.tgz” from “code.google.com/p/seek-for-android/downloads”

3. Applying the patches
$ cd <ANDROID_ROOT_DIR>
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/smartcard-api.patch
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/uicc.patch
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/emulator.patch
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/cts.patch
$ make update-api

All the patches were successfully applied with no errors and hunk failures

4. Building the Source
$ source build/envsetup.sh
$ lunch full-eng
$ make -j2

出现的错误如下

target thumb C: SRecTestAudio <= external/srec/srec/test/SRecTestAudio/src/SRecTestAudio.c
system/media/opensles/tests/automated/BufferQueue_test.cpp:34:29: error: SLES/OpenSLESUT.h: No such file or directory
system/media/opensles/tests/automated/BufferQueue_test.cpp: In function 'void CheckErr(SLresult)':
system/media/opensles/tests/automated/BufferQueue_test.cpp:55: error: 'slesutResultToString' was not declared in this scope
make: *** [out/target/product/generic/obj/EXECUTABLES/BufferQueue_test_intermediates/BufferQueue_test.o] Error 1

I am to build an Android image from source but with smart card api support.

I have listed the steps that I had done and errors that I face.

Patching Smart card API with android source

1. Downloaded android source “android-2.3.5_r1” from the “source.android.com”
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ mkdir ANDROID2.3.5_r1
$ cd ANDROID2.3.5_r1
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.5_r1
$ repo sync

The download was successful and complete

2. Downloaded the Smart card patch “smartcard-api-2_3_0.tgz” from “code.google.com/p/seek-for-android/downloads”

3. Applying the patches
$ cd <ANDROID_ROOT_DIR>
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/smartcard-api.patch
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/uicc.patch
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/emulator.patch
$ patch -p1 < <path_to_my_patches>/smartcard-api-2_3_0/cts.patch
$ make update-api

All the patches were successfully applied with no errors and hunk failures

4. Building the Source
$ source build/envsetup.sh
$ lunch full-eng
$ make -j2

The error that appeared is as follows

target thumb C: SRecTestAudio <= external/srec/srec/test/SRecTestAudio/src/SRecTestAudio.c
system/media/opensles/tests/automated/BufferQueue_test.cpp:34:29: error: SLES/OpenSLESUT.h: No such file or directory
system/media/opensles/tests/automated/BufferQueue_test.cpp: In function 'void CheckErr(SLresult)':
system/media/opensles/tests/automated/BufferQueue_test.cpp:55: error: 'slesutResultToString' was not declared in this scope
make: *** [out/target/product/generic/obj/EXECUTABLES/BufferQueue_test_intermediates/BufferQueue_test.o] Error 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一笑百媚生 2025-01-12 08:15:25

我遇到了类似的错误,并按照 链接解决了问题。

我将解释它的意思,

  • cd 到你的 aosp 目录

    cd /path/to/ur/aosp
    
  • 使用任何编辑器打开文件 system/media/opensles/tests/automated/BufferQueue_test.cpp。

    vi system/media/opensles/tests/automated/BufferQueue_test.cpp 
    
  • 现在添加链接中描述的包含文件并保存文件 BufferQueue_test.cpp

  • 现在使用这些命令

    sudo updateb
    
    找到 OpenSLESUT.h /home/你的 aosp 路径/system/media/opensles/libopensles/OpenSLESUT.h 
    
    cp /home/你的 aosp 路径/system/media/opensles/libopensles/OpenSLESUT.h /home/<你的 aosp 路径>/system/media/opensles/include/SLES/OpenSLESUT.h
    

注意:您的 aosp 路径是您的 aosp android 项目的路径。

I got similar error and followed this link which solved the problem.

I will explain what it says,

  • cd to your aosp directory

    cd /path/to/ur/aosp
    
  • Open file system/media/opensles/tests/automated/BufferQueue_test.cpp using any editor for example.

    vi system/media/opensles/tests/automated/BufferQueue_test.cpp 
    
  • now add the include files that are described in the link and save the file BufferQueue_test.cpp

  • now use these commands

    sudo updatedb
    
    locate OpenSLESUT.h /home/ur aosp path/system/media/opensles/libopensles/OpenSLESUT.h 
    
    cp /home/ur aosp path/system/media/opensles/libopensles/OpenSLESUT.h /home/<ur aosp path>/system/media/opensles/include/SLES/OpenSLESUT.h
    

NOTE : your aosp path is the path to your aosp android project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文