Giter Site home page Giter Site logo

austin2035 / hermit Goto Github PK

View Code? Open in Web Editor NEW
315.0 9.0 62.0 8.89 MB

Don't need ADB. It runs on Android and the software itself provides a restful API, you just need to send an HTTP request and it translates the call to the API into an operation on the phone.

Home Page: https://lookcos.cn/archives/1206.html

License: GNU General Public License v3.0

Java 89.70% HTML 8.71% CSS 1.59%
automation android-automation android-auto restful-api automated-testing

hermit's Introduction

中文README

Doc: https://www.lookcos.cn/docs/hermit

Introduction

Hermit, a software for Android automation testing, runs on Android by receiving restful API requests, which are then translated into operations on the device.
It supports a range of operations such as quick taps, swipes, reading and setting the clipboard (Chinese language support), simulating input, finding controls and clicking on them, and supports visual layout analysis. Less than 3Mib in size and runs on port 9999 by default.

Accessibility based features

  • Coordinate click
  • Coordinate swipe
  • Clicking based on control ids (if there are multiple identical ids, click based on order)
  • Click based on control text (as above, clickable in order)
  • Click based on control content-desc
  • View screenshots
  • Analog input function (Chinese language support)
  • Ten global functions (back, press home key, recent tasks, show notifications, quick settings, long press on power button, split screen, lock screen, screenshot)
  • Real-time access to interface control details

Root-based features

  • Coordinate tapping
  • Coordinate swipe
  • Screenshot
  • Request and determine root access
  • Send any keyevent
  • Long press on coordinates
  • Launch app based on package name
  • Get device information capability
  • Get and set clipboard content (Chinese language support)
  • Device screen length and width
  • CPU max, min, real time frequency
  • CPU name
  • Total amount of memory, available
  • Total amount of storage, amount available
  • Name of all installed packages
  • Device language, system version number, phone model, phone manufacturer

Interactive layout visualisation

Similar to Android Studio's LayoutInspector, you can analyse the level and scope of the interface and get information about the controls on the interface to facilitate operations such as clicking and swiping. Controls can be selected with the mouse (see LayoutInspector for details) to see the corresponding information:

  • bounds (clickable range)
  • boundsInParent
  • checked
  • class
  • clickable
  • package
  • resource-id (control id)
  • scrollable
  • text (control text)
  • content-desc (control description)

screencapture3.png

How it works

Caution

The diagram may be slightly over-drawn, but in short: Hermit, once installed and running, provides HTTP APIs which are translated into operations on the phone by calling the appropriate APIs. As a result, most languages can be supported. It is because it is based on the restful API that it is considerably more extensible, and a Python module based on its API has been produced to enable the ease of operation.

hermit's People

Contributors

austin2035 avatar ellieot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hermit's Issues

布局范围分析器获取图像失败(app版本2.02)

GET /image/screen?t=1000 报 500 错误
错误内容为:
Attempt to invoke virtual method 'android.hardware.display.VirtualDisplay android.media.projection.MediaProjection.createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay$Callback, android.os.Handler)' on a null object reference

机型:Redmi MIUI版本:10.3.11

获取不到布局

获取不到布局,网页里,左边的布局处是空白。已授予无障碍。

布局范围分析器获取图像失败

GET /image/screen?t=500

No virtual method getMainExecutor()Ljava/util/concurrent/Executor; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar)

机型:魅族 Note8

hermit布局分析无效

手机:piex xl
系统: lineage16.0 安卓9

浏览器打开网页布局信息 左边的矩形是个空的

关于横屏布局分析

image
手机横屏时 布局分析出现问题
相应的点击操作也出现无响应问题 是不是布局分析 和寻找都是按照竖屏的逻辑开发的呀

厉害厉害

首先感谢您
请问怎么连接物理机呀?
期待 不需要root权限的版本

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.