KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
smafile
★ 9
Open GitHub ↗
Process smali files. 迁移gitee.com
Download README (.md)
Explore Similar Repositories
pragai-aws
:
Chapter 2 on AWS for Pragmatic AI
fengyunkkx.github.io
:
FoxGeeker's Blog | 我的个人博客,通常发布一些与科技有关的教程、应用、评论,欢迎订阅 RSS:http://ifoxfactory.com/feed.xml
DiskYT
:
All about DiskYT project
mallard
:
The DuckDuckGo Bot of the Programming Discord Server.
chicagojs.org-old
:
Source for http://chicagojs.org, PR's welcome! Maintained by @mikehostetler
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
smafile
?
Download (.md)
# smafile [](https://badge.fury.io/py/smafile) [](https://opensource.org/licenses/MIT) ### Install ```shell pip install smafile or python setup.py install ``` ### Usage ```python from smafile import SmaliDir, SmaliMethod sd = SmaliDir('smali') test_class_name = 'Lcom/test/Test;' test_class_file = r'smali\com\test\Test.smali' test_mtd = 'test(Ljava/lang/String;[B[I]BICF)Ljava/lang/String;' sf = sd.get_smali_file(test_class_name) print(sf.content) print(sf.class_name) print(sf.super) for field in sf.fields: print(field.descriptor) for mtd in sf.methods: print(mtd.descriptor) mtd = sd.get_method(test_class_name, test_mtd) body = mtd.get_body() # rename clz/field/method sd.update_desc('La/b/c;', 'La/b/Test;') sd.update_desc('La/b/c;->b:I', 'La/b/c;->newb:I') sd.update_desc('La/b/c;->b()V', 'La/b/c;->newb()V') ``` ### 说明 ``` method_description : Lpackage/name/ClassName;->MethodName(III)Z class_name : Lpackage/name/ClassName; mtd_name : MethodName mtd_sign : (III)Z (方法签名) proto : III (方法原型,由参数类型组成) parameters : I, I, I (参数类型) return_type : Z,返回类型 Lcom/a;->a()V改名为Lcom/a;->b()V ```