日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

mac 编译android系统,mac 编译 Android 系统杂记

發布時間:2023/12/20 Android 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mac 编译android系统,mac 编译 Android 系统杂记 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

掛載android分區

sudo hdiutil attach ~/android_code/android7.dmg.sparseimage -mountpoint /Volumes/android

原放入U盤:

echo '188jinghao' | sudo -S hdiutil attach ~/android7.dmg.sparseimage -mountpoint /Volumes/android

放入機械硬盤

sudo hdiutil attach /Volumes/chenjinghao/android7.dmg.sparseimage -mountpoint /Volumes/android7

sudo hdiutil attach /Volumes/chenjinghao/code/android.dmg.sparseimage -mountpoint /Volumes/android

tar -cvf android-6.0.1.tar /Volumes/android/android6_0_1/

啟動模擬器

export ANDROID_PRODUCT_OUT=/Volumes/android/android6.0.1/out/target/product/generic

export ANDROID_PRODUCT_OUT_BIN=/Volumes/android/android6.0.1/out/host/linux-x86/bin

export PATH=$PATH:$ANDROID_PRODUCT_OUT_BIN:$ANDROID_PRODUCT_OUT

$cd ~/android/out/host/linux-x86/bin

$ emulator -system system.img -data userdata.img -ramdisk ramdisk.img

export ANDROID_BUILD_TOP=/Volumes/android/android6_0_1

export ANDROID_PRODUCT_OUT=/Volumes/android/android6.0.1/out/target/product/generic

export ANDROID_PRODUCT_OUT_BIN=/Volumes/android/android6.0.1/out/host/darwin-x86/bin

export PATH=$PATH:$ANDROID_PRODUCT_OUT_BIN:$ANDROID_PRODUCT_OUT:$ANDROID_BUILD_TOP

/Volumes/android/android6.0.1/out/host/linux-x86/bin/emulator

-system /Volumes/android/android6.0.1/out/target/product/generic/system.img

-data /Volumes/android/android6.0.1/out/target/product/generic/userdata.img

-ramdisk /Volumes/android/android6.0.1/out/target/product/generic/ramdisk.img

啟動模擬器

export ANDROID_BUILD_TOP=/Volumes/android/android7.1.1

export ANDROID_PRODUCT_OUT=/Volumes/android/android7.1.1/out/target/product/shamu

export ANDROID_PRODUCT_OUT_BIN=/Volumes/android/android7.1.1/out/host/darwin-x86/bin

export PATH=$PATH:$ANDROID_PRODUCT_OUT_BIN:$ANDROID_PRODUCT_OUT:$ANDROID_BUILD_TOP

emulator

-system /Volumes/android/android7.1.1/out/target/product/shamu/system.img

-data /Volumes/android/android7.1.1/out/target/product/shamu/userdata.img

-ramdisk /Volumes/android/android7.1.1/out/target/product/shamu/ramdisk.img

下載源碼遇到的問題一:

這個error信息忘了詳細記錄了,就是某個./repo/projects/.............下面報錯了,把報錯的文件夾刪掉,repo sync

error:

………………………………………………………………………...

Traceback (most recent call last):

File "/Volumes/aosp/android-6.0.1/.repo/repo/main.py", line 531, in

_Main(sys.argv[1:])

…………………………….

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd4 in position 578: ordinal not in range(128)

解決辦法:根據error的提示,刪除./repo/projects/...相應下的git就行了,然后再repo sync

編譯源碼遇到的問題二:

build/core/combo/mac_version.mk:39: * Can not find SDK 10.12 at /Developer/SDKs/MacOSX10.6.sdk

build/core/combo/mac_version.mk:40: *****************************************************

build/core/combo/mac_version.mk:41: *** Stop.. Stop.

配置mac_sdk_versions_supported里添加10.12

編譯源碼遇到的問題三:

system/core/libcutils/threads.c:38:10: error: 'syscall' is deprecated: first deprecated in OS X 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]

return syscall(SYS_thread_selfid);

^

host C: libcutils <= system/core/libcutils/iosched_policy.c

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here

int syscall(int, ...);

MacOSX-SDKs下載地址:https://github.com/phracker/MacOSX-SDKs

刪除10.12,下載MacOSX10.11.sdk,解壓拷貝到/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

然后確保AOSP源碼下build/core/combo/mac_version.mk文件中

mac_sdk_versions_supported := 10.9 10.10 10.11

后面不要寫10.12。

編譯源碼遇到的問題四:

找不到com.sun.javadoc.ClassDoc

external/doclava/src/com/google/doclava/ClassInfo.java:20:

error: package com.sun.javadoc does not exist import com.sun.javadoc.ClassDoc;external/doclava/src/com/google/doclava/apicheck/XmlApiFile.java:80:

error: cannot find symbol ClassDoc classDoc = null; ^

symbol: class ClassDoc location: class XmlApiFile Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 163 errors

make: *** [out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/javalib.jar] Error 41

在bash_profile里添加

export ANDROID_JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor hdpi-v19

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor xhdpi-v19

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor xxhdpi-v4

nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor xxhdpi-v19

[ 99% 27238/27420] Compiling SDK Stubs...tubs_current_intermediates/classes.jar

注: 某些輸入文件使用或覆蓋了已過時的 API。

注: 有關詳細信息, 請使用 -Xlint:deprecation 重新編譯。

注: 某些輸入文件使用了未經檢查或不安全的操作。

注: 有關詳細信息, 請使用 -Xlint:unchecked 重新編譯。

[ 99% 27413/27420] host Java: ahat-tes...RIES/ahat-tests_intermediates/classes)

注: art/tools/ahat/test/SortTest.java使用了未經檢查或不安全的操作。

注: 有關詳細信息, 請使用 -Xlint:unchecked 重新編譯。

[100% 27420/27420] Checking build with...sts_intermediates/jack.check.timestamp

總結

以上是生活随笔為你收集整理的mac 编译android系统,mac 编译 Android 系统杂记的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。