Reproduced 1. Jebapi's Jeb.api

Source: Internet
Author: User

This article was reproduced from: https://www.zybuluo.com/oro-oro/note/142707

JEB API

Official address: https://www.pnfsoftware.com/apidoc/
Local Path: Jeb/doc

1. Iscript

This is the interface of the Jeb script, which supports both Java and Python, and the following examples are explained in Python.

Any Jeb script must implement this interface. The class of any script must be like the file name, similar to Java.

Iscript There is only one method, the entrance to the script, equivalent to the main function.

Run (jebinstance instance)    Script entry point.

Write a Hello world.

-hello.py

#Coding:utf-8 fromJeb.apiImportIscriptclassHello (iscript):defrun (self, Jeb): Jeb.Print("Hello world!") Jeb.Print(U"Hello, JEB, I'm here too ...") Jeb.Print("Hello, JEB, I'm here too ...")

Open Jeb,file. Run script and select the script to execute.

  1. Hello World!
  2. 你好,JEB,我来也……
  3. ?? ?¥????JEB????????¥?1?a?|a?|

Chinese strings are preceded by U, otherwise the display will be garbled.

2. Jebinstance

The Run method passes in an JebInstance object.

It is the instantiation of Jeb, which is done in Jeb, such as Disassembly, decompile, renaming method names, renaming class names, and so on.

The following is a list of methods of interest, other detailed reference JEBAPI documentation.

Method Description
Getdex () Get the Dex object, Jeb.api.dex.Dex
Print (java.lang.String s) Print a string at the Jeb terminal
Renameclass (java.lang.String partial_sig, java.lang.String new_name) Rename class name
Renamefield (java.lang.String partial_sig, java.lang.String new_name) Rename variable name
Renamemethod (java.lang.String partial_sig, java.lang.String new_name) Rename Method name
Getui () Get the Jeb Interface interface

Reproduced 1. Jebapi's Jeb.api

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.