文章目录
- 前言
- 配置
- 新建Android.mk
- 核心命令
- 首次编译
- Apk已生成 但是无arm文件
- system.img 也已经更新
- 第一次刷入
- 打开APP后闪退
- 加入so文件
- 如下为修改后的mk
- 第二次刷入
- mm报错
- 查看手机系统abi
- 路径下分别生成两个环境的so
- 官方LOCAL_MULTILIB描述
- so打包错误
- 验证so位数
- 注释v7部分
- 第三次刷入
- 引用
前言
需求是预装带so的apk当作系统app,自己的app成了预装软件,是不是想起当年新买的手机被厂商支配的那段日子,如今转变下身份,预装自己的app到手机当中 ,还不能卸载!心中不免有些暗爽。
配置
新建文件夹 packages/apps/mobir/
如下放入自己的无源码 apk,以及so文件,有时候可能是客户定制的app,我们只负责集成,所以不需要源码
对应型号加入项目名
新建Android.mk
packages/apps/mobir/
# Android.mk通常需要定义好LOCAL_PATH,表示当前工作路径,函数my-dir是编译系统提供的,返回当前路径
LOCAL_PATH := $(call my-dir)
# 这一步操作主要是清空之前定义的LOCAL_XXX开头的变量,是必须要的操作。CLEAR_VARS 变量由Build System提供。并指向一个指定的GNU Makefile,由它负责清理很多LOCAL_xxx,例如:LOCAL_MODULE, LOCAL_SRC_FILES, LOCAL_STATIC_LIBRARIES等等。但不清理LOCAL_PATH.
# 这个清理动作是必须的,因为所有的编译控制文件由同一个GNU Make解析和执行,其变量是全局的。所以清理后才能避免相互影响。
include $(CLEAR_VARS)#模块名,并且这个名字要加入到PRODUCT_PACKAGES中
LOCAL_MODULE := mobir#不管是user 还是eng 版本都会编译此app ;
LOCAL_MODULE_TAGS := optional# 定义编译模块所需的源文件 ;
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk#定义编译完成之后的类型:除了APPS,还有ETC,EXECUTABLES(.bin)SHARED_LIBRARIES(.so) 等选择值
LOCAL_MODULE_CLASS := APPS#定义编译完成之后模块的后缀
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)#定义使用原app签名可用选择项platform,shared,media
LOCAL_CERTIFICATE := PRESIGNED#将apk编进“/system/priv-app/目录”,如果为false,或者不加这句话,就会编进“/system/app” 目录, 二者区别在于前者的权限要高于后者,即不可卸载
LOCAL_PRIVILEGED_MODULE := true#不进行odex化
LOCAL_DEX_PREOPT := false# 定义编译出来的目标文件,如动态库,静态库,jar包以及apk
include $(BUILD_PREBUILT)
核心命令
m -j12 #全局编译
adb reboot bootloader#
cd ${ANDROID_PRODUCT_OUT}
fastboot flash system system.img
fastboot reboot
首次编译
maqi@ubuntu:~/data/android-11.0.0_r9$ m -j16
make: Entering directory '/home/maqi/data/android-11.0.0_r9'
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=aosp_angler
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-26-generic-x86_64-with-Ubuntu-20.04-focal
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR5.170623.007
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
device/huawei/angler/aosp_angler.mk was modified, regenerating...
[9/975] including ./cts/Android.mk ...
cts/apps/CtsVerifier/Android.mk:72: warning: FindEmulator: find: `cts/apps/CtsVerifier/src/com/android/cts/verifier/backup': No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/res: No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/backup/assets: No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory
cts/tests/tests/contactsproviderwipe/Android.mk:33: warning: FindEmulator: find: `cts/tests/tests/contactsproviderwipe/common/src': No such file or directory
cts/tests/tests/telecom3/Android.mk:37: warning: FindEmulator: find: `cts/tests/tests/telecom/src/android/telecom/cts/MockDialerActivity.java': No such file or directory
[323/975] including ./external/toybox/Android.mk ...
awk: line 1: syntax error at or near ,
[355/975] including ./frameworks/av/media/libaaudio/Android.mk ...
frameworks/av/media/libaaudio/examples/input_monitor/static/Android.mk: warning: input_monitor: unusual tags examples
frameworks/av/media/libaaudio/examples/write_sine/static/Android.mk: warning: write_sine: unusual tags examples
[389/975] including ./frameworks/base/Android.mk ...
./frameworks/base/Android.mk:865: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:874: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:879: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:884: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
[718/975] including ./system/sepolicy/Android.mk ...
./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[975/975] including ./tools/tradefederation/core/Android.mk ...
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
PRODUCT_COPY_FILES device/huawei/angler/fstab.angler:root/fstab.angler ignored.
No private recovery resources for TARGET_DEVICE angler
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
build/core/base_rules.mk:466: warning: overriding commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/angler/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/angler/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/angler/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/angler/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
[ 6% 39/594] AAPT2 link out/target/product/angler/obj/APPS/Bluetooth_intermediates/package-res.apk
packages/apps/Bluetooth/res/layout/bt_enabling_progress.xml:30: warn: generated id 'android:id/progress' for external package 'android'.
[ 8% 52/594] target R.java/Manifest.java: OpenWnn (...t/common/obj/APPS/OpenWnn_intermediates/src/R.stamp)
warning: ignoring flag -c hdpi-v4. Use --preferred-density instead.
warning: ignoring flag -c hdpi-v4. Use --preferred-density instead.
[ 12% 75/594] target R.java/Manifest.java: CalendarP...obj/APPS/CalendarProvider_intermediates/src/R.stamp)
warning: string 'upgrade_msg' has no default translation.
[ 15% 91/594] target R.java/Manifest.java: Email (ou...get/common/obj/APPS/Email_intermediates/src/R.stamp)
warning: string 'account_folder_list_summary_drafts' has no default translation.
warning: string 'account_folder_list_summary_outbox' has no default translation.
warning: string 'account_folder_list_summary_starred' has no default translation.
warning: string 'done_action' has no default translation.
warning: string 'exchange_name' has no default translation.
warning: string 'next_action' has no default translation.
nothing matches overlay file notification_bg_normal.9.png, for flavor xxhdpi-v4
nothing matches overlay file notification_bg_normal_pressed.9.png, for flavor mdpi-v19
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
[ 15% 93/594] target Java: android-support-v7-cardvi...S/android-support-v7-cardview_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[ 17% 103/594] target Java: android-support-compat (...RARIES/android-support-compat_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 18% 111/594] target Java: android-support-core-uti...ES/android-support-core-utils_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[ 19% 113/594] target Java: android-support-vectordr...ndroid-support-vectordrawable_intermediates/classes)
Note: frameworks/support/graphics/drawable/static/src/android/support/graphics/drawable/VectorDrawableCompat.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[ 19% 117/594] target Java: android-support-core-ui ...ARIES/android-support-core-ui_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[ 20% 120/594] target Java: telephony-common (out/ta...VA_LIBRARIES/telephony-common_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 20% 121/594] target Java: android-support-media-co.../android-support-media-compat_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 21% 129/594] target Java: android-support-fragment...RIES/android-support-fragment_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: frameworks/support/fragment/java/android/support/v4/app/FragmentManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 22% 133/594] target Java: android-support-v7-recyc...droid-support-v7-recyclerview_intermediates/classes)
Note: frameworks/support/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 26% 160/594] AAPT2 link out/target/product/angler/.../APPS/PackageInstaller_intermediates/package-res.apk
packages/apps/PackageInstaller/res/layout-watch/wear_review_permission_title_pref.xml:23: warn: generated id 'android:id/icon' for external package 'android'.
packages/apps/PackageInstaller/res/layout-watch/wear_review_permission_action_pref.xml:17: warn: generated id 'android:id/title' for external package 'android'.
[ 28% 168/594] target Java: android-support-v13 (out...LIBRARIES/android-support-v13_intermediates/classes)
Note: frameworks/support/v13/java/android/support/v13/app/FragmentStatePagerAdapter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[ 28% 171/594] target Java: android-support-v7-appco.../android-support-v7-appcompat_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 29% 175/594] target Prebuilt: mobir (out/target/pr...uct/angler/obj/APPS/mobir_intermediates/package.apk)
Archive: out/target/product/angler/obj/APPS/mobir_intermediates/package.apkinflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libmcu_guidecore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libvudroid.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libguide_sdk_zm04c.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libtnn_wrapper.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libita.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libyuv.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libc++_shared.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libmcu_guidecore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libguide_sdk_zm04c.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libpreview-record-core-android.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libasic_guidecore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libpreview-record-core.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libNativeCore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libtnn_wrapper.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libpreview-record-core-android.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libvudroid.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libita.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libusb1.0.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libusb1.0.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libyuv.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libcommon_guidecore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libita_android.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libita_android.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libNativeCore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libasic_guidecore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libcommon_guidecore.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/armeabi-v7a/libc++_shared.so inflating: out/target/product/angler/obj/APPS/mobir_intermediates/uncompressedlibs/lib/arm64-v8a/libpreview-record-core.so
deleting: lib/armeabi-v7a/libmcu_guidecore.so
deleting: lib/arm64-v8a/libvudroid.so
deleting: lib/armeabi-v7a/libguide_sdk_zm04c.so
deleting: lib/arm64-v8a/libtnn_wrapper.so
deleting: lib/armeabi-v7a/libita.so
deleting: lib/armeabi-v7a/libyuv.so
deleting: lib/arm64-v8a/libc++_shared.so
deleting: lib/arm64-v8a/libmcu_guidecore.so
deleting: lib/arm64-v8a/libguide_sdk_zm04c.so
deleting: lib/armeabi-v7a/libpreview-record-core-android.so
deleting: lib/armeabi-v7a/libasic_guidecore.so
deleting: lib/armeabi-v7a/libpreview-record-core.so
deleting: lib/armeabi-v7a/libNativeCore.so
deleting: lib/armeabi-v7a/libtnn_wrapper.so
deleting: lib/arm64-v8a/libpreview-record-core-android.so
deleting: lib/armeabi-v7a/libvudroid.so
deleting: lib/arm64-v8a/libita.so
deleting: lib/arm64-v8a/libusb1.0.so
deleting: lib/armeabi-v7a/libusb1.0.so
deleting: lib/arm64-v8a/libyuv.so
deleting: lib/armeabi-v7a/libcommon_guidecore.so
deleting: lib/arm64-v8a/libita_android.so
deleting: lib/armeabi-v7a/libita_android.so
deleting: lib/arm64-v8a/libNativeCore.so
deleting: lib/arm64-v8a/libasic_guidecore.so
deleting: lib/arm64-v8a/libcommon_guidecore.so
deleting: lib/armeabi-v7a/libc++_shared.so
deleting: lib/arm64-v8a/libpreview-record-core.soadding: lib/arm64-v8a/libNativeCore.so (stored 0%)adding: lib/arm64-v8a/libasic_guidecore.so (stored 0%)adding: lib/arm64-v8a/libc++_shared.so (stored 0%)adding: lib/arm64-v8a/libcommon_guidecore.so (stored 0%)adding: lib/arm64-v8a/libguide_sdk_zm04c.so (stored 0%)adding: lib/arm64-v8a/libita.so (stored 0%)adding: lib/arm64-v8a/libita_android.so (stored 0%)adding: lib/arm64-v8a/libmcu_guidecore.so (stored 0%)adding: lib/arm64-v8a/libpreview-record-core-android.so (stored 0%)adding: lib/arm64-v8a/libpreview-record-core.so (stored 0%)adding: lib/arm64-v8a/libtnn_wrapper.so (stored 0%)adding: lib/arm64-v8a/libusb1.0.so (stored 0%)adding: lib/arm64-v8a/libvudroid.so (stored 0%)adding: lib/arm64-v8a/libyuv.so (stored 0%)adding: lib/armeabi-v7a/libNativeCore.so (stored 0%)adding: lib/armeabi-v7a/libasic_guidecore.so (stored 0%)adding: lib/armeabi-v7a/libc++_shared.so (stored 0%)adding: lib/armeabi-v7a/libcommon_guidecore.so (stored 0%)adding: lib/armeabi-v7a/libguide_sdk_zm04c.so (stored 0%)adding: lib/armeabi-v7a/libita.so (stored 0%)adding: lib/armeabi-v7a/libita_android.so (stored 0%)adding: lib/armeabi-v7a/libmcu_guidecore.so (stored 0%)adding: lib/armeabi-v7a/libpreview-record-core-android.so (stored 0%)adding: lib/armeabi-v7a/libpreview-record-core.so (stored 0%)adding: lib/armeabi-v7a/libtnn_wrapper.so (stored 0%)adding: lib/armeabi-v7a/libusb1.0.so (stored 0%)adding: lib/armeabi-v7a/libvudroid.so (stored 0%)adding: lib/armeabi-v7a/libyuv.so (stored 0%)
[ 30% 180/594] target Java: android-support-design (...RARIES/android-support-design_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 32% 191/594] Docs droiddoc: out/target/common/docs/test-api-stubs
DroidDoc took 19 sec. to write docs to out/target/common/docs/test-api-stubs
[ 32% 192/594] Docs droiddoc: out/target/common/docs/system-api-stubs
frameworks/base/core/java/android/app/WallpaperManager.java:1361: lint: Method 'setDisplayPadding' must be protected with a system permission; it currently allows non-system callers holding [android.permission.SET_WALLPAPER_HINTS] [125]
frameworks/base/core/java/android/app/WallpaperManager.java:1384: lint: Method 'setDisplayOffset' must be protected with a system permission. [125]
frameworks/base/core/java/android/app/WallpaperManager.java:1402: lint: Method 'clearWallpaper' must be protected with a system permission; it currently allows non-system callers holding [android.permission.SET_WALLPAPER] [125]
frameworks/base/core/java/android/app/WallpaperManager.java:1415: lint: Method 'clearWallpaper' must be protected with a system permission; it currently allows non-system callers holding [android.permission.SET_WALLPAPER] [125]
frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:4968: lint: Method 'getProfileOwner' must be protected with a system permission. [125]
frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:5646: lint: Method 'getPermittedAccessibilityServices' must be protected with a system permission. [125]
frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:5747: lint: Method 'getPermittedInputMethodsForCurrentUser' must be protected with a system permission. [125]
frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:7565: lint: Method 'getUserProvisioningState' must be protected with a system permission. [125]
frameworks/base/core/java/android/app/admin/DevicePolicyManager.java:7705: lint: Method 'isDeviceProvisioned' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:3969: lint: Method 'queryBroadcastReceiversAsUser' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:4757: lint: Method 'getIntentVerificationStatusAsUser' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:4797: lint: Method 'getIntentFilterVerifications' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:4812: lint: Method 'getAllIntentFilters' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:4826: lint: Method 'getDefaultBrowserPackageNameAsUser' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:5715: lint: Method 'getInstantAppResolverSettingsComponent' must be protected with a system permission. [125]
frameworks/base/core/java/android/content/pm/PackageManager.java:5725: lint: Method 'getInstantAppInstallerComponent' must be protected with a system permission. [125]
frameworks/base/core/java/android/hardware/SensorManager.java:1801: lint: Method 'initDataInjection' must be protected with a system permission. [125]
frameworks/base/core/java/android/hardware/SensorManager.java:1835: lint: Method 'injectSensorData' must be protected with a system permission. [125]
frameworks/base/core/java/android/hardware/radio/RadioManager.java:1315: lint: Method 'listModules' must be protected with a system permission. [125]
frameworks/base/core/java/android/hardware/radio/RadioManager.java:1331: lint: Method 'openTuner' must be protected with a system permission. [125]
frameworks/base/core/java/android/net/ConnectivityManager.java:1092: lint: Method 'getCaptivePortalServerUrl' must be protected with a system permission. [125]
frameworks/base/core/java/android/net/ConnectivityManager.java:2051: lint: Method 'isTetheringSupported' must be protected with a system permission; it currently allows non-system callers holding [android.permission.ACCESS_NETWORK_STATE] [125]
frameworks/base/core/java/android/net/ConnectivityManager.java:2083: lint: Method 'startTethering' must be protected with a system permission. [125]
frameworks/base/core/java/android/net/NetworkScoreManager.java:229: lint: Method 'getActiveScorerPackage' must be protected with a system permission. [125]
frameworks/base/core/java/android/os/PowerManager.java:854: lint: Method 'isScreenBrightnessBoosted' must be protected with a system permission. [125]
frameworks/base/core/java/android/print/PrintManager.java:557: lint: Method 'addPrintServicesChangeListener' must be protected with a system permission. [125]
frameworks/base/core/java/android/print/PrintManager.java:592: lint: Method 'removePrintServicesChangeListener' must be protected with a system permission. [125]
frameworks/base/core/java/android/print/PrintManager.java:634: lint: Method 'getPrintServices' must be protected with a system permission. [125]
frameworks/base/core/java/android/print/PrintManager.java:659: lint: Method 'addPrintServiceRecommendationsChangeListener' must be protected with a system permission. [125]
frameworks/base/core/java/android/print/PrintManager.java:695: lint: Method 'removePrintServiceRecommendationsChangeListener' must be protected with a system permission. [125]
frameworks/base/core/java/android/print/PrintManager.java:734: lint: Method 'getPrintServiceRecommendations' must be protected with a system permission. [125]
frameworks/base/core/java/android/service/persistentdata/PersistentDataBlockManager.java:133: lint: Method 'getMaximumDataBlockSize' must be protected with a system permission. [125]
frameworks/base/core/java/android/view/accessibility/AccessibilityManager.java:1065: lint: Method 'isAccessibilityButtonSupported' must be protected with a system permission. [125]
frameworks/base/location/java/android/location/LocationManager.java:832: lint: Method 'requestLocationUpdates' must be protected with a system permission; it currently allows non-system callers holding [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] [125]
frameworks/base/location/java/android/location/LocationManager.java:861: lint: Method 'requestLocationUpdates' must be protected with a system permission; it currently allows non-system callers holding [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] [125]
frameworks/base/media/java/android/media/AudioManager.java:2378: lint: Method 'requestAudioFocus' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/AudioManager.java:2417: lint: Method 'requestAudioFocus' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/AudioManager.java:2475: lint: Method 'requestAudioFocus' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/AudioManager.java:2572: lint: Method 'dispatchAudioFocusChange' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/AudioManager.java:2623: lint: Method 'abandonAudioFocus' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/AudioManager.java:3831: lint: Method 'isHdmiSystemAudioSupported' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/tv/TvInputManager.java:1335: lint: Method 'getBlockedRatings' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/tv/TvInputManager.java:1390: lint: Method 'getTvContentRatingSystemList' must be protected with a system permission. [125]
frameworks/base/media/java/android/media/tv/TvInputManager.java:1554: lint: Method 'isSingleSessionActive' must be protected with a system permission. [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:722: lint: Method 'getConnectionManager' must be protected with a system permission. [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:744: lint: Method 'getPhoneAccountsSupportingScheme' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:862: lint: Method 'getAllPhoneAccountsCount' must be protected with a system permission. [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:880: lint: Method 'getAllPhoneAccounts' must be protected with a system permission. [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:898: lint: Method 'getAllPhoneAccountHandles' must be protected with a system permission. [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:1194: lint: Method 'getCallState' must be protected with a system permission. [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:1216: lint: Method 'isRinging' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:1318: lint: Method 'isTtySupported' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:1403: lint: Method 'addNewUnknownCall' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:1241: lint: Method 'getCurrentPhoneType' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:1256: lint: Method 'getCurrentPhoneType' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:4936: lint: Method 'getCarrierPackageNamesForIntent' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:4942: lint: Method 'getCarrierPackageNamesForIntentAndPhone' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:4986: lint: Method 'call' must be protected with a system permission; it currently allows non-system callers holding [android.permission.CALL_PHONE] [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:4999: lint: Method 'endCall' must be protected with a system permission; it currently allows non-system callers holding [android.permission.CALL_PHONE] [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5040: lint: Method 'isOffhook' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5057: lint: Method 'isRinging' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5074: lint: Method 'isIdle' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5091: lint: Method 'isRadioOn' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5376: lint: Method 'isDataConnectivityPossible' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5389: lint: Method 'needsOtaServiceProvisioning' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5439: lint: Method 'getDataEnabled' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5472: lint: Method 'getDataEnabled' must be protected with a system permission. [125]
frameworks/base/telephony/java/android/telephony/TelephonyManager.java:5527: lint: Method 'isVideoCallingEnabled' must be protected with a system permission; it currently allows non-system callers holding [android.permission.READ_PHONE_STATE] [125]
frameworks/base/wifi/java/android/net/wifi/RttManager.java:315: lint: Method 'getRttCapabilities' must be protected with a system permission. [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:1425: lint: Method 'isPortableHotspotSupported' must be protected with a system permission. [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:1434: lint: Method 'isWifiScannerSupported' must be protected with a system permission. [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:1451: lint: Method 'isDeviceToDeviceRttSupported' must be protected with a system permission. [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:1459: lint: Method 'isDeviceToApRttSupported' must be protected with a system permission. [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:2070: lint: Method 'getWifiApState' must be protected with a system permission; it currently allows non-system callers holding [android.permission.ACCESS_WIFI_STATE] [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:2087: lint: Method 'isWifiApEnabled' must be protected with a system permission; it currently allows non-system callers holding [android.permission.ACCESS_WIFI_STATE] [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:2099: lint: Method 'getWifiApConfiguration' must be protected with a system permission; it currently allows non-system callers holding [android.permission.ACCESS_WIFI_STATE] [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:2115: lint: Method 'setWifiApConfiguration' must be protected with a system permission; it currently allows non-system callers holding [android.permission.CHANGE_WIFI_STATE] [125]
frameworks/base/wifi/java/android/net/wifi/WifiManager.java:2790: lint: Method 'connect' must be protected with a system permission. [125]
DroidDoc took 19 sec. to write docs to out/target/common/docs/system-api-stubs
[ 32% 196/594] Compiling SDK Stubs: out/target/commo...droid_system_stubs_current_intermediates/classes.jar
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 33% 198/594] target Java: Dialer (out/target/common/obj/APPS/Dialer_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 33% 199/594] Ensuring Jack server is installed and started
FAILED: setup-jack-server
/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.31.CANDIDATE.jar 4.31.CANDIDATE || exit 47 )"
Jack server already installed in "/home/maqi/.jack-server"
Server is already running
Communication error with Jack server 28. Try 'jack-diagnose'
Communication error with Jack server 28. Try 'jack-diagnose'
ninja: build stopped: subcommand failed.
19:18:29 ninja failed with: exit status 1
make: *** [build/core/main.mk:21: run_soong_ui] Error 1
make: Leaving directory '/home/maqi/data/android-11.0.0_r9'#### make failed to build some targets (13:50 (mm:ss)) ####
首次因为内存不足导致失败
maqi@ubuntu:~/data/android-11.0.0_r9$ m -j16
make: Entering directory '/home/maqi/data/android-11.0.0_r9'
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=aosp_angler
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-26-generic-x86_64-with-Ubuntu-20.04-focal
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR5.170623.007
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
device/huawei/angler/aosp_angler.mk was modified, regenerating...
[9/975] including ./cts/Android.mk ...
cts/apps/CtsVerifier/Android.mk:72: warning: FindEmulator: find: `cts/apps/CtsVerifier/src/com/android/cts/verifier/backup': No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/res: No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/backup/assets: No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory
cts/tests/tests/contactsproviderwipe/Android.mk:33: warning: FindEmulator: find: `cts/tests/tests/contactsproviderwipe/common/src': No such file or directory
cts/tests/tests/telecom3/Android.mk:37: warning: FindEmulator: find: `cts/tests/tests/telecom/src/android/telecom/cts/MockDialerActivity.java': No such file or directory
[323/975] including ./external/toybox/Android.mk ...
awk: line 1: syntax error at or near ,
[355/975] including ./frameworks/av/media/libaaudio/Android.mk ...
frameworks/av/media/libaaudio/examples/input_monitor/static/Android.mk: warning: input_monitor: unusual tags examples
frameworks/av/media/libaaudio/examples/write_sine/static/Android.mk: warning: write_sine: unusual tags examples
[389/975] including ./frameworks/base/Android.mk ...
./frameworks/base/Android.mk:865: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:874: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:879: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:884: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
[718/975] including ./system/sepolicy/Android.mk ...
./system/sepolicy/Android.mk:107: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[975/975] including ./tools/tradefederation/core/Android.mk ...
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
PRODUCT_COPY_FILES device/huawei/angler/fstab.angler:root/fstab.angler ignored.
No private recovery resources for TARGET_DEVICE angler
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
build/core/base_rules.mk:466: warning: overriding commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/angler/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/angler/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/angler/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/angler/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
[ 0% 1/396] Ensuring Jack server is installed and started
Jack server already installed in "/home/maqi/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/maqi/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
[ 17% 70/396] target Package: Calendar (out/target/p.../angler/obj/APPS/Calendar_intermediates/package.apk)
nothing matches overlay file ic_colorpicker_swatch_selected.png, for flavor xhdpi-v4
[ 21% 86/396] target Package: Camera2 (out/target/pr...t/angler/obj/APPS/Camera2_intermediates/package.apk)
warning: no entries written for bool/only_use_portrait (0x7f0b0001)
warning: no entries written for bool/picker_is_dialog (0x7f0b0002)
warning: no entries written for dimen/category_panel_height (0x7f0d00ac)
warning: no entries written for dimen/category_panel_icon_size (0x7f0d00ad)
warning: no entries written for dimen/category_panel_text_size (0x7f0d00ae)
warning: no entries written for dimen/category_panel_margin (0x7f0d00af)
warning: no entries written for style/DialogPickerTheme (0x7f0f0028)
[ 31% 124/396] target Package: OpenWnn (out/target/p...t/angler/obj/APPS/OpenWnn_intermediates/package.apk)
warning: ignoring flag -c hdpi-v4. Use --preferred-density instead.
warning: ignoring flag -c hdpi-v4. Use --preferred-density instead.
[ 37% 150/396] target Package: QuickSearchBox (out/t...r/obj/APPS/QuickSearchBox_intermediates/package.apk)
warning: no entries written for dimen/suggestions_width (0x7f0c0006)
warning: no entries written for dimen/shortcuts_width (0x7f0c0007)
[ 55% 219/396] target Package: CalendarProvider (out...obj/APPS/CalendarProvider_intermediates/package.apk)
warning: string 'upgrade_msg' has no default translation.
warning: string 'upgrade_msg' is missing 91 required localizations: af_ZA am_ET ar_EG be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
[ 60% 240/396] target Package: Email (out/target/pro...uct/angler/obj/APPS/Email_intermediates/package.apk)
warning: string 'account_folder_list_summary_drafts' has no default translation.
warning: string 'account_folder_list_summary_drafts' is missing 92 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'account_folder_list_summary_outbox' has no default translation.
warning: string 'account_folder_list_summary_outbox' is missing 92 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'account_folder_list_summary_starred' has no default translation.
warning: string 'account_folder_list_summary_starred' is missing 92 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'done_action' has no default translation.
warning: string 'done_action' is missing 92 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'exchange_name' has no default translation.
warning: string 'exchange_name' is missing 92 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: string 'next_action' has no default translation.
warning: string 'next_action' is missing 92 required localizations: af_ZA am_ET ar_EG az_AZ be_BY bg_BG bn_BD bs_BA ca_ES cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_IN en_NZ en_SG en_US eo_EU es_ES es_US et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES gu_IN hi_IN hr_HR hu_HU hy_AM in_ID is_IS it_CH it_IT iw_IL ja_JP ka_GE kk_KZ km_KH kn_IN ko_KR ky_KG lo_LA lt_LT lv_LV mk_MK ml_IN mn_MN mr_IN ms_MY my_MM nb_NO ne_NP nl_BE nl_NL pa_IN pl_PL pt_BR pt_PT ro_RO ru_RU si_LK sk_SK sl_SI sq_AL sr_Latn_RS sr_RS sv_SE sw_TZ ta_IN te_IN th_TH tl_PH tr_TR uk_UA ur_PK uz_UZ vi_VN zh_CN zh_HK zh_TW zu_ZA
warning: no entries written for string/next_action (0x7f0902da)
warning: no entries written for string/done_action (0x7f0902db)
warning: no entries written for string/account_folder_list_summary_starred (0x7f0902dc)
warning: no entries written for string/account_folder_list_summary_drafts (0x7f0902dd)
warning: no entries written for string/account_folder_list_summary_outbox (0x7f0902de)
warning: no entries written for string/exchange_name (0x7f0902df)
warning: no entries written for plurals/message_view_attachment_bytes (0x7f110015)
warning: no entries written for plurals/message_view_attachment_kilobytes (0x7f110016)
warning: no entries written for plurals/message_view_attachment_megabytes (0x7f110017)
warning: no entries written for plurals/message_view_attachment_gigabytes (0x7f110018)
nothing matches overlay file ic_cancel_wht_24dp.png, for flavor hdpi-v4
nothing matches overlay file notification_bg_normal.9.png, for flavor xxhdpi-v4
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
[ 98% 391/396] build out/target/product/angler/obj/NOTICE.html
Combining NOTICE files into text
Combining NOTICE files into HTML
[ 99% 395/396] Target system fs image: out/target/pr...r/obj/PACKAGING/systemimage_intermediates/system.img
Running: build_verity_tree -s 3221225472
25366528
Running: system/extras/verity/build_verity_metadata.py size 3221225472
32768
Running: fec -s 3246624768
25669632
Running: build_verity_tree -s 3195691008
25169920
Running: system/extras/verity/build_verity_metadata.py size 3195691008
32768
Running: fec -s 3220893696
25473024
Running: build_verity_tree -s 3182923776
25067520
Running: system/extras/verity/build_verity_metadata.py size 3182923776
32768
Running: fec -s 3208024064
25366528
Running: build_verity_tree -s 3176538112
25018368
Running: system/extras/verity/build_verity_metadata.py size 3176538112
32768
Running: fec -s 3201589248
25317376
Running: build_verity_tree -s 3173347328
24993792
Running: system/extras/verity/build_verity_metadata.py size 3173347328
32768
Running: fec -s 3198373888
25292800
Running: build_verity_tree -s 3171749888
24981504
Running: system/extras/verity/build_verity_metadata.py size 3171749888
32768
Running: fec -s 3196764160
25276416
Running: build_verity_tree -s 3170951168
24977408
Running: system/extras/verity/build_verity_metadata.py size 3170951168
32768
Running: fec -s 3195961344
25276416
Running: build_verity_tree -s 3170553856
24973312
Running: system/extras/verity/build_verity_metadata.py size 3170553856
32768
Running: fec -s 3195559936
25268224
Running: build_verity_tree -s 3170754560
24973312
Running: system/extras/verity/build_verity_metadata.py size 3170754560
32768
Running: fec -s 3195760640
25268224
Running: build_verity_tree -s 3170852864
24973312
Running: system/extras/verity/build_verity_metadata.py size 3170852864
32768
Running: fec -s 3195858944
25268224
Running: build_verity_tree -s 3170902016
24977408
Running: system/extras/verity/build_verity_metadata.py size 3170902016
32768
Running: fec -s 3195912192
25268224
Running: build_verity_tree -s 3170926592
24977408
Running: system/extras/verity/build_verity_metadata.py size 3170926592
32768
Running: fec -s 3195936768
25276416
Running: build_verity_tree -s 3170938880
24977408
Running: system/extras/verity/build_verity_metadata.py size 3170938880
32768
Running: fec -s 3195949056
25276416
Running: build_verity_tree -s 3170947072
24977408
Running: system/extras/verity/build_verity_metadata.py size 3170947072
32768
Running: fec -s 3195957248
25276416
Running: build_verity_tree -s 3170942976
24977408
Running: system/extras/verity/build_verity_metadata.py size 3170942976
32768
Running: fec -s 3195953152
25276416
Running: mkuserimg.sh -s out/target/product/angler/system out/target/product/angler/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 3170938880 -j 0 -D out/target/product/angler/system -L system -i 4096 out/target/product/angler/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin
make_ext4fs -s -T -1 -S out/target/product/angler/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin -L system -i 4096 -l 3170938880 -J -a system out/target/product/angler/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/angler/system out/target/product/angler/system
Creating filesystem with parameters:Size: 3170938880Block size: 4096Blocks per group: 32768Inodes per group: 176Inode size: 256Journal blocks: 0Label: systemBlocks: 774155Block groups: 24Reserved block group size: 191
Created filesystem with 2686/4224 inodes and 253942/774155 blocks
Running: build_verity_tree -A aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 out/target/product/angler/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmpmiCIOI_verity_images/verity.img
e48d3898c997c67104b84586d97eff17a3c35d6a6b534ea4ed6c5f1dd9f8f0d8 aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7
Running: system/extras/verity/build_verity_metadata.py build 3170938880 /tmp/tmpmiCIOI_verity_images/verity_metadata.img e48d3898c997c67104b84586d97eff17a3c35d6a6b534ea4ed6c5f1dd9f8f0d8 aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7 /dev/block/platform/soc.0/f9824900.sdhci/by-name/system verity_signer build/target/product/security/verity.pk8
['verity_signer', '/tmp/tmpfgc6Ks.table', 'build/target/product/security/verity.pk8', '/tmp/tmprIs37K.sig']
appending /tmp/tmpmiCIOI_verity_images/verity_metadata.img to /tmp/tmpmiCIOI_verity_images/verity.img
Running: fec -e -p 0 out/target/product/angler/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmpmiCIOI_verity_images/verity.img /tmp/tmpmiCIOI_verity_images/verity_fec.img
encoding RS(255, 253) to '/tmp/tmpmiCIOI_verity_images/verity_fec.img' for input files:1: 'out/target/product/angler/obj/PACKAGING/systemimage_intermediates/system.img'2: '/tmp/tmpmiCIOI_verity_images/verity.img'
appending /tmp/tmpmiCIOI_verity_images/verity_fec.img to /tmp/tmpmiCIOI_verity_images/verity.img
Running: append2simg out/target/product/angler/obj/PACKAGING/systemimage_intermediates/system.img /tmp/tmpmiCIOI_verity_images/verity.img[100% 396/396] Install system fs image: out/target/product/angler/system.img
out/target/product/angler/system.img+out/target/product/angler/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=3288637440 blocksize=135168 total=1091325858 reserve=33251328
make: Leaving directory '/home/maqi/data/android-11.0.0_r9'#### make completed successfully (38:57 (mm:ss)) ####
Apk已生成 但是无arm文件
cd data/android-11.0.0_r9/out/target/product/angler/system/priv-app/mobir/
ls -l
system.img 也已经更新
第一次刷入
打开APP后闪退
11-23 10:29:45.282 5883 5883 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/priv-app/mobir/mobir.apk"],nativeLibraryDirectories=[/system/priv-app/mobir/lib/arm64, /system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]] couldn't find "libNativeCore.so"
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1657)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.parts.mobileir.mobileirparts.jni.NativeCore.<clinit>(NativeCore.kt:224)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.parts.mobileir.mobileirparts.view.popup.RealTimeVideoCustomPalettePopupWindowCommon.<init>(RealTimeVideoCustomPalettePopupWindowCommon.kt:40)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.parts.mobileir.mobileirparts.presenter.RealTimeVideoZX10APresenterImpl.<init>(RealTimeVideoZX10APresenterImpl.kt:79)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.parts.mobileir.mobileirparts.home.activity.RealTimeVideoActivity.showRealTime(RealTimeVideoActivity.kt:82)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.parts.mobileir.mobileirparts.home.activity.RealTimeVideoActivity.onCreate(RealTimeVideoActivity.kt:58)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6975)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
11-23 10:29:45.282 5883 5883 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
加入so文件
LOCAL_PREBUILT_JNI_LIBS := \lib/arm64-v8a/libNativeCore.so \lib/armeabi-v7a/libyuv.so
如下为修改后的mk
# Android.mk通常需要定义好LOCAL_PATH,表示当前工作路径,函数my-dir是编译系统提供的,返回当前路径
LOCAL_PATH := $(call my-dir)
# 这一步操作主要是清空之前定义的LOCAL_XXX开头的变量,是必须要的操作。CLEAR_VARS 变量由Build System提供。并指向一个指定的GNU Makefile,由它负责清理很多LOCAL_xxx,例如:LOCAL_MODULE, LOCAL_SRC_FILES, LOCAL_STATIC_LIBRARIES等等。但不清理LOCAL_PATH.
# 这个清理动作是必须的,因为所有的编译控制文件由同一个GNU Make解析和执行,其变量是全局的。所以清理后才能避免相互影响。
include $(CLEAR_VARS)#模块名,并且这个名字要加入到PRODUCT_PACKAGES中
LOCAL_MODULE := mobir#不管是user 还是eng 版本都会编译此app ;
LOCAL_MODULE_TAGS := optional# 定义编译模块所需的源文件 ;
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk#定义编译完成之后的类型:除了APPS,还有ETC,EXECUTABLES(.bin)SHARED_LIBRARIES(.so) 等选择值
LOCAL_MODULE_CLASS := APPS#定义编译完成之后模块的后缀
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)#“both”(二者):同时编译 32 位和 64 位架构。
#“32”:仅编译 32 位架构。
#“64”:仅编译 64 位架构。
#“first”(第一个):仅编译第一个架构(在 32 位设备中编译 32 位架构,在 64 位设备中编译 64 位架构)
LOCAL_MULTILIB := firstLOCAL_PREBUILT_JNI_LIBS := \lib/arm64-v8a/libNativeCore.so \lib/arm64-v8a/libasic_guidecore.so \lib/arm64-v8a/libc++_shared.so \lib/arm64-v8a/libcommon_guidecore.so \lib/arm64-v8a/libguide_sdk_zm04c.so \lib/arm64-v8a/libita.so \lib/arm64-v8a/libita_android.so \lib/arm64-v8a/libmcu_guidecore.so \lib/arm64-v8a/libpreview-record-core-android.so \lib/arm64-v8a/libpreview-record-core.so \lib/arm64-v8a/libtnn_wrapper.so \lib/arm64-v8a/libusb1.0.so \lib/arm64-v8a/libvudroid.so \lib/arm64-v8a/libyuv.so \lib/armeabi-v7a/libNativeCore.so \lib/armeabi-v7a/libasic_guidecore.so \lib/armeabi-v7a/libc++_shared.so \lib/armeabi-v7a/libcommon_guidecore.so \lib/armeabi-v7a/libguide_sdk_zm04c.so \lib/armeabi-v7a/libita.so \lib/armeabi-v7a/libita_android.so \lib/armeabi-v7a/libmcu_guidecore.so \lib/armeabi-v7a/libpreview-record-core-android.so \lib/armeabi-v7a/libpreview-record-core.so \lib/armeabi-v7a/libtnn_wrapper.so \lib/armeabi-v7a/libusb1.0.so \lib/armeabi-v7a/libvudroid.so \lib/armeabi-v7a/libyuv.so #定义使用原app签名可用选择项platform,shared,media
LOCAL_CERTIFICATE := PRESIGNED#将apk编进“/system/priv-app/目录”,如果为false,或者不加这句话,就会编进“/system/app” 目录, 二者区别在于前者的权限要高于后者,即不可卸载
LOCAL_PRIVILEGED_MODULE := true#不进行odex化
LOCAL_DEX_PREOPT := false# 定义编译出来的目标文件,如动态库,静态库,jar包以及apk
include $(BUILD_PREBUILT)
第二次刷入
mm报错
./packages/apps/mobir/Android.mk:24: error: commands commence before first target.
原因为 \
后面不允许有空格
查看手机系统abi
adb shell getprop ro.product.cpu.abi
路径下分别生成两个环境的so
/home/maqi/data/android-11.0.0_r9/packages/apps/mobir/
官方LOCAL_MULTILIB描述
https://source.android.com/source/64-bit-builds?hl=zh-cn
so打包错误
a.lang.UnsatisfiedLinkError: dlopen failed: "/system/priv-app/mobir/lib/arm64/libNativeCore.so" is 32-bit instead of 64-bit
堆栈如下
maqi@ubuntu:~$ adb logcat |grep AndroidRuntime
11-23 15:03:55.198 577 577 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
11-23 15:03:59.668 995 995 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
11-23 15:03:59.736 1013 1013 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
11-23 15:03:59.933 1031 1031 D AndroidRuntime: >>>>>> START com.android.internal.os.WebViewZygoteInit uid 1053 <<<<<<
11-23 15:06:19.217 5308 5308 D AndroidRuntime: Shutting down VM
11-23 15:06:19.218 5308 5308 E AndroidRuntime: FATAL EXCEPTION: main
11-23 15:06:19.218 5308 5308 E AndroidRuntime: Process: com.parts.mobileir.mobileirparts, PID: 5308
11-23 15:06:19.218 5308 5308 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: "/system/priv-app/mobir/lib/arm64/libNativeCore.so" is 32-bit instead of 64-bit
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1657)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.parts.mobileir.mobileirparts.jni.NativeCore.<clinit>(NativeCore.kt:224)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.parts.mobileir.mobileirparts.view.popup.RealTimeVideoCustomPalettePopupWindowCommon.<init>(RealTimeVideoCustomPalettePopupWindowCommon.kt:40)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.parts.mobileir.mobileirparts.presenter.RealTimeVideoZX10APresenterImpl.<init>(RealTimeVideoZX10APresenterImpl.kt:79)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.parts.mobileir.mobileirparts.home.activity.RealTimeVideoActivity.showRealTime(RealTimeVideoActivity.kt:82)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.parts.mobileir.mobileirparts.home.activity.RealTimeVideoActivity.onCreate(RealTimeVideoActivity.kt:58)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6975)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
11-23 15:06:19.218 5308 5308 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
验证so位数
angler:/system/priv-app/mobir/lib/arm64 $ file libNativeCore.so
libNativeCore.so: ELF shared object, 32-bit LSB arm, for Android 21, built by NDK r21b (6352462), BuildID=9d79b7029cc70acfcf565f87ff74cd072e787ff6, stripped
果然是32位的
验证源码
maqi@ubuntu:~/data/android-11.0.0_r9/packages/apps/mobir$ file lib/arm64-v8a/libNativeCore.so
lib/arm64-v8a/libNativeCore.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=bb6a21a91d37798d5b09f755a74114798add21ff, stripped
确实是64位的,接下来看mk哪里出了问题
注释v7部分
第三次刷入
至此预装一个系统APP的需求完成
引用
https://www.cnblogs.com/l2rf/p/5973362.html
https://blog.csdn.net/byhook/article/details/51900277
Android Framework开发 -
向系统中添加预装App
https://www.cnblogs.com/chorm590/p/12338558.html
https://blog.51cto.com/u_11866419/4764609
https://blog.csdn.net/tracydragonlxy/article/details/124198616
https://mr-cao.gitbooks.io/android/content/android-build.html
https://cloud.tencent.com/developer/article/1578464
https://www.cnblogs.com/l2rf/p/5973362.html