我无法在AOSP上找到任何好的学习资源.无法找到有关该主题的任何书籍或综合网络资源.涵盖所有相关主题的书籍将是最好的.就像如何设置环境,下载代码,使用repo/git,更改基本的东西,制作自定义的roms等等.有这样的书吗?或者在网络上的任何其他资源在一个地方有这些信息?
我在Android源代码中找到外部文件夹,如果我没有错,则设计为具有U-HAL(用户空间硬件抽象层),因此OEM可以编写适当的驱动程序,不需要在GPL许可下暴露给外部世界.
随着Android的发展,我发现越来越多的文件夹被包含在外部文件夹中可能是Google正在为每个版本的Android添加更多支持,例如freetype,Yaffs2.
我想知道如何在Apps中使用外部文件夹逻辑?这些是作为共享库(.so)生成的,而这些共享库又用于功能吗?
我不确定这个适当的逻辑是如何嵌入外部文件夹的,以及它如何与较低层(可能是sysfs)通信?是否有任何博客或文档描述外部文件夹的使用,功能和HowTo?
感谢您的帮助!
我正在尝试通过此处提供的步骤构建Android源代码.但是我的JDK遇到了麻烦.发布时:
lunch full-eng
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied
build/core/config.mk:344: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
** Don't have a product spec for: 'full'
** Do you have the right repo manifest?
Run Code Online (Sandbox Code Playgroud)
所以我尝试通过以下步骤正确安装JDK:
步骤1
第2步
按照以下步骤安装正确的JAVA .我使用默认安装程序选项和版本6,而不是7或8
第3步
在这里,我只是按照这个答案.
sudo gedit .bashrc
Run Code Online (Sandbox Code Playgroud)
通过添加这些行来编辑底部的文件
JAVA_HOME=/usr/lib/jvm/java-6-oracle
export JAVA_HOME
# replacing /path/to/androidsdk/ …Run Code Online (Sandbox Code Playgroud) 我正在尝试下载Android源代码,并遵循https://source.android.com/source/downloading.html中描述的过程,其中包括安装repo脚本然后运行
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo sync
Run Code Online (Sandbox Code Playgroud)
获得主要分支.我也尝试使用-f -j1标志来解决错误,并且只使用一个核心,就像网上建议的那样.在这一点上,我认为我非常接近整个事情的下载,但在使用ipsec-tools时它总是会停止到最后.它总是提供以下输出:
Fetching project platform/external/ipsec-tools
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1 100 1 0 0 3 0 --:--:-- --:--:-- --:--:-- 3
100 1690k 100 1690k 0 0 2307k 0 --:--:-- --:--:-- --:--:-- 2307k
fatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'
fatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'
fatal: Not a git repository: '/home/sebastian/WORKING_DIR/.repo/projects/external/ipsec-tools.git'
Traceback (most …Run Code Online (Sandbox Code Playgroud) 我能够将android-5.0.1_r1的源代码放到我的工作目录中.但是,我在模拟器上构建和运行代码时遇到了麻烦,因为午餐命令给我带来了麻烦.
repo has been initialized in /Volumes/AOSPDiskImage/AOSP
Nikhils-MBP:AOSP Nikhil$ . build/envsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
Nikhils-MBP:AOSP Nikhil$ lunch
You're building on Darwin
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_deb-userdebug
8. aosp_flo-userdebug
9. full_fugu-userdebug
10. aosp_fugu-userdebug
11. aosp_grouper-userdebug
12. aosp_tilapia-userdebug
13. mini_emulator_arm64-userdebug
14. …Run Code Online (Sandbox Code Playgroud) 尝试从Google Play安装某些应用时出现以下错误:
LibraryUtils.isAvailable: not available restriction=9
DocUtils.getAvailabilityRestrictionResourceId: Item is not available. Reason: 9
Run Code Online (Sandbox Code Playgroud)
我在x86硬件上运行AOSP(定制的Android x86风格)的定制版本.我已经研究了很多,网上已经有很多模糊的尝试/猜测,但我特别在寻找"理由9"所指的内容.一旦我有了这个,我希望我能在AOSP中找到一个黑客以避免错误,因为当我侧载相同的应用程序时,它们运行正常.这是我的爱好,所以我并不担心一些可能的意外副作用.
我已经使用Android 4.4.4源构建了我的AOSP自定义ROM.我想做一个自助服务终端模式应用程序(总是全屏 - 用户不可能离开它或切换到另一个应用程序).
为了拥有一个完整的沉浸式模式,我跟着这个SO帖子在Android 4.4.2中使用Root启用了KioskMode
我完全按照他们的说法完成,但它不起作用.系统UI未禁用,我没有错误.
所以我决定创建一个从Android SDK代码运行的.sh文件:
Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "/etc/stop-ui.sh" });
它完美地运作.但是当我想再次启动系统UI时:
Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "/etc/start-ui.sh" });
它返回错误1.
当我从adb shell运行/etc/start-ui.sh时,它可以工作.
这是我的stop.sh(有权限555)文件:
#!/system/bin/sh
service call activity 42 s16 com.android.systemui
Run Code Online (Sandbox Code Playgroud)
这是我的start.sh(有权限555)文件:
#!/system/bin/sh
am startservice -n com.android.systemui/.SystemUIService
Run Code Online (Sandbox Code Playgroud)
我的应用程序是一个系统应用程序(我用平台签名签名)
结论:我可以从shell重启系统UI,但不能以编程方式从app重启
我已经同步了整个Android存储库,并按照此处的说明设置了构建环境:https: //source.android.com/source/building
构建说明似乎是在假设您要构建整个Android平台。我真的对构建特定的AOSP应用程序感兴趣,例如联系人,短信,摄像头等。我已经在GitHub上看到了股票应用程序代码的镜像,但是其中似乎没有任何构建说明。 :
https://github.com/android/platform_packages_apps_contacts https://github.com/android/platform_packages_apps_calendar
是否有执行此操作的构建指南?我是否一直坚持要下载,修改,构建这个庞大的(100 + GB)代码集?
frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
find: ‘/home/xuanan/android/lineage/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: No such file or directory
Starting build with ninja
ninja: Entering directory `.'
[ 0% 14/48263] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/home/xuanan/android/lineage/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
[ 0% 14/48263] target Java: libprotob...tobuf-java-nano_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ …Run Code Online (Sandbox Code Playgroud) 不确定如何分类。我正在尝试在MacOS 10.14下从头开始构建AOSP。
我构建了区分大小写的文件系统,并执行了以下命令:
repo init -u https://android.googlesource.com/platform/manifest
repo init -b android-9.0.0_r34
repo sync
source build/envsetup.sh
lunch aosp_arm-eng
make -j4
Run Code Online (Sandbox Code Playgroud)
并且还编辑了build / soong / cc / config / x86_darwin_host.go,以将10.14添加到darwinSupportedSdkVersions中。
构建因以下错误而失败:
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libpthread.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libpthread.tbd
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libdl.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libdl.tbd
…
[ 5% 4372/76415] //external/expat:libexpat link libexpat-host.dylib [darwin x86]
FAILED: out/soong/.intermediates/external/expat/libexpat/darwin_x86_shared/libexpat-host.dylib …Run Code Online (Sandbox Code Playgroud) android-source ×10
android ×9
build ×2
git ×2
android-x86 ×1
google-play ×1
java ×1
kiosk-mode ×1
ninja ×1
repository ×1
ubuntu ×1
wrapper ×1