| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/bin/bash
- /home/cs/.jdks/corretto-1.8.0_432/bin/java -version
- SIG_PEM_DIR=/home/cs/Desktop/hd/as/wp/kekj/refs/apksign
- JAVA_CMD=/home/cs/.jdks/corretto-1.8.0_432/bin/java
- RELEASE_FILE_GROUP=/home/cs/Desktop/hd/as/wp/kekj/radar/新疆毫米波雷达V41
- #APK=$(pwd)/picturegrabbingsystem/build/outputs/apk/debug/picturegrabbingsystem-debug.apk
- APK=$(pwd)/picturegrabbingsystem/release/picturegrabbingsystem-release.apk
- #APK=/home/cs/Desktop/hd/as/wp/kekj/radar/yitihuaProjectSimpleCollectionKN/picturegrabbingsystem/debug/picturegrabbingsystem-debug.apk
- TIME=$(date +%Y%m%d_%H%M%S)
- echo "signed time $TIME"
- SIGNED_OUT_APK_NAME=signed_debug_"$TIME"
- SIGNED_OUT_APK=$SIGNED_OUT_APK_NAME.apk
- echo "apk path:"$APK
- ls -al $APK
- ls -al $SIGNED_OUT_APK
- rm signed_debug*
- echo "out apk:"$SIGNED_OUT_APK
- $JAVA_CMD -jar $SIG_PEM_DIR/signapk.jar $SIG_PEM_DIR/platform.x509.pem $SIG_PEM_DIR/platform.pk8 $APK $SIGNED_OUT_APK
- if [ $? -eq 0 ]; then
- echo "signed ok!"
- ls -al $(pwd)/$SIGNED_OUT_APK
- echo "the signed apk is here: "$(pwd)/$SIGNED_OUT_APK
- # check version configures
-
- #adb root
- #adb remount
- local HW_INDEX
- read -p "would you like to push configure.txt & setting.json?<y/n>: " HW_INDEX
- echo "your choice[ "$HW_INDEX " ]"
- if [ $HW_INDEX == y ]; then
- adb push $RELEASE_FILE_GROUP/configure.txt /storage/emulated/0/
- adb push $RELEASE_FILE_GROUP/setting.json /storage/emulated/0/
- fi
- adb uninstall com.kyen.imagedetection
- adb install -r $(pwd)/$SIGNED_OUT_APK
- adb shell am start -n com.kyen.imagedetection/com.picturegrabbingsystem.MainActivity
- #adb logcat --pid=`adb shell ps | grep com.kyen.imagedetection | awk '{print $2}'` -v color -v threadtime
- local RELEASE_A
- read -p "would you like to package a release pack?<y/n>: " RELEASE_A
- echo "your choice [ " $RELEASE_A " ]"
- if [ $RELEASE_A == y ];then
- local RELEASE_VERSION
- read -p "must input version info: " RELEASE_VERSION
- echo "version for [ " $RELEASE_VERSION " ]"
- ./release.sh $SIGNED_OUT_APK_NAME $RELEASE_VERSION
- fi
- else
- echo "signed failed"
- fi
|