-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
download: add a script to re-sign apk before release
to avoid installation issues in some ROMs Signed-off-by: sunilpaulmathew <sunil.kde@gmail.com>
- Loading branch information
1 parent
0d5c233
commit 362b51e
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
COLOR_RED="\033[0;31m" | ||
COLOR_GREEN="\033[1;32m" | ||
COLOR_NEUTRAL="\033[0m" | ||
PROJECT_ROOT=$PWD | ||
APK_SIGN_KEY="../app/sp.jks" | ||
|
||
# Checking the existence of apk signing key | ||
if [ -e $APK_SIGN_KEY ]; then | ||
echo -e $COLOR_GREEN"\n Copying apk signing key to the download folder..."$COLOR_NEUTRAL | ||
cp $APK_SIGN_KEY spsigningkey.jks | ||
|
||
echo -e $COLOR_GREEN"\n Re-signing apk..."$COLOR_NEUTRAL | ||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore spsigningkey.jks com.smartpack.kernelmanager.apk sp_key1 | ||
|
||
# Remove the signing key file once the process is done | ||
rm -r spsigningkey.jks | ||
|
||
echo -e $COLOR_GREEN"\n Everything done..."$COLOR_NEUTRAL | ||
else | ||
echo -e $COLOR_RED"\n Signing key not found..."$COLOR_RED | ||
fi |