首页 \ 问答 \ 堆栈跟踪反混淆:带有ProGuard和Crashlytics的Android Studio(Stack trace deobfuscation: Android Studio with ProGuard and Crashlytics)

堆栈跟踪反混淆:带有ProGuard和Crashlytics的Android Studio(Stack trace deobfuscation: Android Studio with ProGuard and Crashlytics)

堆栈跟踪反混淆技术如何与Android Studio,ProGuard和Crashlytics协同工作?

每个应用程序构建生成一个唯一的构建ID,据我了解,即使应用程序的versionCodeversionName没有改变,它也会生成:

<string name = "com.crashlytics.android.build_id">RANDOM_UUID</ string>

正如我在编译时所假设的,这个构建ID和mapping.txt一起被上传到Crashlytics服务器。 而且,每个崩溃报告都会包含此构建ID。 因此,Crashlytics服务器可以找到正确的mapping.txt,即使对于具有相同versionCodeversionName versionCode也是如此。

但是如果在构建过程中我暂时失去了互联网连接,我不会注意到这一点? 我试图在互联网关闭的情况下进行构建,并且成功,没有任何警告,也没有错误。 但我预计这个构建会失败,并抱怨说它无法将mapping.txt和构建ID上传到Crashlytics服务器。

那么,Gradle的Crashlytics插件如何处理没有互联网的构建?

假设,Crashlytics可以用相同的versionCodeversionName来区分构建,是正确的吗?

UPD。 在我得到Mike的回答之前,我还通过简单的做./gradlew tasks --all找到了关于发生了什么的见解 - 都在我的项目根目录中:

  • app:crashlyticsStoreDeobsRelease - 在完成发布版本之后调用Crashlytics目标。 清理Crashlytics生成的资源文件。 将反混淆文件缓存并上传到Crashlytics服务器。
  • 应用程序:crashlyticsUploadDeobsRelease - 将存储的反混淆文件上传到Crashlytics。
  • app:crashlyticsUploadDistributionDebug - 将APK上传到Crashlytics进行分发。
  • app:crashlyticsUploadDistributionRelease - 将APK上传到Crashlytics进行分发。
  • app:fabricGenerateResourcesDebug - 注入Fabric SDK使用的构建ID。
  • app:fabricGenerateResourcesRelease - 注入Fabric SDK使用的构建标识。

How does the magic of stack trace deobfuscation works with Android Studio, ProGuard and Crashlytics?

Each app build generates an unique build id, and as I understand, it is generated even if versionCode and versionName of the app haven't changed:

<string name = "com.crashlytics.android.build_id">RANDOM_UUID</ string>

As I assuming, at build time, this build id, together with mapping.txt, is uploaded to the Crashlytics server. And, in turn, each crash report contains this build id. Thus, the Crashlytics server can find the correct mapping.txt, even for builds with the same versionCode and versionName.

But what if during the build I got temporary lost an Internet connection, and I wouldn't notice this? I've tried to make a build with the Internet turned off, and it was successful, no warnings, no errors. But I anticipated the build would fail, complaining that it couldn't upload mapping.txt and the build id to the Crashlytics server.

So, how Crashlytics plugin for Gradle does handles build without Internet?

And is assumption, that Crashlytics can distinguish builds with the same versionCode and versionName, is correct?

UPD. Before I got answer from Mike, I've also found insights on what's going on under the hood, by simply doing ./gradlew tasks --all in my projects root directory:

  • app:crashlyticsStoreDeobsRelease - Crashlytics target to be invoked after completing release builds. Cleans up Crashlytics-generated resource files. Caches and uploads deobfuscation files to Crashlytics servers.
  • app:crashlyticsUploadDeobsRelease - Uploads stored deobfuscation files to Crashlytics.
  • app:crashlyticsUploadDistributionDebug - Uploads an APK to Crashlytics for distribution.
  • app:crashlyticsUploadDistributionRelease - Uploads an APK to Crashlytics for distribution.
  • app:fabricGenerateResourcesDebug - Injects the build id used by the Fabric SDK.
  • app:fabricGenerateResourcesRelease - Injects the build id used by the Fabric SDK.

原文:https://stackoverflow.com/questions/48512131
更新时间:2022-11-05 18:11

最满意答案

你可以这样做:

SELECT  MT.NQ, MT.ProductId, MT.Product, MT.Warehouse, MT.ProductType, MT.Transactiontime
FROM    @MaxTime MT
INNER JOIN (
                SELECT  ProductId
                ,       MAX(Transactiontime) AS 'TransactionTime'
                FROM    @MaxTime
                GROUP BY Productid
            ) GR
        ON  MT.ProductId = GR.ProductId
        AND MT.TransactionTime = GR.TransactionTime
ORDER BY MT.ProductId

You could do:

SELECT  MT.NQ, MT.ProductId, MT.Product, MT.Warehouse, MT.ProductType, MT.Transactiontime
FROM    @MaxTime MT
INNER JOIN (
                SELECT  ProductId
                ,       MAX(Transactiontime) AS 'TransactionTime'
                FROM    @MaxTime
                GROUP BY Productid
            ) GR
        ON  MT.ProductId = GR.ProductId
        AND MT.TransactionTime = GR.TransactionTime
ORDER BY MT.ProductId

相关问答

更多
  • 最简单的方法是利用数组键的唯一性: $grouped = array(); while ($row = $db->fetchResult()) { // or however you get your data if (isset($grouped[$row['item']])) { $grouped[$row['item']]['count']++; } else { $grouped[$row['item']] = $row + array('coun ...
  • 你可以这样做: SELECT MT.NQ, MT.ProductId, MT.Product, MT.Warehouse, MT.ProductType, MT.Transactiontime FROM @MaxTime MT INNER JOIN ( SELECT ProductId , MAX(Transactiontime) AS 'TransactionTime' FROM @ ...
  • 您正在加入商店以租赁给员工。 因此,您的COUNT()函数将返回相同的值(租赁和员工的产品)。 你没有解释你的家庭作业的逻辑,但让我们猜测:你想要计算每家商店的员工数量和每家商店的租金数量,以及所有商店的平均租金数量。 为此,您需要多个查询。 在这里,我定义了两个子查询来获取基本计数,然后我将其加入主查询并用于推导平均值。 with emps as (select store.store_num , count(*) as cnt fro ...
  • 您现有的查询将有效解决 UPDATE Products SET Price = Price*100 WHERE 47 = 47 巧合的是,47恰好是子查询的第一行的结果。 由于47 = 47始终为真,因此将更新所有行。 您真正想要做的是找到所有产品的SUM为47的SupplierID,并在WHERE子句中使用它。 我想这会做你想做的事情: UPDATE Products SET Price = Price*100 WHERE SupplierID IN (SELECT SupplierID ...
  • 如果movie由title和year唯一标识,并且“演员”通过name标识......我们不一定需要加入movie表。 我们可以使用多个character_name识别出现在同一影片中的演员,并使用如下查询: SELECT a.title , a.year , a.name FROM actors a GROUP BY a.title , a.year , a.name HAVING COUNT(DISTINCT a.character_name) > ...
  • 您需要嵌套查询。 像这样的东西应该工作: 内部查询: select bsd_id, count(*) as c from mitable where status_flag='completed' group by bsd_id 结果: 1256,1 1232,1 1216,2 1235,1 完整的查询: select count(*), t.c from (select bsd_id, count(*) as c from mitable where status_flag='completed' gr ...
  • select lesson,sum(COND1) as COND1, sum(COND2) as COND2,sum(COND3) as COND3 from ( SELECT c.name, ccc.lesson, CASE WHEN COUNT(distinct cmc.id) = COUNT(distinct ccc.id) THEN 1 ELSE 0 END AS "COND1", CASE WHEN COUNT(distinct cmc.id) > 0 AND CO ...
  • 如果要选择单独的列,则它们都需要出现在GROUP BY子句中,除非它们是聚合函数。 请参见此处: http : //msdn.microsoft.com/en-us/library/ms177673.aspx 例如 SELECT TOP 20 ADMINSTATUS, CURRENCY, CUSTOMERID, CUSTOMERMESSAGE, DELTIME, DELTOTAL, DISCOUNT, DISCOUNTCODE, ...
  • 实现类似HAVING的行为 您可以使用其中一个pipeline aggregations ,即存储桶选择器聚合 。 查询看起来像这样: POST my_index/tdrs/_search { "aggregations": { "reseller_sale_sum": { "aggregations": { "sales": { "sum": { "field": "request ...
  • 您需要按选择查询中使用的所有列进行分组,但具有聚合函数的列除外: SELECT EmbroiderAccountId ,EmbroiderReceivedDeliveryChallanId BuyerOrderProductId ,EmbroiderDeliveryChallanNo ,EmbroiderName ,sum(Qty) ,OrderNo ,Rate ,sum(Debit) ,Credit ,EmbroiderReceive ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)