CodeLocator is a toolset that includes Android SDK and Android Studio plugins

Overview

English | 简体中文

CodeLocator

GitHub license API

A picture takes you through CodeLocator
CodeLocator

CodeLocator is a toolset that includes Android SDK and Android Studio plugins. It has the following functions(Support Mac Only):

  1. Display the current View information
  2. Display current Activity information
  3. Display information about all fragments
  4. Display custom App runtime information
  5. Display file information about the current application
  6. Edit the status of the View in real time, such as visibility, text content, etc
  7. Locate the View that currently responds to the touch event
  8. Get the data of the current View
  9. Get the drawing content corresponding to the current View
  10. Jump to View click event code, findViewById, ViewHolder code location
  11. Jump to View's XML layout file
  12. Jump to the code location of Toast & Dialog
  13. Jump to the location of code which starts the current Activity
  14. Display all Schema information supported by the application
  15. Send specified Schema to the application
  16. Locate the latest Apk file in the project
  17. Apk files can be installed from the shortcut menu
  18. Quickly open display layout boundaries, transition drawing, click operations, etc
  19. Fast connect Charles

These apps are using CodeLocator

douyin tiktok duoshan resso xigua
抖音 TikTok 多闪 Resso 西瓜视频
helo feishu qingbei fanqie qingyan
Helo 飞书 清北网校 番茄小说 轻颜相机
huoshan guagualong jianying fanqiefm xingfuli
抖音火山版 瓜瓜龙 剪映 番茄畅听 幸福里

Integration

The followings describe how to use CodeLocator:

  1. Install CodeLocator in Android Studio (Click here to download plugin)
  2. Integrate CodeLocator into the application
allprojects {
    repositories {
        mavenCentral()
    }
}

// To integrate the basic capabilities, just add one dependency
dependencies {
    implementation "com.bytedance.tools.codelocator:codelocator-core:1.0.0"
}

If you need to integrate code jump capability, you need to integrate Lancet first and add the following dependencies

dependencies {
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-xml:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-activity:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-view:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-toast:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-dialog:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-popup:1.0.0"
}

Usage

CodeLocator plug-in is a sidebar plug-in that is displayed on the right side of Android Studio after installation and can be expanded by clicking

The initial state is as follows

codelocator_init

The green button is clickable, while the gray button is unavailable currently

Click the Grab button to obtain the status information of the current app. Click the image panel on the left to select the corresponding View, and the state of the button will change according to the currently selected View

codelocator_grab

For more operations, see the CodeLocator instructions

Contact us

If you have any questions or suggestions about CodeLocator, please join our Wechat group to communicate with us.

WeChat

Alternatively, you can send an email to [email protected] with a detailed description of your problem.
Applications are also welcome~~

License

Copyright (c) 2021 ByteDance Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

The following components are provided under an Apache 2.0 license.

  1. lancet - For details, https://github.com/eleme/lancet

  2. okhttp - For details, https://github.com/square/okhttp

  3. gson - For details, https://github.com/google/gson

Comments
  • AGP7.0报错,考虑支持下吗

    AGP7.0报错,考虑支持下吗

    错误信息: AGPBI: {"kind":"error","text":"java.lang.IllegalArgumentException","sources":[{"file":"/Users/Desktop/My-Application/app/build/intermediates/transforms/lancet/debug/136/com/loyal888/myapplication/adapter/MyHolder$_lancet.class"}],"tool":"D8"}

    版本: classpath 'com.bytedance.tools.lancet:lancet-plugin-asm6:1.0.2' debugImplementation "com.bytedance.tools.codelocator:codelocator-core:1.0.0" debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-xml:1.0.0" debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-activity:1.0.0" debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-view:1.0.0" debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-toast:1.0.0" debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-dialog:1.0.0" debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-popup:1.0.0" compileOnly 'me.ele:lancet-base:1.0.6'

    opened by loyal888 2
  • 添加依赖后,报 Duplicate class 错误

    添加依赖后,报 Duplicate class 错误

    Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Duplicate class com.bytedance.tools.codelocator.BuildConfig found in modules jetified-codelocator-core-2.0.0-runtime.jar (com.bytedance.tools.codelocator:codelocator-core:2.0.0) and jetified-codelocator-core-support-2.0.0-runtime.jar (com.bytedance.tools.codelocator:codelocator-core-support:2.0.0)

    opened by hust-twj 1
  • 当前SDK版本暂不支持抓取Release包, 请检查当前是否使用Release包

    当前SDK版本暂不支持抓取Release包, 请检查当前是否使用Release包

    本地新建一个项目,build.gradle配置sdk为30,build的apk也是debug版本的, 但抓取时提示“当前SDK版本暂不支持抓取Release包, 请检查当前是否使用Release包” 请问我需要把SDK版本设为多少呢?或者如何使用Debug包

    build.gradle文件代码如下:

    plugins { id 'com.android.application' id 'kotlin-android' }

    android { compileSdkVersion 30 buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.codelocatordemo"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
    
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    

    }

    dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    
    //Code Locator
    implementation "com.bytedance.tools.codelocator:codelocator-core:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-xml:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-activity:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-view:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-toast:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-dialog:1.0.0"
    debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-popup:1.0.0"
    

    }

    opened by ZouYongpeng 1
  • Type com.bytedance.tools.codelocator.utils.CodeLocatorUtils$Transform is defined multiple times:

    Type com.bytedance.tools.codelocator.utils.CodeLocatorUtils$Transform is defined multiple times:

    Type com.bytedance.tools.codelocator.utils.CodeLocatorUtils$Transform is defined multiple times: /Users/wengege/Desktop/project/CodeLocator/CodeLocatorApp/app/build/intermediates/mixed_scope_dex_archive/debug/out/1f36d78ddc6a93310a4477926a88cdafb759110006bde10cfc003e05844cb00a_1.jar:classes.dex, /Users/wengege/Desktop/project/CodeLocator/CodeLocatorApp/app/build/intermediates/mixed_scope_dex_archive/debug/out/52239907ab4e2b8d58f10838fd58b5fc22a6f1bfd7ff2ac3f146f2c4b949bdfb_1.jar:classes.dex

    app依赖方式改成

    dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.recyclerview:recyclerview:1.2.0'

    // implementation 'com.bytedance.tools.codelocator:codelocator-core:1.0.0' // debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-xml:1.0.0" // debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-activity:1.0.0" // debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-view:1.0.0" // debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-toast:1.0.0" // debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-dialog:1.0.0" // debugImplementation "com.bytedance.tools.codelocator:codelocator-lancet-popup:1.0.0" implementation project(path: ':CodeLocatorLancetXml') implementation project(path: ':CodeLocatorCore') implementation project(path: ':CodeLocatorLancetActivity') implementation project(path: ':CodeLocatorLancetToast') implementation project(path: ':CodeLocatorLancetPopup') implementation project(path: ':CodeLocatorLancetView') implementation project(path: ':CodeLocatorLancetDialog')

    compileOnly 'me.ele:lancet-base:1.0.6'
    

    }

    编译 App 有遇到这个问题吗??我发现 CodeLocatorUtils 在2个jar中

    opened by makeloveandroid 1
  • 集成lancet报错

    集成lancet报错

    Task :app:transformClassesWithLancetForReleaseForTest FAILED

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:transformClassesWithLancetForReleaseForTest'.

    java.lang.RuntimeException

    • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithLancetForReleaseForTest'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101) at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46) at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: java.lang.RuntimeException: java.lang.RuntimeException at me.ele.lancet.plugin.internal.context.ContextReader.accept(ContextReader.java:88) at me.ele.lancet.plugin.internal.preprocess.PreClassAnalysis.fullyParse(PreClassAnalysis.java:94) at me.ele.lancet.plugin.internal.preprocess.PreClassAnalysis.execute(PreClassAnalysis.java:76) at me.ele.lancet.plugin.LancetTransform.transform(LancetTransform.java:110) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102) at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99) ... 31 more Caused by: java.lang.RuntimeException at org.objectweb.asm.ClassVisitor.visitModule(ClassVisitor.java:148) at org.objectweb.asm.ClassReader.readModule(ClassReader.java:731) at org.objectweb.asm.ClassReader.accept(ClassReader.java:632) at org.objectweb.asm.ClassReader.accept(ClassReader.java:500) at me.ele.lancet.plugin.internal.preprocess.AsmClassProcessorImpl.process(AsmClassProcessorImpl.java:15) at me.ele.lancet.plugin.internal.preprocess.PreClassAnalysis$PreAnalysisClassFetcher.onClassFetch(PreClassAnalysis.java:127) at me.ele.lancet.plugin.internal.context.JarContentProvider.forActualInput(JarContentProvider.java:34) at me.ele.lancet.plugin.internal.context.JarContentProvider.forEach(JarContentProvider.java:22) at me.ele.lancet.plugin.internal.context.ClassifiedContentProvider.forEach(ClassifiedContentProvider.java:29) at me.ele.lancet.plugin.internal.context.ContextReader$QualifiedContentTask.call(ContextReader.java:131) at me.ele.lancet.plugin.internal.context.ContextReader$QualifiedContentTask.call(ContextReader.java:119)

    • Get more help at https://help.gradle.org

    opened by ihrthk 6
Releases(2.0.0)
Owner
Bytedance Inc.
Bytedance Inc.
This repository is for active development of the Azure SDK for Java.

This repository is for active development of the Azure SDK for Java.

Microsoft Azure 1.8k Dec 31, 2022
Cordova plugin for Android Serial USB communication (easily connect an Arduino board to an Android device).

PR-DC cordova-plugin-serialusb Cordova plugin for Android Serial USB communication. This plugin makes a connection to the external board trivial, for

PR-DC 3 May 8, 2022
STxMobile is a proof of concept of an Android app for remotely controlling the Raymarine ST2000+ tiller pilot from an Android phone.

STxMobile is a proof of concept of an Android app for remotely controlling the Raymarine ST2000+ tiller pilot from an Android phone.

Marco 8 Sep 1, 2022
An open source, modular alternative of sketchware. Create your own app in android using block programming like scratch!

OpenBlocks An open source, modular alternative of sketchware. Create your own app in android using block programming like scratch! What is OpenBlocks?

OpenBlocks 30 Dec 16, 2022
An easy to use Hindi keyboard Android app

AasaanHindi-Keyboard-app An easy to use Hindi keyboard Android app. Easy and fast Hindi typing.

Ankit Kumar 1 Jan 20, 2022
An android application to make students life easier by reducing their backpack weight.

Smart-Schooling An android application to make students life easier by reducing their backpack weight. Dont forget to ⭐ the repo Overview Almost every

Thamizh Kaniyan 3 Jan 31, 2022
A todo app with Alan AI smart voice assistant android application

Todo App A todo app with Alan AI smart voice assistant android application. Experience a hands-free voice app where you can add, edit, delete and make

Venu Sai Madisetti 1 Jan 26, 2022
Crackersanimator is a particle system library that works with the standard Android UI

Crackersanimator is a particle system library that works with the standard Android UI. This library build from https://github.com/plattysoft/Leonids library but make some update to support for latest version of android.

null 3 Jun 14, 2022
RealmeDirac - an open-source Android application written in java

RealmeDirac is an open-source Android application written in java. RealmeDirac is a feature introduced by realme & dirac in realmeUI for sound optimisation, trying to recreate same thing, this is scratch written app aiming to provide same features as realmeDirac..

psionicprjkt 4 Feb 21, 2022
Sauron, the all seeing eye! It is a service to generate automated reports and track migrations, changes and dependency versions for backend services also report on known CVE and security issues.

SAURON - VERSION AND DEPLOYMENT TRACKER DESCRIPTION Sauron, the all seeing eye! It is a service to generate automated reports and track migrations, ch

FREENOWTech 20 Oct 31, 2022
A calculator that performs various operations such as addition, subtraction, multiplication and division of positive and negative values

A calculator that performs various operations such as addition, subtraction, multiplication and division of positive and negative values The calculator also does percentages, square roots and squares

Andrey Fabricio 1 Jan 31, 2022
A Local implementation of a java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

A Local implementation of java library functions to create a serverside and clientside application which will communicate over TCP using given port and ip address.

Isaac Barry 1 Feb 12, 2022
Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data.

Tripoli imports raw mass spectrometer data files and supports interactive review and archiving of isotopic data. Tripoli facilitates visualization of temporal trends and scatter during measurement, statistically rigorous filtering of data, and calculation of statistical parameters.

CIRDLES 7 Dec 15, 2022
Java Notes & Codes for better understanding and it contains all the funtions with examples and also added Cheat Sheet for Revision

Java Notes & Codes for better understanding and it contains all the funtions with examples and also added Cheat Sheet for Revision...

Ujjawal Singh 1 Nov 30, 2022
Automatically discover and tag PII data across BigQuery tables and apply column-level access controls based on confidentiality level.

Automatically discover and tag PII data across BigQuery tables and apply column-level access controls based on confidentiality level.

Google Cloud Platform 18 Dec 29, 2022
A Java to iOS Objective-C translation tool and runtime.

J2ObjC: Java to Objective-C Translator and Runtime Project site: https://j2objc.org J2ObjC blog: https://j2objc.blogspot.com Questions and discussion:

Google 5.9k Dec 29, 2022
Make Slack and Facebook Bots in Java.

JBot Make bots in Java. JBot is a java framework (inspired by Howdyai's Botkit) to make Slack and Facebook bots in minutes. It provides all the boiler

Ram 1.2k Dec 18, 2022
API gateway for REST and SOAP written in Java.

Membrane Service Proxy Reverse HTTP proxy (framework) written in Java, that can be used as an API gateway as a security proxy for HTTP based integrati

predic8 GmbH 389 Dec 31, 2022
An extensible Java framework for building XML and non-XML streaming applications

Smooks Framework This is the Git source code repository for the Smooks Project. Build Status Building Pre-requisites JDK 8 Apache Maven 3.2.x Maven gi

Smooks Framework 353 Dec 1, 2022