[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7501":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},7501,"blocker","lihenggui\u002Fblocker","lihenggui","Utilize an integrated firewall to manage application components.","",null,"Kotlin",2263,99,24,29,0,9,42,3,66.7,"Apache License 2.0",false,"main",true,[26,27,28,29],"android","compose","firewall","kotlin","2026-06-12 04:00:34","[中文README](https:\u002F\u002Fgithub.com\u002Flihenggui\u002Fblocker\u002Fblob\u002Fmain\u002FREADME.zh-CN.md)\n\n## Blocker\n[![release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Flihenggui\u002Fblocker?label=release&color=red)](https:\u002F\u002Fgithub.com\u002Flihenggui\u002Fblocker\u002Freleases)\n[![download](https:\u002F\u002Fshields.io\u002Fgithub\u002Fdownloads\u002Flihenggui\u002Fblocker\u002Ftotal?label=download)](https:\u002F\u002Fgithub.com\u002Flihenggui\u002Fblocker\u002Freleases\u002Flatest)\n[![translation](https:\u002F\u002Fweblate.sanmer.app\u002Fwidget\u002Fblocker\u002Fsvg-badge.svg)](https:\u002F\u002Fweblate.sanmer.app\u002Fengage\u002Fblocker\u002F)\n[![follow](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ffollow-Telegram-blue.svg?label=follow)](https:\u002F\u002Ft.me\u002Fblockerandroid) \n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Flihenggui\u002Fblocker)](LICENSE) \n\n\nBlocker is a component controller for Android applications that currently supports using\nPackageManager and Intent Firewall to manage the state of components. For bloated applications, many\ncomponents within the application are redundant. Blocker provides a convenient control button to\nmanage the corresponding components, enabling the disabling of unnecessary functions and saving\napplication runtime resources.  \nBlocker can be seamlessly switched between these controllers, and for application rules, you can\nexport and import them. Additionally, it is compatible with backup files generated by\nMyAndroidTools, and you can effortlessly convert them to Intent Firewall rules. The application also\nhas the potential to be extended in the future.\n\n[\u003Cimg src=\"https:\u002F\u002Ffdroid.gitlab.io\u002Fartwork\u002Fbadge\u002Fget-it-on.png\"\n     alt=\"Get it on F-Droid\"\n     height=\"80\">](https:\u002F\u002Ff-droid.org\u002Fpackages\u002Fcom.merxury.blocker\u002F)\n[\u003Cimg src=\"https:\u002F\u002Fplay.google.com\u002Fintl\u002Fen_us\u002Fbadges\u002Fimages\u002Fgeneric\u002Fen-play-badge.png\"\n     alt=\"Get it on Google Play\"\n     height=\"80\">](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.merxury.blocker)\n\n## Advantages\n1. Lightweight, don't burden the system\n2. Easy to use\n3. Supports multiple control types\n\n## Introduction to different component controllers\n### Package Manager\n\nThe Android system provides a tool called PackageManager, which is used for managing installed\napplications or obtaining information about them. One of its\nmethods, `setComponentEnabledSetting(ComponentName, int, int)`, allows an application to control\nthe state of its own components. If attempting to use this method to control components in other\napplications, a signature permission is required, or the call will fail.  \nFortunately, Android provides another tool called `pm` that allows users to control component states in command-line mode. However, the `pm` tool requires root permission to run. The following command can be used to disable a specific package or component:\n\n```\npm disable [PackageName\u002FComponentName]\n```\n\nWhether using PackageManager in the code or `pm` in command-line mode, the configurations will be written to ```\u002Fdata\u002Fsystem\u002Fusers\u002F0\u002Fpackage_restrictions.xml```.\n\n### Intent Firewall Mode\nIntent Firewall was introduced in Android 4.4.2 (API 19) and is still effective in the latest Android systems. It is integrated into the Android Framework to filter the intents sent by applications or systems. \n\n#### What Intent Firewall can do\nEach intent sent by an application is filtered by the Intent Firewall, with rules stored in XML files. The Intent Firewall updates rules immediately if changes occur in the configuration file.\n\n#### Limitations of Intent Firewall\nOnly system applications can read and write the directory where the configuration file is stored, and third-party applications do not have permission to access it.\n\n#### Differences between Intent Firewall and Package Manager\nIntent Firewall, indeed it is a firewall, it has no impact on component status. The application detects the component is on, but it just cannot start the component.\n\nFor the components disabled by PackageManager, if an application starts it, an exception will be thrown. Developers can catch this exception to know whether the component is disabled or not, so they could re-enable this component. That's the reason why the components will be enabled unexpectedly. If you are using an Intent Firewall controller, there will be no problems.\n#### References\n[Intent Firewall](https:\u002F\u002Fcarteryagemann.com\u002Fpages\u002Fandroid-intent-firewall.html)\n\n### Shizuku\u002FSui Mode\nShizuku is an application developed by Rikka, [RikkaApps\u002FShizuku](https:\u002F\u002Fgithub.com\u002FRikkaApps\u002FShizuku)\n\nStarting from Android O, if we install a Test-Only application, users could use pm command to control the command status. We could modify the install package to set it into Test-Only mode, using APIs provided by Shizuku to control the component status.\n\nTutorial for modifying APKs (Chinese Only) [[实验性功能] [开发者向]如何免Root控制应用程序组件](https:\u002F\u002Fgithub.com\u002Flihenggui\u002Fblocker\u002Fwiki\u002F%5B%E5%AE%9E%E9%AA%8C%E6%80%A7%E5%8A%9F%E8%83%BD%5D-%5B%E5%BC%80%E5%8F%91%E8%80%85%E5%90%91%5D%E5%A6%82%E4%BD%95%E5%85%8DRoot%E6%8E%A7%E5%88%B6%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%BB%84%E4%BB%B6)\n\nPlease note: For normal applications, the Shell permission in Shizuku mode is not sufficient to\nchange the switch status of components. In other words, unmodified APKs do not support non-root\nmodification. If you want to use Shizuku to modify the component status of normal applications,\nplease start Shizuku with Root privileges.  \nImplementation of this restriction in\nAOSP: [frameworks\u002Fbase\u002Fservices\u002Fcore\u002Fjava\u002Fcom\u002Fandroid\u002Fserver\u002Fpm\u002FPackageManagerService.java](https:\u002F\u002Fcs.android.com\u002Fandroid\u002Fplatform\u002Fsuperproject\u002Fmain\u002F+\u002Fmain:frameworks\u002Fbase\u002Fservices\u002Fcore\u002Fjava\u002Fcom\u002Fandroid\u002Fserver\u002Fpm\u002FPackageManagerService.java;l=3750;drc=02a77ed61cbeec253a1b49e732d1f27a9ff4b303;bpv=0;bpt=1)\n\n## Screenshot tests\n\n**Blocker** uses [Roborazzi](https:\u002F\u002Fgithub.com\u002Ftakahirom\u002Froborazzi) to do screenshot tests\nof certain screens and components. To run these tests, run the `verifyRoborazziFossDebug` or\n`recordRoborazziFossDebug` tasks. Note that screenshots are recorded on CI, using Linux, and other\nplatforms might generate slightly different images, making the tests fail.\n\n## Architecture\nThe architecture of the Blocker app is based on the architecture described in [Now in Android](https:\u002F\u002Fgithub.com\u002Fandroid\u002Fnowinandroid\u002Fblob\u002Fmain\u002Fdocs\u002FArchitectureLearningJourney.md), and it also adheres to the [official architecture guidance](https:\u002F\u002Fdeveloper.android.com\u002Ftopic\u002Farchitecture).  \nFor information on modularization, please refer to this article: [Modularization Learning Journey](https:\u002F\u002Fgithub.com\u002Fandroid\u002Fnowinandroid\u002Fblob\u002Fmain\u002Fdocs\u002FModularizationLearningJourney.md).\n\n## UI\nThe app was designed using [Material 3 guidelines](https:\u002F\u002Fm3.material.io\u002F). Learn more about the design process and obtain the [design files in Figma](https:\u002F\u002Fwww.figma.com\u002Ffile\u002FT903MNmXtahDVf1yoOgXoI\u002FBlocker).\nHuge thanks to our UI designer: [@COPtimer](https:\u002F\u002Fgithub.com\u002FCOPtimer)  \nThe Screens and UI elements are built entirely using Jetpack Compose.\n\nThe app has two themes:\n\n* Dynamic color - uses colors based on the user's current color theme (if supported)\n* Default theme - uses predefined colors when dynamic color is not supported\n\nEach theme also supports dark mode.\n\n## Translation Contributions\nDefault string resources for the Blocker app are located here:\n\n`app-compose\u002Fsrc\u002Fmain\u002Fres\u002Fvalues\u002Fstrings.xml`  \n`core\u002F[module]\u002Fsrc\u002Fmain\u002Fres\u002Fvalues\u002Fstrings.xml`  \n`sync\u002F[module]\u002Fsrc\u002Fmain\u002Fres\u002Fvalues\u002Fstrings.xml`  \n`feature\u002F[module]\u002Fsrc\u002Fmain\u002Fres\u002Fvalues\u002Fstrings.xml`  \n\nTranslate each and place them in the respective locations ([module]\u002Fsrc\u002Fmain\u002Fres\u002Fvalues-[lang]\u002Fstrings.xml).  \n\nAlternatively, you can use [Weblate](https:\u002F\u002Fweblate.sanmer.app\u002Fprojects\u002Fblocker\u002F) to translate this project. (Thanks [@SanmerDev](https:\u002F\u002Fgithub.com\u002FSanmerDev) for providing the service)\n\n## Frequently Asked Questions\n\n1. When clicking the button in Shizuku mode, the component state cannot be controlled, and an error\n   pops up: SecurityException: Shell cannot change component state for 'xx' to state 'xx'.\n\n* The Shell permission of Shizuku cannot disable unmodified application components. Please restart\n  Shizuku with Root privileges or try modifying the APK.\n\n2. What's the difference between the `foss` version and the `market` version?\n\n* You can view the detailed changes in [#619 Build & Check F-Droid version](https:\u002F\u002Fgithub.com\u002Flihenggui\u002Fblocker\u002Fpull\u002F619\u002Ffiles). The `foss` version eliminates closed-source libraries such as Firebase and GMS. Conversely, the `market` version integrates Firebase Crashlytics and Firebase Analytics services, enabling the developer to receive crash reports and usage data. This feedback makes it easier for developers to address issues or adjust features based on their usage. The version available on Google Play is the market version. If you prefer not to use analytics services, you can download the `foss` version from the [GitHub release page](https:\u002F\u002Fgithub.com\u002Flihenggui\u002Fblocker\u002Freleases) or [F-Droid](https:\u002F\u002Ff-droid.org\u002Fpackages\u002Fcom.merxury.blocker\u002F).\n","Blocker 是一个用于管理Android应用组件的控制器，支持通过PackageManager和Intent Firewall来控制组件状态。其核心功能包括轻量级设计、易于使用以及支持多种控制类型，能够帮助用户禁用臃肿应用中的冗余组件，从而节省运行时资源。此外，Blocker还允许用户导出和导入应用规则，并兼容MyAndroidTools生成的备份文件转换为Intent Firewall规则，便于管理和迁移设置。该工具非常适合需要优化设备性能或减少不必要后台活动的场景下使用。",2,"2026-06-11 03:12:47","top_language"]