写在20110613:vendor机制、修改应用编译.mk文件、USB调试

本文介绍了Vendor机制的实现方式,包括通过*_BUILD和*_CUSTOM文件实现差异化编译的方法,并解释了如何通过修改.mk文件来控制应用的编译。此外,还提供了解决ADB设备无法识别的问题的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.Vendor机制:
在主分支上建立分量,达到差异化编译的目的,主要体现在***_BUILD和***_CUSTOM两个文件,顾名思义,前者是差异化按项目分门别类的编译脚本,后者是按项目分类的各应用相关定制的文件抽取存放位置

2.是否把某个应用编译进去,可以在该应用对应的工程目录下的.mk文件中修改脚本
3.ADB设备识别不了:检查手机驱动是否安装、设置中“允许USB调试”选项是否开启。
仍然无法识别,转到我的电脑是否有磁盘显示为光驱,把光驱Autorun弹出再试。
01-01 19:26:55.630 01566 01670 D APM_AudioPolicyManager: setVolumeCurveIndex device 40000000, index 14 01-01 19:26:55.630 02924 03113 E UsbDeviceManager: connectToProxy: usb gadget hidl hal service not found. java.util.NoSuchElementException at android.os.HwBinder.getService(Native Method) at android.hardware.usb.gadget.V1_0.IUsbGadget.getService(IUsbGadget.java:57) at android.hardware.usb.gadget.V1_0.IUsbGadget.getService(IUsbGadget.java:64) at com.android.server.usb.hal.gadget.UsbGadgetHidl.isServicePresent(UsbGadgetHidl.java:141) at com.android.server.usb.hal.gadget.UsbGadgetHalInstance.getInstance(UsbGadgetHalInstance.java:39) at com.android.server.usb.UsbDeviceManager.<init>(UsbDeviceManager.java:332) at com.android.server.usb.UsbService.<init>(UsbService.java:205) at com.android.server.usb.UsbService$Lifecycle.lambda$onStart$0(UsbService.java:113) at com.android.server.usb.UsbService$Lifecycle.$r8$lambda$HIZVSW8uTg1XjWF6etZh-bC1WP4(Unknown Source:0) at com.android.server.usb.UsbService$Lifecycle$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at com.android.server.SystemServerInitThreadPool.lambda$submitTask$0(SystemServerInitThreadPool.java:107) at com.android.server.SystemServerInitThreadPool.$r8$lambda$KBkrFsHiqcxWyjNRg1WxRI4WNHA(Unknown Source:0) at com.android.server.SystemServerInitThreadPool$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at com.android.internal.util.ConcurrentUtils$1$1.run(ConcurrentUtils.java:65) 01-01 19:26:55.630 02924 03113 E UsbPortManager: USB Gadget HAL AIDL/HIDL not present 01-01 19:26:55.630 02924 03113 D UsbDeviceManager: getInstance done
08-12
Line 3507: 01-01 19:26:38.540 01744 01744 I adbd : persist.adb.watchdog set to '' Line 3508: 01-01 19:26:38.542 01744 01744 I adbd : persist.sys.test_harness set to '' Line 3510: 01-01 19:26:38.542 01744 01744 I adbd : adb watchdog timeout set to 600 seconds Line 3511: 01-01 19:26:38.543 01744 01744 I adbd : adbd started Line 3511: 01-01 19:26:38.543 01744 01744 I adbd : adbd started Line 3513: 01-01 19:26:38.543 01744 01759 I adbd : opening control endpoint /dev/usb-ffs/adb/ep0 Line 3514: 01-01 19:26:38.544 01744 01757 I adbd : Waiting for persist.adb.tls_server.enable=1 Line 3517: 01-01 19:26:38.554 01744 01759 I adbd : UsbFfsConnection constructed Line 3526: 01-01 19:26:38.570 01744 01761 I adbd : UsbFfs-monitor thread spawned Line 4331: 01-01 19:26:39.572 01744 01761 W adbd : timed out while waiting for FUNCTIONFS_BIND, trying again Line 4332: 01-01 19:26:39.572 01744 01761 I adbd : UsbFfs: connection terminated: monitor thread finished Line 4333: 01-01 19:26:39.573 01744 01744 I adbd : UsbFfs: already offline Line 4334: 01-01 19:26:39.573 01744 01744 I adbd : destroying transport UsbFfs Line 4335: 01-01 19:26:39.573 01744 01744 I adbd : UsbFfsConnection being destroyed Line 4353: 01-01 19:26:39.642 01744 01759 I adbd : opening control endpoint /dev/usb-ffs/adb/ep0 Line 4355: 01-01 19:26:39.648 01744 01759 I adbd : UsbFfsConnection constructed Line 4363: 01-01 19:26:39.652 01744 01965 I adbd : UsbFfs-monitor thread spawned Line 6044: 01-01 19:26:40.669 01744 01965 W adbd : timed out while waiting for FUNCTIONFS_BIND, trying again Line 6045: 01-01 19:26:40.669 01744 01965 I adbd : UsbFfs: connection terminated: monitor thread finished Line 6046: 01-01 19:26:40.670 01744 01744 I adbd : UsbFfs: already offline Line 6047: 01-01 19:26:40.670 01744 01744 I adbd : destroying transport UsbFfs Line 6048: 01-01 19:26:40.670 01744 01744 I adbd : UsbFfsConnection being destroyed Line 6641: 01-01 19:26:40.810 01744 01759 I adbd : opening control endpoint /dev/usb-ffs/adb/ep0 Line 6703: 01-01 19:26:40.815 01744 01759 I adbd : UsbFfsConnection constructed Line 6726: 01-01 19:26:40.820 01744 02220 I adbd : UsbFfs-monitor thread spawned Line 7858: 01-01 19:26:41.384 01744 02220 I adbd : USB event: FUNCTIONFS_BIND Line 12899: 01-01 19:26:45.298 02952 02958 E Diag_Lib: DPL : gIsQXDMDisabled 0, gIsADBDisabled 0, gIsDebugDisabled 0, gIsIMSLogsDisabled 0 gIsDebugDataPathDisabled = 0 Line 13319: 01-01 19:26:45.317 02952 02958 E Diag_Lib: DPL : gIsQXDMDisabled 0, gIsADBDisabled 0, gIsDebugDisabled 0, gIsIMSLogsDisabled 0 gIsDebugDataPathDisabled = 0 Line 13978: 01-01 19:26:45.534 02924 02924 D CompatConfig: No directory /apex/com.android.adbd/etc/compatconfig, skipping Line 17407: 01-01 19:26:47.093 02924 02924 W PackageManager: No package known for package restrictions com.google.android.adbd Line 17766: 01-01 19:26:47.274 02924 02924 D PackageManager: Directories scanned as system partitions: [/system:0, /vendor:524288, /odm:4194304, /oem:262144, /product:1048576, /system_ext:2097152, /my_product/non_overlay:1048576, /mnt/opex/com.oplus.odmf@15002009:2097152, /mnt/opex/com.oplus.moduleservices@15000014:2097152, /mnt/opex/com.oplus.fancyIconLoader@1000000:2097152, /mnt/opex/com.oplus.NetworkAssistSys@15002031:2097152, /mnt/opex/com.oplus.CustCore@15000029:2097152, /my_company:1048576, /my_carrier:1048576, /my_bigball:1048576, /my_product/cust/TR:1048576, /apex/com.android.ipsec:41943040, /apex/com.android.ondevicepersonalization:41943040, /apex/com.android.cellbroadcast:41943040, /apex/com.android.profiling:41943040, /apex/com.android.nfcservices:41943040, /apex/com.android.media.swcodec:41943040, /apex/com.android.conscrypt:41943040, /apex/vendor.oplus.hardware.stability.aidl:42467328, /apex/com.android.os.statsd:41943040, /apex/com.android.wifi:41943040, /apex/com.android.uwb:41943040, /apex/com.android.virt:41943040, /apex/com.android.adservices:41943040, /apex/com.android.configinfrastructure:41943040, /apex/com.android.devicelock:41943040, /apex/com.android.appsearch:41943040, /apex/com.google.mainline.primary.libs:41943040, /apex/com.android.compos:44040192, /apex/com.android.tethering:41943040, /apex/com.android.resolv:41943040, /apex/com.android.mediaprovider:41943040, /apex/com.android.runtime:41943040, /apex/com.android.neuralnetworks:41943040, /apex/com.android.permission:41943040, /apex/com.android.adbd:41943040, /apex/com.android.i18n:41943040, /apex/com.android.scheduling:41943040, /apex/com.android.media:41943040, /apex/com.android.tzdata:41943040, /apex/vendor.oplus.hardware.engineer.aidl:42467328, /apex/com.android.sdkext:41943040, /apex/com.android.rkpd:41943040, /apex/com.android.apex.cts.shim:41943040, /apex/com.android.art:41943040, /apex/com.android.extservices:41943040, /apex/com.android.vndk.v33:44040192, /apex/com.android.healthfitness:41943040] Line 17819: 01-01 19:26:47.410 02924 02924 I PackageManager: /data/apex/decompressed/com.android.adbd@351010000.decompressed.apex changed; collecting certs Line 17823: 01-01 19:26:47.422 02924 02924 E PackageManagerServiceUtilsExtImpl: Fix up user restrict data of pkg: com.google.android.adbd Line 19413: 01-01 19:26:51.224 02924 02924 D PackageManager: No files in app dir /apex/com.android.adbd/priv-app Line 19414: 01-01 19:26:51.224 02924 02924 D PackageManager: No files in app dir /apex/com.android.adbd/app Line 20634: 01-01 19:26:52.985 02924 02924 W PackageSettings: Couldn't write -1 to /config/sdcardfs/com.google.android.adbd/appid Line 21520: 01-01 19:26:53.270 02924 02924 D OverlayManager: -> Updating overlay: target=com.google.android.adbd overlays=[OverlayPaths { resourceDirs = [], overlayPaths = [/data/resource-cache/com.android.systemui-neutral-coSn.frro, /data/resource-cache/com.android.systemui-accent-n7sV.frro, /data/resource-cache/com.android.systemui-dynamic-EysW.frro] }] userId=0 Line 77814: 01-01 19:27:08.471 01744 01758 I adbd : adbd_auth: received a new framework connection Line 77814: 01-01 19:27:08.471 01744 01758 I adbd : adbd_auth: received a new framework connection Line 77815: 01-01 19:27:08.472 01744 01758 I adbd : adbd_auth: received new framework fd 16 (current = -1) Line 77815: 01-01 19:27:08.472 01744 01758 I adbd : adbd_auth: received new framework fd 16 (current = -1) Line 81135: 01-01 19:27:09.113 04893 04893 D vold_prepare_subdirs: Setting up mode 771 uid 0 gid 1000 context u:object_r:apex_module_data_file:s0 on path: /data/misc_ce/0/apexdata/com.android.adbd Line 82329: 01-01 19:27:09.362 02924 04870 W PackageManager: Skipping preparing app data for com.google.android.adbd
最新发布
08-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值