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_VARIANT),eng userdebug user),) PRODUCT_COPY_FILES += $(LOCAL_PATH)/mtklog/mtklog-config-bsp-eng.prop:system/etc/mtklog-config.prop:mtk else PRODUCT_COPY_FILES += $(LOCAL_PATH)/mtklog/mtklog-config-bsp-user.prop:system/etc/mtklog-config.prop:mtk @@ -2433,7 +2433,7 @@ ifneq ($(wildcard vendor/mediatek/internal/mtklog_enable),) MSSI_HAVE_AEE_FEATURE = no endif # Case: Customer eng/userdebug load -else ifneq ($(strip $(TARGET_BUILD_VARIANT)),user) +else ifneq ($(strip $(TARGET_BUILD_VARIANT)),eng userdebug user) PRODUCT_PACKAGES += log-handler PRODUCT_PACKAGES += loghidlsysservice @@ -3656,7 +3656,7 @@ ifeq ($(strip $(MSSI_MTK_ENGINEERMODE_APP)), yes) PRODUCT_PACKAGES += libem_wifi_jni PRODUCT_PACKAGES += libem_audio_jni else - ifneq ($(filter $(TARGET_BUILD_VARIANT),eng userdebug),) + ifneq ($(filter $(TARGET_BUILD_VARIANT),eng userdebug user),) PRODUCT_PACKAGES += EngineerMode PRODUCT_PACKAGES += libem_suppo
device/mediatek/vendor/common/device.mk
+++ b/alps/device/mediatek/vendor/common/device.mk @@ -779,7 +779,7 @@ ifeq ($(strip $(MTK_ENGINEERMODE_APP)),yes) DEVICE_MANIFEST_FILE += $(LOCAL_PATH)/project_manifest/manifest_em.xml PRODUCT_PACKAGES += em_hidl else - ifneq ($(filter $(TARGET_BUILD_VARIANT),eng userdebug),) + ifneq ($(filter $(TARGET_BUILD_VARIANT),eng userdebug user),) DEVICE_MANIFEST_FILE += $(LOCAL_PATH)/project_manifest/manifest_em.xml PRODUCT_PACKAGES += em_hidl endif
配置暗码进入 MTKLog app 界面
vendor/mediatek/proprietary/packages/apps/EngineerMode/AndroidManifest.xml
+ + +
vendor/mediatek/proprietary/packages/apps/EngineerMode/src/com/mediatek/engineermode/EngineerModeReceiver.java
@@ -39,6 +39,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.Uri; +import android.content.ComponentName; }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)