# -*-coding:utf-8-*- import os import xml.etree.ElementTree as ET import re import hashlib import shutil import json from V1.PrintLog import printlog from V1 import Contants, File, GeneralModifySmali, Replace, Aapt_Util, apk_utils from xml.etree.ElementTree import Element # 联想 def LenovoReplace(prj_path, dir_split, key, value): if (key == "OPENAPPID"): # 替换联想id replaceLeonovoIdShell = 'sed -i "1,\\$s/lenovo_id/%s/g" %s/AndroidManifest.xml ' % (value, prj_path) printlog("replaceLeonovoIdShell: %s" % replaceLeonovoIdShell) os.system(replaceLeonovoIdShell) manifestRootExt = r'