Skip to content

Neptune框架调试

Gray Liu edited this page Sep 20, 2018 · 1 revision

打开日志开关

在debug环境下,可以通过NeptuneConfigBuilder#enableDebug打开Neptune的调试日志

NeptuneConfig config = new NeptuneConfig.NeptuneConfigBuilder()
            .enableDebug(BuildConfig.DEBUG)
            .build();
Neptune.init(this, config);

查看调试日志

通过TAG=plugin进行过滤

安装日志

以install_plugin的tag日志为主

2018-08-10 15:18:04.882 23168-23197/? I/install_plugin: [ PluginInstallerService ] : install to Location /data/user/0/com.iqiyi.host.sample/app_pluginapp/com.iqiyi.plugin.sample.1.0.apk:
2018-08-10 15:18:04.882 23168-23197/? I/install_plugin: [ PluginInstallerService ] : doInstall:com.iqiyi.plugin.sample tmpFile and destFile in different directory!
2018-08-10 15:18:04.893 23168-23197/? I/install_plugin: [ PluginInstallerService ] : pluginInstallerService begin install lib, pkgName:com.iqiyi.plugin.sample
2018-08-10 15:18:04.903 23168-23197/? I/install_plugin: [ PluginInstallerService ] : pluginInstallerService finish install lib,pkgName:com.iqiyi.plugin.sample
2018-08-10 15:18:04.905 23168-23197/? I/install_plugin: [ PluginInstallerService ] : Send setInstallSuccess  PluginPackageInfoExt: mPath=/data/user/0/com.iqiyi.host.sample/files/com.iqiyi.plugin.sample.apk, packageName=com.iqiyi.plugin.sample, srcApkPath=/data/user/0/com.iqiyi.host.sample/app_pluginapp/com.iqiyi.plugin.sample.1.0.apk, installStatus=installed, version=1.0, grayVersion=, srcApkPkgName=com.iqiyi.plugin.sample, srcApkVersion=1.0, enableRecovery=false, plugin_refs=[null]
2018-08-10 15:18:04.906 23168-23197/? I/install_plugin: [ PluginInstallerService ] : pluginInstallerService began install dex,pkgName:com.iqiyi.plugin.sample
2018-08-10 15:18:04.909 23168-23197/? I/install_plugin: [ PluginInstallerService ] : DexOptimizer onStart: dexFile:/data/user/0/com.iqiyi.host.sample/app_pluginapp/com.iqiyi.plugin.sample.1.0.apk
2018-08-10 15:18:05.177 23168-23197/? I/install_plugin: [ PluginInstallerService ] : DexOptimizer onSuccess: dexFile:/data/user/0/com.iqiyi.host.sample/app_pluginapp/com.iqiyi.plugin.sample.1.0.apk

启动日志

以runtime_plugin为tag的日志为主, 日志较多,涉及PluginManager,CompnentFinder, NeptuneInstrumentation,PluginLoadedApk等

2018-08-10 15:21:19.983 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ PluginManager ] : Environment is initializing and loading, cache current intent first, intent: Intent { cmp=com.iqiyi.plugin.sample/ }
2018-08-10 15:21:20.082 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ PluginManager ] : checkPkgInstallationAndLaunch loadPluginAsync callback onLoadSuccess pkgName: com.iqiyi.plugin.sample
2018-08-10 15:21:20.083 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ PluginManager ] : launchIntent: Intent { cmp=com.iqiyi.plugin.sample/ }
2018-08-10 15:21:20.091 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ ComponentFinder ] : matchActivityProxyByFeature:org.qiyi.pluginlibrary.component.InstrActivityProxy1
2018-08-10 15:21:20.125 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ NeptuneInstrument ] : newActivity: org.qiyi.pluginlibrary.component.InstrActivityProxy1, targetClass: com.iqiyi.plugin.sample.MainActivity
2018-08-10 15:21:20.140 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ NeptuneInstrument ] : callActivityOnCreate: com.iqiyi.plugin.sample
2018-08-10 15:21:20.143 23378-23378/com.iqiyi.host.sample:plugin1 I/runtime_plugin: [ PluginActivityControl ] : changeActivityInfo activity name:com.iqiyi.plugin.sample.MainActivity, pkgName:com.iqiyi.plugin.sample

卸载日志

tag也是以install_plugin为主

2018-08-10 15:30:12.016 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : deleteInstallerPackage:com.iqiyi.plugin.sample
2018-08-10 15:30:12.017 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : getPluginappRootPath:/data/user/0/com.iqiyi.host.sample/app_pluginapp
2018-08-10 15:30:12.018 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : getPluginappRootPath:/data/user/0/com.iqiyi.host.sample/app_pluginapp
2018-08-10 15:30:12.019 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : getPluginappRootPath:/data/user/0/com.iqiyi.host.sample/app_pluginapp
2018-08-10 15:30:12.019 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : getPluginInjectRootPath:/data/user/0/com.iqiyi.host.sample/app_pluginapp/dex
2018-08-10 15:30:12.020 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : deleteInstallerPackage com.iqiyi.plugin.sample,  dex /data/user/0/com.iqiyi.host.sample/app_pluginapp/com.iqiyi.plugin.sample/com.iqiyi.plugin.sample.1.0.dex success!
2018-08-10 15:30:12.021 22607-22607/com.iqiyi.host.sample I/install_plugin: [ PluginInstaller ] : deleteInstallerPackage lib com.iqiyi.plugin.sample success: true