├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ └── android.yml
├── .gitignore
├── Android.mk
├── Changelog.md
├── LICENSE
├── README.md
├── app
├── build.gradle
├── lint.xml
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ ├── rules.json
│ └── xposed_init
│ ├── ic_launcher-web.png
│ ├── ic_launcher_donate-web.png
│ ├── java
│ ├── com
│ │ ├── stericson
│ │ │ ├── rootshell
│ │ │ │ ├── NativeJavaClass.java
│ │ │ │ ├── RootShell.java
│ │ │ │ ├── SanityCheckRootShell.java
│ │ │ │ ├── containers
│ │ │ │ │ └── RootClass.java
│ │ │ │ ├── exceptions
│ │ │ │ │ └── RootDeniedException.java
│ │ │ │ └── execution
│ │ │ │ │ ├── Command.java
│ │ │ │ │ ├── JavaCommand.java
│ │ │ │ │ └── Shell.java
│ │ │ └── roottools
│ │ │ │ ├── Constants.java
│ │ │ │ ├── RootTools.java
│ │ │ │ ├── SanityCheckRootTools.java
│ │ │ │ ├── containers
│ │ │ │ ├── Mount.java
│ │ │ │ ├── Permissions.java
│ │ │ │ └── Symlink.java
│ │ │ │ └── internal
│ │ │ │ ├── Installer.java
│ │ │ │ ├── InternalVariables.java
│ │ │ │ ├── Remounter.java
│ │ │ │ ├── RootToolsInternalMethods.java
│ │ │ │ └── Runner.java
│ │ └── twofortyfouram
│ │ │ └── locale
│ │ │ ├── BreadCrumber.java
│ │ │ ├── Constants.java
│ │ │ ├── Intent.java
│ │ │ └── PackageUtilities.java
│ ├── dev
│ │ └── ukanth
│ │ │ └── ufirewall
│ │ │ ├── Api.java
│ │ │ ├── InterfaceDetails.java
│ │ │ ├── InterfaceTracker.java
│ │ │ ├── MainActivity.java
│ │ │ ├── activity
│ │ │ ├── AppDetailActivity.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── CustomRulesActivity.java
│ │ │ ├── CustomScriptActivity.java
│ │ │ ├── DataDumpActivity.java
│ │ │ ├── HelpActivity.java
│ │ │ ├── LogActivity.java
│ │ │ ├── LogDetailActivity.java
│ │ │ ├── OldLogActivity.java
│ │ │ ├── ProfileActivity.java
│ │ │ ├── RulesActivity.java
│ │ │ └── StartActivity.java
│ │ │ ├── admin
│ │ │ └── AdminDeviceReceiver.java
│ │ │ ├── broadcast
│ │ │ ├── ConnectivityChangeReceiver.java
│ │ │ ├── OnBootReceiver.java
│ │ │ └── PackageBroadcast.java
│ │ │ ├── customrules
│ │ │ ├── CustomRule.java
│ │ │ └── CustomRuleDatabase.java
│ │ │ ├── events
│ │ │ ├── LogChangeEvent.java
│ │ │ ├── LogEvent.java
│ │ │ ├── RulesEvent.java
│ │ │ ├── RxCommandEvent.java
│ │ │ └── RxEvent.java
│ │ │ ├── log
│ │ │ ├── Log.java
│ │ │ ├── LogData.java
│ │ │ ├── LogDatabase.java
│ │ │ ├── LogDetailRecyclerViewAdapter.java
│ │ │ ├── LogInfo.java
│ │ │ ├── LogPreference.java
│ │ │ ├── LogPreferenceDB.java
│ │ │ ├── LogRecyclerViewAdapter.java
│ │ │ ├── LogRxEvent.java
│ │ │ ├── RecyclerItemClickListener.java
│ │ │ └── ShellCommand.java
│ │ │ ├── plugin
│ │ │ ├── BundleScrubber.java
│ │ │ ├── FireReceiver.java
│ │ │ ├── LocaleEdit.java
│ │ │ └── PluginBundleManager.java
│ │ │ ├── preferences
│ │ │ ├── CustomBinaryPreferenceFragment.java
│ │ │ ├── DefaultConnectionPref.java
│ │ │ ├── DefaultConnectionPrefDB.java
│ │ │ ├── ExpPreferenceFragment.java
│ │ │ ├── LanguagePreferenceFragment.java
│ │ │ ├── LogPreferenceFragment.java
│ │ │ ├── MultiProfilePreferenceFragment.java
│ │ │ ├── PreferencesActivity.java
│ │ │ ├── RulesPreferenceFragment.java
│ │ │ ├── SecPreferenceFragment.java
│ │ │ ├── ShareContract.java
│ │ │ ├── SharePreference.java
│ │ │ ├── SharePreferenceProvider.java
│ │ │ ├── ShareProfilePreference.java
│ │ │ ├── ShareUtils.java
│ │ │ ├── ThemePreferenceFragment.java
│ │ │ ├── UIPreferenceFragment.java
│ │ │ └── WidgetPreferenceFragment.java
│ │ │ ├── profiles
│ │ │ ├── ProfileAdapter.java
│ │ │ ├── ProfileData.java
│ │ │ ├── ProfileHelper.java
│ │ │ └── ProfilesDatabase.java
│ │ │ ├── service
│ │ │ ├── FirewallService.java
│ │ │ ├── LogService.java
│ │ │ ├── RootCommand.java
│ │ │ ├── RootShellService.java
│ │ │ ├── RootShellService2.java
│ │ │ ├── RulesApplyService.java
│ │ │ └── ToggleTileService.java
│ │ │ ├── ui
│ │ │ └── about
│ │ │ │ ├── AboutFragment.java
│ │ │ │ ├── FAQFragment.java
│ │ │ │ └── ViewPagerAdapter.java
│ │ │ ├── util
│ │ │ ├── AppIconHelperV26.java
│ │ │ ├── AppListArrayAdapter.java
│ │ │ ├── BiometricUtil.java
│ │ │ ├── CustomRuleOld.java
│ │ │ ├── DateComparator.java
│ │ │ ├── FileDialog.java
│ │ │ ├── FingerprintUtil.java
│ │ │ ├── G.java
│ │ │ ├── HtmlTagHandler.java
│ │ │ ├── ImportApi.java
│ │ │ ├── JsonHelper.java
│ │ │ ├── LocaleManager.java
│ │ │ ├── LogNetUtil.java
│ │ │ ├── PackageComparator.java
│ │ │ ├── Rule.java
│ │ │ ├── SecurityUtil.java
│ │ │ ├── SlidingTabLayout.java
│ │ │ ├── SlidingTabStrip.java
│ │ │ └── XPreferenceProvider.java
│ │ │ ├── widget
│ │ │ ├── RadialMenuWidget.java
│ │ │ ├── StatusWidget.java
│ │ │ ├── ToggleWidget.java
│ │ │ ├── ToggleWidgetActivity.java
│ │ │ ├── ToggleWidgetOld.java
│ │ │ └── ToggleWidgetOldActivity.java
│ │ │ └── xposed
│ │ │ └── XposedInit.java
│ └── net
│ │ └── margaritov
│ │ └── preference
│ │ └── colorpicker
│ │ ├── AlphaPatternDrawable.java
│ │ ├── ColorPickerDialog.java
│ │ ├── ColorPickerPanelView.java
│ │ ├── ColorPickerPreference.java
│ │ └── ColorPickerView.java
│ └── res
│ ├── convert.properties
│ ├── convert.sh
│ ├── drawable-hdpi-v11
│ ├── active.png
│ ├── error.png
│ └── question.png
│ ├── drawable-hdpi
│ ├── ic_apply.png
│ ├── ic_launcher.png
│ ├── ic_launcher_free.png
│ ├── notification.png
│ ├── notification_error.png
│ ├── notification_quest.png
│ ├── notification_warn.png
│ ├── twofortyfouram_locale_ic_menu_dontsave.png
│ ├── twofortyfouram_locale_ic_menu_help.png
│ └── twofortyfouram_locale_ic_menu_save.png
│ ├── drawable-mdpi-v11
│ ├── active.png
│ ├── error.png
│ └── question.png
│ ├── drawable-mdpi
│ ├── ic_apply.png
│ ├── ic_launcher.png
│ ├── ic_launcher_free.png
│ ├── notification.png
│ ├── notification_error.png
│ ├── notification_quest.png
│ └── notification_warn.png
│ ├── drawable-v21
│ └── ic_android_white_24dp.xml
│ ├── drawable-xhdpi-v11
│ ├── active.png
│ ├── error.png
│ └── question.png
│ ├── drawable-xhdpi
│ ├── ic_apply.png
│ ├── ic_launcher.png
│ ├── ic_launcher_free.png
│ ├── notification.png
│ ├── notification_error.png
│ ├── notification_quest.png
│ └── notification_warn.png
│ ├── drawable-xxhdpi-v11
│ ├── active.png
│ ├── error.png
│ └── question.png
│ ├── drawable-xxhdpi
│ ├── ic_apply.png
│ ├── ic_launcher.png
│ ├── ic_launcher_free.png
│ ├── notification.png
│ ├── notification_error.png
│ ├── notification_quest.png
│ └── notification_warn.png
│ ├── drawable-xxxhdpi
│ └── ic_apply.png
│ ├── drawable
│ ├── ic_action.xml
│ ├── ic_action_fingerprint.xml
│ ├── ic_allow.xml
│ ├── ic_android_white_24dp.xml
│ ├── ic_apply_menu.xml
│ ├── ic_apply_notification.xml
│ ├── ic_block_black_24dp.xml
│ ├── ic_bluetooth.xml
│ ├── ic_clean.xml
│ ├── ic_clearlog.xml
│ ├── ic_clone.xml
│ ├── ic_copy.xml
│ ├── ic_custom_rules.xml
│ ├── ic_deny.xml
│ ├── ic_exit.xml
│ ├── ic_export.xml
│ ├── ic_flow.xml
│ ├── ic_help.xml
│ ├── ic_import.xml
│ ├── ic_invert.xml
│ ├── ic_lan.xml
│ ├── ic_legend.xml
│ ├── ic_log.xml
│ ├── ic_mail.xml
│ ├── ic_menu_binary.xml
│ ├── ic_menu_exp.xml
│ ├── ic_menu_pref.xml
│ ├── ic_menu_profile.xml
│ ├── ic_menu_save.xml
│ ├── ic_menu_secure.xml
│ ├── ic_menu_translate.xml
│ ├── ic_menu_widget.xml
│ ├── ic_mobiledata.xml
│ ├── ic_preference.xml
│ ├── ic_refresh.xml
│ ├── ic_roam.xml
│ ├── ic_rules.xml
│ ├── ic_script.xml
│ ├── ic_search.xml
│ ├── ic_settings.xml
│ ├── ic_sort.xml
│ ├── ic_tether.xml
│ ├── ic_theme.xml
│ ├── ic_tor.xml
│ ├── ic_unknown.xml
│ ├── ic_vpn.xml
│ ├── ic_wifi.xml
│ ├── list_divider.xml
│ ├── plus.xml
│ ├── preview_new.png
│ ├── preview_old.png
│ ├── preview_toggle.png
│ ├── question_widget.png
│ ├── toast.xml
│ ├── twofortyfouram_locale_ic_menu_dontsave.xml
│ ├── twofortyfouram_locale_ic_menu_help.xml
│ ├── twofortyfouram_locale_ic_menu_save.xml
│ ├── widget_bg.xml
│ ├── widget_bg_focus.png
│ ├── widget_bg_pressed.png
│ ├── widget_circle_enable.xml
│ ├── widget_off.png
│ ├── widget_on.png
│ ├── zoomin.xml
│ └── zoomout.xml
│ ├── layout-land
│ └── dialog_color_picker.xml
│ ├── layout
│ ├── activity_custom_rules.xml
│ ├── activity_prefs.xml
│ ├── app_detail.xml
│ ├── apply_view.xml
│ ├── custom_toast.xml
│ ├── customscript.xml
│ ├── dialog_color_picker.xml
│ ├── file_row.xml
│ ├── fingerprint.xml
│ ├── help_about.xml
│ ├── help_about_content.xml
│ ├── help_faq_content.xml
│ ├── legend.xml
│ ├── log_recycle_item.xml
│ ├── log_view.xml
│ ├── logdetail_recycle_item.xml
│ ├── logdetail_view.xml
│ ├── main.xml
│ ├── main_list.xml
│ ├── main_list_old.xml
│ ├── main_old.xml
│ ├── onoff_widget.xml
│ ├── profile_adddialog.xml
│ ├── profile_layout.xml
│ ├── profile_main.xml
│ ├── rules.xml
│ ├── searchbar.xml
│ ├── tasker_profile.xml
│ ├── toggle_widget_layout.xml
│ ├── toggle_widget_old_layout.xml
│ ├── toggle_widget_old_view.xml
│ └── toggle_widget_view.xml
│ ├── menu
│ ├── menu_bar.xml
│ └── twofortyfouram_locale_help_save_dontsave.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ ├── ic_launcher_donate.xml
│ ├── ic_launcher_donate_round.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_donate.png
│ ├── ic_launcher_donate_round.png
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher_foreground_donate.png
│ ├── ic_launcher_round.png
│ ├── round_launcher.png
│ └── round_launcher_free.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_donate.png
│ ├── ic_launcher_donate_round.png
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher_foreground_donate.png
│ ├── ic_launcher_round.png
│ ├── round_launcher.png
│ └── round_launcher_free.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_donate.png
│ ├── ic_launcher_donate_round.png
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher_foreground_donate.png
│ ├── ic_launcher_round.png
│ ├── round_launcher.png
│ └── round_launcher_free.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_donate.png
│ ├── ic_launcher_donate_round.png
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher_foreground_donate.png
│ ├── ic_launcher_round.png
│ ├── round_launcher.png
│ └── round_launcher_free.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ ├── ic_launcher_donate.png
│ ├── ic_launcher_donate_round.png
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher_foreground_donate.png
│ ├── ic_launcher_round.png
│ ├── round_launcher.png
│ └── round_launcher_free.png
│ ├── raw
│ ├── about.html
│ ├── afwallstart
│ ├── busybox_arm
│ ├── busybox_mips
│ ├── busybox_x86
│ ├── faq.html
│ ├── ip6tables_arm
│ ├── ip6tables_mips
│ ├── ip6tables_x86
│ ├── iptables_arm
│ ├── iptables_mips
│ ├── iptables_x86
│ ├── nflog_arm
│ ├── nflog_arm64
│ ├── nflog_mips
│ └── nflog_x86
│ ├── values-af
│ └── strings.xml
│ ├── values-ar
│ └── strings.xml
│ ├── values-ast-rES
│ └── strings.xml
│ ├── values-az
│ └── strings.xml
│ ├── values-bg
│ └── strings.xml
│ ├── values-bi
│ └── strings.xml
│ ├── values-bn
│ └── strings.xml
│ ├── values-bs
│ └── strings.xml
│ ├── values-ca
│ └── strings.xml
│ ├── values-cs
│ └── strings.xml
│ ├── values-da
│ └── strings.xml
│ ├── values-de
│ └── strings.xml
│ ├── values-el
│ └── strings.xml
│ ├── values-es
│ └── strings.xml
│ ├── values-eu
│ └── strings.xml
│ ├── values-fa
│ └── strings.xml
│ ├── values-fi
│ └── strings.xml
│ ├── values-fr
│ └── strings.xml
│ ├── values-he
│ └── strings.xml
│ ├── values-hi
│ └── strings.xml
│ ├── values-hr
│ └── strings.xml
│ ├── values-hu
│ └── strings.xml
│ ├── values-in
│ └── strings.xml
│ ├── values-it
│ └── strings.xml
│ ├── values-ja
│ └── strings.xml
│ ├── values-kn
│ └── strings.xml
│ ├── values-ko
│ └── strings.xml
│ ├── values-ku
│ └── strings.xml
│ ├── values-ky
│ └── strings.xml
│ ├── values-ml-rIN
│ └── strings.xml
│ ├── values-ms
│ └── strings.xml
│ ├── values-nb
│ └── strings.xml
│ ├── values-nl
│ └── strings.xml
│ ├── values-pl
│ └── strings.xml
│ ├── values-pt-rBR
│ └── strings.xml
│ ├── values-pt
│ └── strings.xml
│ ├── values-ro
│ └── strings.xml
│ ├── values-ru
│ └── strings.xml
│ ├── values-si
│ └── strings.xml
│ ├── values-sk
│ └── strings.xml
│ ├── values-sl
│ └── strings.xml
│ ├── values-sr-rCS
│ └── strings.xml
│ ├── values-sr
│ └── strings.xml
│ ├── values-sv
│ └── strings.xml
│ ├── values-ta
│ └── strings.xml
│ ├── values-th
│ └── strings.xml
│ ├── values-tr
│ └── strings.xml
│ ├── values-uk
│ └── strings.xml
│ ├── values-ur-rPK
│ └── strings.xml
│ ├── values-v26
│ └── bools.xml
│ ├── values-vi
│ └── strings.xml
│ ├── values-w820dp
│ ├── dimens.xml
│ └── strings.xml
│ ├── values-zh-rCN
│ └── strings.xml
│ ├── values-zh-rTW
│ └── strings.xml
│ ├── values-zh
│ └── strings.xml
│ ├── values
│ ├── arrays.xml
│ ├── attrs.xml
│ ├── bools.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── ic_launcher_background.xml
│ ├── ic_launcher_background_donate.xml
│ ├── id.xml
│ ├── module_scopes.xml
│ ├── strings.xml
│ ├── strings_platform-en.xml
│ └── styles.xml
│ └── xml
│ ├── device_admin.xml
│ ├── experimental_preferences.xml
│ ├── language_preferences.xml
│ ├── log_preferences.xml
│ ├── onoff_widget.xml
│ ├── preferences_headers.xml
│ ├── profiles_preferences.xml
│ ├── rules_preferences.xml
│ ├── security_preferences.xml
│ ├── shortcuts.xml
│ ├── theme_preference.xml
│ ├── toggle_widget.xml
│ ├── toggle_widget_old.xml
│ ├── ui_custom_preferences.xml
│ ├── ui_preferences.xml
│ └── widget_preferences.xml
├── build.gradle
├── external
├── .gitignore
├── Android.mk
├── Makefile
├── dist
│ ├── busybox-1.21.1.tar.bz2
│ ├── busybox-1.26.2.tar.bz2
│ ├── busybox-config
│ ├── busybox-config_womount
│ ├── busybox-defconfig
│ ├── busybox-patches
│ │ ├── 000-customMakefile.patch
│ │ ├── 000-gcc-version.patch
│ │ ├── 001-mconf+lkc.patch
│ │ ├── 002-checklist.patch
│ │ ├── 003-a-mount-umount-fsck-df.patch
│ │ ├── 003-b-platform-mntent_r.patch
│ │ ├── 004-telnet-telnetd.patch
│ │ ├── 005-rfkill.patch
│ │ ├── 006-eject.patch
│ │ ├── 007-ifconfig_slip.patch
│ │ ├── 008-ifenslave.patch
│ │ ├── 009-watchdog.patch
│ │ ├── 010-ubiX.patch
│ │ ├── 011-ifplugd.patch
│ │ ├── 012-a-ether_ntoa-udhcpd.patch
│ │ ├── 012-b-arping.patch
│ │ ├── 012-c-ether-wake.patch
│ │ ├── 013-loadfont-setfont-conspy.patch
│ │ ├── 014-nandwrite-nanddump.patch
│ │ ├── 015-zcip.patch
│ │ ├── 016-a-swaponoff-syscalls.patch
│ │ ├── 016-b-swapon-swapoff.patch
│ │ ├── 017-a-shmget-msgget-semget-syscalls.patch
│ │ ├── 017-b-msgctl-shmctl-syscalls.patch
│ │ ├── 017-c-semctl-syscall.patch
│ │ ├── 017-d-ipcs-ipcrm.patch
│ │ ├── 017-e-semop-shmdt-syscalls.patch
│ │ ├── 017-f-syslogd-logread.patch
│ │ ├── 018-blkdiscard.patch
│ │ ├── 019-fsck.minix-mkfs.minix.patch
│ │ ├── 01_missing_interface_x86_patch.patch
│ │ ├── 020-microcom.patch
│ │ ├── 021-ipneigh-iproute-iprule.patch
│ │ ├── 022-ipv6.patch
│ │ ├── 024-hush.patch
│ │ ├── 025-readahead.patch
│ │ ├── 026-modinfo-modprobe-without-utsrel.patch
│ │ ├── 027-depmod-parameter.patch
│ │ ├── 050-dietlibc_resolver-nslookup.patch
│ │ └── 051-ash-history.patch
│ ├── iptables-1.4.20.tar.bz2
│ ├── iptables-patches
│ │ ├── 0001-iptables-correctly-reference-generated-file.patch
│ │ ├── 0002-android-libiptc-Fix-socklen_t-type-mismatch-on-Andro.patch
│ │ ├── 0003-android-Don-t-include-conflicting-headers.patch
│ │ ├── 0004-android-build-Blacklist-TCPOPTSTRIP-on-systems-that-.patch
│ │ ├── 0005-Modify-iptables-to-talk-to-xt_IDLETIMER-version-1.patch
│ │ ├── 0006-ignore-SIGPIPES.patch
│ │ ├── 0007-android-Import-latest-libxt_quota2-code-from-AOSP-4..patch
│ │ ├── 0008-android-Work-around-broken-Bionic-getaddrinfo.patch
│ │ └── 0009-ip6tables-Use-consistent-exit-code-for-EAGAIN.patch
│ └── old-pathches
│ │ └── busybox-022-ipv6.patch
├── nflog
│ ├── Android.mk
│ ├── attr.c
│ ├── callback.c
│ ├── config.h
│ ├── internal.h
│ ├── libmnl
│ │ └── libmnl.h
│ ├── linux
│ │ ├── netfilter
│ │ │ └── nfnetlink_log.h
│ │ └── netlink.h
│ ├── nflog.c
│ ├── nlmsg.c
│ └── socket.c
└── run_pie
│ ├── Android.mk
│ └── run_pie.c
├── gradle.properties
├── gradle
├── gradle.iml
├── local.properties
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── jni
└── Application.mk
├── playstore
├── feature.png
├── playstore.png
├── promo-graphic.png
└── screenshots
│ ├── Main_2.0.png
│ └── Settings_2.0.png
├── scripts
├── convert.properties
├── convert.sh
├── make
├── makeclean
└── reverse.sh
└── settings.gradle
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: "[ISSUE]"
5 | labels: Review
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **Firewall Logs**
14 | Please get the log from Menu -> Show Rules -> (menu) Export to storage and attach it here
15 |
16 | **Smartphone (please complete the following information):**
17 | - Device: [e.g. Samsung]
18 | - Android OS: [e.g. LOS 15.1 ]
19 |
20 | **Additional context**
21 | Add any other context about the problem here.
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[FEATURE]"
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/android.yml:
--------------------------------------------------------------------------------
1 | name: Android CI
2 |
3 | on:
4 | push:
5 | branches: [ beta ]
6 | pull_request:
7 | branches: [ beta ]
8 | workflow_dispatch:
9 |
10 | jobs:
11 | build:
12 |
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - uses: actions/checkout@v2
17 | - name: set up JDK
18 | uses: actions/setup-java@v1
19 | with:
20 | java-version: 17
21 | - name: Build with Gradle
22 | run: ./gradlew build
23 | - name: Upload build artifacts
24 | uses: actions/upload-artifact@v4
25 | with:
26 | name: build-artifacts
27 | path: |
28 | app/build/outputs/apk/
29 | app/build/outputs/bundle/
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 | *.ap_
4 |
5 | .DS_Store
6 |
7 | # Files for the dex VM
8 | *.dex
9 |
10 | # Java class files
11 | *.class
12 |
13 | # Auto generated files
14 | bin/
15 | gen/
16 | out/
17 | build/
18 | build.xml
19 |
20 | # Gradle wrapper
21 | gradlew
22 | gradlew.bat
23 | gradle-wrapper.jar
24 | gradle-wrapper.properties
25 |
26 | # Gradle
27 | .gradle/
28 | gradle/
29 |
30 | # Log Files
31 | *.log
32 |
33 | # Local configuration file (sdk path, etc)
34 | local.properties
35 |
36 | # Eclipse project files
37 | .classpath
38 | .project
39 | proguard/
40 |
41 | # Editor swap/save files
42 | *~
43 | *.swp
44 |
45 | # native binaries
46 | libs/
47 | obj/
48 |
49 | # IDE related
50 | .idea/
51 | *.iml
52 | app/*.iml
53 | .settings/
54 |
55 | # Proguard
56 | proguard-project.txt
57 | copy.sh
58 | make
59 | makeclean
60 |
--------------------------------------------------------------------------------
/Android.mk:
--------------------------------------------------------------------------------
1 | #/**
2 | # * Contains shared programming interfaces.
3 | # * All iptables "communication" is handled by this class.
4 | # *
5 | # * Copyright (C) 2007-2008 The Android Open Source Project
6 | # * Copyright (C) 2009-2011 Rodrigo Zechin Rosauro
7 | # * Copyright (C) 2011-2012 Umakanthan Chandran
8 | # *
9 | # * This program is free software: you can redistribute it and/or modify
10 | # * it under the terms of the GNU General Public License as published by
11 | # * the Free Software Foundation, either version 3 of the License, or
12 | # * (at your option) any later version.
13 | # *
14 | # * This program is distributed in the hope that it will be useful,
15 | # * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | # * GNU General Public License for more details.
18 | # *
19 | # * You should have received a copy of the GNU General Public License
20 | # * along with this program. If not, see .
21 | # *
22 | # * @author Rodrigo Zechin Rosauro, Umakanthan Chandran
23 | # * @version 1.1
24 | # */
25 |
26 | LOCAL_PATH:= $(call my-dir)
27 | include $(CLEAR_VARS)
28 |
29 | LOCAL_MODULE_TAGS := optional
30 |
31 | LOCAL_SRC_FILES := $(call all-java-files-under, src)
32 |
33 | LOCAL_PACKAGE_NAME := afwall
34 | LOCAL_CERTIFICATE := platform
35 |
36 | # Builds against the public SDK
37 | # LOCAL_SDK_VERSION := current
38 |
39 | include $(BUILD_PACKAGE)
40 |
41 | # This finds and builds the test apk as well, so a single make does both.
42 | include $(call all-makefiles-under,$(LOCAL_PATH))
--------------------------------------------------------------------------------
/app/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -keepattributes
2 | -keep class org.ocpsoft.prettytime.i18n.**
3 | -keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }
4 | -dontpreverify
5 | -dontoptimize
6 | -dontobfuscate
7 | -keep class dev.ukanth.ufirewall.** { *; }
8 | -optimizations !code/allocation/variable
9 |
--------------------------------------------------------------------------------
/app/src/main/assets/xposed_init:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukanth/afwall/7781903380d125a8fbfd9c7ec51b093350ebe532/app/src/main/assets/xposed_init
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukanth/afwall/7781903380d125a8fbfd9c7ec51b093350ebe532/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/ic_launcher_donate-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukanth/afwall/7781903380d125a8fbfd9c7ec51b093350ebe532/app/src/main/ic_launcher_donate-web.png
--------------------------------------------------------------------------------
/app/src/main/java/com/stericson/rootshell/NativeJavaClass.java:
--------------------------------------------------------------------------------
1 | package com.stericson.rootshell;
2 |
3 | import com.stericson.rootshell.containers.RootClass;
4 |
5 | import java.io.BufferedWriter;
6 | import java.io.File;
7 | import java.io.FileWriter;
8 | import java.io.IOException;
9 |
10 | @RootClass.Candidate
11 | public class NativeJavaClass
12 | {
13 |
14 | public NativeJavaClass(RootClass.RootArgs args)
15 | {
16 | System.out.println("NativeJavaClass says: oh hi there.");
17 | String p = "/data/data/com.android.browser/cache";
18 | File f = new File(p);
19 | String[] fl = f.list();
20 | if (fl != null)
21 | {
22 | System.out.println("Look at all the stuff in your browser's cache:");
23 | for (String af : fl)
24 | {
25 | System.out.println("-" + af);
26 | }
27 | System.out.println("Leaving my mark for posterity...");
28 | File f2 = new File(p + "/rootshell_was_here");
29 | try
30 | {
31 | FileWriter filewriter = new FileWriter(f2);
32 | BufferedWriter out = new BufferedWriter(filewriter);
33 | out.write("This is just a file created using RootShell's Sanity check tools..\n");
34 | out.close();
35 | System.out.println("Done!");
36 | }
37 | catch (IOException e)
38 | {
39 | System.out.println("...and I failed miserably.");
40 | e.printStackTrace();
41 | }
42 |
43 | }
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stericson/rootshell/exceptions/RootDeniedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the RootShell Project: https://github.com/Stericson/RootShell
3 | *
4 | * Copyright (c) 2014 Stephen Erickson, Chris Ravenscroft
5 | *
6 | * This code is dual-licensed under the terms of the Apache License Version 2.0 and
7 | * the terms of the General Public License (GPL) Version 2.
8 | * You may use this code according to either of these licenses as is most appropriate
9 | * for your project on a case-by-case basis.
10 | *
11 | * The terms of each license can be found in the root directory of this project's repository as well as at:
12 | *
13 | * * http://www.apache.org/licenses/LICENSE-2.0
14 | * * http://www.gnu.org/licenses/gpl-2.0.txt
15 | *
16 | * Unless required by applicable law or agreed to in writing, software
17 | * distributed under these Licenses is distributed on an "AS IS" BASIS,
18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 | * See each License for the specific language governing permissions and
20 | * limitations under that License.
21 | */
22 |
23 | package com.stericson.rootshell.exceptions;
24 |
25 | public class RootDeniedException extends Exception {
26 |
27 | private static final long serialVersionUID = -8713947214162841310L;
28 |
29 | public RootDeniedException(String error) {
30 | super(error);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stericson/rootshell/execution/JavaCommand.java:
--------------------------------------------------------------------------------
1 | package com.stericson.rootshell.execution;
2 |
3 | import android.content.Context;
4 |
5 | public class JavaCommand extends Command
6 | {
7 | /**
8 | * Constructor for executing Java commands rather than binaries
9 | *
10 | * @param context needed to execute java command.
11 | */
12 | public JavaCommand(int id, Context context, String... command) {
13 | super(id, command);
14 | this.context = context;
15 | this.javaCommand = true;
16 | }
17 |
18 | /**
19 | * Constructor for executing Java commands rather than binaries
20 | *
21 | * @param context needed to execute java command.
22 | */
23 | public JavaCommand(int id, boolean handlerEnabled, Context context, String... command) {
24 | super(id, handlerEnabled, command);
25 | this.context = context;
26 | this.javaCommand = true;
27 | }
28 |
29 | /**
30 | * Constructor for executing Java commands rather than binaries
31 | *
32 | * @param context needed to execute java command.
33 | */
34 | public JavaCommand(int id, int timeout, Context context, String... command) {
35 | super(id, timeout, command);
36 | this.context = context;
37 | this.javaCommand = true;
38 | }
39 |
40 |
41 | @Override
42 | public void commandOutput(int id, String line)
43 | {
44 | super.commandOutput(id, line);
45 | }
46 |
47 | @Override
48 | public void commandTerminated(int id, String reason)
49 | {
50 | // pass
51 | }
52 |
53 | @Override
54 | public void commandCompleted(int id, int exitCode)
55 | {
56 | // pass
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stericson/roottools/Constants.java:
--------------------------------------------------------------------------------
1 | package com.stericson.roottools;
2 |
3 | public class Constants
4 | {
5 | public static final String TAG = "RootTools v4.4";
6 | public static final int FPS = 1;
7 | public static final int BBA = 3;
8 | public static final int BBV = 4;
9 | public static final int GI = 5;
10 | public static final int GS = 6;
11 | public static final int GSYM = 7;
12 | public static final int GET_MOUNTS = 8;
13 | public static final int GET_SYMLINKS = 9;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/stericson/roottools/containers/Symlink.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the RootTools Project: http://code.google.com/p/RootTools/
3 | *
4 | * Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks
5 | *
6 | * This code is dual-licensed under the terms of the Apache License Version 2.0 and
7 | * the terms of the General Public License (GPL) Version 2.
8 | * You may use this code according to either of these licenses as is most appropriate
9 | * for your project on a case-by-case basis.
10 | *
11 | * The terms of each license can be found in the root directory of this project's repository as well as at:
12 | *
13 | * * http://www.apache.org/licenses/LICENSE-2.0
14 | * * http://www.gnu.org/licenses/gpl-2.0.txt
15 | *
16 | * Unless required by applicable law or agreed to in writing, software
17 | * distributed under these Licenses is distributed on an "AS IS" BASIS,
18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 | * See each License for the specific language governing permissions and
20 | * limitations under that License.
21 | */
22 |
23 | package com.stericson.roottools.containers;
24 |
25 | import java.io.File;
26 |
27 | public class Symlink
28 | {
29 | protected final File file;
30 | protected final File symlinkPath;
31 |
32 | public Symlink(File file, File path)
33 | {
34 | this.file = file;
35 | symlinkPath = path;
36 | }
37 |
38 | public File getFile()
39 | {
40 | return this.file;
41 | }
42 |
43 | public File getSymlinkPath()
44 | {
45 | return symlinkPath;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/twofortyfouram/locale/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 two forty four a.m. LLC
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 | * compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
8 | * Unless required by applicable law or agreed to in writing, software distributed under the License is
9 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and limitations under the License.
11 | */
12 |
13 | package com.twofortyfouram.locale;
14 |
15 | /**
16 | * Utility class containing constants for the Locale Developer Platform.
17 | */
18 | /*
19 | * This class is NOT part of the public API.
20 | */
21 | /* package */final class Constants
22 | {
23 | /**
24 | * Private constructor prevents instantiation
25 | *
26 | * @throws UnsupportedOperationException because this class cannot be instantiated.
27 | */
28 | private Constants()
29 | {
30 | throw new UnsupportedOperationException("This class is non-instantiable"); //$NON-NLS-1$
31 | }
32 |
33 | /**
34 | * Log tag for logcat messages generated by the Locale Developer Platform
35 | */
36 | /*
37 | * This is NOT a public API. Third party apps should NOT use this log tag for their own log messages.
38 | */
39 | /* package */static final String LOG_TAG = "LocaleApiLibrary"; //$NON-NLS-1$
40 |
41 | /**
42 | * String package name for Locale.
43 | */
44 | /*
45 | * This is NOT a public API. Third parties should NOT rely on this being the only package name for Locale.
46 | */
47 | /* package */static final String LOCALE_PACKAGE = "com.twofortyfouram.locale"; //$NON-NLS-1$
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/activity/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.activity;
2 |
3 | import android.content.Context;
4 | import android.content.ContextWrapper;
5 | import android.content.res.Configuration;
6 | import android.content.res.Resources;
7 | import android.os.Build;
8 | import android.os.LocaleList;
9 |
10 | import androidx.appcompat.app.AppCompatActivity;
11 |
12 | import java.util.Locale;
13 |
14 | public class BaseActivity extends AppCompatActivity {
15 |
16 | @Override
17 | protected void attachBaseContext(Context newBase) {
18 | super.attachBaseContext(newBase);
19 | }
20 |
21 | public static ContextWrapper wrap(Context context, Locale newLocale) {
22 |
23 | Resources res = context.getResources();
24 | Configuration configuration = res.getConfiguration();
25 |
26 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
27 | configuration.setLocale(newLocale);
28 |
29 | LocaleList localeList = new LocaleList(newLocale);
30 | LocaleList.setDefault(localeList);
31 | configuration.setLocales(localeList);
32 |
33 | context = context.createConfigurationContext(configuration);
34 |
35 | } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
36 | configuration.setLocale(newLocale);
37 | context = context.createConfigurationContext(configuration);
38 | } else {
39 | configuration.locale = newLocale;
40 | res.updateConfiguration(configuration, res.getDisplayMetrics());
41 | }
42 |
43 | return new ContextWrapper(context);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/activity/StartActivity.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.activity;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 |
6 | import dev.ukanth.ufirewall.MainActivity;
7 |
8 | public class StartActivity extends BaseActivity {
9 |
10 | /*
11 | * This activity only existed, so the user can toggle between
12 | * classic and material icon.
13 | */
14 |
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | Intent intent = new Intent(this, MainActivity.class);
19 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
20 | if (getIntent().getExtras() != null) {
21 | intent.putExtras(getIntent().getExtras());
22 | }
23 | startActivity(intent);
24 | finish();
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/admin/AdminDeviceReceiver.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.admin;
2 |
3 | import android.app.admin.DeviceAdminReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.widget.Toast;
7 |
8 | import dev.ukanth.ufirewall.R;
9 | import dev.ukanth.ufirewall.log.Log;
10 | import dev.ukanth.ufirewall.util.G;
11 |
12 |
13 | /**
14 | * This is the component that is responsible for actual device administration.
15 | * It becomes the receiver when a policy is applied. It is important that we
16 | * subclass DeviceAdminReceiver class here and to implement its only required
17 | * method onEnabled().
18 | */
19 | public class AdminDeviceReceiver extends DeviceAdminReceiver {
20 | static final String TAG = "AdminDeviceReceiver";
21 |
22 | @Override
23 | public void onEnabled(Context context, Intent intent) {
24 | super.onEnabled(context, intent);
25 | G.enableAdmin(true);
26 | Toast.makeText(context, R.string.device_admin_enabled ,Toast.LENGTH_LONG).show();
27 | Log.d(TAG, "onEnabled");
28 | }
29 |
30 | @Override
31 | public void onDisabled(Context context, Intent intent) {
32 | super.onDisabled(context, intent);
33 | G.enableAdmin(false);
34 | Toast.makeText(context, R.string.device_admin_disabled,Toast.LENGTH_LONG).show();
35 | Log.d(TAG, "onDisabled");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/customrules/CustomRule.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.customrules;
2 |
3 | import com.raizlabs.android.dbflow.annotation.Column;
4 | import com.raizlabs.android.dbflow.annotation.PrimaryKey;
5 | import com.raizlabs.android.dbflow.annotation.Table;
6 | import com.raizlabs.android.dbflow.structure.BaseModel;
7 |
8 | /**
9 | * Created by ukanth on 24/9/17.
10 | */
11 |
12 | @Table(database = CustomRuleDatabase.class)
13 | public class CustomRule extends BaseModel {
14 |
15 | @Column
16 | @PrimaryKey(autoincrement = true)
17 | long id;
18 |
19 | public long getId() {
20 | return id;
21 | }
22 |
23 | @Column
24 | private String name;
25 |
26 | @Column
27 | private String rule;
28 |
29 | @Column
30 | private long timestamp;
31 |
32 | @Column
33 | private boolean active;
34 |
35 | public CustomRule() {
36 | }
37 |
38 | public CustomRule(String name, String rule) {
39 | this.name = name;
40 | this.rule = rule;
41 | this.timestamp = System.currentTimeMillis();
42 | }
43 |
44 | public String getName() {
45 | return name;
46 | }
47 |
48 | public void setName(String name) {
49 | this.name = name;
50 | }
51 |
52 | public String getRule() {
53 | return rule;
54 | }
55 |
56 | public void setRule(String rule) {
57 | this.rule = rule;
58 | }
59 |
60 | public long getTimestamp() {
61 | return timestamp;
62 | }
63 |
64 | public void setTimestamp(long timestamp) {
65 | this.timestamp = timestamp;
66 | }
67 |
68 | public boolean isActive() {
69 | return active;
70 | }
71 |
72 | public void setActive(boolean active) {
73 | this.active = active;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/customrules/CustomRuleDatabase.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.customrules;
2 |
3 | import com.raizlabs.android.dbflow.annotation.Database;
4 |
5 | /**
6 | * Created by ukanth on 24/9/17.
7 | */
8 |
9 | @Database(name = CustomRuleDatabase.NAME, version = CustomRuleDatabase.VERSION)
10 | public class CustomRuleDatabase {
11 | public static final String NAME = "rules";
12 | public static final int VERSION = 1;
13 | }
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/events/LogChangeEvent.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.events;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * Created by ukanth on 21/8/16.
7 | */
8 |
9 | public class LogChangeEvent {
10 | public final Context ctx;
11 | public final String message;
12 |
13 | public LogChangeEvent(String message, Context ctx) {
14 | this.message = message;
15 | this.ctx = ctx;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/events/LogEvent.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.events;
2 |
3 | import android.content.Context;
4 |
5 | import dev.ukanth.ufirewall.log.LogInfo;
6 |
7 | /**
8 | * Created by ukanth on 21/8/16.
9 | */
10 |
11 | public class LogEvent {
12 | public final LogInfo logInfo;
13 | public final Context ctx;
14 |
15 | public LogEvent(LogInfo logInfo, Context ctx) {
16 | this.logInfo = logInfo;
17 | this.ctx = ctx;
18 | }
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/events/RulesEvent.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.events;
2 |
3 | import android.content.Context;
4 |
5 | /**
6 | * Created by ukanth on 21/8/16.
7 | */
8 |
9 | public class RulesEvent {
10 | public final Context ctx;
11 | public final String message;
12 |
13 | public RulesEvent(String message,Context ctx) {
14 | this.message = message;
15 | this.ctx = ctx;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/dev/ukanth/ufirewall/events/RxCommandEvent.java:
--------------------------------------------------------------------------------
1 | package dev.ukanth.ufirewall.events;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import io.reactivex.rxjava3.disposables.Disposable;
6 | import io.reactivex.rxjava3.functions.Consumer;
7 | import io.reactivex.rxjava3.subjects.PublishSubject;
8 |
9 | /**
10 | * Created by ukanth on 25/9/17.
11 | */
12 |
13 | public class RxCommandEvent {
14 | private static final PublishSubject