MTKLog 功能很好用,在 userdebug 和 eng 版本中可以帮助我们分析问题。
今天来搞一下,在 User 版本中也启用这个功能。
修改清单
device/mediatek/system/common/mtklog/mtklog-config-bsp-eng.prop
device/mediatek/system/common/mtklog/mtklog-config-bsp-user.prop
device/mediatek/system/common/device.mk
device/mediatek/vendor/common/device.mk
vendor/mediatek/proprietary/packages/apps/EngineerMode/AndroidManifest.xml
vendor/mediatek/proprietary/packages/apps/EngineerMode/src/com/mediatek/engineermode/EngineerModeReceiver.java
vendor/mediatek/proprietary/packages/apps/MTKLogger/Android.mk
vendor/mediatek/proprietary/packages/apps/MTKLogger/src/com/debug/loggerui/utils/Utils.java
vendor/mediatek/proprietary/external/NetworkLogD/netdiag/commandlistening.cpp
device/mediatek/system/common/mtklog/mtklog-config-bsp-eng.prop
device/mediatek/system/common/mtklog/mtklog-config-bsp-user.prop
@@ -1,5 +1,5 @@
# mtk log path can be set as system_data or device_storage or portable_storage
-mtklog_path = system_data
+mtklog_path = internal_sd
com.mediatek.log.mobile.customer = MTK_Internal
com.mediatek.log.mobile.AllMode = true
device/mediatek/system/common/device.mk
@@ -672,13 +672,13 @@ $(call inherit-product-if-exists, vendor/mediatek/common/device-vendor.mk)
# mtklog config
ifeq ($(strip $(MTK_BASIC_PACKAGE)), yes)
- ifeq ($(TARGET_BUILD_VARIANT),eng)
+ ifneq ($(filter $(TARGET_BUILD_VARIANT),eng userdebug user),)
PRODUCT_COPY_FILES += $(LOCAL_PATH)/mtklog/mtklog-config-basic-eng.prop:system/etc/mtklog-config.prop:mtk
else
PRODUCT_COPY_FILES += $(LOCAL_PATH)/mtklog/mtklog-config-basic-user.prop:system/etc/mtklog-config.prop:mtk
endif
else
- ifeq ($(TARGET_BUILD_VARIANT),eng)
+ ifneq ($(filter $(TARGET_BUILD_VARIAN