From f95a3a72b6ee31862d5a0ef42ccfcb439181514d Mon Sep 17 00:00:00 2001 From: liutuantuan Date: Fri, 22 Mar 2024 10:29:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9PCID=E4=BB=A5=E5=8F=8ARPC?= =?UTF-8?q?ID=E5=A4=A7=E5=86=99=E4=B8=BA=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liutuantuan --- README.md | 6 +++--- README_ZH.md | 22 +++++++++++----------- src/create_pcid.c | 2 +- src/main.c | 34 +++++++++++++++++----------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 312bc67..4ca90a9 100644 --- a/README.md +++ b/README.md @@ -65,13 +65,13 @@ SysCap tools usually integrate to IDE, APP store and bundle tools. Follow instru ``` ./syscap_tool --help -./syscap_tool -r/p -e/d -i filepath [-o outpath] +./syscap_tool -R/P -e/d -i filepath [-o outpath] -h, --help : how to use --r, --rpcid : encode or decode rpcid +-R, --rpcid : encode or decode rpcid --p, --pcid : encode or decode pcid +-P, --pcid : encode or decode pcid -e, --encode : to encode diff --git a/README_ZH.md b/README_ZH.md index b213b40..a12c356 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -70,10 +70,10 @@ syscap_tool PC端可执行文件编译步骤: 使用./syscap_tool -h或者./syscap_tool --help查看: ```shell -syscap_tool -r/p -e/d -i filepath [-o outpath] +syscap_tool -R/P -e/d -i filepath [-o outpath] -h, --help : how to use --r, --rpcid : encode or decode rpcid --p, --pcid : encode or decode pcid +-R, --rpcid : encode or decode rpcid +-P, --pcid : encode or decode pcid -C, --compare : compare pcid with rpcid string format. -s, --string : input string. -e, --encode : encode to sc format. @@ -89,31 +89,31 @@ syscap_tool v1.1.1 ### 使用示例 ```shell # 将 rpcid.json 编码为SC格式,文件名rpcid.sc -syscap_tool -rei rpcid.json -o path/ +syscap_tool -Rei rpcid.json -o path/ # 将 pcid.sc 编码为JSON格式,文件名rpcid.json -syscap_tool -rdi pcid.sc -o path/ +syscap_tool -Rdi pcid.sc -o path/ # 将 pcid.json 编码为SC格式,文件名pcid.sc -syscap_tool -pei pcid.json -o path/ +syscap_tool -Pei pcid.json -o path/ # 将 pcid.sc 编码为JSON格式,文件名pcid.json -syscap_tool -pdi pcid.sc -o path/ +syscap_tool -Pdi pcid.sc -o path/ # 将 pcid.sc 编码为字符串格式,文件名rpcid.txt -syscap_tool -resi pcid.sc -o path/ +syscap_tool -Resi pcid.sc -o path/ # 将 pcid.sc 编码为字符串格式,文件名pcid.txt -syscap_tool -pesi pcid.sc -o path/ +syscap_tool -Pesi pcid.sc -o path/ # 比较字符串格式的pcid和rpcid,pcid 符合条件返回成功提示,不符合则提示原因。 syscap_tool -C pcid.txt rpcid.txt -# 功能类似 -C 选项,区别为 -SC 选项为直接输入字符串。 +# 功能类似 -C选项,区别为 -sC 选项为直接输入字符串。 syscap_tool -sC "pcidstring" "rpcidstring" # 将字符串格式的 pcid 转为 json 格式,文件名 pcid.json。 -syscap_tool -pdsi pcid.txt -o path/ +syscap_tool -Pdsi pcid.txt -o path/ ``` **说明:** -o 选项指定输出目录,缺省为当前目录。 diff --git a/src/create_pcid.c b/src/create_pcid.c index adacedd..8f37087 100644 --- a/src/create_pcid.c +++ b/src/create_pcid.c @@ -775,7 +775,7 @@ static int32_t GetEncodePCIDOut(uint16_t priSyscapCount, uint32_t privateSyscapL } } // save as file - const char outputFileName[] = "PCID.txt"; + const char outputFileName[] = "pcid.txt"; ret = ConvertedContextSaveAsFile(freePcidInfo.outDirPathFinal, outputFileName, output, strlen(output)); if (ret != 0) { PRINT_ERR("ConvertedContextSaveAsFile failed, outDirPath:%s, filename:%s\n", diff --git a/src/main.c b/src/main.c index 4b1d0b1..a54d331 100644 --- a/src/main.c +++ b/src/main.c @@ -50,8 +50,8 @@ int32_t OperateByBitMap(char *const *argv, uint16_t bitMap, char *outputpath); static struct option g_longOptions[] = { {"help", no_argument, 0, 'h' }, {"version", no_argument, 0, 'v' }, - {"rpcid", no_argument, 0, 'r' }, - {"pcid", no_argument, 0, 'p' }, + {"rpcid", no_argument, 0, 'R' }, + {"pcid", no_argument, 0, 'P' }, {"compare", required_argument, 0, 'C' }, {"encode", no_argument, 0, 'e' }, {"decode", no_argument, 0, 'd' }, @@ -103,28 +103,28 @@ int32_t OperateByBitMap(char *const *argv, uint16_t bitMap, char *outputpath) { int32_t ret = 0; switch (bitMap) { - case 0x109: // 0x109, -rei inputfile + case 0x109: // 0x109, -Rei inputfile ret = RPCIDEncode(g_customerfileinfo.inputfile, outputpath); break; - case 0x10A: // 0x10A, -rdi inputfile + case 0x10A: // 0x10A, -Rdi inputfile ret = RPCIDDecode(g_customerfileinfo.inputfile, outputpath); break; - case 0x10D: // 0x10D, -resi inputfile + case 0x10D: // 0x10D, -Resi inputfile ret = EncodeRpcidscToString(g_customerfileinfo.inputfile, outputpath); break; - case 0x115: // 0x115, -pesi inputfile + case 0x115: // 0x115, -Pesi inputfile ret = EncodePcidscToString(g_customerfileinfo.inputfile, outputpath); break; case 0x60: // 0x60, -C pcid.txt rpcid.txt ret = ComparePcidWithRpcidString(g_customerfileinfo.pcidfile, g_customerfileinfo.rpcidfile, TYPE_FILE); break; - case 0x64: // 0x64, -sc "pcidstring" "rpcidstring" + case 0x64: // 0x64, -sC "pcidstring" "rpcidstring" ret = ComparePcidWithRpcidString(g_customerfileinfo.pcidfile, g_customerfileinfo.rpcidfile, TYPE_STRING); break; - case 0x111: // 0x111, -pei inputfile + case 0x111: // 0x111, -Pei inputfile ret = CreatePCID(g_customerfileinfo.inputfile, outputpath); break; - case 0x112: // 0x112, -pdi inputfile + case 0x112: // 0x112, -Pdi inputfile ret = DecodePCID(g_customerfileinfo.inputfile, outputpath); break; - case 0x116: // 0x116, -pdsi inputfile + case 0x116: // 0x116, -Pdsi inputfile ret = DecodeStringPCIDToJson(g_customerfileinfo.inputfile, outputpath); break; - case 0x10E: // 0x10E, -rdsi inputfile - printf("-rdsi is not support currently.\n"); break; + case 0x10E: // 0x10E, -Rdsi inputfile + printf("-Rdsi is not support currently.\n"); break; case 0x80: // 0x80, -v (void)OutputVersion(argv[optind], optind); break; default: @@ -145,10 +145,10 @@ void SetBitMap(char *const *argv, int32_t flag, uint16_t *bitMap, char **outputp case 's': (*bitMap) |= 0x1 << STRING_DECODE; break; - case 'r': + case 'R': (*bitMap) |= 0x1 << RPCID; break; - case 'p': + case 'P': (*bitMap) |= 0x1 << PCID; break; case 'C': @@ -186,10 +186,10 @@ void PrintVersion(void) void PrintHelp(void) { - printf("syscap_tool -r/p -e/d -i filepath [-o outpath]\n"); + printf("syscap_tool -R/P -e/d -i filepath [-o outpath]\n"); printf("-h, --help\t: how to use\n"); - printf("-r, --rpcid\t: encode or decode rpcid\n"); - printf("-p, --pcid\t: encode or decode pcid\n"); + printf("-R, --rpcid\t: encode or decode rpcid\n"); + printf("-P, --pcid\t: encode or decode pcid\n"); printf("-C, --compare\t: compare pcid with rpcid string format.\n\t" "-s, --string : input string.\n"); printf("-e, --encode\t: encode to sc format.\n\t-s, --string : encode to string format.\n"); From 277e8d1b1de09242b876ca982806f26e6124e978 Mon Sep 17 00:00:00 2001 From: yangzk Date: Wed, 27 Mar 2024 10:15:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9ESystemCapability.Ability.?= =?UTF-8?q?AppStartup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangzk Change-Id: I5658eb0a2d5f6eb4591aaebe46b74697c821e361 --- include/codec_config/syscap_define.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/codec_config/syscap_define.h b/include/codec_config/syscap_define.h index 8e1d5c1..1e42cbd 100644 --- a/include/codec_config/syscap_define.h +++ b/include/codec_config/syscap_define.h @@ -342,6 +342,7 @@ typedef enum SystemCapabilityNum { AI_NEURAL_NETWORK_RUNTIME, RESOURCESCHEDULE_SYSTEMLOAD, MSDP_MULTIMODAL_AWARENESS, + ABILITY_APP_STARTUP, // Add before here SYSCAP_BASIC_END = 500, } SyscapNum; @@ -666,6 +667,7 @@ const static SyscapWithNum g_arraySyscap[] = { {"SystemCapability.Multimedia.AudioHaptic.Core", MULTIMEDIA_MEDIA_AUDIOHAPTIC_CORE}, {"SystemCapability.Resourceschedule.Ffrt.Core", RESOURCESCHEDULE_FFRT_CORE}, {"SystemCapability.AI.MindSporeLite", AI_MINDSPORELITE}, + {"SystemCapability.Ability.AppStartup", ABILITY_APP_STARTUP}, {"SystemCapability.Base", BASE}, }; From dd2e2e0ec01783d21788ded1d9ce0584cb15abfe Mon Sep 17 00:00:00 2001 From: liutuantuan Date: Fri, 22 Mar 2024 10:29:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9PCID=E4=BB=A5=E5=8F=8ARPC?= =?UTF-8?q?ID=E5=A4=A7=E5=86=99=E4=B8=BA=E5=B0=8F=E5=86=99=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liutuantuan --- README.md | 6 +++--- README_ZH.md | 22 +++++++++++----------- src/create_pcid.c | 2 +- src/main.c | 34 +++++++++++++++++----------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 312bc67..4ca90a9 100644 --- a/README.md +++ b/README.md @@ -65,13 +65,13 @@ SysCap tools usually integrate to IDE, APP store and bundle tools. Follow instru ``` ./syscap_tool --help -./syscap_tool -r/p -e/d -i filepath [-o outpath] +./syscap_tool -R/P -e/d -i filepath [-o outpath] -h, --help : how to use --r, --rpcid : encode or decode rpcid +-R, --rpcid : encode or decode rpcid --p, --pcid : encode or decode pcid +-P, --pcid : encode or decode pcid -e, --encode : to encode diff --git a/README_ZH.md b/README_ZH.md index b213b40..a12c356 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -70,10 +70,10 @@ syscap_tool PC端可执行文件编译步骤: 使用./syscap_tool -h或者./syscap_tool --help查看: ```shell -syscap_tool -r/p -e/d -i filepath [-o outpath] +syscap_tool -R/P -e/d -i filepath [-o outpath] -h, --help : how to use --r, --rpcid : encode or decode rpcid --p, --pcid : encode or decode pcid +-R, --rpcid : encode or decode rpcid +-P, --pcid : encode or decode pcid -C, --compare : compare pcid with rpcid string format. -s, --string : input string. -e, --encode : encode to sc format. @@ -89,31 +89,31 @@ syscap_tool v1.1.1 ### 使用示例 ```shell # 将 rpcid.json 编码为SC格式,文件名rpcid.sc -syscap_tool -rei rpcid.json -o path/ +syscap_tool -Rei rpcid.json -o path/ # 将 pcid.sc 编码为JSON格式,文件名rpcid.json -syscap_tool -rdi pcid.sc -o path/ +syscap_tool -Rdi pcid.sc -o path/ # 将 pcid.json 编码为SC格式,文件名pcid.sc -syscap_tool -pei pcid.json -o path/ +syscap_tool -Pei pcid.json -o path/ # 将 pcid.sc 编码为JSON格式,文件名pcid.json -syscap_tool -pdi pcid.sc -o path/ +syscap_tool -Pdi pcid.sc -o path/ # 将 pcid.sc 编码为字符串格式,文件名rpcid.txt -syscap_tool -resi pcid.sc -o path/ +syscap_tool -Resi pcid.sc -o path/ # 将 pcid.sc 编码为字符串格式,文件名pcid.txt -syscap_tool -pesi pcid.sc -o path/ +syscap_tool -Pesi pcid.sc -o path/ # 比较字符串格式的pcid和rpcid,pcid 符合条件返回成功提示,不符合则提示原因。 syscap_tool -C pcid.txt rpcid.txt -# 功能类似 -C 选项,区别为 -SC 选项为直接输入字符串。 +# 功能类似 -C选项,区别为 -sC 选项为直接输入字符串。 syscap_tool -sC "pcidstring" "rpcidstring" # 将字符串格式的 pcid 转为 json 格式,文件名 pcid.json。 -syscap_tool -pdsi pcid.txt -o path/ +syscap_tool -Pdsi pcid.txt -o path/ ``` **说明:** -o 选项指定输出目录,缺省为当前目录。 diff --git a/src/create_pcid.c b/src/create_pcid.c index adacedd..8f37087 100644 --- a/src/create_pcid.c +++ b/src/create_pcid.c @@ -775,7 +775,7 @@ static int32_t GetEncodePCIDOut(uint16_t priSyscapCount, uint32_t privateSyscapL } } // save as file - const char outputFileName[] = "PCID.txt"; + const char outputFileName[] = "pcid.txt"; ret = ConvertedContextSaveAsFile(freePcidInfo.outDirPathFinal, outputFileName, output, strlen(output)); if (ret != 0) { PRINT_ERR("ConvertedContextSaveAsFile failed, outDirPath:%s, filename:%s\n", diff --git a/src/main.c b/src/main.c index 4b1d0b1..a54d331 100644 --- a/src/main.c +++ b/src/main.c @@ -50,8 +50,8 @@ int32_t OperateByBitMap(char *const *argv, uint16_t bitMap, char *outputpath); static struct option g_longOptions[] = { {"help", no_argument, 0, 'h' }, {"version", no_argument, 0, 'v' }, - {"rpcid", no_argument, 0, 'r' }, - {"pcid", no_argument, 0, 'p' }, + {"rpcid", no_argument, 0, 'R' }, + {"pcid", no_argument, 0, 'P' }, {"compare", required_argument, 0, 'C' }, {"encode", no_argument, 0, 'e' }, {"decode", no_argument, 0, 'd' }, @@ -103,28 +103,28 @@ int32_t OperateByBitMap(char *const *argv, uint16_t bitMap, char *outputpath) { int32_t ret = 0; switch (bitMap) { - case 0x109: // 0x109, -rei inputfile + case 0x109: // 0x109, -Rei inputfile ret = RPCIDEncode(g_customerfileinfo.inputfile, outputpath); break; - case 0x10A: // 0x10A, -rdi inputfile + case 0x10A: // 0x10A, -Rdi inputfile ret = RPCIDDecode(g_customerfileinfo.inputfile, outputpath); break; - case 0x10D: // 0x10D, -resi inputfile + case 0x10D: // 0x10D, -Resi inputfile ret = EncodeRpcidscToString(g_customerfileinfo.inputfile, outputpath); break; - case 0x115: // 0x115, -pesi inputfile + case 0x115: // 0x115, -Pesi inputfile ret = EncodePcidscToString(g_customerfileinfo.inputfile, outputpath); break; case 0x60: // 0x60, -C pcid.txt rpcid.txt ret = ComparePcidWithRpcidString(g_customerfileinfo.pcidfile, g_customerfileinfo.rpcidfile, TYPE_FILE); break; - case 0x64: // 0x64, -sc "pcidstring" "rpcidstring" + case 0x64: // 0x64, -sC "pcidstring" "rpcidstring" ret = ComparePcidWithRpcidString(g_customerfileinfo.pcidfile, g_customerfileinfo.rpcidfile, TYPE_STRING); break; - case 0x111: // 0x111, -pei inputfile + case 0x111: // 0x111, -Pei inputfile ret = CreatePCID(g_customerfileinfo.inputfile, outputpath); break; - case 0x112: // 0x112, -pdi inputfile + case 0x112: // 0x112, -Pdi inputfile ret = DecodePCID(g_customerfileinfo.inputfile, outputpath); break; - case 0x116: // 0x116, -pdsi inputfile + case 0x116: // 0x116, -Pdsi inputfile ret = DecodeStringPCIDToJson(g_customerfileinfo.inputfile, outputpath); break; - case 0x10E: // 0x10E, -rdsi inputfile - printf("-rdsi is not support currently.\n"); break; + case 0x10E: // 0x10E, -Rdsi inputfile + printf("-Rdsi is not support currently.\n"); break; case 0x80: // 0x80, -v (void)OutputVersion(argv[optind], optind); break; default: @@ -145,10 +145,10 @@ void SetBitMap(char *const *argv, int32_t flag, uint16_t *bitMap, char **outputp case 's': (*bitMap) |= 0x1 << STRING_DECODE; break; - case 'r': + case 'R': (*bitMap) |= 0x1 << RPCID; break; - case 'p': + case 'P': (*bitMap) |= 0x1 << PCID; break; case 'C': @@ -186,10 +186,10 @@ void PrintVersion(void) void PrintHelp(void) { - printf("syscap_tool -r/p -e/d -i filepath [-o outpath]\n"); + printf("syscap_tool -R/P -e/d -i filepath [-o outpath]\n"); printf("-h, --help\t: how to use\n"); - printf("-r, --rpcid\t: encode or decode rpcid\n"); - printf("-p, --pcid\t: encode or decode pcid\n"); + printf("-R, --rpcid\t: encode or decode rpcid\n"); + printf("-P, --pcid\t: encode or decode pcid\n"); printf("-C, --compare\t: compare pcid with rpcid string format.\n\t" "-s, --string : input string.\n"); printf("-e, --encode\t: encode to sc format.\n\t-s, --string : encode to string format.\n");