bytedance / AabResGuard

The tool of obfuscated aab resources.(Android app bundle资源混淆工具)
Apache License 2.0
1.32k stars 182 forks source link

Automatically keep mandatory resources #16

Closed eakteam closed 4 years ago

eakteam commented 4 years ago

We have to explictly add to white list those lines or the app will crash Maybe there are more mandatory fields but for the moment app crash is solved by adding only those

whiteList = ["*.R.string.com.crashlytics.android.build_id", "*.R.string.google_app_id"]

eakteam commented 4 years ago

Those are automatically generated by Google Services :

<resources>
    <string name="default_web_client_id" translatable="false">example</string>
    <string name="firebase_database_url" translatable="false">example</string>
    <string name="gcm_defaultSenderId" translatable="false">example</string>
    <string name="google_api_key" translatable="false">example</string>
    <string name="google_app_id" translatable="false">example</string>
    <string name="google_crash_reporting_api_key" translatable="false">example</string>
    <string name="google_storage_bucket" translatable="false">example</string>
    <string name="project_id" translatable="false">example</string>
</resources>

and this is generated by crashlytics :

<string tools:ignore="UnusedResources,TypographyDashes" name="com.crashlytics.android.build_id" translatable="false">example</string>

It is better to automatically include in whitelist...

JingYeoh commented 4 years ago

@eakteam I don't think this is a desirable feature in the AabResGuard, there are too many SDK in android, I can create a resources whitelist template file for the usual SDK and show the file in the wiki.

JingYeoh commented 4 years ago

Welcome PR your configs which is not included in WHITELIST.

eakteam commented 4 years ago

Thanks, i have already added one more mandatory string resource

trycatchx commented 4 years ago

那请问这个已经默认列入白名单了?还是要手动?

JingYeoh commented 4 years ago

@zhangchaojiong AabResGuard 内部不提供默认白名单,所有的白名单都需要手动配置。

trycatchx commented 4 years ago

@JingYeoh 好的