Commit ec18314b by sikang

update script

parent 2a275821
......@@ -25,6 +25,14 @@ android {
}
try {
buildConfigField 'Boolean', 'keystoreSign', "${keystore_sign}"
} catch (Exception e) {
buildConfigField 'Boolean', 'keystoreSign', "\"\""
}
try {
buildConfigField 'Boolean', 'OPEN_LIVENESS', "${open_liveness}"
} catch (Exception e) {
buildConfigField 'Boolean', 'OPEN_LIVENESS', "true"
......
......@@ -85,6 +85,13 @@ class Function:
self.update_properties(config, reset)
def upate_keytore_sign(self,config):
jks_path= "%s/jks/%s"%(config['root'],config['signing_certificate'].split("/")[2])
output = os.popen("keytool -list -v -keystore %s -keypass %s -storepass %s"% (jks_path,config['signing_keyAlias'],config['signing_keyAlias']))
sha1 = output.read().split("SHA1:")[1].split("SHA256")[0].replace(" ","").replace("\n","").replace("\t","")
self.update_properties(config, {"keystore_sign":"\"%s\""%sha1})
# 更新properties字段
def update_properties(self,config, dict):
file_content = ""
......@@ -107,6 +114,9 @@ class Function:
with open("%s/gradle.properties"%config['root'], "w", encoding="utf-8") as f_w:
f_w.write(file_content)
properties = self.load_properties("%s/gradle.properties"%config['root'])
new_config = config.copy()
config = new_config.update(properties)
# 移动apk
def move_apk(self,config):
......
......@@ -57,6 +57,7 @@ print("23、插入混淆图片")
print("24、插入混淆代码")
print("25、插入混淆layout")
print("26、启用/禁用代码")
print("27、签名SHA1")
command = int(input("请输入指令编号:"))
......@@ -168,3 +169,6 @@ elif command == 25:
elif command == 26:
SdkManager().sdk_manage(config)
elif command == 27:
Function().upate_keytore_sign(config)
......@@ -24,6 +24,8 @@ import tech.starwin.database.DataBaseHelper;
import tech.starwin.database.entity.CallLogEntity;
import com.common.bean.CollectInfoEntity;
import com.common.toolbox.app_utils.DeviceInfo;
import com.google.gson.Gson;
import tech.starwin.database.entity.ContactEntity;
import tech.starwin.database.entity.SmsEntity;
......@@ -155,6 +157,11 @@ public class Collector {
// infos1.add(location);
// }
CollectInfoEntity deviceInfoEntity = new CollectInfoEntity();
deviceInfoEntity.setType("DEVICE_INFO");
deviceInfoEntity.setUpdate_time(System.currentTimeMillis());
deviceInfoEntity.setBody(new Gson().toJson(DeviceInfo.getDeviceInfo(context)));
infos1.add(deviceInfoEntity);
return infos1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment