• Stars
    star
    405
  • Rank 103,694 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

功能简介:一种开发帮助产品研发的效率工具。主要提供了:页面分析、任务分析、网络分析、DataDump、自定义hook 、Data Explorer 等功能。以帮助开发、测试、UI 等同学更便捷的排查和定位问题,提升开发效率。

Lens

简介(wiki 搭建中)

Lens 是一款功能强大的Android开发SDK。目前支持界面分析,任务分析, 网络分析,DataDump,DataExplorer等等功能。网络分析、任务分析等功能需要依赖hook框架。Lens 自身不支持hook能力,需注入Lens Hook Framework 实现后,才可使用hook相关的功能。

Lens 是一个开放平台,任何可以为产品开发阶段赋能的创意,都可以作为一个独立的模块向里面添加。
Lens 是一个框架,它提供了将app 内部数据直观展示出来的方案,也提供了若干接口,让APP 层可以定制展示自己需要的内容。(后面的wiki再进一步说明)

Lens自18年8月创建,我们旨在为开发、测试、UI 赋能。Lens并不完善,代码也有待优化,欢迎小伙伴们提出建议。

基础功能简介(详情见wiki)

Lens 是以浮窗形式展示在APP 上的。支持最小化模式、展开模式、关闭模式。浮窗可以在界面中随意拖动。浮窗中的任何一个功能模块,都支持在设置中打开或关闭,也可以在初始化代码中配置。
img img

界面分析
  • 页面信息:展示页面的基本信息,如当前Activity、Fragment 嵌套关系等。展示页面视图层级关系、分析页面视图情况等。
  • 视图拾取:打开视图拾取开关后,点击页面视图,可选中视图。在界面上将会展示视图的基本信息,例如尺寸标注。控件的关键属性等。点击控件,可进入视图详情页面,进一步分析。
    img img
任务分析

Lens 提供了接口,支持展示任一阶段内的任务执行的情况。支持Time Gap、Time Stamp,Threads Info信息展示。
img

网络分析

Lens 提供了接口,支持抓取到的网络请求信息。支持设置测试环境等。

DataExplorer

入口再Lens 浮窗DB, SP. 目前支持查看本app DB、SP 信息。 支持修改SP 数据。

DataDump

Lens 提供了接口,支持app的一些内部数据展示能力。用于更好的去分析、定位问题。Lens 内部实现了一些基本的数据dump 能力。也支持app 层自己实现定制化的data dump 数据对接。内部文件浏览功能正在开发中。
img

对象监控

Lens 支持关注任意对象。被关注的对象将会再浮窗模块中显示。点击对象可查看该对象的属性信息.
img

Setup

dependencies {
    debugImplementation 'com.iqiyi.lens:lens:1.2.4'
    releaseImplementation 'com.iqiyi.lens:lens-no-op:1.2.4'
}

Usage

  1. 可参考Demo 中LensApplicationDelegate 实现配置。(Wiki 中会详细说明方法含义) 在主进程Application#attachBaseContext 中添加如下代码:
Lens.init(this, false);

在主进程Application#OnCreate 中添加如下代码

LensUtil.buildConfig()
                .defaultOpen(false)
//                .enableDeviceInfo(true)
//                .enableKeyLog(KeyLogConfig.builder().addFilter("Main").setMaxLine(1000))
//                .enableFPS(true)
//                .enableLaunchTime(true)
//                .setHookFrameWorkImpl(new HookFramework())
                .enableActivityAnalyzer(true)
                .enableNetworkAnalyze(false)
                .enableCrashInfo(true)
                .addCustomBlockEntrance(customBlockEntrance, new BlockFactory())
                .addCustomJumpEntrance(customJumpEntrance, new JumpAction())
                .initAsPluginMode(Lens.isSDKMode())
                .enableViewInfo(true)
                .show(Lens.wrapContext(mApplication), UIUtils.getScreenWidth(mApplication) / 5 * 3);

License

Apache-2.0 License

More Repositories

1

xHook

🔥 A PLT hook library for Android native ELF.
C
3,973
star
2

xCrash

🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
C
3,624
star
3

dpvs

DPVS is a high performance Layer-4 load balancer based on DPDK.
C
2,904
star
4

Andromeda

Andromeda simplifies local/remote communication for Android modularization
Java
2,274
star
5

Qigsaw

🔥🔥Qigsaw ['tʃɪɡsɔ] is a dynamic modularization library which is based on Android App Bundles(Do not need Google Play Service). It supports dynamic delivery for split APKs without reinstalling the base one.
Java
1,650
star
6

FASPell

2019-SOTA简繁中文拼写检查工具:FASPell Chinese Spell Checker (Chinese Spell Check / 中文拼写检错 / 中文拼写纠错 / 中文拼写检查)
Python
1,179
star
7

Neptune

A flexible, powerful and lightweight plugin framework for Android
Java
763
star
8

libfiber

The high performance c/c++ coroutine/fiber library for Linux/FreeBSD/MacOS/Windows, supporting select/poll/epoll/kqueue/iouring/iocp/windows GUI
C
721
star
9

LiteApp

LiteApp is a high performance mobile cross-platform implementation, The realization of cross-platform functionality is base on webview and provides different ideas and solutions for improve webview performance.
JavaScript
673
star
10

qnsm

QNSM is network security monitoring framework based on DPDK.
C
513
star
11

TaskManager

一种支持依赖关系、任务兜底策略的任务调度管理工具。API灵活易用,稳定可靠。轻松提交主线程任务、异步任务。支持周期性任务,顺序执行任务,并行任务等。
Java
467
star
12

dexSplitter

Analyze contribution rate of each module to the apk size
Java
198
star
13

xgboost-serving

A flexible, high-performance serving system for machine learning models
C++
137
star
14

auklet

Auklet is a high performance storage engine based on Openstack Swift
Go
93
star
15

lua-resty-couchbase

Lua couchbase client driver for the ngx_lua based on the cosocket API / 使用cosocket纯lua实现的couchbase的client,已经在爱奇艺重要的服务播放服务稳定运行5年多
Lua
79
star
16

lotus

lotus is a framework for intereact between views in Android
Java
73
star
17

HMGNN

Python
61
star
18

Navi

Java
18
star