为 APK 文件增加右键菜单组实现快捷安装
2024-10-09 22:52:53
0.结果
1.需求
迫于每次都要打开 Powershell 手动敲 adb install xxx.apk
太麻烦,就想通过注册表搞一个右键菜单,实现快捷安装 apk 的功能。
最后决定先实现三个功能:
- adb install -r
- adb install -t
- 使用 jarsigner 重签名
可是对 windows 一窍不通,只能去网上抄代码。
2.抄代码
照着几个现成的代码抄,又测了半天,最后发现无论是注册HKEY_CLASSES_ROOT\.apk\
还是HKEY_CLASSES_ROOT\apk_auto_file\
、无论配置SubCommands
还是直接在\.apk\shell
下面增加条目,都没办法在apk文件的右键中展示。
反正也是自己用,图方便就直接对HKEY_CLASSES_ROOT\*\
进行注册了。
调用的代码是Powershell -noexit 'command'
,第一次写 shell 代码,这个-noexit
还查了老半天。
3.代码
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\ApkHelper]
"MUIVerb"="APK Helper"
"SubCommands"=""
"Position"="Center"
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell]
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell\InstallR]
@="adb install -r"
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell\InstallR\command]
@="PowerShell -noexit adb install -r \"%1\" "
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell\InstallT]
@="adb install -t"
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell\InstallT\command]
@="PowerShell -noexit adb install -r -t \"%1\" "
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell\SignNew]
@="Jarsigner"
[HKEY_CLASSES_ROOT\*\shell\ApkHelper\Shell\SignNew\command]
@="PowerShell -noexit jarsigner -verbose -keystore F:\Decompile\windows签名工具\Test.keystore -storepass 123456 -signedjar \"%1.signed.apk\" \"%1\" test -digestalg SHA1 -sigalg MD5withRSA "
4.Todo
- 1.只为 apk 文件注册右键菜单组
- 2.配置命令执行 python 脚本对重签名的文件名进行优化
- 3.为 apk 文件增加常用的 apktool 命令
- 4.为 dex 文件增加常用的 d2j 命令
最新文章
- mysql 导出批量导出表数据 (程序)
- linux环境下安装tomcat并配置tomcat日志分割
- ODAC学习地址
- 论文笔记之: Recurrent Models of Visual Attention
- hdu 1491 Octorber 21st
- android抓包工具
- 学习 ExtJS 4 面板与布局
- LINUX nfs服务
- thinkphp 3.2 导入第三方类库的两种方式
- EBS-子库存转移和物料搬运单区别
- Unix历史及相关概念回顾
- AspnetCore WebApi使用Swagger简单入门
- What can Reactive Streams offer EE4J?
- ppt字体
- python爬虫---BeautifulSoup的用法
- linux命令1—安装optimizer
- nc63 树管理型单据的开发
- 转载--void指针(void *的用法)
- 面试准备——(三)Selenium面试题总结
- Pro Git 学习笔记
热门文章
- Codeforces Round #666 (Div. 2)
- NOIP2015提高组 信息传递 ---并查集问题
- Java中赋值常量的注意事项
- Vitya and Strange Lesson CodeForces - 842D 字典树+交换节点
- Educational Codeforces Round 91 (Rated for Div. 2) A. Three Indices (模拟)
- Django分页APP_django-pure-pagination
- pthread_create函数
- Leetcode(11)-盛最多水的容器
- (转载)RTMP协议中的AMF数据 http://blog.csdn.net/yeyumin89/article/details/7932585
- exgcd&;&;中国剩余定理专题练习