Create an apksign. Sh File
When running, you only need to./apksign xx.apk to automatically complete the signature and install it by using ADB.
In Linux, the more tools you use, the more time you use.
In Windows, you need to learn new things for each upgrade, and the old knowledge is obsolete. There are often some things out of the box. Valid only for one version. There is no delay.
The content is as follows:
#! /Bin/sh
Echo $ @ | awk'
{
# Printf ("\ n" $1 "\ n ");
If (4> length ($1 )){
Printf ("./apksign. Sh xx.apk \ n ");
Exit (0 );
}
Len = length ($1 );
Suffix = substr ($1, length ($1)-3, 4 );
If (suffix! = ". APK "){
System ("Echo./apksign. Sh xx.apk \ n ");
Exit (0 );
}
Filename = substr ($1, 1, length ($1)-4 );
Newfile = FILENAME "-mysign" suffix;
Printf ("signapk... \ n ");
System ("Java-jar signapk. Jar mykey. x509.pem mykey. pk8" $1 "" newfile "\ n ");
Printf ("Install... \ n ");
System ("ADB install-R" newfile "\ n ");
}'