├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── crash_report.yml │ └── feature_request.yml ├── dependabot.yml ├── scripts │ ├── generate_crowdin_svg.py │ └── update_bug_report_template.py └── workflows │ ├── build_debug.yml │ ├── crowdin.yml │ ├── crowdin_download.yml │ ├── crowdin_upload.yml │ ├── release.yml │ ├── telegram_updates.yml │ ├── update_bug_report.yml │ └── update_translation_progress.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── SECURITY.md ├── adblib ├── .gitignore ├── build.gradle ├── lint-baseline.xml ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── cgutman │ └── adblib │ ├── AdbBase64.java │ ├── AdbChannel.java │ ├── AdbConnection.java │ ├── AdbCrypto.java │ ├── AdbMessage.java │ ├── AdbProtocol.java │ ├── AdbStream.java │ ├── TcpChannel.java │ ├── UsbChannel.java │ └── package-info.java ├── app ├── .gitignore ├── build.gradle ├── lint-baseline.xml ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── translators.json │ ├── java │ └── in │ │ └── hridayan │ │ └── ashell │ │ ├── AshellYou.java │ │ ├── activities │ │ ├── CrashReportActivity.java │ │ └── MainActivity.java │ │ ├── adapters │ │ ├── AboutAdapter.java │ │ ├── ChangelogAdapter.java │ │ ├── CommandsAdapter.java │ │ ├── CommandsSearchAdapter.java │ │ ├── ExamplesAdapter.java │ │ ├── OnboardingAdapter.java │ │ ├── SettingsAdapter.java │ │ ├── ShellOutputAdapter.java │ │ └── WifiAdbDevicesAdapter.java │ │ ├── config │ │ ├── Const.java │ │ └── Preferences.java │ │ ├── fragments │ │ ├── AboutFragment.java │ │ ├── ChangelogFragment.java │ │ ├── ExamplesFragment.java │ │ ├── PairingFragment.java │ │ ├── home │ │ │ ├── AshellFragment.java │ │ │ ├── HomeFragment.java │ │ │ ├── OtgFragment.java │ │ │ ├── ScriptExecutorFragment.java │ │ │ └── WifiAdbFragment.java │ │ ├── settings │ │ │ ├── LookAndFeel.java │ │ │ └── SettingsFragment.java │ │ └── setup │ │ │ ├── OnboardingItem1Fragment.java │ │ │ ├── OnboardingItem2Fragment.java │ │ │ ├── OnboardingItem3Fragment.java │ │ │ └── StartFragment.java │ │ ├── items │ │ ├── ChangelogItem.java │ │ ├── CommandItems.java │ │ ├── SettingsItem.java │ │ └── WifiAdbDevicesItem.java │ │ ├── shell │ │ ├── localadb │ │ │ ├── BasicShell.java │ │ │ ├── RootShell.java │ │ │ └── ShizukuShell.java │ │ └── wifiadb │ │ │ ├── AdbMdns.java │ │ │ ├── AdbPairingNotification.java │ │ │ ├── AdbPairingNotificationWorker.java │ │ │ ├── WifiAdbConnect.java │ │ │ ├── WifiAdbConnectedDevices.java │ │ │ ├── WifiAdbPair.java │ │ │ └── WifiAdbShell.java │ │ ├── ui │ │ ├── BehaviorFAB.java │ │ ├── CategoryAbout.java │ │ ├── CoordinatedNestedScrollView.java │ │ ├── CustomSearchView.java │ │ ├── KeyboardUtils.java │ │ ├── SelectableViewWidget.java │ │ ├── ThemeUtils.java │ │ ├── ToastUtils.java │ │ ├── Transitions.java │ │ ├── bottomsheets │ │ │ ├── ChangelogBottomSheet.java │ │ │ ├── UpdateCheckerBottomSheet.java │ │ │ └── WifiAdbBottomSheet.java │ │ └── dialogs │ │ │ ├── ActionDialogs.java │ │ │ ├── DialogAnimation.java │ │ │ ├── DialogUtils.java │ │ │ ├── ErrorDialogs.java │ │ │ ├── FeedbackDialogs.java │ │ │ ├── PermissionDialogs.java │ │ │ ├── SettingsDialogs.java │ │ │ └── WifiAdbDialogUtils.java │ │ ├── utils │ │ ├── Commands.java │ │ ├── DeviceUtils.java │ │ ├── DocumentTreeUtil.java │ │ ├── HapticUtils.java │ │ ├── MiuiCheck.java │ │ ├── OtgUtils.java │ │ ├── PermissionUtils.java │ │ ├── Utils.java │ │ └── app │ │ │ ├── CrashHandler.java │ │ │ └── updater │ │ │ ├── ApkDownloader.java │ │ │ ├── ApkInstaller.java │ │ │ ├── AppUpdater.java │ │ │ ├── FetchLatestVersionCode.java │ │ │ └── ReleaseFetcher.java │ │ └── viewmodels │ │ ├── AboutViewModel.java │ │ ├── AshellFragmentViewModel.java │ │ ├── ChangelogViewModel.java │ │ ├── ExamplesViewModel.java │ │ ├── HomeViewModel.java │ │ ├── MainViewModel.java │ │ ├── SettingsItemViewModel.java │ │ └── SettingsViewModel.java │ ├── jniLibs │ ├── LICENSE.txt │ ├── arm64-v8a │ │ └── libadb.so │ ├── armeabi-v7a │ │ └── libadb.so │ ├── x86 │ │ └── libadb.so │ └── x86_64 │ │ └── libadb.so │ └── res │ ├── anim │ ├── fast_out_extra_slow_in.xml │ ├── fragment_enter.xml │ ├── fragment_exit.xml │ ├── fragment_exit_fast.xml │ ├── fragment_pop_enter.xml │ ├── fragment_pop_exit.xml │ ├── item_scale_up.xml │ ├── layout_animator.xml │ └── on_scroll_animator.xml │ ├── animator │ ├── rotate_anim.xml │ └── rotate_anim_loop.xml │ ├── drawable-night │ ├── ic_onboarding1.xml │ ├── ic_onboarding3.xml │ ├── ic_undraw_bug.xml │ ├── ic_undraw_search.xml │ └── ic_undraw_theme.xml │ ├── drawable │ ├── arrow_back.xml │ ├── circular_bg.xml │ ├── ic_404_error.xml │ ├── ic_adb.xml │ ├── ic_adb2.xml │ ├── ic_add.xml │ ├── ic_add_bookmark.xml │ ├── ic_amoled_theme.xml │ ├── ic_arrow.xml │ ├── ic_arrow_right.xml │ ├── ic_auto_update.xml │ ├── ic_bmc_logo.xml │ ├── ic_bookmark_added.xml │ ├── ic_bookmarks.xml │ ├── ic_cancel.xml │ ├── ic_cards.xml │ ├── ic_changelog.xml │ ├── ic_check.xml │ ├── ic_check_update.xml │ ├── ic_checked_filled.xml │ ├── ic_checked_outline.xml │ ├── ic_clear.xml │ ├── ic_connect.xml │ ├── ic_copy.xml │ ├── ic_counter_one.xml │ ├── ic_counter_three.xml │ ├── ic_counter_two.xml │ ├── ic_cross.xml │ ├── ic_deselect_all.xml │ ├── ic_directory.xml │ ├── ic_disable_keyboard.xml │ ├── ic_discord.xml │ ├── ic_dynamic_color.xml │ ├── ic_error.xml │ ├── ic_expand.xml │ ├── ic_feature.xml │ ├── ic_github.xml │ ├── ic_help.xml │ ├── ic_help2.xml │ ├── ic_history.xml │ ├── ic_info.xml │ ├── ic_inventory.xml │ ├── ic_language.xml │ ├── ic_license.xml │ ├── ic_link_off.xml │ ├── ic_mail.xml │ ├── ic_mode.xml │ ├── ic_no_wifi.xml │ ├── ic_notification.xml │ ├── ic_notification_error.xml │ ├── ic_numbers.xml │ ├── ic_onboarding1.xml │ ├── ic_onboarding3.xml │ ├── ic_open_in_new.xml │ ├── ic_otg.xml │ ├── ic_pallete.xml │ ├── ic_paste.xml │ ├── ic_pin.xml │ ├── ic_pinned.xml │ ├── ic_play.xml │ ├── ic_report.xml │ ├── ic_reset.xml │ ├── ic_save.xml │ ├── ic_save_24px.xml │ ├── ic_scroll.xml │ ├── ic_search.xml │ ├── ic_select_all.xml │ ├── ic_send.xml │ ├── ic_settings.xml │ ├── ic_share.xml │ ├── ic_shell.xml │ ├── ic_shizuku.xml │ ├── ic_sort.xml │ ├── ic_stop.xml │ ├── ic_stop_animated.xml │ ├── ic_stop_v2.xml │ ├── ic_styles.xml │ ├── ic_support.xml │ ├── ic_telegram.xml │ ├── ic_terminal.xml │ ├── ic_undo.xml │ ├── ic_undraw_bug.xml │ ├── ic_undraw_search.xml │ ├── ic_undraw_theme.xml │ ├── ic_version_tag.xml │ ├── ic_vibration.xml │ ├── ic_warning.xml │ ├── ic_wifi_settings.xml │ ├── ic_wireless.xml │ ├── ic_x.xml │ ├── kernelsu_logo.xml │ ├── magisk_logo.xml │ ├── rotate_reset.xml │ ├── scrollbar.xml │ ├── thumb_drawable.xml │ ├── ui_shape1.xml │ ├── ui_shape2.xml │ ├── ui_shape3.xml │ ├── ui_shape4.xml │ └── ui_shape5.xml │ ├── layout-land │ ├── fragment_ashell.xml │ └── fragment_examples.xml │ ├── layout │ ├── activity_crash_report.xml │ ├── activity_main.xml │ ├── bottom_sheet_changelog.xml │ ├── bottom_sheet_pair_and_connect.xml │ ├── bottom_sheet_update_checker.xml │ ├── category_about.xml │ ├── category_app.xml │ ├── category_contributors.xml │ ├── category_lead_dev.xml │ ├── dialog_choose_directory.xml │ ├── dialog_choose_feedback_mode.xml │ ├── dialog_connected_device.xml │ ├── dialog_latest_version.xml │ ├── dialog_loading.xml │ ├── dialog_no_otg_connection.xml │ ├── dialog_no_root.xml │ ├── dialog_no_shizuku.xml │ ├── dialog_root_perm.xml │ ├── dialog_sensitive_package_warning.xml │ ├── dialog_shizuku_perm.xml │ ├── dialog_wifi_adb_devices.xml │ ├── dialog_wifi_adb_mode.xml │ ├── fragment_about.xml │ ├── fragment_ashell.xml │ ├── fragment_changelog.xml │ ├── fragment_examples.xml │ ├── fragment_home.xml │ ├── fragment_onboarding_item1.xml │ ├── fragment_onboarding_item2.xml │ ├── fragment_onboarding_item3.xml │ ├── fragment_otg.xml │ ├── fragment_pairing.xml │ ├── fragment_script_executor.xml │ ├── fragment_settings.xml │ ├── fragment_start.xml │ ├── fragment_wifi_adb.xml │ ├── item_changelog.xml │ ├── item_settings.xml │ ├── rv_commands.xml │ ├── rv_examples.xml │ ├── rv_shell_output.xml │ ├── rv_wifi_adb_devices.xml │ ├── settings_look_and_feel.xml │ └── view_widget_selectable.xml │ ├── menu │ ├── bottom_nav_menu.xml │ └── search_bar_menu.xml │ ├── mipmap-anydpi-v26 │ └── ic_launcher.xml │ ├── mipmap-hdpi │ ├── dp_adb_otg.png │ ├── dp_drdisagree.png │ ├── dp_hridayan.png │ ├── dp_krishna.png │ ├── dp_marciozomb13.png │ ├── dp_shivam.png │ ├── dp_shizuku.png │ ├── dp_sunilpaulmathew.png │ ├── dp_weiguangtwk.png │ ├── dp_winzort.png │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_monochrome.png │ ├── shortcut_commands.png │ ├── shortcut_commands_background.png │ ├── shortcut_commands_foreground.png │ ├── shortcut_commands_monochrome.png │ ├── shortcut_settings.png │ ├── shortcut_settings_background.png │ ├── shortcut_settings_foreground.png │ └── shortcut_settings_monochrome.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_monochrome.png │ ├── shortcut_commands.png │ ├── shortcut_commands_background.png │ ├── shortcut_commands_foreground.png │ ├── shortcut_commands_monochrome.png │ ├── shortcut_settings.png │ ├── shortcut_settings_background.png │ ├── shortcut_settings_foreground.png │ └── shortcut_settings_monochrome.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_monochrome.png │ ├── shortcut_commands.png │ ├── shortcut_commands_background.png │ ├── shortcut_commands_foreground.png │ ├── shortcut_commands_monochrome.png │ ├── shortcut_settings.png │ ├── shortcut_settings_background.png │ ├── shortcut_settings_foreground.png │ └── shortcut_settings_monochrome.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_monochrome.png │ ├── shortcut_commands.png │ ├── shortcut_commands_background.png │ ├── shortcut_commands_foreground.png │ ├── shortcut_commands_monochrome.png │ ├── shortcut_settings.png │ ├── shortcut_settings_background.png │ ├── shortcut_settings_foreground.png │ └── shortcut_settings_monochrome.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ ├── ic_launcher_monochrome.png │ ├── shortcut_commands.png │ ├── shortcut_commands_background.png │ ├── shortcut_commands_foreground.png │ ├── shortcut_commands_monochrome.png │ ├── shortcut_settings.png │ ├── shortcut_settings_background.png │ ├── shortcut_settings_foreground.png │ └── shortcut_settings_monochrome.png │ ├── raw │ ├── check_animation.json │ ├── commands.json │ └── loading_dots.json │ ├── resources.properties │ ├── values-ar-rSA │ └── strings.xml │ ├── values-ar │ └── strings.xml │ ├── values-fa-rIR │ └── strings.xml │ ├── values-fr-rFR │ └── strings.xml │ ├── values-fr │ └── strings.xml │ ├── values-hi-rIN │ └── strings.xml │ ├── values-hi │ └── strings.xml │ ├── values-ja-rJP │ └── strings.xml │ ├── values-ja │ └── strings.xml │ ├── values-land │ └── styles.xml │ ├── values-night-v31 │ └── themes.xml │ ├── values-night │ └── styles.xml │ ├── values-pt-rPT │ └── strings.xml │ ├── values-pt │ └── strings.xml │ ├── values-ru-rRU │ └── strings.xml │ ├── values-ru │ └── strings.xml │ ├── values-tr-rTR │ └── strings.xml │ ├── values-tr │ └── strings.xml │ ├── values-v31 │ └── themes.xml │ ├── values-zh-rCN │ └── strings.xml │ ├── values │ ├── attrs.xml │ ├── colors.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ ├── backup_rules.xml │ ├── data_extraction_rules.xml │ ├── device_filter.xml │ ├── file_paths.xml │ └── shortcuts.xml ├── assets ├── Motion.gif ├── fdroid.png ├── github.png ├── izzy.png ├── mockups.svg ├── telegram.png ├── wirelessDebOtherDevice │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png └── wirelessDebThisDevice │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ └── 6.png ├── build.gradle ├── crowdin.yml ├── docs ├── index.html ├── style.css ├── translations-dark.svg ├── translations-light.svg └── translators.md ├── fastlane └── metadata │ └── android │ └── en-US │ ├── changelogs │ ├── 53.txt │ ├── 54.txt │ └── 55.txt │ ├── full_description.txt │ ├── images │ ├── featureGraphic.png │ ├── icon.png │ └── phoneScreenshots │ │ ├── 1.jpeg │ │ ├── 2.jpeg │ │ ├── 3.jpeg │ │ ├── 4.jpeg │ │ ├── 5.jpeg │ │ ├── 6.jpeg │ │ ├── 7.jpeg │ │ └── 8.jpeg │ ├── short_description.txt │ └── title.txt ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: DP-Hridayan 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | description: Suggest an idea for this project 4 | title: "[Feature request] " 5 | labels: [enhancement] 6 | assignees: [] 7 | 8 | body: 9 | - type: textarea 10 | id: problem-description 11 | attributes: 12 | label: Is your feature request related to a problem? Please describe. 13 | description: A clear and concise description of what the problem is. 14 | placeholder: Ex. I'm always frustrated when [...] 15 | validations: 16 | required: true 17 | 18 | - type: textarea 19 | id: solution-description 20 | attributes: 21 | label: Describe the solution you'd like 22 | description: A clear and concise description of what you want to happen. 23 | placeholder: What solution would you propose? 24 | validations: 25 | required: true 26 | 27 | - type: textarea 28 | id: alternatives-description 29 | attributes: 30 | label: Describe alternatives you've considered 31 | description: A clear and concise description of any alternative solutions or features you've considered. 32 | placeholder: Have you considered any alternative approaches? 33 | 34 | - type: textarea 35 | id: additional-context 36 | attributes: 37 | label: Additional context 38 | description: Add any other context or screenshots about the feature request here. 39 | placeholder: Any other details or screenshots that might help? 40 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gradle" 4 | directory: "/app" 5 | target-branch: "master" 6 | schedule: 7 | interval: "daily" 8 | ignore: 9 | - dependency-name: "dev.rikka.shizuku" 10 | 11 | - package-ecosystem: "gradle" 12 | directory: "/" 13 | target-branch: "master" 14 | schedule: 15 | interval: "weekly" 16 | ignore: 17 | - dependency-name: "com.android.tools.build:gradle" 18 | -------------------------------------------------------------------------------- /.github/scripts/update_bug_report_template.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | import subprocess 3 | 4 | template_path = ".github/ISSUE_TEMPLATE/bug_report.yml" 5 | 6 | try: 7 | tags = subprocess.check_output(["git", "tag", "--sort=-v:refname"]).decode().splitlines() 8 | except subprocess.CalledProcessError: 9 | tags = [] 10 | 11 | if not tags: 12 | tags = ["v0.9.0 (Initial release)"] 13 | 14 | latest_tag = tags[0] 15 | 16 | version_dropdown = { 17 | "type": "dropdown", 18 | "id": "version", 19 | "attributes": { 20 | "label": "Version", 21 | "description": "What version of aShellYou are you running?", 22 | "options": [f"{tag} (Latest)" if tag == latest_tag else tag for tag in tags], 23 | "default": 0 24 | }, 25 | "validations": { 26 | "required": True 27 | } 28 | } 29 | 30 | with open(template_path, "r") as f: 31 | template = yaml.safe_load(f) 32 | 33 | if "body" in template: 34 | for i, field in enumerate(template["body"]): 35 | if isinstance(field, dict) and field.get("type") == "dropdown" and field.get("id") == "version": 36 | template["body"][i] = version_dropdown 37 | break 38 | 39 | with open(template_path, "w") as f: 40 | yaml.dump(template, f, sort_keys=False) 41 | 42 | print("Dropdown updated with tags:", tags) 43 | -------------------------------------------------------------------------------- /.github/workflows/build_debug.yml: -------------------------------------------------------------------------------- 1 | name: Build Debug APK 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | 7 | jobs: 8 | build: 9 | name: Build Debug APK 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v3 15 | 16 | - name: Set up Java 17 | uses: actions/setup-java@v3 18 | with: 19 | distribution: 'zulu' 20 | java-version: '17' 21 | 22 | - name: Set up Android SDK 23 | uses: android-actions/setup-android@v3 24 | 25 | - name: Grant execute permission to Gradle 26 | run: chmod +x ./gradlew 27 | 28 | - name: Build Debug APK 29 | run: ./gradlew assembleDebug 30 | 31 | - name: Upload Debug APK to Artifacts 32 | uses: actions/upload-artifact@v4 33 | with: 34 | name: debug-apk 35 | path: app/build/outputs/apk/debug/*.apk 36 | -------------------------------------------------------------------------------- /.github/workflows/crowdin.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Synchronization 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | permissions: 7 | contents: write 8 | pull-requests: write 9 | 10 | jobs: 11 | 12 | synchronize-with-crowdin: 13 | name: Synchronize with Crowdin 14 | if: github.repository_owner == 'DP-Hridayan' 15 | runs-on: ubuntu-latest 16 | steps: 17 | 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | 21 | - name: Sync Translations 22 | uses: crowdin/github-action@v2 23 | with: 24 | upload_translations: false 25 | upload_sources: true 26 | download_translations: true 27 | localization_branch_name: localization 28 | create_pull_request: true 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 32 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/crowdin_download.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Download 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * 0' 6 | workflow_dispatch: 7 | 8 | permissions: 9 | contents: write 10 | pull-requests: write 11 | 12 | jobs: 13 | 14 | synchronize-with-crowdin: 15 | name: Download translations from Crowdin 16 | if: github.repository_owner == 'DP-Hridayan' 17 | runs-on: ubuntu-latest 18 | steps: 19 | 20 | - name: Checkout 21 | uses: actions/checkout@v4 22 | 23 | - name: Generate translators table 24 | id: "translators" 25 | uses: andrii-bodnar/action-crowdin-contributors@v2 26 | with: 27 | contributors_per_line: 6 28 | max_contributors: 500 29 | image_size: 32 30 | min_words_contributed: 1 31 | files: ./docs/translators.md 32 | crowdin_project_link: 'https://crowdin.com/project/ashellyou' 33 | env: 34 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 35 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 36 | 37 | - name: Save translators in assets 38 | run: 39 | printf '%s\n' '${{ steps.translators.outputs.json_report }}' > ./app/src/main/assets/translators.json 40 | 41 | - name: Download translations 42 | uses: crowdin/github-action@v2 43 | with: 44 | upload_translations: false 45 | upload_sources: false 46 | download_translations: true 47 | localization_branch_name: localization 48 | create_pull_request: true 49 | env: 50 | GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} 51 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 52 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 53 | -------------------------------------------------------------------------------- /.github/workflows/crowdin_upload.yml: -------------------------------------------------------------------------------- 1 | name: Crowdin Upload 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | paths: 7 | - 'app/src/main/res/values/strings.xml' 8 | workflow_dispatch: 9 | 10 | jobs: 11 | synchronize-with-crowdin: 12 | name: Upload source to Crowdin 13 | if: github.repository_owner == 'DP-Hridayan' 14 | runs-on: ubuntu-latest 15 | steps: 16 | 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | 20 | - name: Upload Strings 21 | uses: crowdin/github-action@v2 22 | with: 23 | upload_translations: false 24 | upload_sources: true 25 | download_translations: false 26 | localization_branch_name: localization 27 | create_pull_request: false 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 31 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 32 | -------------------------------------------------------------------------------- /.github/workflows/update_bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Update bug report yml 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | delete: 8 | tags: 9 | - 'v*' 10 | workflow_dispatch: 11 | 12 | jobs: 13 | sync_dropdown: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | with: 18 | token: ${{ secrets.PAT_TOKEN }} 19 | fetch-depth: 0 20 | 21 | - name: Set up environment 22 | run: | 23 | if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then 24 | VERSION=$(git tag --sort=-v:refname | grep '^v' | head -n 1) 25 | elif [ "${{ github.event_name }}" = "push" ]; then 26 | RAW_REF="${{ github.ref }}" 27 | VERSION="${RAW_REF##*/}" 28 | elif [ "${{ github.event_name }}" = "delete" ]; then 29 | VERSION="${GITHUB_REF##*/}" 30 | fi 31 | echo "VERSION=$VERSION" >> $GITHUB_ENV 32 | echo "EVENT=${{ github.event_name }}" >> $GITHUB_ENV 33 | 34 | - name: Configure Git 35 | run: | 36 | git config user.name "DP-Hridayan" 37 | git config user.email "hridayanofficial@gmail.com" 38 | 39 | - name: Fetch and check out master as branch 40 | run: | 41 | git fetch origin master 42 | git checkout -b master origin/master 43 | 44 | - name: Install dependencies 45 | run: | 46 | python3 -m pip install --upgrade pip 47 | pip install pyyaml 48 | 49 | - name: Modify bug report template using Python 50 | run: | 51 | python3 .github/scripts/update_bug_report_template.py 52 | 53 | - name: Commit and Push 54 | run: | 55 | git add .github/ISSUE_TEMPLATE/bug_report.yml 56 | git commit -m "Sync version dropdown: $VERSION" || echo "No changes to commit" 57 | git push origin master -------------------------------------------------------------------------------- /.github/workflows/update_translation_progress.yml: -------------------------------------------------------------------------------- 1 | name: Update Translation Progress SVG 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 */12 * * *" 7 | 8 | jobs: 9 | generate-svg: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v3 15 | with: 16 | token: ${{ secrets.PAT_TOKEN }} 17 | 18 | - name: Set up Python 19 | uses: actions/setup-python@v4 20 | with: 21 | python-version: "3.x" 22 | 23 | - name: Install dependencies 24 | run: pip install requests 25 | 26 | - name: Generate translation SVG 27 | run: python .github/scripts/generate_crowdin_svg.py 28 | env: 29 | CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} 30 | CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} 31 | 32 | - name: Update README timestamp 33 | run: | 34 | TS=$(date +%s) 35 | sed -i "s/ts=[0-9]*/ts=$TS/g" README.md 36 | 37 | - name: Configure Git 38 | run: | 39 | git config user.name "Translation Bot" 40 | git config user.email "translation-bot@example.com" 41 | 42 | - name: Commit and Push 43 | run: | 44 | git add docs/translations-light.svg docs/translations-dark.svg README.md 45 | git commit -m "Update translation progress SVG and README cache-busting timestamp" || echo "No changes to commit" 46 | git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }} HEAD:master 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .kotlin 4 | /local.properties 5 | /.idea 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | .cxx 11 | local.properties 12 | .androidide/ 13 | signing-foss.properties -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Only the [latest version](https://github.com/DP-Hridayan/ashellyou/releases/latest) of Ashell You is actively supported with security updates. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | If you discover a security vulnerability in Ashell You, please do the following: 10 | 11 | 1. **Do not open a public issue or pull request.** 12 | 2. Instead, email me directly at: **hridayanofficial@gmail.com** 13 | 3. Include as much detail as possible (e.g., steps to reproduce, logs, screenshots, etc.). 14 | 15 | >I will investigate and respond as soon as possible. Responsible disclosure is appreciated, and you will be credited in the changelog if the issue is confirmed and fixed. 16 | 17 |
18 | 19 | >[!IMPORTANT] 20 | > 21 | >- This app allows access to ADB shell commands. Use responsibly. 22 | >- Users are expected to understand the implications of executing shell commands. 23 | >- The app does not elevate privileges by itself (no root or privilege escalation). 24 | 25 | >[!TIP] 26 | >Stay secure and responsible! 27 | -------------------------------------------------------------------------------- /adblib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /adblib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdk 35 5 | 6 | defaultConfig { 7 | minSdkVersion 14 8 | targetSdkVersion 35 9 | } 10 | 11 | lint { 12 | baseline = file("lint-baseline.xml") 13 | } 14 | 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | namespace 'com.cgutman.adblib' 22 | 23 | compileOptions { 24 | sourceCompatibility JavaVersion.VERSION_17 25 | targetCompatibility JavaVersion.VERSION_17 26 | } 27 | } 28 | 29 | dependencies { 30 | api fileTree(dir: 'libs', include: ['*.jar']) 31 | testImplementation 'junit:junit:4.13.2' 32 | } 33 | -------------------------------------------------------------------------------- /adblib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/xudong/android-sdks/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /adblib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /adblib/src/main/java/com/cgutman/adblib/AdbBase64.java: -------------------------------------------------------------------------------- 1 | package com.cgutman.adblib; 2 | 3 | /** 4 | * This interface specifies the required functions for AdbCrypto to 5 | * perform Base64 encoding of its public key. 6 | * @author Cameron Gutman 7 | */ 8 | public interface AdbBase64 { 9 | /** 10 | * This function must encoded the specified data as a base 64 string, without 11 | * appending any extra newlines or other characters. 12 | * @param data Data to encode 13 | * @return String containing base 64 encoded data 14 | */ 15 | public String encodeToString(byte[] data); 16 | } 17 | -------------------------------------------------------------------------------- /adblib/src/main/java/com/cgutman/adblib/AdbChannel.java: -------------------------------------------------------------------------------- 1 | package com.cgutman.adblib; 2 | 3 | import java.io.Closeable; 4 | import java.io.IOException; 5 | 6 | /** 7 | * Created by xudong on 2/21/14. 8 | */ 9 | public interface AdbChannel extends Closeable { 10 | void readx(byte[] buffer, int length) throws IOException; 11 | 12 | void writex(AdbMessage message) throws IOException; 13 | } 14 | -------------------------------------------------------------------------------- /adblib/src/main/java/com/cgutman/adblib/TcpChannel.java: -------------------------------------------------------------------------------- 1 | package com.cgutman.adblib; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.OutputStream; 6 | import java.net.Socket; 7 | 8 | /** 9 | * Created by xudong on 2/21/14. 10 | */ 11 | public class TcpChannel implements AdbChannel { 12 | 13 | /** The underlying socket that this class uses to communicate with the target device. */ 14 | private Socket socket; 15 | 16 | /** 17 | * The input stream that this class uses to read from the socket. 18 | */ 19 | private InputStream inputStream; 20 | 21 | /** 22 | * The output stream that this class uses to read from the socket. 23 | */ 24 | private OutputStream outputStream; 25 | 26 | 27 | @Override 28 | public void readx(byte[] buffer, int length) throws IOException { 29 | 30 | int dataRead = 0; 31 | do { 32 | int bytesRead = inputStream.read(buffer, dataRead, length - dataRead); 33 | 34 | if (bytesRead < 0) 35 | throw new IOException("Stream closed"); 36 | else 37 | dataRead += bytesRead; 38 | } 39 | while (dataRead < length); 40 | } 41 | 42 | private void writex(byte[] buffer) throws IOException { 43 | outputStream.write(buffer); 44 | outputStream.flush(); 45 | } 46 | 47 | @Override 48 | public void writex(AdbMessage message) throws IOException { 49 | writex(message.getMessage()); 50 | if (message.getPayload() != null) { 51 | writex(message.getPayload()); 52 | } 53 | } 54 | 55 | @Override 56 | public void close() throws IOException { 57 | socket.close(); 58 | } 59 | 60 | public TcpChannel(Socket socket) { 61 | try { 62 | /* Disable Nagle because we're sending tiny packets */ 63 | socket.setTcpNoDelay(true); 64 | 65 | this.socket = socket; 66 | this.inputStream = socket.getInputStream(); 67 | this.outputStream = socket.getOutputStream(); 68 | 69 | 70 | } catch (IOException e) { 71 | throw new RuntimeException(e); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /adblib/src/main/java/com/cgutman/adblib/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package provides a native Java implementation of the ADB protocol. 3 | * @author Cameron Gutman 4 | */ 5 | package com.cgutman.adblib; -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /release 3 | signingConfigs/** 4 | *.jks -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Preserve the line number information for debugging stack traces. 2 | -keepattributes SourceFile,LineNumberTable 3 | 4 | # Glide-specific rules 5 | -keep public class * implements com.bumptech.glide.module.GlideModule 6 | -keep class * extends com.bumptech.glide.module.AppGlideModule { 7 | (...); 8 | } 9 | -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { 10 | **[] $VALUES; 11 | public *; 12 | } 13 | -keep class com.bumptech.glide.load.data.ParcelFileDescriptorRewinder$InternalRewinder { 14 | *** rewind(); 15 | } 16 | 17 | # General ProGuard rules to ensure meaningful stack traces 18 | -keepattributes *Annotation* 19 | -dontwarn javax.annotation.Nullable 20 | -keep class javax.annotation.** { *; } 21 | 22 | # Preserve class and method names for debugging 23 | -keepnames class * { 24 | public *; 25 | } 26 | 27 | # Keep the names of your activities, fragments, and services 28 | -keep class in.hridayan.ashell.** { *; } 29 | 30 | # For libraries you are using (e.g., Retrofit, OkHttp) 31 | -keep class retrofit2.** { *; } 32 | -keep class okhttp3.** { *; } 33 | 34 | # Add any other library rules as necessary -------------------------------------------------------------------------------- /app/src/main/assets/translators.json: -------------------------------------------------------------------------------- 1 | [{"id":"16319000","username":"DP-Hridayan","name":"Hridayan (DP-Hridayan)","translated":32539,"approved":0,"picture":"https://crowdin-static.cf-downloads.crowdin.com/avatar/16319000/medium/83750741692d1ecb16b7de139291cb30.png","languages":[{"id":"ar","name":"Arabic"},{"id":"zh-CN","name":"Chinese Simplified"},{"id":"fr","name":"French"},{"id":"hi","name":"Hindi"},{"id":"ja","name":"Japanese"},{"id":"pt-PT","name":"Portuguese"},{"id":"pt-BR","name":"Portuguese, Brazilian"},{"id":"ru","name":"Russian"},{"id":"tr","name":"Turkish"}]},{"id":"16623243","username":"R9TRH","name":"R9 #lancelot TRH (R9TRH)","translated":110,"approved":0,"picture":"https://crowdin-static.cf-downloads.crowdin.com/avatar/16623243/medium/87137f31b65ee3f2e1a137eafcf9729d.jpeg","languages":[{"id":"fa","name":"Persian"}]},{"id":"17101716","username":"jimietianxia","name":"jimietianxia","translated":90,"approved":0,"picture":"https://crowdin-static.cf-downloads.crowdin.com/avatar/17101716/medium/fd01e9074549bdf41d672bd55d739d5f_default.png","languages":[{"id":"zh-CN","name":"Chinese Simplified"}]},{"id":"16749463","username":"alex211952i","name":"AlexeiCrystal (alex211952i)","translated":59,"approved":0,"picture":"https://crowdin-static.cf-downloads.crowdin.com/avatar/16749463/medium/a5c4e3624bfd368750b8b82116a2dafb.png","languages":[{"id":"ru","name":"Russian"}]},{"id":"13410766","username":"Camellan","name":"Camellan","translated":3,"approved":0,"picture":"https://crowdin-static.cf-downloads.crowdin.com/avatar/13410766/medium/b4019516b3323e817b7e77712961de69_default.png","languages":[{"id":"ru","name":"Russian"}]},{"id":"16914423","username":"krishnassh","name":"Krishna Gopal (krishnassh)","translated":1,"approved":0,"picture":"https://crowdin-static.cf-downloads.crowdin.com/avatar/16914423/medium/ffc48179d9e2aff7be3ece42771e55ed.png","languages":[{"id":"ar","name":"Arabic"}]}] 2 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/AshellYou.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import androidx.appcompat.app.AppCompatDelegate; 6 | import com.google.android.material.color.DynamicColors; 7 | import in.hridayan.ashell.config.Preferences; 8 | import java.lang.ref.WeakReference; 9 | 10 | public class AshellYou extends Application { 11 | private static AshellYou instance; 12 | private static WeakReference contextReference; 13 | 14 | public void onCreate() { 15 | super.onCreate(); 16 | instance = this; 17 | contextReference = new WeakReference<>(getApplicationContext()); 18 | 19 | Preferences.init(); 20 | 21 | AppCompatDelegate.setDefaultNightMode(Preferences.getThemeMode()); 22 | } 23 | 24 | public static Context getAppContext() { 25 | if (contextReference == null || contextReference.get() == null) { 26 | contextReference = new WeakReference<>(AshellYou.getInstance().getApplicationContext()); 27 | } 28 | return contextReference.get(); 29 | } 30 | 31 | private static AshellYou getInstance() { 32 | if (instance == null) { 33 | instance = new AshellYou(); 34 | } 35 | return instance; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/adapters/OnboardingAdapter.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.adapters; 2 | 3 | import androidx.annotation.NonNull; 4 | import androidx.fragment.app.Fragment; 5 | import androidx.fragment.app.FragmentManager; 6 | import androidx.lifecycle.Lifecycle; 7 | import androidx.viewpager2.adapter.FragmentStateAdapter; 8 | 9 | import java.util.ArrayList; 10 | 11 | public class OnboardingAdapter extends FragmentStateAdapter { 12 | 13 | private final ArrayList fragmentList = new ArrayList<>(); 14 | 15 | public OnboardingAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) { 16 | super(fragmentManager, lifecycle); 17 | } 18 | 19 | @NonNull 20 | @Override 21 | public Fragment createFragment(int position) { 22 | return fragmentList.get(position); 23 | } 24 | 25 | public void addFragment(Fragment fragment) { 26 | fragmentList.add(fragment); 27 | } 28 | 29 | @Override 30 | public int getItemCount() { 31 | return fragmentList.size(); 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/adapters/ShellOutputAdapter.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.adapters; 2 | 3 | import android.text.Html; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import androidx.annotation.NonNull; 8 | import androidx.recyclerview.widget.RecyclerView; 9 | import com.google.android.material.textview.MaterialTextView; 10 | import in.hridayan.ashell.R; 11 | import java.util.List; 12 | 13 | /* 14 | * Created by sunilpaulmathew on November 09, 2022 15 | */ 16 | public class ShellOutputAdapter extends RecyclerView.Adapter { 17 | 18 | private final List data; 19 | 20 | public ShellOutputAdapter(List data) { 21 | this.data = data; 22 | } 23 | 24 | @NonNull 25 | @Override 26 | public ShellOutputAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 27 | View rowItem = 28 | LayoutInflater.from(parent.getContext()).inflate(R.layout.rv_shell_output, parent, false); 29 | return new ShellOutputAdapter.ViewHolder(rowItem); 30 | } 31 | 32 | @Override 33 | public void onBindViewHolder(@NonNull ShellOutputAdapter.ViewHolder holder, int position) { 34 | holder.mOutput.setText(Html.fromHtml(this.data.get(position), Html.FROM_HTML_MODE_LEGACY)); 35 | } 36 | 37 | @Override 38 | public int getItemCount() { 39 | return this.data.size(); 40 | } 41 | 42 | public static class ViewHolder extends RecyclerView.ViewHolder { 43 | private final MaterialTextView mOutput; 44 | 45 | public ViewHolder(View view) { 46 | super(view); 47 | this.mOutput = view.findViewById(R.id.shell_output); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/fragments/setup/OnboardingItem1Fragment.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.fragments.setup; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import androidx.annotation.NonNull; 8 | import androidx.fragment.app.Fragment; 9 | import in.hridayan.ashell.databinding.FragmentOnboardingItem1Binding; 10 | 11 | public class OnboardingItem1Fragment extends Fragment { 12 | 13 | private FragmentOnboardingItem1Binding binding; 14 | 15 | @Override 16 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 17 | binding = FragmentOnboardingItem1Binding.inflate(inflater, container, false); 18 | 19 | return binding.getRoot(); 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/fragments/setup/OnboardingItem2Fragment.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.fragments.setup; 2 | 3 | import android.os.Bundle; 4 | import android.view.Gravity; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.LinearLayout; 9 | import androidx.annotation.NonNull; 10 | import androidx.fragment.app.Fragment; 11 | import in.hridayan.ashell.databinding.FragmentOnboardingItem2Binding; 12 | 13 | public class OnboardingItem2Fragment extends Fragment { 14 | 15 | private FragmentOnboardingItem2Binding binding; 16 | 17 | @Override 18 | public View onCreateView( 19 | @NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 20 | binding = FragmentOnboardingItem2Binding.inflate(inflater, container, false); 21 | 22 | // We take 10% of the screen height as top margin an then assign a top margin to the disclaimer 23 | // title 24 | int screenHeight = getResources().getDisplayMetrics().heightPixels; 25 | int topMargin = (int) (screenHeight * 0.1); 26 | 27 | LinearLayout.LayoutParams params = 28 | new LinearLayout.LayoutParams( 29 | ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); 30 | params.topMargin = topMargin; 31 | params.gravity = Gravity.CENTER_HORIZONTAL; 32 | 33 | binding.disclaimer.setLayoutParams(params); 34 | 35 | return binding.getRoot(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/items/ChangelogItem.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.items; 2 | 3 | public class ChangelogItem { 4 | private String title; 5 | private String description; 6 | 7 | public ChangelogItem(String title, String description) { 8 | this.title = title; 9 | this.description = description; 10 | } 11 | 12 | public String getTitle() { 13 | return title; 14 | } 15 | 16 | public void setTitle(String title) { 17 | this.title = title; 18 | } 19 | 20 | public String getDescription() { 21 | return description; 22 | } 23 | 24 | public void setDescription(String description) { 25 | this.description = description; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/items/CommandItems.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.items; 2 | 3 | import android.content.Context; 4 | import java.io.Serializable; 5 | import in.hridayan.ashell.config.Preferences; 6 | 7 | public class CommandItems implements Serializable { 8 | 9 | private final String command, description, example; 10 | private int useCounter; 11 | private Context context; 12 | private boolean isChecked, isPinned; 13 | 14 | public CommandItems(String command, String example, String description, Context context) { 15 | this.command = command; 16 | this.description = description; 17 | this.example = example; 18 | this.context = context; 19 | this.useCounter = Preferences.getUseCounter(command); 20 | this.isPinned = Preferences.getPinned(command); 21 | } 22 | 23 | public String getTitle() { 24 | return command; 25 | } 26 | 27 | public String getSummary() { 28 | return description; 29 | } 30 | 31 | public String getExample() { 32 | return example; 33 | } 34 | 35 | public int getUseCounter() { 36 | return useCounter; 37 | } 38 | 39 | public void setUseCounter(int counter) { 40 | this.useCounter = counter; 41 | Preferences.setUseCounter( command, counter); 42 | } 43 | 44 | public boolean isPinned() { 45 | return isPinned; 46 | } 47 | 48 | public void setPinned(boolean pinned) { 49 | this.isPinned = pinned; 50 | Preferences.setPinned( command, pinned); 51 | } 52 | 53 | public boolean isChecked() { 54 | return isChecked; 55 | } 56 | 57 | public void setChecked(boolean checked) { 58 | isChecked = checked; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/items/SettingsItem.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.items; 2 | 3 | import androidx.annotation.Nullable; 4 | import android.content.Context; 5 | import android.content.SharedPreferences; 6 | import android.graphics.drawable.Drawable; 7 | import androidx.annotation.DrawableRes; 8 | import androidx.core.content.ContextCompat; 9 | import androidx.preference.PreferenceManager; 10 | import in.hridayan.ashell.config.Preferences; 11 | 12 | public class SettingsItem { 13 | private int symbolResId; 14 | private String description, title, id; 15 | private boolean hasSwitch, isChecked; 16 | 17 | public SettingsItem( 18 | String id, 19 | @Nullable @DrawableRes int symbolResId, 20 | String title, 21 | String description, 22 | boolean hasSwitch, 23 | boolean isChecked) { 24 | this.id = id; 25 | this.symbolResId = symbolResId; 26 | this.title = title; 27 | this.description = description; 28 | this.hasSwitch = hasSwitch; 29 | this.isChecked = isChecked; 30 | } 31 | 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | public Drawable getSymbol(Context context) { 37 | return ContextCompat.getDrawable(context, symbolResId); 38 | } 39 | 40 | public String getTitle() { 41 | return title; 42 | } 43 | 44 | public String getDescription() { 45 | return description; 46 | } 47 | 48 | public boolean hasSwitch() { 49 | return hasSwitch; 50 | } 51 | 52 | public boolean isChecked() { 53 | return isChecked; 54 | } 55 | 56 | public void setChecked(boolean isChecked) { 57 | this.isChecked = isChecked; 58 | } 59 | 60 | public void saveSwitchState() { 61 | // SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); 62 | 63 | SharedPreferences.Editor editor = Preferences.prefs.edit(); 64 | 65 | editor.putBoolean(id, isChecked); 66 | editor.apply(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/items/WifiAdbDevicesItem.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.items; 2 | 3 | public class WifiAdbDevicesItem { 4 | private final String ipPort; 5 | 6 | public WifiAdbDevicesItem(String ipPort) { 7 | this.ipPort = ipPort; 8 | } 9 | 10 | public String getIpPort() { 11 | return ipPort; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/shell/localadb/BasicShell.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.shell.localadb; 2 | 3 | import in.hridayan.ashell.utils.Utils; 4 | import java.io.BufferedReader; 5 | import java.io.InputStreamReader; 6 | import java.util.List; 7 | 8 | public class BasicShell { 9 | 10 | private static List mOutput; 11 | private static String mCommand; 12 | private static Process mProcess = null; 13 | private static final int TIMEOUT = 750; // in milliseconds 14 | 15 | public BasicShell(List output, String command) { 16 | mOutput = output; 17 | mCommand = command; 18 | } 19 | 20 | // Call this method after passing output and command to BasicShell 21 | public static void exec() { 22 | 23 | try { 24 | mProcess = Runtime.getRuntime().exec("sh -c " + mCommand); 25 | 26 | BufferedReader mInput = new BufferedReader(new InputStreamReader(mProcess.getInputStream())); 27 | BufferedReader mError = new BufferedReader(new InputStreamReader(mProcess.getErrorStream())); 28 | String line; 29 | while ((line = mInput.readLine()) != null) { 30 | mOutput.add(line); 31 | } 32 | while ((line = mError.readLine()) != null) { 33 | 34 | mOutput.add("" + line + ""); 35 | } 36 | mProcess.waitFor(); 37 | } catch (Exception ignored) { 38 | 39 | } 40 | } 41 | 42 | // Checks if shell is busy or not 43 | public static boolean isBusy() { 44 | return mOutput != null 45 | && mOutput.size() > 0 46 | && !mOutput.get(mOutput.size() - 1).equals(Utils.shellDeadError()); 47 | } 48 | 49 | // Destroys the running shell process 50 | public static void destroy() { 51 | if (mProcess != null) mProcess.destroy(); 52 | } 53 | } -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/shell/wifiadb/AdbPairingNotificationWorker.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.shell.wifiadb; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import androidx.annotation.NonNull; 6 | import androidx.work.Worker; 7 | import androidx.work.WorkerParameters; 8 | 9 | public class AdbPairingNotificationWorker extends Worker { 10 | 11 | public AdbPairingNotificationWorker(@NonNull Context context, @NonNull WorkerParameters params) { 12 | super(context, params); 13 | } 14 | 15 | @NonNull 16 | @Override 17 | public Result doWork() { 18 | Context context = getApplicationContext(); 19 | String pairingCode = getInputData().getString("pairingCode"); 20 | 21 | Intent serviceIntent = new Intent(context, AdbPairingNotification.class); 22 | serviceIntent.putExtra("pairingCode", pairingCode); 23 | 24 | context.startForegroundService(serviceIntent); 25 | 26 | return Result.success(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/ui/CoordinatedNestedScrollView.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.ui; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import androidx.core.view.ViewCompat; 8 | import androidx.core.widget.NestedScrollView; 9 | import in.hridayan.ashell.R; 10 | 11 | public class CoordinatedNestedScrollView extends NestedScrollView { 12 | 13 | public CoordinatedNestedScrollView(Context context) { 14 | super(context); 15 | } 16 | 17 | public CoordinatedNestedScrollView(Context context, AttributeSet attrs) { 18 | super(context, attrs); 19 | } 20 | 21 | public CoordinatedNestedScrollView(Context context, AttributeSet attrs, int defStyleAttr) { 22 | super(context, attrs, defStyleAttr); 23 | } 24 | 25 | @Override 26 | public boolean onStartNestedScroll(View child, View target, int axes, int type) { 27 | return (axes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0; 28 | } 29 | 30 | @Override 31 | public void onNestedScroll( 32 | View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int type) { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/ui/CustomSearchView.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.ui; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.EditText; 6 | import androidx.annotation.NonNull; 7 | import androidx.annotation.Nullable; 8 | import com.google.android.material.R; 9 | import com.google.android.material.search.SearchView; 10 | 11 | public class CustomSearchView extends SearchView { 12 | 13 | public CustomSearchView(@NonNull Context context) { 14 | super(context); 15 | } 16 | 17 | public CustomSearchView(@NonNull Context context, @Nullable AttributeSet attrs) { 18 | super(context, attrs); 19 | } 20 | 21 | public CustomSearchView( 22 | @NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 23 | super(context, attrs, defStyleAttr); 24 | } 25 | 26 | public EditText getSearchEditText() { 27 | return findViewById(R.id.open_search_view_edit_text); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/ui/ToastUtils.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.ui; 2 | 3 | import android.widget.Toast; 4 | import android.content.Context; 5 | 6 | public class ToastUtils { 7 | private static Toast toast; 8 | public static int LENGTH_SHORT = 0, LENGTH_LONG = 1; 9 | 10 | public static void showToast(Context context, String message, int length) { 11 | if (toast != null) { 12 | toast.cancel(); 13 | } 14 | toast = Toast.makeText(context, message, length); 15 | toast.show(); 16 | } 17 | 18 | public static void showToast(Context context, int resId, int length) { 19 | showToast(context, context.getString(resId), length); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/ui/Transitions.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.ui; 2 | 3 | import android.view.View; 4 | import com.google.android.material.transition.MaterialContainerTransform; 5 | import android.graphics.Color; 6 | import android.view.ViewGroup; 7 | import androidx.transition.TransitionManager; 8 | 9 | public class Transitions { 10 | 11 | public static void materialContainerTransformViewToView(View startView, View endView) { 12 | MaterialContainerTransform transform = new MaterialContainerTransform(); 13 | 14 | transform.setStartView(startView); 15 | transform.setEndView(endView); 16 | transform.addTarget(endView); 17 | 18 | // Optionally add a curved path to the transform 19 | // transform.setPathMotion(new MaterialArcMotion()); 20 | 21 | transform.setScrimColor(Color.TRANSPARENT); 22 | 23 | TransitionManager.beginDelayedTransition((ViewGroup) startView.getRootView(), transform); 24 | 25 | startView.setVisibility(View.GONE); 26 | endView.setVisibility(View.VISIBLE); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/ui/dialogs/DialogAnimation.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.ui.dialogs; 2 | 3 | import android.view.View; 4 | import android.view.ViewGroup; 5 | import com.google.android.material.transition.MaterialContainerTransform; 6 | import android.graphics.Color; 7 | import androidx.transition.TransitionManager; 8 | 9 | public class DialogAnimation { 10 | public static void materialContainerTransform(View startView, View endView, boolean toDialog) { 11 | MaterialContainerTransform transform = new MaterialContainerTransform(); 12 | transform.setStartView(startView); 13 | transform.setEndView(endView); 14 | transform.addTarget(endView); 15 | transform.setScrimColor(Color.TRANSPARENT); 16 | 17 | TransitionManager.beginDelayedTransition((ViewGroup) startView.getRootView(), transform); 18 | 19 | startView.setVisibility(toDialog ? View.INVISIBLE : View.VISIBLE); 20 | endView.setVisibility(View.VISIBLE); 21 | } 22 | 23 | public static void showDialogWithTransition( 24 | View startView, View dialogCard, View dimBackground, boolean modeDialog) { 25 | dimBackground.setVisibility(View.VISIBLE); 26 | dimBackground.animate().alpha(1f).setDuration(modeDialog ? 0 : 300).start(); 27 | materialContainerTransform(startView, dialogCard, true); 28 | } 29 | 30 | public static void dismissDialogWithTransition( 31 | View startView, View dialogCard, View dimBackground, ViewGroup rootView, boolean modeDialog) { 32 | dimBackground.animate() 33 | .alpha(0f) 34 | .setDuration(modeDialog ? 0 : 300) 35 | .withEndAction(() -> { 36 | dimBackground.setVisibility(View.GONE); 37 | rootView.removeView(dimBackground); 38 | }) 39 | .start(); 40 | materialContainerTransform(dialogCard, startView, false); 41 | } 42 | } -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/ui/dialogs/DialogUtils.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.ui.dialogs; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import androidx.appcompat.app.AlertDialog; 6 | import android.view.LayoutInflater; 7 | import com.google.android.material.dialog.MaterialAlertDialogBuilder; 8 | 9 | public class DialogUtils { 10 | public static View inflateDialogView(Context context, int layoutRes) { 11 | return LayoutInflater.from(context).inflate(layoutRes, null); 12 | } 13 | 14 | public static AlertDialog createDialog(Context context, View view) { 15 | return new MaterialAlertDialogBuilder(context).setView(view).show(); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/utils/HapticUtils.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.utils; 2 | 3 | import android.view.HapticFeedbackConstants; 4 | import android.view.View; 5 | import in.hridayan.ashell.config.Preferences; 6 | 7 | public class HapticUtils { 8 | 9 | /** Types of vibration. */ 10 | public enum VibrationType { 11 | Weak, 12 | Strong 13 | } 14 | 15 | public static void vibrate(View view, VibrationType type) { 16 | if (Preferences.getHapticsAndVibration()) { 17 | switch (type) { 18 | case Weak: 19 | view.performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK); 20 | break; 21 | case Strong: 22 | view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); 23 | break; 24 | } 25 | } 26 | } 27 | 28 | public static void weakVibrate(View view) { 29 | vibrate(view, VibrationType.Weak); 30 | } 31 | 32 | public static void strongVibrate(View view) { 33 | vibrate(view, VibrationType.Strong); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/utils/app/CrashHandler.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.utils.app; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.os.Looper; 6 | import android.util.Log; 7 | import in.hridayan.ashell.activities.CrashReportActivity; 8 | 9 | public class CrashHandler implements Thread.UncaughtExceptionHandler { 10 | private final Context context; 11 | 12 | public CrashHandler(Context context) { 13 | this.context = context; 14 | } 15 | 16 | @Override 17 | public void uncaughtException(Thread thread, Throwable throwable) { 18 | String stackTrace = Log.getStackTraceString(throwable); 19 | Intent intent = new Intent(context, CrashReportActivity.class); 20 | intent.putExtra("stackTrace", stackTrace); 21 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); 22 | context.startActivity(intent); 23 | 24 | android.os.Process.killProcess(android.os.Process.myPid()); 25 | System.exit(1); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/utils/app/updater/ApkInstaller.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.utils.app.updater; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.os.Build; 7 | import android.provider.Settings; 8 | import android.widget.Toast; 9 | import androidx.core.content.FileProvider; 10 | import in.hridayan.ashell.config.Preferences; 11 | import java.io.File; 12 | 13 | public class ApkInstaller { 14 | 15 | public static void installApk(Activity activity, File apkFile) { 16 | if (!apkFile.exists() || apkFile.length() == 0) { 17 | Toast.makeText(activity, "Download completed, but APK file is missing!", Toast.LENGTH_SHORT) 18 | .show(); 19 | return; 20 | } 21 | 22 | Preferences.setUpdateApkFileName(apkFile.getName()); 23 | 24 | Uri apkUri = 25 | FileProvider.getUriForFile(activity, activity.getPackageName() + ".fileprovider", apkFile); 26 | Intent installIntent = 27 | new Intent(Intent.ACTION_VIEW) 28 | .setDataAndType(apkUri, "application/vnd.android.package-archive") 29 | .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION); 30 | 31 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 32 | if (!activity.getPackageManager().canRequestPackageInstalls()) { 33 | Preferences.setUnknownSourcePermAskStatus(true); 34 | activity.startActivity( 35 | new Intent( 36 | Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, 37 | Uri.parse("package:" + activity.getPackageName()))); 38 | return; 39 | } 40 | } 41 | activity.startActivity(installIntent); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/AboutViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import android.util.Pair; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | public class AboutViewModel extends ViewModel { 7 | private boolean isToolbarExpanded = true; 8 | private Pair rvPositionAndOffset; 9 | 10 | public void setRVPositionAndOffset(Pair pair) { 11 | this.rvPositionAndOffset = pair; 12 | } 13 | 14 | public Pair getRVPositionAndOffset() { 15 | return rvPositionAndOffset; 16 | } 17 | 18 | public boolean isToolbarExpanded() { 19 | return isToolbarExpanded; 20 | } 21 | 22 | public void setToolbarExpanded(boolean toolbarExpanded) { 23 | isToolbarExpanded = toolbarExpanded; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/ChangelogViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import android.util.Pair; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | public class ChangelogViewModel extends ViewModel { 7 | private boolean isToolbarExpanded = true; 8 | private Pair rvPositionAndOffset; 9 | 10 | public void setRVPositionAndOffset(Pair pair) { 11 | this.rvPositionAndOffset = pair; 12 | } 13 | 14 | public Pair getRVPositionAndOffset() { 15 | return rvPositionAndOffset; 16 | } 17 | 18 | public boolean isToolbarExpanded() { 19 | return isToolbarExpanded; 20 | } 21 | 22 | public void setToolbarExpanded(boolean toolbarExpanded) { 23 | isToolbarExpanded = toolbarExpanded; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/ExamplesViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import android.util.Pair; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | public class ExamplesViewModel extends ViewModel { 7 | private boolean isToolbarExpanded = true; 8 | private boolean isEnteringFromSettings; 9 | private Pair rvPositionAndOffset; 10 | 11 | public void setRVPositionAndOffset(Pair pair) { 12 | this.rvPositionAndOffset = pair; 13 | } 14 | 15 | public Pair getRVPositionAndOffset() { 16 | return rvPositionAndOffset; 17 | } 18 | 19 | public boolean isToolbarExpanded() { 20 | return isToolbarExpanded; 21 | } 22 | 23 | public void setToolbarExpanded(boolean toolbarExpanded) { 24 | isToolbarExpanded = toolbarExpanded; 25 | } 26 | 27 | public void setEnteringFromSettings(boolean value){ 28 | isEnteringFromSettings = value; 29 | } 30 | 31 | public boolean isEnteringFromSettings(){ 32 | return isEnteringFromSettings; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/HomeViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import androidx.lifecycle.LiveData; 4 | import androidx.lifecycle.MutableLiveData; 5 | import androidx.lifecycle.ViewModel; 6 | 7 | public class HomeViewModel extends ViewModel { 8 | private final MutableLiveData scrollY = new MutableLiveData<>(0); 9 | private boolean isDeviceRooted = false; 10 | 11 | public void setScrollY(int y) { 12 | scrollY.setValue(y); 13 | } 14 | 15 | public LiveData getScrollY() { 16 | return scrollY; 17 | } 18 | 19 | public void setDeviceRooted(boolean value) { 20 | isDeviceRooted = value; 21 | } 22 | 23 | public boolean isDeviceRooted() { 24 | return isDeviceRooted; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/MainViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import androidx.lifecycle.ViewModel; 4 | import in.hridayan.ashell.config.Const; 5 | 6 | public class MainViewModel extends ViewModel { 7 | private static final int nullValue = 2004; 8 | private int currentFragment = nullValue, 9 | previousFragment = Const.LOCAL_FRAGMENT, 10 | whichHomeFragment; 11 | private String useCommand, selectedWifiAdbDevice; 12 | 13 | public void setUseCommand(String text) { 14 | this.useCommand = text; 15 | } 16 | 17 | public String getUseCommand() { 18 | return useCommand; 19 | } 20 | 21 | public int currentFragment() { 22 | return currentFragment; 23 | } 24 | 25 | public void setCurrentFragment(int fragment) { 26 | currentFragment = fragment; 27 | } 28 | 29 | public boolean isFragmentSaved() { 30 | return currentFragment != nullValue; 31 | } 32 | 33 | public int previousFragment() { 34 | return previousFragment; 35 | } 36 | 37 | public void setPreviousFragment(int fragment) { 38 | previousFragment = fragment; 39 | } 40 | 41 | public int whichHomeFragment() { 42 | return whichHomeFragment; 43 | } 44 | 45 | public void setHomeFragment(int fragment) { 46 | whichHomeFragment = fragment; 47 | } 48 | 49 | public String getSelectedWifiAdbDevice() { 50 | return selectedWifiAdbDevice; 51 | } 52 | 53 | public void setSelectedWifiAdbDevice(String value) { 54 | this.selectedWifiAdbDevice = value; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/SettingsItemViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import android.util.Pair; 4 | import androidx.lifecycle.ViewModel; 5 | 6 | public class SettingsItemViewModel extends ViewModel { 7 | private boolean isToolbarExpanded = true; 8 | private Pair scrollPosition; 9 | 10 | public void setScrollPosition(Pair pair) { 11 | this.scrollPosition = pair; 12 | } 13 | 14 | public Pair getScrollPosition() { 15 | return scrollPosition; 16 | } 17 | 18 | public boolean isToolbarExpanded() { 19 | return isToolbarExpanded; 20 | } 21 | 22 | public void setToolbarExpanded(boolean toolbarExpanded) { 23 | isToolbarExpanded = toolbarExpanded; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/in/hridayan/ashell/viewmodels/SettingsViewModel.java: -------------------------------------------------------------------------------- 1 | package in.hridayan.ashell.viewmodels; 2 | 3 | import android.util.Pair; 4 | import in.hridayan.ashell.items.SettingsItem; 5 | import java.util.List; 6 | import androidx.lifecycle.ViewModel; 7 | 8 | public class SettingsViewModel extends ViewModel { 9 | private boolean isToolbarExpanded = true; 10 | 11 | private List settingsData; 12 | private int scrollPosition; 13 | private Pair rvPositionAndOffset; 14 | 15 | public List getSettingsData() { 16 | return settingsData; 17 | } 18 | 19 | public void setSettingsData(List settingsData) { 20 | this.settingsData = settingsData; 21 | } 22 | 23 | public void setRVPositionAndOffset(Pair pair) { 24 | this.rvPositionAndOffset = pair; 25 | } 26 | 27 | public Pair getRVPositionAndOffset() { 28 | return rvPositionAndOffset; 29 | } 30 | 31 | public boolean isToolbarExpanded() { 32 | return isToolbarExpanded; 33 | } 34 | 35 | public void setToolbarExpanded(boolean toolbarExpanded) { 36 | isToolbarExpanded = toolbarExpanded; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libadb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DP-Hridayan/aShellYou/d127e8d4a196437d8fe44cb1e558f782359dab40/app/src/main/jniLibs/arm64-v8a/libadb.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libadb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DP-Hridayan/aShellYou/d127e8d4a196437d8fe44cb1e558f782359dab40/app/src/main/jniLibs/armeabi-v7a/libadb.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/x86/libadb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DP-Hridayan/aShellYou/d127e8d4a196437d8fe44cb1e558f782359dab40/app/src/main/jniLibs/x86/libadb.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/x86_64/libadb.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DP-Hridayan/aShellYou/d127e8d4a196437d8fe44cb1e558f782359dab40/app/src/main/jniLibs/x86_64/libadb.so -------------------------------------------------------------------------------- /app/src/main/res/anim/fast_out_extra_slow_in.xml: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fragment_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fragment_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fragment_exit_fast.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fragment_pop_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fragment_pop_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/anim/item_scale_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/anim/layout_animator.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/on_scroll_animator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/animator/rotate_anim.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/animator/rotate_anim_loop.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/arrow_back.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/circular_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_adb.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_adb2.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_bookmark.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_amoled_theme.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_right.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_auto_update.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bookmark_added.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bookmarks.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cancel.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cards.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_changelog.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_update.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_checked_filled.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_checked_outline.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_clear.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_connect.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_copy.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_counter_one.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_counter_three.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_counter_two.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cross.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_deselect_all.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_directory.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_disable_keyboard.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dynamic_color.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_error.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_expand.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_feature.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_github.xml: -------------------------------------------------------------------------------- 1 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_help2.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_history.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_inventory.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_language.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_license.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_link_off.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_mail.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_mode.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_no_wifi.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_notification.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_notification_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_numbers.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_open_in_new.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_otg.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_pallete.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_paste.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_pin.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_pinned.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_play.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_report.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_reset.xml: -------------------------------------------------------------------------------- 1 | 8 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save_24px.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_scroll.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_select_all.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_send.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_share.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_shell.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_shizuku.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sort.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_stop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_stop_animated.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_styles.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_support.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_telegram.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_terminal.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_undo.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_version_tag.xml: -------------------------------------------------------------------------------- 1 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_vibration.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_warning.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_wifi_settings.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_wireless.xml: -------------------------------------------------------------------------------- 1 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_x.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/kernelsu_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rotate_reset.xml: -------------------------------------------------------------------------------- 1 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/scrollbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/thumb_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ui_shape1.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ui_shape2.xml: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ui_shape3.xml: -------------------------------------------------------------------------------- 1 | 6 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/bottom_sheet_changelog.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 24 | 25 | 32 | 33 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/category_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_latest_version.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 22 | 23 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_no_otg_connection.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | 21 | 31 | 32 | 41 | 42 |