为 APK 文件增加右键菜单组实现快捷安装、反编译、重签名、导出AndroidManifest、打印签名信息、类型转换、ZIPALIGN字节对齐、显示MD5等功能

Apktool-Windows-Registry

配置注册表为 APK 文件增加右键菜单组实现快捷安装、反编译、重签名、导出AndroidManifest、打印签名信息、类型转换、ZIPALIGN字节对齐、显示MD5等功能

github


效果

  • apk
    Apk

  • dex
    Dex

  • folder
    Folder

  • aab
    Aab


功能


配置

  1. 在注册表中找到HKEY_CLASSES_ROOT下的.xxx,确定拓展名对应的配置

  2. 如果没有拓展名,手动创建,然后新建项.xxx/shell/name/command.xxx/shell/sub/shell/name/command

  3. 部分的类型被其他软件注册,可以看到

    1

    2

    需要到对应的项下去配置,如

    3

  4. 参照本机路径和环境、文件位置配置注册表命令


Todo

使用 GUI 实现全部功能


参考代码

adb

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ApkFile\shell\adb]
"Position"="Center"
"MUIVerb"="adb"
"SubCommands"=""

[HKEY_CLASSES_ROOT\ApkFile\shell\adb\shell]

[HKEY_CLASSES_ROOT\ApkFile\shell\adb\shell\installr]
@="adb install -r"

[HKEY_CLASSES_ROOT\ApkFile\shell\adb\shell\installr\command]
@="PowerShell -noexit adb install -r \"%1\""

[HKEY_CLASSES_ROOT\ApkFile\shell\adb\shell\installt]
@="adb install -t"

[HKEY_CLASSES_ROOT\ApkFile\shell\adb\shell\installt\command]
@="PowerShell -noexit adb install -r -t \"%1\""

sign

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ApkFile\shell\sign]
"Position"="Center"
"MUIVerb"="APK重签名"
"SubCommands"=""

[HKEY_CLASSES_ROOT\ApkFile\shell\sign\shell]

[HKEY_CLASSES_ROOT\ApkFile\shell\sign\shell\ApkSigner]
@="ApkSigner--v1&v2"

[HKEY_CLASSES_ROOT\ApkFile\shell\sign\shell\ApkSigner\command]
@="PowerShell -noexit SDK_DIR\\build-tools\\31.0.0\\apksigner.bat sign --out \"%1.signed.apk\" --ks Test.keystore --ks-key-alias test_alias \"%1\" "

[HKEY_CLASSES_ROOT\ApkFile\shell\sign\shell\Jarsigner]
@="Jarsigner--v1"

[HKEY_CLASSES_ROOT\ApkFile\shell\sign\shell\Jarsigner\command]
@="PowerShell -noexit jarsigner -verbose -keystore Test.keystore -storepass test_pwd -signedjar \"%1.signed.apk\"  \"%1\"  test_alias -digestalg SHA1 -sigalg MD5withRSA "

apkanalyzer

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ApkFile\shell\ApkAnalyzer]
@="导出AndroidManifest"

[HKEY_CLASSES_ROOT\ApkFile\shell\ApkAnalyzer\command]
@="PowerShell -noexit apkanalyzer manifest print \"%1\" >  \"%1.AndroidManifest.xml\"  "

apktoold

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ApkFile\shell\ApktoolD]
@="apktool -d"

[HKEY_CLASSES_ROOT\ApkFile\shell\ApktoolD\command]
@="PowerShell -noexit java -jar DIR\apktool\\apktool_2.5.0.jar d \"%1\" --only-main-classes "

apktoolb

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\APKTool\shell\apktoolb]
@="apktool b"

[HKEY_CLASSES_ROOT\Folder\shell\APKTool\shell\apktoolb\command]
@="PowerShell -noexit java -jar C:\\Users\\M\\Desktop\\Files\\Decompile\\libs\\apktool\\apktool_2.5.0.jar b \"%1\" -o new.apk"

cert

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.rsa\shell\PrintCert]
@="签名信息"

[HKEY_CLASSES_ROOT\.rsa\shell\PrintCert\command]
@="PowerShell -noexit keytool -printcert -file  \\\"%1\\\""

keystore

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.keystore\shell\KeystoreInfo]
@="签名信息"

[HKEY_CLASSES_ROOT\.keystore\shell\KeystoreInfo\command]
@="PowerShell -noexit keytool -list -v  -keystore \\\"%1\\\" "

[HKEY_CLASSES_ROOT\.jks\shell\KeystoreInfo]
@="签名信息"

[HKEY_CLASSES_ROOT\.jks\shell\KeystoreInfo\command]
@="PowerShell -noexit keytool -list -v  -keystore \\\"%1\\\" "

dex

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.dex]

[HKEY_CLASSES_ROOT\.dex\shell]

[HKEY_CLASSES_ROOT\.dex\shell\dex2jar]

[HKEY_CLASSES_ROOT\.dex\shell\dex2jar\command]
@="PowerShell -noexit DIR\\dex2jar-2.0\\d2j-dex2jar.bat \"%1\" "

[HKEY_CLASSES_ROOT\.dex\shell\dex2smali]

[HKEY_CLASSES_ROOT\.dex\shell\dex2smali\command]
@="PowerShell -noexit java -jar DIR\\baksmali-2.4.0.jar d  \"%1\" -o out "

[HKEY_CLASSES_ROOT\.dex\shell\dex2dexjar]

[HKEY_CLASSES_ROOT\.dex\shell\dex2dexjar\command]
@="PowerShell -noexit java -jar DIR\\dx.jar --dex --output=.\\classes.jar \"%1\" "

cfr

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Bandizip.jar\Shell\cfr]
@="CFR"

[HKEY_CLASSES_ROOT\Bandizip.jar\Shell\cfr\command]
@="PowerShell -noexit java -jar DIR\\cfr-0.151.jar \"%1\" --outputdir .\\cfr-out\\"

jar2dex

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Bandizip.jar\Shell\jar2dex]

[HKEY_CLASSES_ROOT\Bandizip.jar\Shell\jar2dex\command]
@="PowerShell -noexit java -jar DIR\\dx.jar --dex --output classes.dex  \"%1\" "

class2dex

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.class\shell\d8]
@="class2dex"

[HKEY_CLASSES_ROOT\.class\shell\d8\command]

@="PowerShell -noexit SDK_DIR\\build-tools\\31.0.0\\d8.bat \"%1\" "

bundletool

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.aab\shell\bundletool]
"Position"="Center"
"MUIVerb"="aab2apks"
"SubCommands"=""

[HKEY_CLASSES_ROOT\.aab\shell\bundletool\shell]

[HKEY_CLASSES_ROOT\.aab\shell\bundletool\shell\universal]
@="mode=universal"

[HKEY_CLASSES_ROOT\.aab\shell\bundletool\shell\universal\command]

@="PowerShell -noexit java -jar DIR\\bundletool.jar build-apks --bundle=\"%1\" --output=outputs.apks --mode=universal --overwrite "

[HKEY_CLASSES_ROOT\.aab\shell\bundletool\shell\connected_device]
@="connected-device"

[HKEY_CLASSES_ROOT\.aab\shell\bundletool\shell\connected_device\command]

@="PowerShell -noexit java -jar DIR\\bundletool.jar build-apks --bundle=\"%1\" --output=outputs.apks --connected-device --overwrite "

[HKEY_CLASSES_ROOT\.apks\shell\install\]
@="install apks"

[HKEY_CLASSES_ROOT\.apks\shell\install\command]

@="PowerShell -noexit java -jar DIR\\bundletool.jar install-apks --apks=\"%1\" "

zipalign

```shell Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ApkFile\shell\zipalign]
"Position"="Center"
"MUIVerb"="ZipAlign"
"SubCommands"=""

[HKEY_CLASSES_ROOT\ApkFile\shell\zipalign\shell]

[HKEY_CLASSES_ROOT\ApkFile\shell\zipalign\shell\check]
@="zipalign -c"

[HKEY_CLASSES_ROOT\ApkFile\shell\zipalign\shell\check\command]
@="PowerShell -noexit BUILD_TOOLS_DIR\zipalign.exe -c -v 4 "%1" "

[HKEY_CLASSES_ROOT\ApkFile\shell\zipalign\shell\page-align]
@="zipalign -p"

[HKEY_CLASSES_ROOT\ApkFile\shell\zipalign\shell\page-align\command]
@="PowerShell -noexit BUILD_TOOLS_DIR\zipalign.exe -p -f -v 4 "%1" "%1.aligned.apk" "


## enjarify
<span id = "enjarify"/>

```shell
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.dex\Shell\enjarify]

[HKEY_CLASSES_ROOT\.dex\Shell\enjarify\command]
@="PowerShell -noexit DIR\\enjarify.bat \"%1\" "

md5

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\cert_util_md5\]
@="CertUtil-MD5"

[HKEY_CLASSES_ROOT\*\shell\cert_util_md5\command]
@="PowerShell -noexit certutil -hashfile \"%1\" MD5"

posted on 2021-03-03 10:39  maiiiiii  阅读(316)  评论(0编辑  收藏  举报

导航