Commit 9ff1c1ee authored by wanglei's avatar wanglei

[打包]提交换值脚本和mapping

parent d018de55
{
"string_ids": {
"app_name": "violateic",
"facebook_app_id": "rubdownic",
"involve_ad": "clapboardic",
"consent_required": "vitalityic",
"consent": "skateboarderic",
"start": "laneic",
"privacy_policy": "pageantryic",
"photo": "oppressic",
"audio": "modernizeic",
"document": "ragsic",
"video": "preconceptionic",
"continue_": "hijackic",
"open_settings": "remakeic",
"storage_permission_title": "labyrinthic",
"storage_permission_content": "wormsic",
"file_recovery": "arthriticic",
"junk_clean": "copulationic",
"battery_info": "nastyic",
"screenshot_clean": "ostracismic",
"large_file_clean": "principleic",
"photo_compression": "creepic",
"similar_photos": "painfulic",
"recovery": "placeic",
"settings": "debilitateic",
"normal": "stimulantic",
"please_wait": "localityic",
"left_with_current_power_consumption": "killeric",
"finish": "likelyic",
"found": "couldic",
"clean_tips": "intervalic",
"clean": "ornateic",
"go_it": "dominoic",
"empty_folder": "adamantic",
"apk_files": "dimic",
"temp_files": "relentic",
"logs_files": "notableic",
"cleaned_up": "untimelyic",
"cleaned_up_content": "italicic",
"result_junk_clean": "Yiddishic",
"clean_now": "skirmishic",
"result_battery_info": "prosperousic",
"result_large_file_clean": "uncertainic",
"result_photo_compression": "agreementic",
"result_screenshot_clean": "nomineeic",
"result_similar_photos": "nonplussedic",
"all_types": "jitteryic",
"mb_10": "sideburnsic",
"delete": "airic",
"other_than": "courthouseic",
"image": "ultravioletic",
"apk": "obedientlyic",
"other_types": "herbic",
"mb_20": "buyeric",
"mb_50": "housingic",
"mb_100": "instepic",
"mb_500": "forwentic",
"all_time": "toldic",
"week_1": "freezeric",
"month_1": "showmanshipic",
"month_3": "ramshackleic",
"month_6": "humorouslyic",
"year_1": "fantasyic",
"larger_than": "pollsteric",
"confirm": "copyrightic",
"confirm_content": "acceptableic",
"cancel": "sprinteric",
"delete_title": "fervoric",
"delete_content": "wiselyic",
"screenshots_totally": "fantasticic",
"select_all": "communeic",
"auto_select": "immoralic",
"occupies": "liberalic",
"compress": "confiscationic",
"wait_a_moment": "reckonic",
"compress_all": "saboteuric",
"best_quality_photo": "counterbalanceic",
"most_space_saved": "storeroomic",
"recover_tip": "decentralizationic",
"photos": "craftyic",
"recover_lost_photos": "templeic",
"videos": "shyic",
"recover_lost_videos": "tinfoilic",
"audios": "sequoiaic",
"documents": "ravineic",
"recover_lost_documents": "melodramaic",
"scan": "protectoric",
"click_to_view": "comicic",
"clean_junk": "scuttleic",
"more": "disparageic",
"duplicate_photos": "talentic",
"already_saved_for_you": "inferiorityic",
"rate_us": "leaseic",
"version": "inflationic",
"recycle_bin": "parochialic",
"recyclebin_tip": "egocentricic",
"recyclebin": "Oscaric",
"thank_you_for_using_app": "competitoric",
"thank_you_very_much_for_taking_the_time_to_rate_us": "insistentic",
"submit": "unlikelyic",
"screenshot_cleaner": "immunizationic",
"guide_tip_1": "regroupic",
"guide_tip_2": "hitchic",
"guide_tip_3": "disdainic",
"next": "polarizeic",
"sure": "baptizeic",
"exit_junk_clean": "heavinessic",
"exit_junk_clean_content": "writeric",
"exit_battery_info": "papergirlic",
"exit_battery_info_content": "gallic",
"exit_large_file_clean": "groundlesslyic",
"exit_large_file_clean_content": "reactoric",
"exit_photo_compression": "lightlyic",
"exit_photo_compression_content": "fogyic",
"exit_screenshot_cleaner": "scoutic",
"exit_screenshot_cleaner_content": "hospitalityic",
"exit_similar_photos": "characterizationic",
"exit_similar_photos_content": "pleatedic",
"logout_content": "awningic",
"please_wait_a_moment": "crunchyic",
"exit": "dazedic",
"privacy": "earnestic",
"agree": "humidifyic",
"terms_of_service": "sociableic",
"notification_title": "conjugalic",
"notification_content": "boldic",
"turn_on": "lapelic"
},
"color_ids": {
"black": "possessic",
"white": "dandruffic",
"transparent": "phenomenonic",
"colorPrimary": "smuggleic",
"colorDisEnable": "monogrammedic",
"color_66000000": "primlyic",
"color_1a1a1a": "sickeningic",
"color_181b1f": "intolerantic",
"color_666666": "Martianic",
"color_f7fafa": "sticksic",
"color_aeb4bd": "remembranceic",
"color_f0f0f0": "translateic",
"color_ededed": "rigidic",
"color_ebebeb": "closedic",
"color_d9d9d9": "crazeic",
"color_9b9595": "veterinaryic",
"color_8b8b8b": "uselesslyic",
"color_999999": "planetariumic",
"color_fafafa": "realtyic"
},
"dimen_ids": {
"dp_300": "earnestlyic",
"dp_150": "extraordinarilyic",
"dp_40": "flirtatiousic",
"dp_20": "gaspic",
"dp_50": "unkemptic",
"dp_30": "waterbedic",
"dp_80": "hundredthic",
"dp_10": "wokeic",
"dp_16": "accompanistic",
"dp_15": "fruitfulic",
"dp_2": "speedilyic",
"sp_16": "precinctic",
"sp_12": "thumbtackic",
"dp_8": "pollinateic",
"dp_180": "ironic",
"dp_98": "beyondic",
"dp_118": "definitiveic",
"dp_18": "peric",
"sp_17": "meleeic",
"dp_35": "amazinglyic",
"dp_5": "thickic",
"dp_90": "proposeic",
"dp_45": "invisiblyic",
"sp_18": "embroideric",
"dp_4": "shamic",
"dp_60": "generalic",
"sp_14": "tuxic",
"dp_12": "philistineic",
"dp_14": "thirstilyic",
"sp_20": "misteric",
"dp_70": "ambitiousic",
"dp_38": "environmentic",
"dp_320": "flueic",
"dp_330": "skillic",
"dp_55": "peppyic",
"dp_6": "tinkeric",
"dp_345": "rotundic",
"sp_15": "minusculeic",
"dp_295": "wheelic",
"dp_306": "insurrectionic",
"dp_136": "serviceableic",
"dp_24": "lengthic",
"sp_13": "excuseic",
"dp_260": "panicic"
},
"style_ids": {
"Base.Theme.BaseAppTheme": "domicileic",
"Theme.AppTheme": "impasseic",
"splash.theme": "himic",
"BottomSheetDialog": "carburetoric",
"BottomSheetStyleWrapper": "sheepishic"
},
"styleable": {
"NativeParentView": "inventoryic",
"removeAll_A": "revivalic",
"TripleSeekBar": "whalingic",
"default_color_A": "qualifieric",
"selected_color_A": "governmentic",
"line_height_A": "amidic",
"width_A": "nonviolentic"
},
"view_ids": {
"clTop": "successoric",
"ivBack": "cataclysmic",
"rv": "satanismic",
"tvBtn": "foreplayic",
"layoutAnimation": "cleftic",
"llTitle": "abstinenceic",
"tvTitle": "phantomic",
"idLottie": "composureic",
"tvCleanedUp": "tautlyic",
"rvResult": "repairic",
"main": "delicateic",
"ivYanhua": "Bibleic",
"tvNumber": "underwroteic",
"tvType": "loftic",
"tvSuccess": "expelic",
"tvDir": "unwarrantedic",
"tvContinue": "invisibilityic",
"tvFinish": "clingic",
"flFanhui": "unleadedic",
"tvRecover": "predominantic",
"llDate": "trapperic",
"ivDate": "pageric",
"llSize": "holdoveric",
"ivSize": "shamefullyic",
"llLayout": "despicableic",
"ivLayout": "lifeguardic",
"llAllSelect": "establishic",
"flSelectAll": "scamperic",
"ivSelectAll": "epilogueic",
"clThumbnails": "aceic",
"tvThumbnails": "sherbetic",
"tvThumbnailsTip": "bowleggedic",
"switchThumbnails": "securelyic",
"llFilter": "dualic",
"rvFilter": "internalic",
"tvTittle": "gargleic",
"llFinish": "unrelentingic",
"ivWancheng": "compostic",
"tvScanning": "bottledic",
"line": "fluentic",
"tvFileNumber": "adolescentic",
"tvFileType": "blabbermouthic",
"tvFolderNumber": "braveryic",
"flEmpty": "handlebaric",
"viewpager2": "embezzleic",
"tv": "behindic",
"ll": "kernelic",
"llPhoto": "crossfireic",
"iv1": "lungeic",
"llVideo": "implicitlyic",
"iv2": "capic",
"llAudio": "advertiseric",
"iv3": "neutralic",
"llDocument": "immigrateic",
"iv4": "confessionic",
"llContinue": "districtic",
"flAd": "electoralic",
"shimmerLayout": "helmetic",
"tvLength": "auditionic",
"tvUnit": "forgivingic",
"lottieScan": "modernic",
"pbProgress": "mitigateic",
"tvPath": "roundupic",
"expandableFiles": "sunburnedic",
"tvClean": "seriousic",
"llTab": "articleic",
"llType": "bathic",
"ivType": "honeysuckleic",
"ivTypeArrow": "importantlyic",
"tvSize": "refreshmentsic",
"ivSizeArrow": "trapezeic",
"llTime": "luridic",
"ivTime": "unconcernedic",
"tvTime": "featic",
"ivTimeArrow": "clockwiseic",
"ivEmpty": "bayouic",
"rvLargeFile": "digestiveic",
"tvDelete": "condominiumic",
"clTab": "withstoodic",
"tvOtherThan": "sewnic",
"rvTab": "ladyic",
"flContainer": "ludicrousic",
"viewPager2": "medicallyic",
"flBottom": "woebegoneic",
"tabLayout": "discreetic",
"flBanner": "zodiacic",
"rvCompress": "capriciousic",
"llBottom": "pulloveric",
"llSelectAll": "conceptualic",
"tvCompress": "propitiousic",
"ivOriginalImage": "dismantleic",
"tvOriginalSize": "deviceic",
"ivCompressImage": "essentiallyic",
"tvCompressSize": "uncannyic",
"clCompress": "congressionalic",
"rvPhoto": "prismic",
"llCount": "shirtsleeveic",
"tvCurrentCount": "schmaltzyic",
"tvTotalCount": "scandalousic",
"viewTriple": "pungentic",
"llTriple": "peonic",
"tvCompressAll": "empowermentic",
"flTop": "reversionic",
"ivDelete": "gapingic",
"iv": "nightic",
"ivIcon": "unyieldingic",
"ivBofang": "cradleic",
"tvRestore": "boatic",
"v": "lickic",
"clSize": "sprintic",
"fragment": "decorateic",
"clSelect": "necessaryic",
"ivSelect": "revelryic",
"llDelete": "nutcrackeric",
"guideLine": "waysideic",
"ivLogo": "pipingic",
"tvName": "caringic",
"llConsent": "backstageic",
"clBottomStart": "recognizablyic",
"tvStart": "manneric",
"tvPrivacy": "creedic",
"tvTerms": "transformationic",
"clBottomLoading": "engrossingic",
"lottieLoading": "evolveic",
"tvInvolveAd": "specialic",
"ivYuan": "undisturbedic",
"tvCountdown": "navigationic",
"ivCancel": "oxygenic",
"tvContent": "sightsic",
"tvExit": "gradientic",
"tvCleanNow": "infatuationic",
"fl": "rancidic",
"tvCancel": "leashic",
"tvConfirm": "polymeric",
"tvDesc": "newsic",
"tvN": "eachic",
"tvY": "unpredictableic",
"tvFoundNumber": "terminalic",
"clExit": "tartaric",
"tvSure": "layoffic",
"tvLog": "enmityic",
"ivClose": "sootheic",
"tvTurnOn": "hordeic",
"idFullLottie": "surrealisticic",
"idDeny": "precociousic",
"idTvAllow": "polemicic",
"tvThank": "firearmic",
"star1": "infinityic",
"star2": "treatic",
"star3": "venomousic",
"star4": "superioric",
"star5": "overstateic",
"tvSubmit": "sourdoughic",
"ivPermission": "vandalizeic",
"tvOpenSettings": "upholsteryic",
"tvSkip": "unabatedic",
"ivDian": "ragtimeic",
"tvAppName": "historyic",
"ivVips": "wayic",
"ivVip": "toxicologyic",
"llWeather": "regainic",
"ivSet": "audiovisualic",
"scrollView": "precursoric",
"flClean": "papersic",
"circleProgress": "impeccableic",
"tvUsed": "bentic",
"tvTotal": "fiddleic",
"ivScrollBottom": "polygraphic",
"llClean": "entreatyic",
"llBattery": "makeric",
"llLarge": "headlinesic",
"llDuplicate": "buttockic",
"tvDupSize": "veritableic",
"llScreenshot": "boobic",
"llPhotoCompression": "physicallyic",
"llEmpty": "lifelongic",
"tvSettings": "giantic",
"ivBlade": "visibleic",
"clSettings": "mediumic",
"clPrivacyPolicy": "furoric",
"ivPersona": "raucouslyic",
"tvPrivacyPolicy": "unableic",
"clRateUs": "disuseic",
"ivRate": "housebrokenic",
"tvRate": "probablyic",
"clVersion": "probationic",
"ivVersion": "impendingic",
"tvVersion": "semiconductoric",
"tvToken": "procureic",
"tvValue": "tweakic",
"clVideoImage": "summertimeic",
"ivImage": "formerlyic",
"ivVideo": "crystalic",
"clAudio": "contradictionic",
"ivAudio": "cliffhangeric",
"tvAudioName": "concussionic",
"tvAudioSize": "senselessic",
"ivAudioSelect": "ranchingic",
"viewLine": "starkic",
"llContent": "estateic",
"ivSelector": "complementaryic",
"tvInfo": "ideallyic",
"ivMore": "applicableic",
"tvFolder": "instinctic",
"vDian": "escapeic",
"tvTab": "dominoesic",
"clItem": "toweric",
"ivIndicator": "boundic",
"flSelector": "devotedlyic",
"llPhotoBg": "circuitic",
"ivPhoto": "babysatic",
"icon": "Cabinetic",
"clContainer": "congressmanic",
"viewBg": "stylishic",
"tvOccupies": "deepenic",
"clLarge": "buckleic",
"ivFirstPhoto": "opticalic",
"rvLargePhoto": "mundaneic",
"flTittle": "alienic",
"llSelect": "baconic",
"rvMediaColumns": "breadbasketic",
"tvCleanSize": "oppositionic",
"tvCleanSizeUnit": "roaric",
"tvSize1": "volatileic",
"tvSize2": "sensibleic",
"nativeAdView": "monumentic",
"adMedia": "backlashic",
"adHeadline": "cacheic",
"adBody": "ablazeic",
"adAppIcon": "aimlesslyic",
"adCallToAction": "anchorwomanic",
"glLine": "coopic",
"clAnimation": "twineic",
"lottieAnimation": "industrialistic",
"tvProgress": "rhapsodyic",
"includeFlAd": "obviousic",
"iconImageView": "relaxic",
"textView": "sensitivityic",
"titleTextView": "jackalic",
"optionsView": "encompassic",
"advertiserTextView": "joblessnessic",
"starRatingView": "tastelessic",
"bodyTextView": "admireic",
"mediaViewContainer": "itinerantic",
"ctaButton": "ailingic",
"tv1": "physicianic",
"tv2": "exaggerationic",
"tvMark": "cartoonistic"
},
"layout": {
"activity_battery_info_2": "prominentic",
"activity_clean_result": "whiric",
"activity_file_recovered": "freethinkingic",
"activity_file_recovery": "socioeconomicic",
"activity_file_scan_result": "battlegroundic",
"activity_guide": "decorousic",
"activity_guide_clean": "accountic",
"activity_junk_clean": "wantingic",
"activity_large_file_clean": "abortiveic",
"activity_main": "pantic",
"activity_photo_compression": "algebraicic",
"activity_photo_compression_detail": "perishablesic",
"activity_recycle_bin_detail": "emberic",
"activity_screenshot_clean": "glamorouslyic",
"activity_setting": "electrocuteic",
"activity_similar_photos": "traditionalistic",
"activity_splash": "ethnicic",
"dialog_ad_countdown": "revaluationic",
"dialog_app_exit": "proic",
"dialog_confirm": "hindsightic",
"dialog_exit_function": "standbyic",
"dialog_file_scan": "meticulousic",
"dialog_function_back": "impersonationic",
"dialog_log_content": "legiblyic",
"dialog_notification": "hitchhikeic",
"dialog_permisson_open": "ringsideic",
"dialog_rate": "jerkyic",
"dialog_recovering": "nonchalantic",
"dialog_storage": "highwayic",
"fragment_guide2": "electiveic",
"fragment_home": "litanyic",
"fragment_home2": "guardianic",
"fragment_native_full": "intoic",
"fragment_recovery": "contraryic",
"fragment_recycle_bin": "tractic",
"fragment_settings": "nightmarishic",
"item_ad": "darlingic",
"item_battery_head": "deliriumic",
"item_battery_info": "jaileric",
"item_clean_detail": "springtimeic",
"item_clean_result": "bloodstainic",
"item_document": "paradiseic",
"item_feature_rv": "camaraderieic",
"item_feature_span1": "despondentic",
"item_feature_span2": "solutionic",
"item_folder": "intestateic",
"item_folder_recovery": "coffeehouseic",
"item_home_tab": "healthfulic",
"item_junk_clean_child": "paceic",
"item_junk_clean_group": "turtleneckic",
"item_large_file_clean": "piecemealic",
"item_large_file_clean_tab": "desertic",
"item_media_columns2": "transcendentalic",
"item_media_columns3": "theoreticianic",
"item_media_columns4": "terrificic",
"item_photo_detail": "hithertoic",
"item_recovery_bin": "requestic",
"item_recovery_filter": "compellingic",
"item_rv": "appreciativelyic",
"item_screenshot_clean_child": "recessic",
"item_screenshot_clean_group": "terminologyic",
"item_similar_photos": "awaitic",
"item_similar_photos_child": "preschoolic",
"item_time_media": "insipidic",
"item_yuan_2": "quarterlyic",
"layout_admob_native_custom": "riftic",
"layout_admob_native_full": "anonymousic",
"layout_animation": "errantic",
"layout_max_native_custom": "rubellaic",
"notification_common_large": "friskyic",
"notification_common_small": "catastropheic",
"stay_notification_big": "rowdinessic",
"stay_notification_small": "amateurishic"
},
"drawable": {
"bg_328ef6_38": "hailic",
"bg_355bea_18": "complyic",
"bg_577dfd_22": "wronglyic",
"bg_577dfd_tlr20": "drearyic",
"bg_801b1b1b_15": "consensusic",
"bg_btn_4": "ventilationic",
"bg_btn_50": "manicic",
"bg_btn_90": "snowfallic",
"bg_btn_ad": "discreetlyic",
"bg_btn_enable_50": "magicianic",
"bg_circle_border_selector": "gummyic",
"bg_circle_selector": "expositionic",
"bg_e7ecff_edf5ff_blr15": "autonomyic",
"bg_enable_4": "affordableic",
"bg_enable_50": "aquaticic",
"bg_enable_no_50": "dispenseric",
"bg_f3f5f7_61": "glacialic",
"bg_f5f5f5_18": "immobilizeic",
"bg_f5f7f8_8": "harmonicaic",
"bg_f6fbff_10": "cerealic",
"bg_f8f9fa_15": "hallmarkic",
"bg_fbfbfb_20": "exorbitantic",
"bg_fe3e56_90": "matchic",
"bg_ff3434_4": "apricotic",
"bg_ffffff_10": "hostilitiesic",
"bg_ffffff_15": "tapeic",
"bg_ffffff_8": "synopsesic",
"bg_filter_large_size": "wowic",
"bg_filter_large_time": "precariousic",
"bg_filter_large_type": "nephewic",
"bg_recover_enable": "collectiveic",
"bg_ring_e7f1fd": "commentaryic",
"bg_select_fang": "procurementic",
"bg_select_yuan": "felonic",
"bg_splash": "disintegrateic",
"bg_splash_button": "absolveic",
"bg_stroke_328ef6_50": "clippingic",
"bg_stroke_577dfd_22": "simulateic",
"bg_stroke_bfbec4_15": "creditableic",
"bg_stroke_black_15": "nuzzleic",
"bg_stroke_ffffff_22": "dorsalic",
"button_border_background": "senatoric",
"icon_jiantou_down_small": "hereic",
"icon_notification_svg": "retookic",
"ic_launcher_background": "civilianic",
"ic_launcher_foreground": "evilic",
"junk_clean_progress": "restatementic",
"photo_background": "pacificic",
"shadow_background": "fishnetic",
"shadow_background_bottom": "graciousnessic",
"splash_bp": "thwartic",
"tab_large_file": "impudenceic",
"tab_recovery_selector": "fagic",
"tab_recyclebin_selector": "stalkic",
"white_background": "guardedlyic",
"white_background_24": "evidenceic",
"white_background_8": "elementaryic",
"white_background_bottom": "himselfic",
"white_background_bottom_8": "marvelousic",
"white_background_top": "arterialic",
"white_background_top_8": "puzzledic",
"ad_full": "doomedic",
"bg_bg_splash": "annexationic",
"bofang": "tranquilizeic",
"delete_b": "impressic",
"dianchi": "hockic",
"dian_1": "freehandic",
"dian_2": "dogic",
"dian_3": "overthrowic",
"doc": "shoulderic",
"du": "nimbleic",
"essentiona": "avenueic",
"fanhui_b": "surrogateic",
"flac": "patricideic",
"gxuan": "moralisticic",
"h_battery": "matriarchalic",
"h_compression": "cleverlyic",
"h_junkclean": "morningic",
"h_lagre": "critiqueic",
"h_screenshot": "infertileic",
"h_similar": "freeic",
"h_vip": "startledic",
"h_vip_s": "insolenceic",
"h_yuan": "gassyic",
"icom_persona": "inertic",
"icon": "illnessic",
"icon_apk": "puritanic",
"icon_app_file_cleaner": "cabaretic",
"icon_audios": "implementic",
"icon_audio_guide": "tellingic",
"icon_audio_junk_nor": "cinderic",
"icon_battery": "potluckic",
"icon_battery_info_push": "beginic",
"icon_clean": "wordyic",
"icon_clean_n": "homeyic",
"icon_clean_push": "questic",
"icon_clean_s": "presideic",
"icon_clean_stay": "terrorizeic",
"icon_close": "dartic",
"icon_close_pop": "anthologyic",
"icon_close_pop_blue": "impairmentic",
"icon_compression": "robberyic",
"icon_compression_push": "competeic",
"icon_current_average": "boondocksic",
"icon_documents": "trafficic",
"icon_documents_stay": "sporadicallyic",
"icon_document_guide": "treatmentic",
"icon_down": "airmailic",
"icon_duplicate_photos": "colorlessic",
"icon_electric_current": "moralityic",
"icon_empty": "legislatureic",
"icon_fang_n": "submissionic",
"icon_fang_s": "unmarriedic",
"icon_file": "virtuallyic",
"icon_jiantou": "sanityic",
"icon_jiantou_up_small": "operaic",
"icon_large_file_cleaner_push": "repentic",
"icon_large_file_cleanner": "enshrineic",
"icon_log": "heavensic",
"icon_mb_file_n": "fretfulic",
"icon_mb_file_s": "ministryic",
"icon_n": "estuaryic",
"icon_next": "presentlyic",
"icon_photos": "antipathyic",
"icon_photos_stay": "autoic",
"icon_photo_guide": "garageic",
"icon_qita_file_cleaner": "rehearseic",
"icon_rate": "abilityic",
"icon_recovery_n": "sliveric",
"icon_recovery_s": "sprungic",
"icon_recyclebin_n": "southeastwardic",
"icon_recyclebin_s": "tendic",
"icon_return_b": "hacksawic",
"icon_return_w": "determinationic",
"icon_right_tool": "precipitationic",
"icon_screenshot_cleaner": "cleanlinessic",
"icon_screenshot_clean_push": "slingshotic",
"icon_set": "dotingic",
"icon_similar_pictures_push": "expressic",
"icon_star_n": "hardyic",
"icon_star_s": "streetic",
"icon_technology": "etherealic",
"icon_time_file_n": "stubbornic",
"icon_time_file_s": "alleyic",
"icon_tixing": "subletic",
"icon_type_file_n": "murdereric",
"icon_type_file_s": "fibic",
"icon_up": "minceic",
"icon_version": "overtimeic",
"icon_videos": "innocentic",
"icon_videos_stay": "unfoldic",
"icon_video_guide": "independenceic",
"icon_voltage": "nominalic",
"icon_weixuanzhong_photo_off": "watchwordic",
"icon_wenjianx": "generousic",
"icon_xingzuo": "impostoric",
"icon_yinping": "feudalic",
"icon_yuan_n": "closenessic",
"icon_yuan_s": "ingratiatingic",
"image": "diaryic",
"image_guide_1": "satinic",
"image_guide_2": "retroactivelyic",
"image_guide_3": "schoolgirlic",
"image_set": "exhortationic",
"img_after_photo": "pallbeareric",
"img_before_photo": "hilarityic",
"img_bj_pop": "hereinic",
"img_pingjia": "squirtic",
"img_play_file_small": "insultingic",
"img_quanxian_pop": "petiteic",
"jianotu": "whineric",
"jiazai_scan": "enrichmentic",
"mp3": "protestic",
"pdf": "shuntic",
"ppt": "jukeboxic",
"qiehuan": "ostentatiousic",
"quanxuan_n": "chapsic",
"quanxuan_s": "hallucinogenicic",
"queshengtu": "drowsyic",
"queshengye": "thermosic",
"quit": "determineic",
"shouqi": "cleanseric",
"tab_clean_selector": "inspirationalic",
"tancuang": "merrilyic",
"temp": "enlargeic",
"tianqi": "connoisseuric",
"tubg_yanhua": "butterflyic",
"tuicon": "specimenic",
"tu_yanhua": "thesaurusic",
"t_weixuan": "prohibitic",
"t_xuan": "spasticic",
"videotu": "astonishinglyic",
"wancheng": "humidityic",
"wav": "curtainic",
"wenjianjia": "organismic",
"xls": "adjunctic",
"zhankai": "jauntyic",
"zhanwei1": "inhospitableic",
"zhuanquan": "corkic"
},
"mipmap": {
"ic_launcher": "nozzleic",
"ic_launcher_round": "magneticic",
"logo": "gumic"
},
"xml": {
"backup_rules": "construeic",
"data_extraction_rules": "violationic",
"file_paths": "leveric"
},
"dir": {
"com.dumpster.cleaner": "birthplaceic.infusionic",
"com.dumpster.cleaner.base": "birthplaceic.infusionic.drudgeic",
"com.dumpster.cleaner.bean": "birthplaceic.infusionic.trinketic.peddleic",
"com.dumpster.cleaner.utils": "birthplaceic.infusionic.tousleic.connectedic",
"com.dumpster.cleaner.ui.set": "tuneric",
"com.dumpster.cleaner.ui.main": "hypersensitiveic",
"com.dumpster.cleaner.ui.clean": "homemadeic.referendaic.barbiturateic",
"com.dumpster.cleaner.ui.guide": "hazeic.obedientic",
"com.dumpster.cleaner.ui.views": "hammeric.agreeableic.overranic",
"com.dumpster.cleaner.bean.push": "birthplaceic.infusionic.trinketic.peddleic.conciseic.archaicic.restlesslyic",
"com.dumpster.cleaner.ui.dialog": "eightyic.liveic.prerequisiteic",
"com.dumpster.cleaner.ui.splash": "windowic.pastryic.patheticallyic",
"com.dumpster.cleaner.ui.adapter": "injureic.oldieic",
"com.dumpster.cleaner.ui.similar": "horseic.grandchildic",
"com.dumpster.cleaner.bean.config": "birthplaceic.infusionic.trinketic.peddleic.muggingic.shinyic",
"com.dumpster.cleaner.ui.recovery": "misuseic",
"com.dumpster.cleaner.business.ads": "arrogantlyic",
"com.dumpster.cleaner.ui.largefile": "owneric",
"com.dumpster.cleaner.bean.recovery": "birthplaceic.infusionic.trinketic.peddleic.quadrupedic",
"com.dumpster.cleaner.ui.recyclebin": "screamic.whoic",
"com.dumpster.cleaner.ui.screenshot": "excitableic.exemptic",
"com.dumpster.cleaner.ui.batteryinfo": "disastrouslyic",
"com.dumpster.cleaner.ui.cleanresult": "taffyic",
"com.dumpster.cleaner.business.helper": "tightwadic.sedimentic",
"com.dumpster.cleaner.business.billing": "strivenic",
"com.dumpster.cleaner.business.service": "emanateic.stratifyic",
"com.dumpster.cleaner.business.push.fcm": "anagramic.incapableic",
"com.dumpster.cleaner.business.ads.admob": "arrogantlyic.distrustfullyic",
"com.dumpster.cleaner.business.push.work": "forwardsic.ponyic.musicic",
"com.dumpster.cleaner.business.push.timer": "pasteurizationic.cartic",
"com.dumpster.cleaner.ui.photocompression": "rearic.hollowic",
"com.dumpster.cleaner.business.ads.applovin": "arrogantlyic.fridgeic",
"com.dumpster.cleaner.business.push.receiver": "jerseyic.spaceic",
"com.dumpster.cleaner.business.push.notification": "weakic"
},
"class": {
"FCMManager": "Craggyic",
"FcmReceiver": "Prideic",
"MessagingService": "Clutchic",
"AdCountDownDialog": "Itemizeic",
"AdEvent": "Pussyfootic",
"AdsMgr": "Roomic",
"AdsShowCallBack": "Driveric",
"AdState": "Mantleic",
"AdsType": "Maniacic",
"AdBannerMgr": "Energeticallyic",
"AdInterMgr": "Brandishic",
"AdmobEvent": "Deathbedic",
"AdNativeMgr": "Planneric",
"AdOpenMgr": "Tyrannyic",
"AdMaxEvent": "Fatalityic",
"MaxInsertMgr": "Shopic",
"MaxNativeMgr": "Representic",
"MaxOpenMgr": "Oneselfic",
"LimitUtils": "Limoic",
"NativeParentView": "Indigestibleic",
"SolarEngineEvent": "Greatnessic",
"BaseActivity": "Rumoric",
"BaseFragment": "Outbackic",
"MyApplication": "Slingic",
"SpConstObject": "Frequentic",
"ActivityLauncher": "Radaric",
"ActivityManagerUtils": "Vocalic",
"AppPreferences": "Autopsyic",
"BarUtils": "Hystericallyic",
"BatteryUtils": "Diagnoseic",
"ClickTimesUtils": "Simmeric",
"ClipboardUtils": "Horizontallyic",
"DensityUtils": "Climbic",
"FileUtils": "Lushic",
"IntentUtils": "Maternityic",
"JsonUtils": "Tryic",
"KotlinExt": "Steamrollic",
"LogEx": "Sadic",
"MediaUtils": "YWCAic",
"MineTypeUtils": "Farmhouseic",
"MyAnimationUtils": "Toolic",
"PermissionUtils": "Downsizeic",
"SolarEngineUtils": "Fascistic",
"SpStringUtils": "Ganglandic",
"ToastUtils": "Terraceic",
"UmpUtils": "Provenic",
"Utils": "Pressureic",
"VpnStatusListener": "Sweatic",
"WriteLogEx": "Contraceptionic",
"XmlEx": "Negligenceic",
"NotificationInfoBean": "Socialic",
"NotificationSendBean": "Trioic",
"FeatureBean": "Exitic",
"FileBean": "Voyeurismic",
"HomeTabUIBean": "Uncouthic",
"AdConfigBean": "Facetiouslyic",
"ConfigBean": "Motorizedic",
"PopupConfigBean": "Unnoticedic",
"VipConfigBean": "Seenic",
"FolderBean": "Steakic",
"RecoveryBean": "Dineric",
"RecoveryFilterBean": "Globetrotteric",
"SimilarBean": "Rarityic",
"BatteryHeadAdapter": "Impedimentic",
"BatteryInfoActivity": "Riverbedic",
"BatteryInfoAdapter": "Equinoxic",
"BatteryReceiver": "Disagreeic",
"AppExitDialog": "Syrupic",
"ConfirmDialog": "Addictiveic",
"FunctionBackDialog": "Cataclysmicic",
"NotificationTurnOnDialog": "Sanitizeic",
"RateDialog": "Dustpanic",
"StoragePermissionDialog": "Skinheadic",
"StayJobService": "Washingic",
"StayNotification": "Varyic",
"ScreenshotCleanActivity": "Offic",
"RepeatingWorker": "Pedanticallyic",
"LogDialog": "Helpfullyic",
"Guide2Fragment": "Mackerelic",
"GuideActivity": "Classmateic",
"GuideCleanActivity": "Aggravatingic",
"GuideFragment": "Stadiaic",
"NativeFullFragment": "Dapperic",
"JunkCleanActivity": "Bronzeic",
"SimilarPhotosActivity": "Exonerationic",
"SimilarUtils": "Activationic",
"FeatureAdapter": "Trickeryic",
"FeatureItemAdapter": "Homeopathicic",
"Home2Fragment": "Retortic",
"HomeFragment": "Religiousic",
"MainActivity": "Videocassetteic",
"MainViewModel": "Foulic",
"RecoveryFragment": "Vieic",
"YuanAdapter2": "Unattachedic",
"AdAdapter": "Autocracyic",
"CommonViewHolder": "Offeric",
"AlarmReceiver": "Butcheryic",
"ScreenStatusReceiver": "Rugbyic",
"FileFolderAdapter": "Introduceic",
"FileHexEx": "Integrationic",
"FileRecoveredActivity": "Bridleic",
"FileRecoveryActivity": "Awkwardlyic",
"FileScanDialog": "Litheic",
"FileScanResultActivity": "Forgottenic",
"FileTimeColumnsAdapter": "Anticlimacticic",
"RecoveringDialog": "Frostbiteic",
"RecoveryFilterAdapter": "Damselic",
"LargeFileCleanActivity": "Pompomic",
"TimerManager": "Jewelryic",
"CleanDetailAdapter": "Acclimationic",
"CompressionUtils": "Mattingic",
"PhotoCompressionActivity": "Passerbyic",
"PhotoCompressionDetailActivity": "Mangeic",
"TripleSeekBar": "Speakeric",
"RecycleBinAdapter": "Unspokenic",
"RecycleBinDetailActivity": "Disbeliefic",
"RecycleBinFragment": "Whoeveric",
"RecycleBinUtils": "Mathematicsic",
"GoogleSubUtil": "Eveningsic",
"CleanResultActivity": "Fenderic",
"AESHelper": "Fledic",
"EventUtils": "Wageic",
"InstallHelper": "Fezic",
"NewComUtils": "Blackberryic",
"ReportUtils": "Muddyic",
"SettingActivity": "Imposingic",
"SettingsFragment": "Romanic",
"MyNotificationManager": "Homesicknessic",
"NotificationBeanUtils": "Covetic",
"NotificationHoverUtils": "Griefic",
"NotificationUiUtil": "Sweateric",
"SplashActivity": "Zapic",
"SplashViewModel": "Responsibilityic"
}
}
\ No newline at end of file
......@@ -300,17 +300,9 @@ def sub_map_text_impl(mapping, result, skip_type, skip_name, is_reverse=True, pa
reverse = sorted(list(mapping.keys()), key=len, reverse=is_reverse)
text_result = text
patterns = sorted(mapping.keys(), key=len, reverse=is_reverse)
for pattern in patterns:
try:
print(f"正在替换 pattern: {pattern}")
text_result = re.sub(pattern, mapping[pattern], text_result)
except Exception as e:
print(f"替换失败: pattern={pattern}, 错误: {e}")
# # 遍历映射规则替换
# for name in reverse:
# text_result = re2.sub(str(name), mapping[name], text_result)
# 遍历映射规则替换
for name in reverse:
text_result = re2.sub(str(name), mapping[name], text_result)
# 方案 3:针对特定 import 的直接替换
text_result = re.sub(
......@@ -518,65 +510,13 @@ def deal_ids_type(ids_type):
sub_map = {}
for i in type_ids_mapping:
if i in type_ids_mapping and type_ids_mapping[i].startswith("android"):
continue
# mapped = type_ids_mapping[i]
#
# sub_map['<' + ids_type + ' name="' + i + '"'] = '<' + ids_type + ' name="' + mapped + '"'
# sub_map['<item name="' + i + '"(.*? type="' + ids_type + '")>'] = '<item name="' + mapped + '"\\g<1>>'
# sub_map[r'(?<=[^\.])R\.' + ids_type + r'\.' + re.escape(i) + r'(?=\W)'] = 'R.' + ids_type + '.' + mapped
# sub_map[r'(?<=>|")@' + ids_type + '/' + re.escape(i) + r'(?=<|")'] = '@' + ids_type + '/' + mapped
# sub_map[r'(?<=[@=:])@' + ids_type + '/' + re.escape(i) + r'(?=[}"\'\s])'] = '@' + ids_type + '/' + mapped
#
# # ✅ DataBinding 表达式中所有 @xxx/yyy(包括拼接字符串等复杂表达式)
# sub_map[r'(?<=@{[^}]*?)@' + ids_type + r'/' + re.escape(i) + r'(?=[^}]*})'] = '@' + ids_type + '/' + mapped
#
# # ✅ <style name="..." parent="xxx"> 资源引用
# sub_map[r'<' + ids_type + r'(.*?) parent="' + re.escape(i) + r'"(.*?)>'] = (
# r'<' + ids_type + r'\g<1> parent="' + mapped + r'"\g<2>>'
# )
sub_map['<' + ids_type + ' name="' + i + '"'] = '<' + ids_type + ' name="' + type_ids_mapping[i] + '"'
sub_map['<item name="' + i + '"(.*? type="' + ids_type + '")>'] = '<item name="' + type_ids_mapping[
i] + '"\\g<1>>'
sub_map['<item name="' + i + '"(.*? type="' + ids_type + '")>'] = \
'<item name="' + type_ids_mapping[i] + '"\\g<1>>'
sub_map['(?<=[^\\.])R\\.' + ids_type + '\\.' + i + '(?=\\W)'] = 'R.' + ids_type + '.' + type_ids_mapping[i]
sub_map['(?<=>|")@' + ids_type + '/' + i + '(?=<|")'] = '@' + ids_type + '/' + type_ids_mapping[i]
sub_map[r'(?<=[@=:])@' + ids_type + '/' + i + r'(?=[}"\'\s])'] = '@' + ids_type + '/' + type_ids_mapping[i]
sub_map[r'(?<=@{[^}]*?)@' + ids_type + r'/' + i + r'(?=[^}]*})'] = '@' + ids_type + '/' + type_ids_mapping[
i] # ⬅ 适配 data binding 表达式
sub_map['<' + ids_type + '(.*?) parent="' + i + '"(.*?)>'] = '<' + ids_type + '\\g<1> parent="' + \
type_ids_mapping[i] + '"\\g<2>>'
escaped_i = re.escape(i)
sub_map[rf'(?<![a-zA-Z0-9_/])@{ids_type}/{escaped_i}(?![a-zA-Z0-9_])'] = f'@{ids_type}/{type_ids_mapping[i]}'
# 带包名前缀的资源路径 com.retrytech.ledgeapp.R.color.xxx
# sub_map[rf'(\b[\w\.]+)\.R\.{ids_type}\.{re.escape(i)}\b'] = rf'\1.R.{ids_type}.{type_ids_mapping[i]}'
# sub_map[
# rf'(?<!android\.)(\b[\w\.]+)\.R\.{ids_type}\.{re.escape(i)}\b'] = rf'\1.R.{ids_type}.{type_ids_mapping[i]}'
sub_map[
rf'(?<!\bandroid\.)\b([\w\.]+)\.R\.{ids_type}\.{re.escape(i)}\b'] = rf'\1.R.{ids_type}.{type_ids_mapping[i]}'
# ✅ 推荐的替换逻辑(万能适配 DataBinding 场景)
# sub_map[f'@{ids_type}/{i}'] = f'@{ids_type}/{type_ids_mapping[i]}'
# # ✅ 适配 DataBinding 表达式中包括拼接、三目等形式的字符串资源引用
# sub_map[rf'(?<=@{{[^}}]*?)@{ids_type}/{re.escape(i)}(?=[^}}]*}})'] = f'@{ids_type}/{type_ids_mapping[i]}'
# # DataBinding 表达式中字符串拼接,如:@{@string/subscribe_to+" "+@string/pro}
# sub_map[r'(?<=@{[^}]*?)@' + ids_type + r'/' + re.escape(i) + r'(?=[^}]*})'] = '@' + ids_type + '/' + \
# type_ids_mapping[i]
# sub_map['<' + ids_type + ' name="' + i + '"'] = '<' + ids_type + ' name="' + type_ids_mapping[i] + '"'
# sub_map['<item name="' + i + '"(.*? type="' + ids_type + '")>'] = \
# '<item name="' + type_ids_mapping[i] + '"\\g<1>>'
# sub_map['(?<=[^\\.])R\\.' + ids_type + '\\.' + i + '(?=\\W)'] = 'R.' + ids_type + '.' + type_ids_mapping[i]
# sub_map['(?<=>|")@' + ids_type + '/' + i + '(?=<|")'] = '@' + ids_type + '/' + type_ids_mapping[i]
# sub_map['(?<=[@=:])@' + ids_type + '/' + i + r'(?=[}"\'\s])'] = '@' + ids_type + '/' + type_ids_mapping[i]
# sub_map['<' + ids_type + '(.*?) parent="' + i + '"(.*?)>'] = \
# '<' + ids_type + '\\g<1> parent="' + type_ids_mapping[i] + '"\\g<2>>'
# # 匹配 @color/xxx 出现在 @{} 表达式中,适配 data binding 多种情况
# sub_map[r'(?<=@{[^}]*?)@' + ids_type + r'/' + i + r'(?=[^}]*})'] = '@' + ids_type + '/' + type_ids_mapping[i]
sub_map[
rf'android\.R\.color\.(\w+)'] = lambda m: 'android.R.color.' + type_ids_mapping.get(m.group(1), m.group(1))
sub_map['<' + ids_type + '(.*?) parent="' + i + '"(.*?)>'] = \
'<' + ids_type + '\\g<1> parent="' + type_ids_mapping[i] + '"\\g<2>>'
sub_map_text(sub_map)
......@@ -735,9 +675,7 @@ def replace_package_in_imports(root_path, old_package, new_package):
patterns = [
(re.compile(rf'import {re.escape(old_package)}(\.databinding\.\w+)'), rf'import {new_package}\1'),
(re.compile(rf'import {re.escape(old_package)}\.R\b'), rf'import {new_package}.R'),
(re.compile(rf'import {re.escape(old_package)}\.BuildConfig'), rf'import {new_package}.BuildConfig'),
(re.compile(rf'{re.escape(old_package)}\.R\b'), rf'{new_package}.R'),
(re.compile(rf'import {re.escape(old_package)}\.BuildConfig'), rf'import {new_package}.BuildConfig')
]
# 遍历目录中的所有文件
......@@ -791,6 +729,7 @@ def replace_package_in_imports(root_path, old_package, new_package):
# return re.findall(class_pattern, text)
def get_method_names(text, filename):
"""
获取 Java 或 Kotlin 文件中的所有方法名
......@@ -810,7 +749,6 @@ def get_method_names(text, filename):
# 匹配所有方法名
return re.findall(method_pattern, text)
def get_variable_names(text, filename):
"""
获取 Java 或 Kotlin 文件中的所有变量名
......@@ -830,7 +768,6 @@ def get_variable_names(text, filename):
# 匹配所有变量名
return re.findall(variable_pattern, text)
def get_file_names_without_extension(root_path):
"""
获取所有 `.kt` 和 `.java` 文件的路径(无扩展名)
......@@ -848,7 +785,6 @@ def get_file_names_without_extension(root_path):
# 存储每个文件名的映射关系
file_to_class_map = {}
def get_constant_names(text, filename):
"""
获取 Java 或 Kotlin 文件中的所有常量名
......@@ -974,6 +910,9 @@ def replace_with_mapped_names(all_files, name_mapping, constant_mapping):
print(f"文件 {file_path} 引用的名称已进行统一混淆处理。")
def deal_code():
print("deal_code start")
# 替换点击事件
......@@ -1020,6 +959,9 @@ def deal_code():
with open(get_path('.\\src\\main\\AndroidManifest.xml'), 'w', encoding='utf-8') as f:
f.write(text)
# 修改依赖
sub_map = {}
for i in mapping:
......@@ -1063,15 +1005,14 @@ def deal_code():
# 添加排除前缀 "styleable." 的逻辑
# 原规则匹配整个单词,添加排除前缀 "styleable." 的逻辑,并允许后面有引号的匹配
regex_pattern = r'(?<!")(?<!\bstyleable\.)\b' + i + r'\b'
dagger_pattern = rf'(?<!")(?<!\bstyleable\.)\bDaggerAppComponent\b'
obfuscated_name = class_mapping['AppComponent']
sub_map[dagger_pattern] = f'Dagger{obfuscated_name}'
# 保持原有规则的匹配,优先处理非引号的情况
sub_map[regex_pattern] = class_mapping[i]
print(class_mapping[i])
sub_map_text(sub_map)
print("类名 over")
# 混淆字典
check_obfuscation_dictionary()
print(root_path)
......@@ -1098,6 +1039,7 @@ def deal_code():
# # 第二步:替换其他文件中的引用,保证同样的混淆名
# replace_with_mapped_names(all_files, name_mapping, constant_mapping)
replace_package_in_imports(root_path, mapping[applicationId], applicationId)
......@@ -1137,45 +1079,8 @@ def deal_res_type(res_type):
sub_map = {}
for i in type_mapping:
mapped = type_mapping[i]
# 普通 R.xxx.xxx
sub_map[r'R\.' + res_type + r'\.' + re.escape(i) + r'(\W)'] = r'R.' + res_type + '.' + mapped + r'\1'
# # # 包名限定的 com.retrytech.ledgeapp.R.drawable.xxx
# sub_map[r'(\b[\w\.]+)\.R\.' + res_type + r'\.' + re.escape(
# i) + r'(\W)'] = r'\1.R.' + res_type + '.' + mapped + r'\2'
# sub_map[r'(\b[\w\.]+)\.R\.' + res_type + r'\.' + re.escape(
# i) + r'(?=[\s)\];,])'] = r'\1.R.' + res_type + '.' + mapped
# ✅ 推荐统一写法:以单词边界结尾,适配更多结尾符号(避免重复)
sub_map[rf'(\b[\w\.]+)\.R\.{res_type}\.{re.escape(i)}\b'] = rf'\1.R.{res_type}.{mapped}'
# XML 资源:@drawable/xxx
sub_map[r'(>|")@' + res_type + r'/' + re.escape(i) + r'(<|")'] = r'\1@' + res_type + '/' + mapped + r'\2'
# DataBinding 表达式中:@{ condition ? @drawable/xxx :@drawable/yyy }
# # 匹配 ? 后的资源
# sub_map[r'(?<=\? *@' + res_type + r'\/)' + re.escape(i) + r'(?= *:)'] = mapped
# # 匹配 : 后的资源
# sub_map[r'(?<=: *@' + res_type + r'\/)' + re.escape(i) + r'(?= *})'] = mapped
# ? 后的资源
sub_map[r'(?<=\? *@' + res_type + r'/)' + re.escape(i) + r'(?=\b)'] = mapped
# : 后的资源
sub_map[r'(?<=: *@' + res_type + r'/)' + re.escape(i) + r'(?=\b)'] = mapped
# ✅ 通配 DataBinding 内的任意资源引用
sub_map[r'(@\{[^}]*?)@' + res_type + r'/' + re.escape(i) + r'(?=[^}]*})'] = r'\1@' + res_type + '/' + mapped
# 通用 DataBinding 表达式中任意位置(不拆三元)
# sub_map[r'(?<=@{[^}]*?)@' + res_type + r'/' + re.escape(i) + r'(?=[^}]*})'] = '@' + res_type + '/' + mapped
# sub_map['R\\.' + res_type + '\\.' + i + '(\\W)'] = 'R.' + res_type + '.' + type_mapping[i] + '\\g<1>'
# sub_map[
# r'(\b[\w\.]+)\.R\.' + res_type + r'\.' + i + r'(\W)'
# ] = r'\1.R.' + res_type + '.' + type_mapping[i] + r'\2'
#
# sub_map['(>|")@' + res_type + '/' + i + '(<|")'] = '\\g<1>@' + res_type + '/' + type_mapping[i] + '\\g<2>'
# # 适配 DataBinding 表达式中的 @drawable/xxx 写法
# sub_map[r'(?<=@{[^}]*?)@' + res_type + r'/' + i + r'(?=[^}]*})'] = '@' + res_type + '/' + type_mapping[i]
sub_map['R\\.' + res_type + '\\.' + i + '(\\W)'] = 'R.' + res_type + '.' + type_mapping[i] + '\\g<1>'
sub_map['(>|")@' + res_type + '/' + i + '(<|")'] = '\\g<1>@' + res_type + '/' + type_mapping[i] + '\\g<2>'
sub_map_text(sub_map)
......@@ -1573,7 +1478,7 @@ def deal_res():
'R.styleable.' + styleable_mapping[styleable_id] + '_' + styleable_mapping[attr + '_A'] + '\\g<1>'
sub_map['app:' + attr + '='] = 'app:' + styleable_mapping[attr + '_A'] + '='
sub_map['\\?attr/' + attr] = '?attr/' + styleable_mapping[attr + '_A'] # 新增的替换规则
sub_map['<item name=\"' + attr + '\"'] = '<item name=\"' + styleable_mapping[attr + '_A'] + '\"' # 新增的替换规则
sub_map['<item name=\"' + attr +'\"'] = '<item name=\"' + styleable_mapping[attr + '_A'] +'\"' # 新增的替换规则
# 判断 attr 是否以 "android:" 开头
if attr.startswith("android:"):
new_attr = "android_" + attr[8:] # 去掉 "android:" 并替换为 "android_"
......@@ -1595,28 +1500,9 @@ def deal_res():
sub_map['(>|")@(\\+)?id/' + i + '(<|")'] = '\\g<1>@\\g<2>id/' + view_ids_mapping[key] + '\\g<3>'
sub_map['R\\.id\\.' + i + '(\\W)'] = 'R.id.' + view_ids_mapping[key] + '\\g<1>'
sub_map['([bB]inding\\??(?:\\.\\w+)?\\??)\\.' + key + '(\\W)'] = '\\g<1>.' + view_ids_mapping[key] + '\\g<2>'
sub_map['([bB]inding\\??(?:\\.\\w+)?\\??)\\.' + key + '\\.' + key + '(\\W)'] = '\\g<1>.' + view_ids_mapping[
key] + '.' + view_ids_mapping[key] + '\\g<2>'
sub_map['([bB]inding\\??(?:\\.\\w+)?\\??)\\.' + key +'\\.'+ key + '(\\W)'] = '\\g<1>.' + view_ids_mapping[key] +'.' +view_ids_mapping[key] +'\\g<2>'
sub_map[r'\(binding as (\w+Binding)\)\.' + key + r'(\W)'] = r'(binding as \1).' + view_ids_mapping[key] + r'\2'
sub_map['(?<=app:constraint_referenced_ids=".*?)' + i + '(?=.*?")'] = view_ids_mapping[key]
# 新增 Kotlin 特有写法适配
sub_map[r'(binding!!(?:\.\w+)*?)\.' + key + r'(\W)'] = r'\1.' + view_ids_mapping[key] + r'\2'
sub_map[r'(binding\?\?(?:\.\w+)*?)\.' + key + r'(\W)'] = r'\1.' + view_ids_mapping[key] + r'\2'
sub_map[r'(binding(?:\.\w+)*?)\.' + key + r'(\W)'] = r'\1.' + view_ids_mapping[key] + r'\2'
sub_map['this\\.' + i + '(\\W)'] = 'this.' + view_ids_mapping[key] + '\\g<1>'
sub_map['this\\.' + i + '(\\.[\\w\\?]+(?:\\([^)]*\\))?)'] = 'this.' + view_ids_mapping[key] + '\\g<1>'
# sub_map['this\\.(\\w+)(\\.[\\w\\?]+(?:\\([^)]*\\))?)'] = 'this.' + view_ids_mapping[key] + '\\g<1>\\g<2>'
sub_map['popupView\\.' + i + '(\\W)'] = 'popupView.' + view_ids_mapping[key] + '\\g<1>'
# sub_map['\\b' + i + '\\.(\\w+)(\\s*=\\s*[^\\s]+)'] = view_ids_mapping[key] + '.\\g<1>\\g<2>'
sub_map['(?<!\\()\\b' + i + '\\.(\\w+)(\\s*=\\s*[^\\s]+)'] = view_ids_mapping[key] + '.\\g<1>\\g<2>'
# sub_map['this\\.' + view_ids_mapping['title']] = 'this.title'
sub_map[r'\.into\(\s*this\.(imgIcon)\s*\)'] = r'.into(this.' + view_ids_mapping['imgIcon'] + ')'
sub_map_text(sub_map)
# 改 layout 文件名
......@@ -1656,60 +1542,6 @@ def deal_res():
# 改图片内容
deal_image()
# 主执行逻辑
mapping_file = "./mapping.json"
java_path = get_path('.\\src\\main\\java')
mapping_data = load_color_mapping(mapping_file) # 调用正确的函数
# 调试信息:检查 color_ids_mapping 内容
print("Color IDs Mapping:")
for original_color, mapped_color in mapping_data.items():
print(f"{original_color}: {mapped_color}")
# 进行文件处理
process_color_files(java_path, mapping_data)
def process_color_files(src_path, color_ids):
for root, dirs, files in os.walk(src_path):
for file in files:
if file.endswith(".kt") or file.endswith(".java"):
file_path = os.path.join(root, file)
print(f"Processing file: {file_path}")
replace_color_ids_in_file(file_path, color_ids)
def replace_color_ids_in_file(file_path, color_ids_mapping):
print("replace_color_ids_in_file")
print(color_ids_mapping)
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
if "paperedto" in content:
print(f"Found 'paperedto' in: {file_path}")
if "android.R.color.paperedto" in content:
print(f"Found 'android.R.color.paperedto' in: {file_path}")
changed = False
for original_color, mapped_color in color_ids_mapping.items():
print('original_color'+original_color)
print('mapped_color'+mapped_color)
if mapped_color in content:
pattern = r'android.R.color.' + re.escape(mapped_color) + r'(?=[^\w])'
print(pattern)
replacement = 'android.R.color.' + original_color
print(replacement)
if re.search(pattern, content):
print(f"Matched: {mapped_color} → {original_color}")
matches = re.findall(pattern, content)
if matches:
print(f"Matched: {mapped_color} → {original_color} ({len(matches)} times)")
content = re.sub(pattern, replacement, content)
changed = True
if changed:
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
def get_path(path):
paths = path.split('\\')
......@@ -1726,7 +1558,6 @@ def main():
deal_code()
def load_mapping(file_path):
"""加载 mapping.json 文件并打印内容."""
try:
......@@ -1739,7 +1570,6 @@ def load_mapping(file_path):
print(f"Error loading mapping file: {e}")
return {}
def replace_identifiers_in_file(file_path, mapping, replacements_log):
"""替换单个文件中的标识符,并存储替换的内容到 JSON 日志."""
with open(file_path, 'r', encoding='utf-8') as f:
......@@ -1817,7 +1647,6 @@ def replace_identifiers_in_file(file_path, mapping, replacements_log):
else:
print("No replacements made.")
def process_files_in_directory(directory, mapping, replacements_log):
"""处理目录下的所有文件并打印文件路径."""
for root, _, files in os.walk(directory):
......@@ -1853,32 +1682,14 @@ def solve_runapplyalso():
json.dump(replacements_log, log, ensure_ascii=False, indent=4)
print(f"\nReplacement completed. Log saved to {log_file}.")
def load_color_mapping(file_path):
"""加载 mapping.json 文件并打印内容."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
print("Loaded color Mapping:")
print(json.dumps(data, indent=4, ensure_ascii=False)) # 打印映射内容
color_ids = data.get("color_ids", {})
print(f"color_ids extracted: {color_ids}") # 检查 color_ids 是否存在
return color_ids
except (FileNotFoundError, json.JSONDecodeError) as e:
print(f"Error loading mapping file: {e}")
return {}
if __name__ == '__main__':
if os.path.exists('build.gradle'):
gradle_path = 'build.gradle'
elif os.path.exists('build.gradle.kts'):
gradle_path = '../build.gradle.kts'
gradle_path = 'build.gradle.kts'
else:
exit('找不到 build.gradle 文件')
applicationId = re.search('namespace .*?["\'](.*?)["\']', open(gradle_path, 'r', encoding='utf-8').read())[1]
print(applicationId)
main()
# solve_runapplyalso()
# solve_runapplyalso()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment