順便紀錄一下很久沒做android (上次到 android 9) 之後,覺得是新的東西。
先照: 果然 prequreirement package 有新的:
sudo apt-get install bc coreutils dosfstools e2fsprogs fdisk kpartx mtools ninja-build pkg-config python3-pip sudo pip3 install meson mako jinja2 ply pyyaml dataclasses以 ubunutu 22.04,已經 build 過 android12 的系統。
結果缺 mtools (mcopy command). 和 pip install 的 meson, mako, ply.
結果用 pip3 install 還是 build fail,最後是用 apt (deb) 的 package 才 build OK
bionic/apex
結果是一種file format.從Android 10 就有了。
這種file 是用來更新用(?)
以往的 apk 都是用在 application 更新,所以都是由 package manager 負責。
但是如果是系統 component (例如native service),不是由 vm run 的程式,就沒版辦法了。
這個 apex 系統就是為了這個目的。
apex 檔案裡面主要是一個 ext4 的 img file,裡面包含需要的 program. so 和一些config file。
android 另外新增一個 apexd 服務,boot 時會檢查 /apex/ 目錄下有沒有 *.apex 檔案。
有的話就 把img loop mount,然後叫起裡面的服務。
另外,他也支援更新。因為 /apex 目錄是 ro,所以安裝都放在其他位置(/data ?)。
apexd 會去見查 /data 下有沒有 /apex/ 內檔案的對應新版本,有就用,沒有就用 /apex/ 下的。
結果在 android 14 上,幾乎所有東西都 apex 化了。
framework 裡的 service,甚至一些 apk 也都包裝成 apex.
out 目錄中,有一個 apex 目錄。裡面很多 componments folder.
raspberry-vanilla 開機失敗。
試試看: android-rpi。
update: 開機成功。
失敗是因為使用 pi4, 2GB 版本,logcat 一直出現 oom, 最後 watchdog 出現 wait too long,然後 goodbye 重新啟動 dalvik ? activitymanager.
改用 4GB 版本直接開啟 OK
lunch aosp_rpi4_tv 的話,build fail:
ERROR: files are incompatible: android.hardware.camera.provider@2.5::ICameraProvider/legacy/0 is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.gatekeeper@1.0::IGatekeeper/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.allocator@4.0::IAllocator/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.composer@2.4::IComposer/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.keymaster@4.1::IKeymasterDevice/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.tv.cec@1.0::IHdmiCec/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.usb.gadget@1.2::IUsbGadget/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.camera.provider@2.5::ICameraProvider/legacy/0 is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.gatekeeper@1.0::IGatekeeper/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.allocator@4.0::IAllocator/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.composer@2.4::IComposer/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.keymaster@4.1::IKeymasterDevice/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.tv.cec@1.0::IHdmiCec/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.usb.gadget@1.2::IUsbGadget/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.camera.provider@2.5::ICameraProvider/legacy/0 is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.gatekeeper@1.0::IGatekeeper/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.composer@2.4::IComposer/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.keymaster@4.1::IKeymasterDevice/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.tv.cec@1.0::IHdmiCec/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.usb.gadget@1.2::IUsbGadget/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.camera.provider@2.5::ICameraProvider/legacy/0 is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.gatekeeper@1.0::IGatekeeper/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.allocator@4.0::IAllocator/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.graphics.composer@2.4::IComposer/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.keymaster@4.1::IKeymasterDevice/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.tv.cec@1.0::IHdmiCec/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. android.hardware.usb.gadget@1.2::IUsbGadget/default is deprecated in compatibility matrix at FCM Version 8; it should not be served. The following instances are in the device manifest but not specified in framework compatibility matrix: android.hardware.camera.provider@2.5::ICameraProvider/legacy/0 android.hardware.gatekeeper@1.0::IGatekeeper/default android.hardware.graphics.allocator@4.0::IAllocator/default android.hardware.graphics.composer@2.4::IComposer/default android.hardware.keymaster@4.1::IKeymasterDevice/default android.hardware.tv.cec@1.0::IHdmiCec/default android.hardware.usb.gadget@1.2::IUsbGadget/default android.hardware.wifi.supplicant.ISupplicant/default (@1) Suggested fix: 1. Update deprecated HALs to the latest version. 2. Check for any typos in device manifest or framework compatibility matrices with FCM version >= 8. 3. For new platform HALs, add them to any framework compatibility matrix with FCM version >= 8 where applicable. 4. For device-specific HALs, add to DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE or DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE.: Success INCOMPATIBLE 16:15:08 ninja failed with: exit status 1 #### failed to build some targets (43:52 (mm:ss)) ####update: 錯了,上面的error 是因為用 "m" 來build 導致的。
如果 follow 原 po 的說明,用
make bootimage systemimage vendorimage -j$(nproc)就沒有 build fail 了。
android14 的話,還需要 texlive-full ,領外 meson 也要 0.6以上,所以 ubuntu 20.04 的話,apt 的 meson 版本不夠 (0.52),要用 pip 的版本才夠。
另外,要用 python3,所以乾脆整個系統都用 python3 了: python-is-python3
沒有留言:
張貼留言