apk加固后签名

apk打包后需要重新手动签名

使用android apksigner签名

https://developer.android.google.cn/studio/command-line/apksigner

签名脚本:

@echo off
echo run as adminer

::路径设置
set keystorePath=C:\Users\li282\Desktop\jarvisdRelease.jks
set ksKeyAlias=yyyyyyyyyyyyyyyy
set ksPass=zzzzzzzzzzzzzzzzzz
set keyPass=aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
set apksignerPath=C:\Users\li282\AppData\Local\Android\Sdk\build-tools\28.0.3\apksigner.bat

echo.
echo use keystorePath %keystorePath%
echo.
echo use ksKeyAlias %ksKeyAlias%
echo.
echo use apksignerPath %apksignerPath%
echo.

pause

::获取输入
set /p apkToSignPath=please input the path of apk to sign: 

::换行
echo.

echo %apkToSignPath%

::获取输入
set /p apkToSavePath=please input the file path to save  signed apk: 

::换行
echo.

echo %apkToSavePath%

pause

%apksignerPath% sign --ks %keystorePath% --ks-key-alias %ksKeyAlias% --ks-pass pass:%ksPass%  --key-pass pass:%keyPass% --out %apkToSavePath% %apkToSignPath%

pause

你可能感兴趣的:(android,java)