符号表上传工具
1. 下载符号表上传工具
当前符号表上传工具最新版本为V3.4.6,点击下载符号表工具
2. 解压工具包
解压后,可以看到 《符号表上传工具使用说明》 以及 buglyqq-upload-symbol.jar
3. 准备Java运行环境
符号表上传工具是一个依赖于Java环境的jar工具包。它在JDK 8版本下编译,因此原则上可以在Java 8及更高版本的JRE环境中运行。
目前已在Mac平台上验证了Java 8、Java 11、Java 17和Java 19的运行环境。
Windows平台
在Windows上安装JRE(Java运行时环境)的步骤如下:
- 访问Oracle官方网站下载适用于Windows的JRE安装包。请访问以下链接,然后选择适合您的Windows版本(32位或64位)的JRE安装包。
https://www.oracle.com/java/technologies/downloads/#jdk20-windows
下载完成后,双击下载的安装文件(例如:jdk-20_windows-x64_bin.exe),启动安装程序。
在安装向导中,按照提示操作。通常情况下,您可以使用默认设置。点击“下一步”继续安装过程。
安装完成后,点击“关闭”按钮退出安装向导。
为了确保JRE已正确安装并可以在命令行中使用,请打开命令提示符(按下Win键,然后输入“cmd”并回车)。
在命令提示符中输入以下命令,然后按回车键:
java -version
如果安装成功,您将看到类似以下的输出,显示已安装的Java版本:
java version "20.0.1"
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode)
现在,您已成功在Windows上安装了JRE。
Linux平台
在Linux平台上安装JRE(Java运行时环境)的步骤如下。这里以Ubuntu为例:
打开终端(快捷键:Ctrl + Alt + T)。
首先,更新软件包列表:
sudo apt update
- 安装默认的Java运行时环境(通常是OpenJDK的最新版本):
sudo apt install default-jre
输入您的密码并按回车键,然后在提示时按“Y”键,以确认安装。
- 安装完成后,验证JRE是否已成功安装。在终端中输入以下命令,然后按回车键:
java -version
如果安装成功,您将看到类似以下的输出,显示已安装的Java版本:
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
现在,您已成功在Linux(Ubuntu)平台上安装了JRE。
请注意,这里安装的是OpenJDK版本的JRE。如果您需要Oracle JRE,请访问Oracle官方网站下载适用于Linux的JRE安装包,并按照官方文档进行安装。
Mac平台
在Mac上安装多个Java版本,可以使用包管理器Homebrew。以下是安装和管理多个Java版本的步骤:
- 安装Homebrew(如果尚未安装),打开终端并运行以下命令:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
安装完成后,终端会显示相应的提示。
- 添加Homebrew的cask版本库:
brew tap homebrew/cask-versions
- 安装所需的Java版本,例如,如果你想安装Java 8和Java 11,可以运行以下命令:
brew install --cask adoptopenjdk8
brew install --cask adoptopenjdk11
你可以通过替换数字来安装其他版本的Java。
- 查看已安装的Java版本, 运行以下命令:
/usr/libexec/java_home -V
这将显示已安装的Java版本及其路径。
- 切换Java版本: 要在不同的Java版本之间切换,你可以设置JAVA_HOME环境变量。例如,要将Java版本切换到Java 8,请运行以下命令:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
要切换到Java 11,请运行:
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
你可以通过替换数字来切换到其他版本的Java。
使切换持久化,要使切换持久化,你可以将上述export命令添加到你的shell配置文件(如.bashrc、.bash_profile或.zshrc)中。这样,在每次打开新的终端窗口时,都会自动设置JAVA_HOME环境变量。 现在,你已经在Mac上安装了多个Java版本,并可以根据需要在它们之间切换。
可以通过以下命令,检查当前的java版本。
java -version
如笔者当前的输出为:
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.282-b08, mixed mode)
4. 使用工具上传
命令格式
java -jar buglyqq-upload-symbol.jar -appid <APP ID>
-appkey <APP KEY>
-version <App Version or SO Version>
-buildNo <App Build Number>
-platform <Platform>
-inputSymbol <Original Symbol File Path>
-inputMapping <mapping.txt file Path>
参数说明
- appid,必须参数,Bugly平台分配给产品的唯一标识,可以通过 设置/产品信息 查看
- appkey,必须参数,Bugly平台分配给产品的标识,可以通过 设置/产品信息 查看
- version,必须参数,版本号,当上传的是Java的mapping.txt文件时,指对应的APP的版本号,当上传的是SO 或者 dSYM时指对应的SO或者dSYM的版本号。
- 版本号里不要有特殊字符串,比如( ),不然运行可能会报错。
- 如果上报包含mapping文件,那么此处的版本号必须和要还原的堆栈所属的app的实际版本号一致,因为一个版本下的App是对应唯一的mapping.txt,不对齐则无法还原对应的堆栈。
- 如果只是上传SO符号表,这个版本号建议填写SO对应的版本号,方便在查看符号表时知道是哪个版本的。无论填写什么,不影响符号表的还原,SO是根据自身的UUID来唯一标识一个符号表文件的。
- 如果只是上传dSYM符号表,这个版本号建议填写dSYM对应的版本号,方便在查看符号表时知道是哪个版本的。无论填写什么,不影响符号表的还原,dSYM是根据自身的UUID来唯一标识一个符号表文件的。
buildNo, 可选参数, 构建号,如果上传的是mapping.txt文件,并且初始化Bugly时有使用构建号,则上传符号表时一定要填写正确的构建号,否则会导致Java堆栈无法还原。
platform, 必须参数,平台类型,当前支持的三个选项,分别是 Android、IOS、MAC,注意大小写要正确 。
inputSymbol, 原始符号表[dsym、so]所在文件夹目录地址,如果是Android平台同时包含mapping和so,此处输入两个原始符号表存储的共同父目录,或者通过inputMapping来指定mapping文件的路径。
inputMapping, Android平台的mapping.txt所在文件夹目录地址 Android平台特有,ios忽略 。
5. 示例演示
案例一:上传一个SO符号表文件
参考命令行:
java -jar buglyqq-upload-symbol.jar -appid a278f01047 -appkey 1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86 -version 4.3.0 -platform Android -inputSymbol /Users/lilyxie/Downloads/upload_target/obj/arm64-v8a/libbugly_dumper.so
结果摘要:
...
##[info]args is ArgsParser{appId='a278f01047'appKey='1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86', appPackage='com.tencent.demo.buglyprodemo', appVersion='4.3.0', appBuildNo='null', platformId=Android', enviroment=null', symbolPathName='/Users/lilyxie/Downloads/upload_target/obj/arm64-v8a/libbugly_dumper.so', mappingPathName='null', appPathName='null'}
...
##[info]request json is {"appID":"a278f01047","authSign":"1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86","appVersion":"4.3.0","appBundleID":"com.tencent.demo.buglyprodemo","appPlatform":1,"appBuildNumber":null,"fileType":201,"fileSize":83101,"fileMD5":"7237e936f6bf7e8ed52a70f67c02aa31","clientType":7,"clientVersion":"1.0.48","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"buglySymbol&arm64-v8a&libbugly_dumper&a5cd2db99a1f45b45469979205f09730.zip","uuid":"a5cd2db99a1f45b45469979205f09730","arch":"arm64-v8a","type":101,"moduleName":"libbugly_dumper"}],"buildRepo":null,"buildBranch":null,"buildCommitID":null}
##[info]request upload Info Url is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadInfo
##[info]request gitRepoUrl is null
##[info]request gitRepoBranch is null
##[info]request gitRepoHeadCommitId is null
##[info]envtype is null
##[info]getAppModuleList is null
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-2e0f441c-da63-46a3-b03b-6b5ce1bdb008"}
##[info]now begin to uploadFileContent
##[info]request uploadFileurl is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadFile
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-2e0f441c-da63-46a3-b03b-6b5ce1bdb008"}
案例二:上传多个SO符号表文件
参考命令行:
java -jar buglyqq-upload-symbol.jar -appid a278f01047 -appkey 1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86 -version 4.3.0 -platform Android -inputSymbol /Users/lilyxie/Downloads/upload_target/obj/arm64-v8a
上传多个SO符号表文件时,-inputSymbol 需要输入这些要上传的SO符号表文件的目录,例如示例中将arm64-v8a整个架构的结果都上传。
结果摘要:
...
##[info]bugly tools android params: -appid a278f01047 -appkey 1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86 -version 4.3.0 -platform Android -inputSymbol /Users/lilyxie/Downloads/upload_target/obj/arm64-v8a
...
##[info]request json is {"appID":"a278f01047","authSign":"1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86","appVersion":"4.3.0","appBundleID":"com.tencent.demo.buglyprodemo","appPlatform":1,"appBuildNumber":null,"fileType":201,"fileSize":1359658,"fileMD5":"3a54e6b66b6901c6a51c528ea36d86dd","clientType":7,"clientVersion":"1.0.48","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"buglySymbol&arm64-v8a&librmonitor_natmem&2655b543f9689d5dbcac22f995a18a44.zip","uuid":"2655b543f9689d5dbcac22f995a18a44","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_natmem"},{"name":"buglySymbol&arm64-v8a&libBugly_Native&e62597d2365613d35f1110454fa072a2.zip","uuid":"e62597d2365613d35f1110454fa072a2","arch":"arm64-v8a","type":101,"moduleName":"libBugly_Native"},{"name":"buglySymbol&arm64-v8a&libbugly_dumper&a5cd2db99a1f45b45469979205f09730.zip","uuid":"a5cd2db99a1f45b45469979205f09730","arch":"arm64-v8a","type":101,"moduleName":"libbugly_dumper"},{"name":"buglySymbol&arm64-v8a&librmonitor_memory_dump&3958037915dd881290ba72a3f598d862.zip","uuid":"3958037915dd881290ba72a3f598d862","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_memory_dump"},{"name":"buglySymbol&arm64-v8a&librmonitor_fd_stack&e8d847dac7e5fbdb8c134ccc74799e7d.zip","uuid":"e8d847dac7e5fbdb8c134ccc74799e7d","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_fd_stack"},{"name":"buglySymbol&arm64-v8a&librmonitor_core&54ef01f7521cf885a88c387fb6782875.zip","uuid":"54ef01f7521cf885a88c387fb6782875","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_core"},{"name":"buglySymbol&arm64-v8a&librmonitor_base&5990bc6d36f0643987af905c60b3d8f8.zip","uuid":"5990bc6d36f0643987af905c60b3d8f8","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_base"}],"buildRepo":null,"buildBranch":null,"buildCommitID":null}
##[info]request upload Info Url is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadInfo
##[info]request gitRepoUrl is null
##[info]request gitRepoBranch is null
##[info]request gitRepoHeadCommitId is null
##[info]envtype is null
##[info]getAppModuleList is null
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-aae1c0a6-492b-4ebc-b6d7-9ed51e3571b1"}
##[info]now begin to uploadFileContent
##[info]request uploadFileurl is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadFile
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-aae1c0a6-492b-4ebc-b6d7-9ed51e3571b1"}
检查符号表上传结果:
案例三:上传mapping.txt文件
参考命令行:
java -jar buglyqq-upload-symbol.jar -appid a278f01047 -appkey 1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86 -version 4.3.1 -buildNo 1 -platform Android -inputMapping /Users/temp/app/build/outputs/mapping/r8/release/mapping.txt
结果摘要:
...
##[info]args is ArgsParser{appId='a278f01047'appKey='1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86', appPackage='com.tencent.demo.buglyprodemo', appVersion='4.3.1', appBuildNo='1', platformId=Android', enviroment=null', symbolPathName='null', mappingPathName='/Users/lilyxie/workspace/apm/QAPM_SDK/app/build/outputs/mapping/r8/release/mapping.txt', appPathName='null'}
...
##[info]symbolFileDetail is [{"name":"mapping&616cc28aa0dfdfce4cfcef72750a4583.zip","type":102}]
##[info]request json is {"appID":"a278f01047","authSign":"1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86","appVersion":"4.3.1","appBundleID":"com.tencent.demo.buglyprodemo","appPlatform":1,"appBuildNumber":null,"fileType":202,"fileSize":727073,"fileMD5":"b409dc5beb8061397429086273d1e023","clientType":7,"clientVersion":"1.0.48","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"mapping&616cc28aa0dfdfce4cfcef72750a4583.zip","type":102}],"buildRepo":null,"buildBranch":null,"buildCommitID":null}
##[info]request upload Info Url is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadInfo
##[info]request gitRepoUrl is null
##[info]request gitRepoBranch is null
##[info]request gitRepoHeadCommitId is null
##[info]envtype is null
##[info]getAppModuleList is null
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-72fd1c79-7096-4818-8244-61248c5e0fe2"}
##[info]now begin to uploadFileContent
##[info]request uploadFileurl is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadFile
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-72fd1c79-7096-4818-8244-61248c5e0fe2"}
案例四:同时上传SO文件以及mappint.txt文件
参考命令行:
java -jar buglyqq-upload-symbol.jar -appid a278f01047 -appkey 1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86 -version 4.3.0 -buildNo 2 -platform Android -inputSymbol /Users/lilyxie/Downloads/upload_target/obj/arm64-v8a -inputMapping /Users/lilyxie/workspace/apm/QAPM_SDK/app/build/outputs/mapping/r8/release/mapping.txt
结果摘要:
...
##[info]args is ArgsParser{appId='a278f01047'appKey='1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86', appPackage='com.tencent.demo.buglyprodemo', appVersion='4.3.0', appBuildNo='2', platformId=Android', enviroment=null', symbolPathName='/Users/lilyxie/Downloads/upload_target/obj/arm64-v8a', mappingPathName='/Users/lilyxie/workspace/apm/QAPM_SDK/app/build/outputs/mapping/r8/release/mapping.txt', appPathName='null'}
...
##[info]request json is {"appID":"a278f01047","authSign":"1e5ab6b3-b6fa-4f9b-a3c2-743d31dffe86","appVersion":"4.3.0","appBundleID":"com.tencent.demo.buglyprodemo","appPlatform":1,"appBuildNumber":null,"fileType":200,"fileSize":2086710,"fileMD5":"5e89401e93597eded44527a9345bc43c","clientType":7,"clientVersion":"1.0.48","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"buglySymbol&arm64-v8a&librmonitor_natmem&2655b543f9689d5dbcac22f995a18a44.zip","uuid":"2655b543f9689d5dbcac22f995a18a44","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_natmem"},{"name":"buglySymbol&arm64-v8a&libBugly_Native&e62597d2365613d35f1110454fa072a2.zip","uuid":"e62597d2365613d35f1110454fa072a2","arch":"arm64-v8a","type":101,"moduleName":"libBugly_Native"},{"name":"buglySymbol&arm64-v8a&libbugly_dumper&a5cd2db99a1f45b45469979205f09730.zip","uuid":"a5cd2db99a1f45b45469979205f09730","arch":"arm64-v8a","type":101,"moduleName":"libbugly_dumper"},{"name":"buglySymbol&arm64-v8a&librmonitor_memory_dump&3958037915dd881290ba72a3f598d862.zip","uuid":"3958037915dd881290ba72a3f598d862","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_memory_dump"},{"name":"buglySymbol&arm64-v8a&librmonitor_fd_stack&e8d847dac7e5fbdb8c134ccc74799e7d.zip","uuid":"e8d847dac7e5fbdb8c134ccc74799e7d","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_fd_stack"},{"name":"buglySymbol&arm64-v8a&librmonitor_core&54ef01f7521cf885a88c387fb6782875.zip","uuid":"54ef01f7521cf885a88c387fb6782875","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_core"},{"name":"buglySymbol&arm64-v8a&librmonitor_base&5990bc6d36f0643987af905c60b3d8f8.zip","uuid":"5990bc6d36f0643987af905c60b3d8f8","arch":"arm64-v8a","type":101,"moduleName":"librmonitor_base"},{"name":"mapping&616cc28aa0dfdfce4cfcef72750a4583.zip","type":102}],"buildRepo":null,"buildBranch":null,"buildCommitID":null}
##[info]request upload Info Url is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadInfo
##[info]request gitRepoUrl is null
##[info]request gitRepoBranch is null
##[info]request gitRepoHeadCommitId is null
##[info]envtype is null
##[info]getAppModuleList is null
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-c6dee54b-a8c0-4ec8-b478-5cce8dc228bf"}
##[info]now begin to uploadFileContent
##[info]request uploadFileurl is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadFile
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a278f01047-c6dee54b-a8c0-4ec8-b478-5cce8dc228bf"}
案例五:上传一个dSYM文件
参考命令行:
java -jar buglyqq-upload-symbol.jar -appid a53fd62f6e -appkey aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f -version 2.3.0 -platform IOS -inputSymbol /Users/lilyxie/workspace/temp/dSYM/Alamofire.framework.dSYM
结果摘要:
...
##[info]args is ArgsParser{appId='a53fd62f6e'appKey='aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f', appPackage='com.tencent.bugly.demo.presentation.ios', appVersion='2.3.0', appBuildNo='null', platformId=IOS', enviroment=null', symbolPathName='/Users/lilyxie/workspace/temp/dSYM/Alamofire.framework.dSYM', mappingPathName='null', appPathName='null'}
...
##[info]request json is {"appID":"a53fd62f6e","authSign":"aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f","appVersion":"2.3.0","appBundleID":"com.tencent.bugly.demo.presentation.ios","appPlatform":2,"appBuildNumber":null,"fileType":201,"fileSize":350816,"fileMD5":"f69a32d33b16756a75d1716f728cef00","clientType":7,"clientVersion":"1.0.48","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"buglySymbol&Alamofire&arm64&5471ad32641a3f9f87610b133693b882.zip","uuid":"5471ad32641a3f9f87610b133693b882","arch":"arm64","type":101,"moduleName":"Alamofire"},{"name":"buglySymbol&Alamofire&x86_64&60e900a3b60035b98fd84ccb13c4ec55.zip","uuid":"60e900a3b60035b98fd84ccb13c4ec55","arch":"x86_64","type":101,"moduleName":"Alamofire"}],"buildRepo":null,"buildBranch":null,"buildCommitID":null}
##[info]request upload Info Url is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadInfo
##[info]request gitRepoUrl is null
##[info]request gitRepoBranch is null
##[info]request gitRepoHeadCommitId is null
##[info]envtype is null
##[info]getAppModuleList is null
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a53fd62f6e-ab4b2b2a-b074-4ecd-b798-4d1d9458ba36"}
案例六:上传多个dSYM文件
参考命令行:
java -jar buglyqq-upload-symbol.jar -appid a53fd62f6e -appkey aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f -version 2.3.0 -platform IOS -inputSymbol /Users/lilyxie/workspace/temp/dSYM
结果摘要:
...
##[info]args is ArgsParser{appId='a53fd62f6e'appKey='aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f', appPackage='com.tencent.bugly.demo.presentation.ios', appVersion='2.3.0', appBuildNo='null', platformId=IOS', enviroment=null', symbolPathName='/Users/lilyxie/workspace/temp/dSYM', mappingPathName='null', appPathName='null'}
...
##[info]request json is {"appID":"a53fd62f6e","authSign":"aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f","appVersion":"2.3.0","appBundleID":"com.tencent.bugly.demo.presentation.ios","appPlatform":2,"appBuildNumber":null,"fileType":201,"fileSize":4673680,"fileMD5":"64c428045dfdcb0c376bea51760dd0df","clientType":7,"clientVersion":"1.0.48","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"buglySymbol&APTimeZones&arm64&659c3d9d48de30b6b47792cebd69ad22.zip","uuid":"659c3d9d48de30b6b47792cebd69ad22","arch":"arm64","type":101,"moduleName":"APTimeZones"},{"name":"buglySymbol&APTimeZones&x86_64&cae5639b99b030bd8c25d501a1e9262f.zip","uuid":"cae5639b99b030bd8c25d501a1e9262f","arch":"x86_64","type":101,"moduleName":"APTimeZones"},{"name":"buglySymbol&NearbyWeather&arm64&cd705ee49b29330dbcfacbd00774c7ff.zip","uuid":"cd705ee49b29330dbcfacbd00774c7ff","arch":"arm64","type":101,"moduleName":"NearbyWeather"},{"name":"buglySymbol&NearbyWeather&x86_64&f9813c5ec1a932f7a06e4167448ac9a2.zip","uuid":"f9813c5ec1a932f7a06e4167448ac9a2","arch":"x86_64","type":101,"moduleName":"NearbyWeather"},{"name":"buglySymbol&Rswift&arm64&915c4f2d6c6c3ce4821c6e8df1ce7001.zip","uuid":"915c4f2d6c6c3ce4821c6e8df1ce7001","arch":"arm64","type":101,"moduleName":"Rswift"},{"name":"buglySymbol&Rswift&x86_64&1d7a56292ec73517a165b3a4645ab9b3.zip","uuid":"1d7a56292ec73517a165b3a4645ab9b3","arch":"x86_64","type":101,"moduleName":"Rswift"},{"name":"buglySymbol&FMDB&arm64&31fc108031e339b780ebfd18f1877861.zip","uuid":"31fc108031e339b780ebfd18f1877861","arch":"arm64","type":101,"moduleName":"FMDB"},{"name":"buglySymbol&FMDB&x86_64&79f5048815c43a6e99a8471edc4e071c.zip","uuid":"79f5048815c43a6e99a8471edc4e071c","arch":"x86_64","type":101,"moduleName":"FMDB"},{"name":"buglySymbol&PKHUD&x86_64&805ab0b5ac413f2a8205de88ab83374f.zip","uuid":"805ab0b5ac413f2a8205de88ab83374f","arch":"x86_64","type":101,"moduleName":"PKHUD"},{"name":"buglySymbol&PKHUD&arm64&4e20af3ed52a338b8f33683a462cc275.zip","uuid":"4e20af3ed52a338b8f33683a462cc275","arch":"arm64","type":101,"moduleName":"PKHUD"},{"name":"buglySymbol&RxRelay&arm64&f16c9ca211c332609db10ab1be487ef2.zip","uuid":"f16c9ca211c332609db10ab1be487ef2","arch":"arm64","type":101,"moduleName":"RxRelay"},{"name":"buglySymbol&RxRelay&x86_64&8c769ff24d4231ed98b0a95ee0967a51.zip","uuid":"8c769ff24d4231ed98b0a95ee0967a51","arch":"x86_64","type":101,"moduleName":"RxRelay"},{"name":"buglySymbol&RxCocoa&x86_64&34e3cf0ae4603507b361340ffcf2787a.zip","uuid":"34e3cf0ae4603507b361340ffcf2787a","arch":"x86_64","type":101,"moduleName":"RxCocoa"},{"name":"buglySymbol&RxCocoa&arm64&72cd027e9b59367a9a7b5febac26452c.zip","uuid":"72cd027e9b59367a9a7b5febac26452c","arch":"arm64","type":101,"moduleName":"RxCocoa"},{"name":"buglySymbol&RxSwift&arm64&d4975416847c3104aa199584ca9e9c14.zip","uuid":"d4975416847c3104aa199584ca9e9c14","arch":"arm64","type":101,"moduleName":"RxSwift"},{"name":"buglySymbol&RxSwift&x86_64&03ea574855783e2080ccb8473c8c70d6.zip","uuid":"03ea574855783e2080ccb8473c8c70d6","arch":"x86_64","type":101,"moduleName":"RxSwift"},{"name":"buglySymbol&TextFieldCounter&arm64&3e1d2e3091c03c6a926132fd8e6787c2.zip","uuid":"3e1d2e3091c03c6a926132fd8e6787c2","arch":"arm64","type":101,"moduleName":"TextFieldCounter"},{"name":"buglySymbol&TextFieldCounter&x86_64&5b22d2600ef2323693cbd4168f9442e9.zip","uuid":"5b22d2600ef2323693cbd4168f9442e9","arch":"x86_64","type":101,"moduleName":"TextFieldCounter"},{"name":"buglySymbol&SwiftMonkey&x86_64&5eb2bb9f2535313bb6d52d20cb997c3f.zip","uuid":"5eb2bb9f2535313bb6d52d20cb997c3f","arch":"x86_64","type":101,"moduleName":"SwiftMonkey"},{"name":"buglySymbol&SwiftMonkey&arm64&ce1692374ecb37fbb0cf58671f91687d.zip","uuid":"ce1692374ecb37fbb0cf58671f91687d","arch":"arm64","type":101,"moduleName":"SwiftMonkey"},{"name":"buglySymbol&RxFlow&arm64&05ab5fa62ccc33ac92bee8302f3c03ac.zip","uuid":"05ab5fa62ccc33ac92bee8302f3c03ac","arch":"arm64","type":101,"moduleName":"RxFlow"},{"name":"buglySymbol&RxFlow&x86_64&8b4df307db4a34d2b003d65eb5f6990f.zip","uuid":"8b4df307db4a34d2b003d65eb5f6990f","arch":"x86_64","type":101,"moduleName":"RxFlow"},{"name":"buglySymbol&NearbyWeatherUITests&arm64&2d853bcf1c703a6ebb0767dae49033d3.zip","uuid":"2d853bcf1c703a6ebb0767dae49033d3","arch":"arm64","type":101,"moduleName":"NearbyWeatherUITests"},{"name":"buglySymbol&NearbyWeatherUITests&x86_64&98bcb7abb3a1376593d8b88be64102d4.zip","uuid":"98bcb7abb3a1376593d8b88be64102d4","arch":"x86_64","type":101,"moduleName":"NearbyWeatherUITests"},{"name":"buglySymbol&Alamofire&arm64&5471ad32641a3f9f87610b133693b882.zip","uuid":"5471ad32641a3f9f87610b133693b882","arch":"arm64","type":101,"moduleName":"Alamofire"},{"name":"buglySymbol&Alamofire&x86_64&60e900a3b60035b98fd84ccb13c4ec55.zip","uuid":"60e900a3b60035b98fd84ccb13c4ec55","arch":"x86_64","type":101,"moduleName":"Alamofire"}],"buildRepo":null,"buildBranch":null,"buildCommitID":null}
##[info]request upload Info Url is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadInfo
##[info]request gitRepoUrl is null
##[info]request gitRepoBranch is null
##[info]request gitRepoHeadCommitId is null
##[info]envtype is null
##[info]getAppModuleList is null
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a53fd62f6e-7b7c95ad-c497-4297-b8af-f919741228bb"}
##[info]now begin to uploadFileContent
##[info]request uploadFileurl is https://symbol-v2.bugly.qq.com/trpc.eff_tool.symbol_upload_gateway.SymbolUploadGateway/uploadFile
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a53fd62f6e-7b7c95ad-c497-4297-b8af-f919741228bb"}
案例七:上传Harmony平台符号表
参考命令行:
如需上传鸿蒙SO,需先设置临时环境变量 USE_LLVM
为true。
export USE_LLVM=true
接着执行符号表上传命令。
java -jar buglyqq-upload-symbol.jar -appid a53fd62f6e -appkey aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f -version 1.0.0 -platform Harmony -inputSymbol ./harmony_test/libdemo.so -inputMapping harmony_test/obfuscation -buildNo 0
- 上传鸿蒙SO符号表前必须设置
USE_LLVM
环境变量,否则可能上传失败。 - 上传时需设置平台为
Harmony
,注意大小写。 - 上传nameCache和sourceMaps复用Android平台
-inputMapping
参数,区别在于平台为鸿蒙时会同时捞取包含nameCache
和sourceMaps
的文件。 - 支持上传一个SO与上传多个SO,支持单独上传nameCache、sourceMaps,支持同时上传SO和nameCache、sourceMaps,示例参考案例一、案例二、案例三、案例四,需注意设置平台。
- 需替换命令中
jar
包名称为真实使用的jar包名称。
上传成功结果摘要如下。
##[info]args is ArgsParser{appId='a53fd62f6e', appKey='aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f', appPackage='null', appVersion='1.0.0', appBuildNo='2', platformId='Harmony', enviroment='null', symbolPathName='./libdemo.so', mappingPathName='harmony_test/obfuscation', appPathName='null'}
##[info]param is : AtomParam{bundleId='null', version='1.0.0', secret='null', platform='Harmony', platformModule='null', symbolPath='./libdemo.so', appPath='null', mappingPath='harmony_test/obfuscation', secretSource='input', secretInputAppId='a53fd62f6e', secretInputKey='aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f', buildNo='2', buildPackageType='app', appModuleList='null', moduleName='null', envType='null'}
##[info]deleteDirFiles file path is /Users/zhuangchihui/Documents/TestData/buglybin/symbolTempStore/bugly_nameCache&85272d438d47884151c9b48bf36b5131.zip
##[info]deleteDirFiles file path is /Users/zhuangchihui/Documents/TestData/buglybin/symbolTempStore/sourceMaps&7fc36306136e9f57db449eb0d61963a1.zip
##[info]deleteDirFiles file path is /Users/zhuangchihui/Documents/TestData/buglybin/symbolTempStore
##[info]deleteDirFiles file path is /Users/zhuangchihui/Documents/TestData/buglybin/symbolResult/BuglyMappingListZip.zip
##[info]deleteDirFiles file path is /Users/zhuangchihui/Documents/TestData/buglybin/symbolResult
##[info]deleteDirFiles file path is /Users/zhuangchihui/Documents/TestData/buglybin
##[info]packSymbolFile file
##[info]workspace:null
##[info]buildPackageType:app
##[info]find mapping file:[harmony_test/obfuscation/sourceMaps.json, harmony_test/obfuscation/bugly_nameCache.json]
##[info]checkSymbolUpload request json is {"appID":"a53fd62f6e","symbolUUIDs":["b151a429a057c9b78803bac7f4b15278"]}
##[info]retCode: 200 response message: {"statusCode":0,"msg":"所有符号表都已经上传过。","notExistUUIDs":[]}
...
##[info]request json is {"appID":"a53fd62f6e","authSign":"aa1c666f-d5e7-446b-8dc7-3bcb3bda7c7f","appVersion":"1.0.0","appBundleID":null,"appPlatform":11,"appBuildNumber":"0","fileType":202,"fileSize":18657,"fileMD5":"80efa7c601bc5fe0c9c065c669997786","clientType":4,"clientVersion":"3.4.2","buildPlatform":1,"buildID":null,"buildName":"null&null","fileInfoList":[{"name":"sourceMaps&7fc36306136e9f57db449eb0d61963a1.zip","type":102},{"name":"bugly_nameCache&85272d438d47884151c9b48bf36b5131.zip","type":102}],"buildRepo":null,"buildBranch":null,"buildCommitID":null,"appType":0}
##[info]retCode: 200 response message: {"statusCode":0,"msg":"success","uploadReqID":"a53fd62f6e-84fd4052-44c7-45da-8b2e-ac59f3846733"}