├── .gitignore ├── .idea ├── .gitignore ├── compiler.xml ├── deploymentTargetSelector.xml ├── gradle.xml ├── kotlinc.xml ├── migrations.xml ├── misc.xml ├── render.experimental.xml └── vcs.xml ├── README.md ├── README_EN.md ├── app ├── .gitignore ├── build.gradle ├── debug │ ├── easyManager_debug.apk │ └── output-metadata.json ├── proguard-rules.pro ├── release │ ├── easyManager_release.apk │ └── output-metadata.json └── src │ └── main │ ├── AndroidManifest.xml │ ├── appclone-playstore.png │ ├── back-playstore.png │ ├── backup-playstore.png │ ├── clean-playstore.png │ ├── help_select-playstore.png │ ├── help_unselect-playstore.png │ ├── home_select-playstore.png │ ├── home_unselect-playstore.png │ ├── java │ ├── android │ │ ├── annotation │ │ │ ├── IntDef.java │ │ │ ├── NonNull.java │ │ │ ├── Nullable.java │ │ │ ├── RequiresPermission.java │ │ │ ├── SystemApi.java │ │ │ └── TestApi.java │ │ ├── app │ │ │ ├── ActivityManagerNative.java │ │ │ ├── ActivityThread.java │ │ │ ├── AppOpsManager.java │ │ │ ├── ContextImpl.java │ │ │ ├── IActivityManager.java │ │ │ ├── IStopUserCallback.java │ │ │ ├── PackageInstallObserver.java │ │ │ ├── enums.proto │ │ │ └── usage │ │ │ │ └── IUsageStatsManager.java │ │ ├── compat │ │ │ └── annotation │ │ │ │ └── UnsupportedAppUsage.java │ │ ├── content │ │ │ ├── IContentProvider.java │ │ │ ├── IIntentReceiver.java │ │ │ ├── IIntentSender.java │ │ │ ├── IntentSender.java │ │ │ └── pm │ │ │ │ ├── BaseParceledListSlice.java │ │ │ │ ├── ContainerEncryptionParams.java │ │ │ │ ├── DataLoaderParams.java │ │ │ │ ├── IPackageDataObserver.java │ │ │ │ ├── IPackageDeleteObserver.java │ │ │ │ ├── IPackageInstallObserver.java │ │ │ │ ├── IPackageInstallObserver2.java │ │ │ │ ├── IPackageInstaller.java │ │ │ │ ├── IPackageInstallerSession.java │ │ │ │ ├── IPackageManager.java │ │ │ │ ├── ManifestDigest.java │ │ │ │ ├── PackageInstaller.java │ │ │ │ ├── PackageParser.java │ │ │ │ ├── ParceledListSlice.java │ │ │ │ ├── SuspendDialogInfo.java │ │ │ │ ├── UserInfo.java │ │ │ │ └── VerificationParams.java │ │ ├── internal │ │ │ └── os │ │ │ │ └── BinderInternal.java │ │ ├── os │ │ │ ├── Binder.java │ │ │ ├── Bundle.java │ │ │ ├── FileBridge.java │ │ │ ├── IInterface.java │ │ │ ├── IServiceManager.java │ │ │ ├── IUserManager.java │ │ │ ├── Parcel.java │ │ │ ├── RemoteException.java │ │ │ ├── ServiceManager.java │ │ │ └── SystemProperties.java │ │ └── permission │ │ │ └── IPermissionManager.java │ └── com │ │ ├── android │ │ └── internal │ │ │ └── app │ │ │ └── IAppOpsService.java │ │ └── easymanager │ │ ├── MainActivity.java │ │ ├── activitys │ │ ├── AppCloneLayoutActivity.java │ │ ├── AppInfoLayoutActivity.java │ │ ├── AppManagerLayoutActivity.java │ │ ├── CreateImgLayoutActivity.java │ │ ├── FileSharedLayoutActivity.java │ │ ├── RunCommandLayoutActivity.java │ │ └── UsbModeLayoutActivity.java │ │ ├── adapters │ │ ├── AppInfoAdapter.java │ │ ├── GeneralAdapter.java │ │ ├── ManagerGrantUserAdapter.java │ │ ├── PKGINFOAdapter.java │ │ └── RunCMDFilterAdapter.java │ │ ├── core │ │ ├── api │ │ │ ├── AppopsAPI.java │ │ │ ├── FileCompressApi.java │ │ │ ├── FunctionAPI.java │ │ │ ├── PackageAPI.java │ │ │ └── baseAPI.java │ │ ├── entity │ │ │ ├── TransmissionEntity.java │ │ │ ├── easyManagerClientEntity.java │ │ │ └── easyManagerServiceEntity.java │ │ ├── enums │ │ │ ├── AppProtoEnums.java │ │ │ └── AppopsPermissionStr.java │ │ ├── server │ │ │ ├── Singleton.java │ │ │ ├── easyManagerAPI.java │ │ │ ├── easyManagerBinderWrapper.java │ │ │ └── easyManagerPortService.java │ │ └── utils │ │ │ ├── CMD.java │ │ │ ├── FileUtils.java │ │ │ └── MyConfigUtils.java │ │ ├── entitys │ │ ├── MyActivityInfo.java │ │ ├── MyApplicationInfo.java │ │ ├── MyAppopsInfo.java │ │ ├── MyPackageInfo.java │ │ └── PKGINFO.java │ │ ├── enums │ │ ├── AppInfoEnums.java │ │ ├── AppManagerEnum.java │ │ └── easyManagerEnums.java │ │ ├── fragment │ │ ├── HelpFragmentLayout.java │ │ ├── HomeFragmentLayout.java │ │ └── ManagerGrantUserFragmentLayout.java │ │ ├── mylife │ │ ├── adbClient.java │ │ ├── adbService.java │ │ └── startAdbService.java │ │ └── utils │ │ ├── FileTools.java │ │ ├── MyActivityManager.java │ │ ├── NetUtils.java │ │ ├── OtherTools.java │ │ ├── PackageUtils.java │ │ ├── ProcessUtils.java │ │ ├── ShellUtils.java │ │ ├── StringTools.java │ │ ├── TextUtils.java │ │ ├── base │ │ ├── AppCloneUtils.java │ │ ├── DialogBaseUtils.java │ │ └── DialogUtils.java │ │ ├── dialog │ │ ├── HelpDialogUtils.java │ │ ├── NetUtilsDialog.java │ │ ├── PackageDialog.java │ │ ├── QueryDialog.java │ │ ├── SearchDialog.java │ │ └── UserDialog.java │ │ ├── easyManagerUtils.java │ │ └── permissionRequest.java │ ├── launcher_iconnn-playstore.png │ ├── manager_grant_app-playstore.png │ ├── othertool-playstore.png │ ├── res │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ ├── drawable │ │ ├── appclone_background.xml │ │ ├── appclone_foreground.xml │ │ ├── back_background.xml │ │ ├── back_foreground.xml │ │ ├── backup_background.xml │ │ ├── backup_foreground.xml │ │ ├── clean_background.xml │ │ ├── clean_foreground.xml │ │ ├── help.xml │ │ ├── help_select_background.xml │ │ ├── help_select_foreground.xml │ │ ├── help_unselect_background.xml │ │ ├── help_unselect_foreground.xml │ │ ├── home.xml │ │ ├── home_select_background.xml │ │ ├── home_select_foreground.xml │ │ ├── home_unselect_background.xml │ │ ├── home_unselect_foreground.xml │ │ ├── ic_launcher_background.xml │ │ ├── launcher_iconnn_background.xml │ │ ├── manager.xml │ │ ├── manager_grant_app_background.xml │ │ ├── manager_grant_app_foreground.xml │ │ ├── othertool_background.xml │ │ ├── othertool_foreground.xml │ │ ├── rombuild_background.xml │ │ ├── rombuild_foreground.xml │ │ ├── search_background.xml │ │ ├── search_foreground.xml │ │ ├── text_underline.xml │ │ ├── unmanager_grant_app_background.xml │ │ ├── unmanager_grant_app_foreground.xml │ │ ├── usbmode_background.xml │ │ └── usbmode_foreground.xml │ ├── layout │ │ ├── activity_main.xml │ │ ├── app_clone_manager.xml │ │ ├── app_info_item_layout.xml │ │ ├── app_info_layout.xml │ │ ├── app_list_view_item_layout.xml │ │ ├── app_manager_layout.xml │ │ ├── create_img_layout.xml │ │ ├── download_process_bar.xml │ │ ├── file_shared_layout.xml │ │ ├── file_shared_select_dialog_layout.xml │ │ ├── general_listview_item_layout.xml │ │ ├── help_ex_item_child_layout.xml │ │ ├── help_ex_item_parent_layout.xml │ │ ├── help_fragment_layout.xml │ │ ├── home_fragment_layout.xml │ │ ├── manager_grant_user_fragment_layout.xml │ │ ├── manager_grant_user_item_layout.xml │ │ ├── run_command_layout.xml │ │ ├── search_view_layout.xml │ │ └── usb_mode_layout.xml │ ├── menu │ │ └── main.xml │ ├── mipmap-anydpi-v26 │ │ ├── appclone.xml │ │ ├── appclone_round.xml │ │ ├── back.xml │ │ ├── back_round.xml │ │ ├── backup.xml │ │ ├── backup_round.xml │ │ ├── clean.xml │ │ ├── clean_round.xml │ │ ├── help_select.xml │ │ ├── help_select_round.xml │ │ ├── help_unselect.xml │ │ ├── help_unselect_round.xml │ │ ├── home_select.xml │ │ ├── home_select_round.xml │ │ ├── home_unselect.xml │ │ ├── home_unselect_round.xml │ │ ├── ic_launcher.xml │ │ ├── ic_launcher_round.xml │ │ ├── launcher_iconnn.xml │ │ ├── launcher_iconnn_round.xml │ │ ├── manager_grant_app.xml │ │ ├── manager_grant_app_round.xml │ │ ├── othertool.xml │ │ ├── othertool_round.xml │ │ ├── rombuild.xml │ │ ├── rombuild_round.xml │ │ ├── search.xml │ │ ├── search_round.xml │ │ ├── unmanager_grant_app.xml │ │ ├── unmanager_grant_app_round.xml │ │ ├── usbmode.xml │ │ └── usbmode_round.xml │ ├── mipmap-hdpi │ │ ├── appclone.png │ │ ├── appclone_round.png │ │ ├── back.png │ │ ├── back_round.png │ │ ├── backup.png │ │ ├── backup_round.png │ │ ├── clean.png │ │ ├── clean_round.png │ │ ├── help_select.png │ │ ├── help_select_round.png │ │ ├── help_unselect.png │ │ ├── help_unselect_round.png │ │ ├── home_select.png │ │ ├── home_select_round.png │ │ ├── home_unselect.png │ │ ├── home_unselect_round.png │ │ ├── ic_launcher.webp │ │ ├── ic_launcher_round.webp │ │ ├── launcher_iconnn.png │ │ ├── launcher_iconnn_foreground.png │ │ ├── launcher_iconnn_round.png │ │ ├── manager_grant_app.png │ │ ├── manager_grant_app_round.png │ │ ├── othertool.png │ │ ├── othertool_round.png │ │ ├── rombuild.png │ │ ├── rombuild_round.png │ │ ├── search.png │ │ ├── search_round.png │ │ ├── unmanager_grant_app.png │ │ ├── unmanager_grant_app_round.png │ │ ├── usbmode.png │ │ └── usbmode_round.png │ ├── mipmap-mdpi │ │ ├── appclone.png │ │ ├── appclone_round.png │ │ ├── back.png │ │ ├── back_round.png │ │ ├── backup.png │ │ ├── backup_round.png │ │ ├── clean.png │ │ ├── clean_round.png │ │ ├── help_select.png │ │ ├── help_select_round.png │ │ ├── help_unselect.png │ │ ├── help_unselect_round.png │ │ ├── home_select.png │ │ ├── home_select_round.png │ │ ├── home_unselect.png │ │ ├── home_unselect_round.png │ │ ├── ic_launcher.webp │ │ ├── ic_launcher_round.webp │ │ ├── launcher_iconnn.png │ │ ├── launcher_iconnn_foreground.png │ │ ├── launcher_iconnn_round.png │ │ ├── manager_grant_app.png │ │ ├── manager_grant_app_round.png │ │ ├── othertool.png │ │ ├── othertool_round.png │ │ ├── rombuild.png │ │ ├── rombuild_round.png │ │ ├── search.png │ │ ├── search_round.png │ │ ├── unmanager_grant_app.png │ │ ├── unmanager_grant_app_round.png │ │ ├── usbmode.png │ │ └── usbmode_round.png │ ├── mipmap-xhdpi │ │ ├── appclone.png │ │ ├── appclone_round.png │ │ ├── back.png │ │ ├── back_round.png │ │ ├── backup.png │ │ ├── backup_round.png │ │ ├── clean.png │ │ ├── clean_round.png │ │ ├── help_select.png │ │ ├── help_select_round.png │ │ ├── help_unselect.png │ │ ├── help_unselect_round.png │ │ ├── home_select.png │ │ ├── home_select_round.png │ │ ├── home_unselect.png │ │ ├── home_unselect_round.png │ │ ├── ic_launcher.webp │ │ ├── ic_launcher_round.webp │ │ ├── launcher_iconnn.png │ │ ├── launcher_iconnn_foreground.png │ │ ├── launcher_iconnn_round.png │ │ ├── manager_grant_app.png │ │ ├── manager_grant_app_round.png │ │ ├── othertool.png │ │ ├── othertool_round.png │ │ ├── rombuild.png │ │ ├── rombuild_round.png │ │ ├── search.png │ │ ├── search_round.png │ │ ├── unmanager_grant_app.png │ │ ├── unmanager_grant_app_round.png │ │ ├── usbmode.png │ │ └── usbmode_round.png │ ├── mipmap-xxhdpi │ │ ├── appclone.png │ │ ├── appclone_round.png │ │ ├── back.png │ │ ├── back_round.png │ │ ├── backup.png │ │ ├── backup_round.png │ │ ├── clean.png │ │ ├── clean_round.png │ │ ├── help_select.png │ │ ├── help_select_round.png │ │ ├── help_unselect.png │ │ ├── help_unselect_round.png │ │ ├── home_select.png │ │ ├── home_select_round.png │ │ ├── home_unselect.png │ │ ├── home_unselect_round.png │ │ ├── ic_launcher.webp │ │ ├── ic_launcher_round.webp │ │ ├── launcher_iconnn.png │ │ ├── launcher_iconnn_foreground.png │ │ ├── launcher_iconnn_round.png │ │ ├── manager_grant_app.png │ │ ├── manager_grant_app_round.png │ │ ├── othertool.png │ │ ├── othertool_round.png │ │ ├── rombuild.png │ │ ├── rombuild_round.png │ │ ├── search.png │ │ ├── search_round.png │ │ ├── unmanager_grant_app.png │ │ ├── unmanager_grant_app_round.png │ │ ├── usbmode.png │ │ └── usbmode_round.png │ ├── mipmap-xxxhdpi │ │ ├── appclone.png │ │ ├── appclone_round.png │ │ ├── back.png │ │ ├── back_round.png │ │ ├── backup.png │ │ ├── backup_round.png │ │ ├── clean.png │ │ ├── clean_round.png │ │ ├── help_select.png │ │ ├── help_select_round.png │ │ ├── help_unselect.png │ │ ├── help_unselect_round.png │ │ ├── home_select.png │ │ ├── home_select_round.png │ │ ├── home_unselect.png │ │ ├── home_unselect_round.png │ │ ├── ic_launcher.webp │ │ ├── ic_launcher_round.webp │ │ ├── launcher_iconnn.png │ │ ├── launcher_iconnn_foreground.png │ │ ├── launcher_iconnn_round.png │ │ ├── manager_grant_app.png │ │ ├── manager_grant_app_round.png │ │ ├── othertool.png │ │ ├── othertool_round.png │ │ ├── rombuild.png │ │ ├── rombuild_round.png │ │ ├── search.png │ │ ├── search_round.png │ │ ├── unmanager_grant_app.png │ │ ├── unmanager_grant_app_round.png │ │ ├── usbmode.png │ │ └── usbmode_round.png │ ├── strings.xml │ ├── values-en │ │ └── strings.xml │ ├── values-ko │ │ └── strings.xml │ ├── values-zh-rHK │ │ └── strings.xml │ ├── values-zh │ │ └── strings.xml │ ├── values │ │ ├── colors.xml │ │ └── strings.xml │ └── xml │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml │ ├── rombuild-playstore.png │ ├── search-playstore.png │ ├── unmanager_grant_app-playstore.png │ └── usbmode-playstore.png ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── images ├── 001.png ├── 01.png ├── 02.png ├── 1.png ├── 10.png ├── 11.png ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.png ├── 7.png ├── 8.png └── 9.png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /.idea/render.experimental.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | easyManager是基于FQAOSP项目削减部分旧内容并耦合其新内容而诞生的,摈弃了众多设计缺陷,提升执行与开发效率,开放许多对外开发接口. 3 | 4 | easyManager是一个轻量化、核心化、简单易用的安卓系统管理工具,它非常适合在原生系统上使用,它还支持安卓4.0这种老设备上使用,同时也支持安卓14的新设备.正如你所看到的,它不会放弃任何还在使用的旧设备,它会一直支持下去,也许现在刚开始,并不完善,但它拥有无限的未来. 5 | 6 | easyManager支持adb与root两种模式运行,正如你所见到,它也支持将自己私有API公开给任何一个通过授权的应用访问. 7 | 它现在提供应用的批量权限管理、后台进程清理、软件静默安装/卸载、单个应用服务/活动/广播/权限管理、应用网络管控、备份与恢复、文件共享等功能. 8 | 它提供大量一键功能,你只需要看完帮助文档,然后选择对应的规则,最后点击那个大大的按钮,它就可以完成你的预期. 9 | 10 | easyManager的工作原理借鉴了Shizuku、AppOps,与它们两个类似,easyManager也需要开启一个单独的后台进程到shell或者root shell里面,才能正常工作. 11 | 通过Socket进行TCP通信,执行对应的操作. 12 | 13 | 跟Shizuku不同的是,easyManager向下拓展了安卓4.0低版本的支持,同时对外也提供对应的SDK开发包工具,任何接入SDK的第三方程序,都可以通过SDK来使用easyManager完整的、私有的功能函数接口,大部分常用的功能都不需要开发者再次实现,easyManager已经全部封装好了,开发者只需要关注界面交互部分. 14 | 并且,easyManager对外开放的接口是经过测试的,支持安卓4.0-安卓14,它们工作稳定而且正常. 15 | 16 | [easyMangerSDK开发工具包](https://github.com/MrsEWE44/easyManagerSDK) 17 | 18 | ![image](images/1.png) ![image](images/01.png) ![image](images/02.png) ![image](images/001.png) 19 | ![image](images/3.jpg) ![image](images/2.jpg) ![image](images/4.jpg) ![image](images/5.jpg) 20 | ![image](images/6.png) ![image](images/8.png) ![image](images/7.png) ![image](images/9.png) 21 | ![image](images/10.png) ![image](images/11.png) 22 | 23 | 24 | - V1.2.5 25 | 26 | 1.修复了U盘模式选择单个iso文件卡死的问题。 27 | 28 | 2.新增应用冻结、数据清楚、后台应用定时终止功能。 29 | 30 | 3.提升compileSdk为35。 31 | 32 | 4.优化功能体验。 33 | 34 | 5.修改版本号为1.2.5 35 | 36 | 37 | - V1.2.4 38 | 39 | 1.U盘模式新增单个文件选择功能。 40 | 41 | 2.修复权限更改功能。 42 | 43 | 3.修复搜索时卡死的问题。 44 | 45 | 4.优化程序异常崩溃后,出现页面叠加的问题。 46 | 47 | 5.新增命令符提示下拉框、软件更新、项目地址跳转功能。 48 | 49 | 6.优化更多细节。 50 | 51 | 7.修改版本号为1.2.4 52 | 53 | 54 | 55 | - V1.2.3b 56 | 57 | 1.完善应用删除功能,使其可以正常删除系统内置应用。 58 | 59 | 2.优化操作界面,删减多余按钮选项。 60 | 61 | 3.添加安卓4.0.x最低支持。 62 | 63 | 4.添加运行命令功能界面。 64 | 65 | 5.更新easyManager工程的Gradle版本。 66 | 67 | 6.修改版本号为1.2.3b 68 | 69 | 70 | - V1.2.3a 71 | 72 | 1.完善分身应用备份与恢复功能。 73 | 74 | 2.更新easyManagerSDK开发工具包,同步easyManager接口。 75 | 76 | 3.修改版本号为1.2.3a 77 | 78 | 79 | - V1.2.3 80 | 81 | 1.新增应用分身功能。 82 | 83 | 2.增加多用户管理与操作功能。 84 | 85 | 3.修改版本号为1.2.3 86 | 87 | 88 | 89 | - V1.2.2a 90 | 91 | 1.修复安装本地apk文件无法正确显示应用图标问题 92 | 93 | 2.修改版本号为1.2.2a 94 | 95 | 96 | - V1.2.2 97 | 98 | 1.修复应用组件禁用失败问题 99 | 100 | 2.提升target至34 101 | 102 | 3.修改版本号为1.2.2 103 | 104 | 105 | - V1.2.1 106 | 107 | 1.修复备份时无法备份obb问题 108 | 109 | 2.更改应用提取保存路径 110 | 111 | 3.修改版本号为1.2.1 112 | 113 | 114 | - V1.2 115 | 116 | 1.修复众多bug 117 | 118 | 2.优化部分操作细节 119 | 120 | 3.加入多国语言,跟随系统语言改变而改变 121 | 122 | 4.修改版本号为1.2 123 | 124 | 125 | - V1.1 126 | 127 | 1.修复选择栏里选项无法生效问题 128 | 129 | 2.修复文件共享路径无法展示完整内容问题 130 | 131 | 3.修复权限修改无法在安卓13上正常使用问题 132 | 133 | 4.修改版本号为1.1 134 | 135 | 136 | 137 | - V1.0 138 | 139 | 初次构建. 140 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | } 4 | 5 | android { 6 | namespace 'com.easymanager' 7 | compileSdk 35 8 | 9 | defaultConfig { 10 | applicationId "com.easymanager" 11 | minSdk 14 12 | targetSdk 34 13 | versionCode 11 14 | versionName "1.2.5" 15 | 16 | } 17 | 18 | // 自定义打包名称 19 | android.applicationVariants.all { variant -> 20 | variant.outputs.all { 21 | outputFileName = "easyManager_${buildType.name}.apk" 22 | } 23 | } 24 | 25 | buildTypes { 26 | release { 27 | // minifyEnabled true 28 | // shrinkResources true 29 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 30 | } 31 | } 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | } 37 | 38 | dependencies { 39 | //引入apache开源压缩包依赖,如果需要使用xz、lzma,需要额外引入org.tukaani:xz依赖 40 | implementation 'org.tukaani:xz:1.9' 41 | // https://mvnrepository.com/artifact/org.apache.commons/commons-compress 42 | implementation 'org.apache.commons:commons-compress:1.14' 43 | 44 | } -------------------------------------------------------------------------------- /app/debug/easyManager_debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/debug/easyManager_debug.apk -------------------------------------------------------------------------------- /app/debug/output-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "artifactType": { 4 | "type": "APK", 5 | "kind": "Directory" 6 | }, 7 | "applicationId": "com.easymanager", 8 | "variantName": "debug", 9 | "elements": [ 10 | { 11 | "type": "SINGLE", 12 | "filters": [], 13 | "attributes": [], 14 | "versionCode": 1, 15 | "versionName": "1.0", 16 | "outputFile": "easyManager_debug.apk" 17 | } 18 | ], 19 | "elementType": "File" 20 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/release/easyManager_release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/release/easyManager_release.apk -------------------------------------------------------------------------------- /app/release/output-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "artifactType": { 4 | "type": "APK", 5 | "kind": "Directory" 6 | }, 7 | "applicationId": "com.easymanager", 8 | "variantName": "release", 9 | "elements": [ 10 | { 11 | "type": "SINGLE", 12 | "filters": [], 13 | "attributes": [], 14 | "versionCode": 11, 15 | "versionName": "1.2.5", 16 | "outputFile": "easyManager_release.apk" 17 | } 18 | ], 19 | "elementType": "File", 20 | "minSdkVersionForDexing": 14 21 | } -------------------------------------------------------------------------------- /app/src/main/appclone-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/appclone-playstore.png -------------------------------------------------------------------------------- /app/src/main/back-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/back-playstore.png -------------------------------------------------------------------------------- /app/src/main/backup-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/backup-playstore.png -------------------------------------------------------------------------------- /app/src/main/clean-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/clean-playstore.png -------------------------------------------------------------------------------- /app/src/main/help_select-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/help_select-playstore.png -------------------------------------------------------------------------------- /app/src/main/help_unselect-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/help_unselect-playstore.png -------------------------------------------------------------------------------- /app/src/main/home_select-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/home_select-playstore.png -------------------------------------------------------------------------------- /app/src/main/home_unselect-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/home_unselect-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/android/annotation/IntDef.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | import java.lang.annotation.Retention; 3 | import java.lang.annotation.Target; 4 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 5 | import static java.lang.annotation.RetentionPolicy.SOURCE; 6 | /** 7 | * Denotes that the annotated element of integer type, represents 8 | * a logical type and that its value should be one of the explicitly 9 | * named constants. If the {@link #flag()} attribute is set to true, 10 | * multiple constants can be combined. 11 | *

12 | *


13 |  *  @Retention(SOURCE)
14 |  *  @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
15 |  *  public @interface NavigationMode {}
16 |  *  public static final int NAVIGATION_MODE_STANDARD = 0;
17 |  *  public static final int NAVIGATION_MODE_LIST = 1;
18 |  *  public static final int NAVIGATION_MODE_TABS = 2;
19 |  *  ...
20 |  *  public abstract void setNavigationMode(@NavigationMode int mode);
21 |  *  @NavigationMode
22 |  *  public abstract int getNavigationMode();
23 |  * 
24 | * For a flag, set the flag attribute: 25 | *

26 |  *  @IntDef(
27 |  *      flag = true,
28 |  *      value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
29 |  * 
30 | * 31 | * @hide 32 | */ 33 | @Retention(SOURCE) 34 | @Target({ANNOTATION_TYPE}) 35 | public @interface IntDef { 36 | /** Defines the constant prefix for this element */ 37 | String[] prefix() default {}; 38 | /** Defines the constant suffix for this element */ 39 | String[] suffix() default {}; 40 | /** Defines the allowed constants for this element */ 41 | int[] value() default {}; 42 | /** Defines whether the constants can be used as a flag, or just as an enum (the default) */ 43 | boolean flag() default false; 44 | } -------------------------------------------------------------------------------- /app/src/main/java/android/annotation/NonNull.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.CLASS) 9 | @Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) 10 | public @interface NonNull { 11 | } -------------------------------------------------------------------------------- /app/src/main/java/android/annotation/Nullable.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | import java.lang.annotation.Retention; 3 | import java.lang.annotation.Target; 4 | import static java.lang.annotation.ElementType.FIELD; 5 | import static java.lang.annotation.ElementType.METHOD; 6 | import static java.lang.annotation.ElementType.PARAMETER; 7 | import static java.lang.annotation.RetentionPolicy.SOURCE; 8 | /** 9 | * Denotes that a parameter, field or method return value can be null. 10 | *

11 | * When decorating a method call parameter, this denotes that the parameter can 12 | * legitimately be null and the method will gracefully deal with it. Typically 13 | * used on optional parameters. 14 | *

15 | * When decorating a method, this denotes the method might legitimately return 16 | * null. 17 | *

18 | * This is a marker annotation and it has no specific attributes. 19 | * 20 | * @hide 21 | */ 22 | @Retention(SOURCE) 23 | @Target({METHOD, PARAMETER, FIELD}) 24 | public @interface Nullable { 25 | } -------------------------------------------------------------------------------- /app/src/main/java/android/annotation/SystemApi.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 3 | import static java.lang.annotation.ElementType.CONSTRUCTOR; 4 | import static java.lang.annotation.ElementType.FIELD; 5 | import static java.lang.annotation.ElementType.METHOD; 6 | import static java.lang.annotation.ElementType.PACKAGE; 7 | import static java.lang.annotation.ElementType.TYPE; 8 | import java.lang.annotation.Repeatable; 9 | import java.lang.annotation.Retention; 10 | import java.lang.annotation.RetentionPolicy; 11 | import java.lang.annotation.Target; 12 | /** 13 | * Indicates an API is exposed for use by bundled system applications. 14 | *

15 | * These APIs are not guaranteed to remain consistent release-to-release, 16 | * and are not for use by apps linking against the Android SDK. 17 | *

18 | * This annotation should only appear on API that is already marked

@hide
. 19 | *

20 | * 21 | * @hide 22 | */ 23 | @Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE}) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | @Repeatable(SystemApi.Container.class) // TODO(b/146727827): make this non-repeatable 26 | public @interface SystemApi { 27 | enum Client { 28 | /** 29 | * Specifies that the intended clients of a SystemApi are privileged apps. 30 | * This is the default value for {@link #client}. 31 | */ 32 | PRIVILEGED_APPS, 33 | /** 34 | * Specifies that the intended clients of a SystemApi are used by classes in 35 | *
BOOTCLASSPATH
in mainline modules. Mainline modules can also expose 36 | * this type of system APIs too when they're used only by the non-updatable 37 | * platform code. 38 | */ 39 | MODULE_LIBRARIES, 40 | /** 41 | * Specifies that the system API is available only in the system server process. 42 | * Use this to expose APIs from code loaded by the system server process but 43 | * not in
BOOTCLASSPATH
. 44 | */ 45 | SYSTEM_SERVER 46 | } 47 | /** 48 | * The intended client of this SystemAPI. 49 | */ 50 | Client client() default android.annotation.SystemApi.Client.PRIVILEGED_APPS; 51 | /** 52 | * Container for {@link SystemApi} that allows it to be applied repeatedly to types. 53 | */ 54 | @Retention(RetentionPolicy.RUNTIME) 55 | @Target(TYPE) 56 | @interface Container { 57 | SystemApi[] value(); 58 | } 59 | } -------------------------------------------------------------------------------- /app/src/main/java/android/annotation/TestApi.java: -------------------------------------------------------------------------------- 1 | package android.annotation; 2 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 3 | import static java.lang.annotation.ElementType.CONSTRUCTOR; 4 | import static java.lang.annotation.ElementType.FIELD; 5 | import static java.lang.annotation.ElementType.METHOD; 6 | import static java.lang.annotation.ElementType.PACKAGE; 7 | import static java.lang.annotation.ElementType.TYPE; 8 | import java.lang.annotation.Retention; 9 | import java.lang.annotation.RetentionPolicy; 10 | import java.lang.annotation.Target; 11 | /** 12 | * Indicates an API is exposed for use by CTS. 13 | *

14 | * These APIs are not guaranteed to remain consistent release-to-release, 15 | * and are not for use by apps linking against the Android SDK. 16 | *

17 | * 18 | * @hide 19 | */ 20 | @Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE}) 21 | @Retention(RetentionPolicy.SOURCE) 22 | public @interface TestApi { 23 | } -------------------------------------------------------------------------------- /app/src/main/java/android/app/ActivityManagerNative.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | 6 | public abstract class ActivityManagerNative extends Binder implements IActivityManager { 7 | 8 | public static IActivityManager asInterface(IBinder obj) { 9 | throw new UnsupportedOperationException(); 10 | } 11 | 12 | static public IActivityManager getDefault() { 13 | throw new UnsupportedOperationException(); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/ActivityThread.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.pm.ApplicationInfo; 4 | import android.content.pm.IPackageManager; 5 | 6 | public class ActivityThread { 7 | 8 | public static IPackageManager getPackageManager() { 9 | return null; 10 | } 11 | 12 | public static ActivityThread systemMain() { 13 | return null; 14 | } 15 | 16 | public static ActivityThread currentActivityThread() { 17 | return null; 18 | } 19 | 20 | 21 | public static Application currentApplication() { 22 | return null; 23 | } 24 | 25 | public static String currentProcessName() { 26 | return null; 27 | } 28 | 29 | public ContextImpl getSystemContext() { 30 | return null; 31 | } 32 | 33 | public void installSystemApplicationInfo(ApplicationInfo info, ClassLoader classLoader) { 34 | 35 | } 36 | 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/ContextImpl.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.Context; 4 | 5 | public abstract class ContextImpl extends Context { 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/IActivityManager.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.pm.IPackageDataObserver; 4 | import android.content.pm.UserInfo; 5 | import android.os.Binder; 6 | import android.os.IBinder; 7 | import android.os.IInterface; 8 | import android.os.RemoteException; 9 | 10 | import java.util.List; 11 | 12 | public interface IActivityManager extends IInterface { 13 | 14 | void forceStopPackage(String packageName); 15 | void forceStopPackage(String packageName, int userId); 16 | boolean killPids( int[] pids, String reason, boolean secure); 17 | boolean startUserInBackground(int userid); 18 | int stopUser(int userid, boolean force, IStopUserCallback callback); 19 | int stopUser(int userid, IStopUserCallback callback); 20 | UserInfo getCurrentUser(); 21 | int getCurrentUserId(); 22 | boolean clearApplicationUserData(String packageName, boolean keepState, 23 | IPackageDataObserver observer, int userId); 24 | boolean clearApplicationUserData(final String packageName, 25 | final IPackageDataObserver observer, int userId) throws RemoteException; 26 | List getRunningAppProcesses(); 27 | 28 | 29 | 30 | abstract class Stub extends Binder implements IActivityManager { 31 | public static IActivityManager asInterface(IBinder obj) { 32 | throw new UnsupportedOperationException(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/IStopUserCallback.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | public interface IStopUserCallback{ 4 | void userStopped(int userId); 5 | void userStopAborted(int userId); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/PackageInstallObserver.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.Intent; 4 | import android.content.pm.IPackageInstallObserver2; 5 | import android.os.Bundle; 6 | 7 | public class PackageInstallObserver { 8 | public void onPackageInstalled(String basePackageName, int returnCode, String msg, 9 | Bundle extras) { 10 | } 11 | 12 | public IPackageInstallObserver2 getBinder() { 13 | return null; 14 | } 15 | 16 | public void onUserActionRequired(Intent intent) { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/android/app/usage/IUsageStatsManager.java: -------------------------------------------------------------------------------- 1 | package android.app.usage; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | import android.os.Binder; 5 | import android.os.IBinder; 6 | import android.os.IInterface; 7 | 8 | public interface IUsageStatsManager extends IInterface { 9 | 10 | @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 11 | void setAppInactive(String packageName, boolean inactive, int userId); 12 | boolean isAppStandbyEnabled(); 13 | @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) 14 | boolean isAppInactive(String packageName, int userId, String callingPackage); 15 | int getAppStandbyBucket(String packageName, String callingPackage, int userId); 16 | void setAppStandbyBucket(String packageName, int bucket, int userId); 17 | 18 | abstract class Stub extends Binder implements IUsageStatsManager { 19 | public static IUsageStatsManager asInterface(IBinder obj) { 20 | throw new UnsupportedOperationException(); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/IContentProvider.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | import android.os.Binder; 4 | import android.os.Bundle; 5 | import android.os.IBinder; 6 | import android.os.IInterface; 7 | import android.os.RemoteException; 8 | 9 | public interface IContentProvider extends IInterface { 10 | 11 | 12 | //android11+ 13 | Bundle call( AttributionSource attributionSource, String authority, 14 | String method, String arg, Bundle extras) throws RemoteException; 15 | 16 | 17 | //android10 18 | public Bundle call(String callingPkg, String authority, String method, 19 | String arg, Bundle extras) throws RemoteException; 20 | 21 | 22 | //android4-9 23 | public Bundle call( 24 | String callingPkg, String method, String arg, Bundle extras) 25 | throws RemoteException; 26 | 27 | 28 | abstract class Stub extends Binder implements IContentProvider { 29 | 30 | public static IContentProvider asInterface(IBinder obj) { 31 | throw new UnsupportedOperationException(); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/IIntentReceiver.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | import android.os.Binder; 4 | import android.os.Bundle; 5 | 6 | public interface IIntentReceiver { 7 | 8 | void performReceive(Intent intent, int resultCode, String data, Bundle extras, 9 | boolean ordered, boolean sticky, int sendingUser) 10 | throws android.os.RemoteException; 11 | 12 | abstract class Stub extends Binder implements IIntentReceiver { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/IIntentSender.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | import android.os.Binder; 4 | import android.os.Build; 5 | import android.os.Bundle; 6 | import android.os.IBinder; 7 | import android.os.IInterface; 8 | 9 | public interface IIntentSender extends IInterface { 10 | 11 | void send(int code, Intent intent, String resolvedType, 12 | IIntentReceiver finishedReceiver, String requiredPermission, Bundle options); 13 | 14 | 15 | void send(int code, Intent intent, String resolvedType, IBinder whitelistToken, 16 | IIntentReceiver finishedReceiver, String requiredPermission, Bundle options); 17 | 18 | 19 | abstract class Stub extends Binder implements IIntentSender { 20 | 21 | public Stub() { 22 | throw new UnsupportedOperationException(); 23 | } 24 | 25 | @Override 26 | public android.os.IBinder asBinder() { 27 | throw new UnsupportedOperationException(); 28 | } 29 | 30 | public static IIntentSender asInterface(IBinder binder) { 31 | throw new UnsupportedOperationException(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/IntentSender.java: -------------------------------------------------------------------------------- 1 | package android.content; 2 | 3 | import android.os.IBinder; 4 | import android.os.Parcel; 5 | import android.os.Parcelable; 6 | 7 | 8 | public class IntentSender implements Parcelable { 9 | 10 | public IntentSender(IIntentSender target) { 11 | 12 | } 13 | 14 | 15 | 16 | public IntentSender(IIntentSender target, IBinder whitelistToken) { 17 | 18 | } 19 | 20 | public IntentSender(IBinder target) { 21 | 22 | } 23 | 24 | @Override 25 | public int describeContents() { 26 | return 0; 27 | } 28 | 29 | @Override 30 | public void writeToParcel( Parcel parcel, int i) { 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/BaseParceledListSlice.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import java.util.List; 4 | 5 | abstract class BaseParceledListSlice { 6 | 7 | public List getList() { 8 | throw new RuntimeException("STUB"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/ContainerEncryptionParams.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface ContainerEncryptionParams extends IInterface { 8 | 9 | abstract class Stub extends Binder implements ContainerEncryptionParams { 10 | 11 | public static ContainerEncryptionParams asInterface(IBinder binder) { 12 | throw new UnsupportedOperationException(); 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/DataLoaderParams.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.annotation.SystemApi; 4 | 5 | @SystemApi 6 | public class DataLoaderParams { 7 | 8 | } -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/IPackageDataObserver.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface IPackageDataObserver extends IInterface { 8 | 9 | void onRemoveCompleted(String packageName, boolean succeeded); 10 | 11 | abstract class Stub extends Binder implements IPackageDataObserver { 12 | 13 | public static IPackageDataObserver asInterface(IBinder binder) { 14 | throw new UnsupportedOperationException(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/IPackageDeleteObserver.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface IPackageDeleteObserver extends IInterface { 8 | void packageDeleted( String packageName, int returnCode); 9 | 10 | abstract class Stub extends Binder implements IPackageDeleteObserver { 11 | 12 | public static IPackageDeleteObserver asInterface(IBinder binder) { 13 | throw new UnsupportedOperationException(); 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/IPackageInstallObserver.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface IPackageInstallObserver extends IInterface { 8 | 9 | void packageInstalled( String packageName, int returnCode); 10 | 11 | abstract class Stub extends Binder implements IPackageInstallObserver { 12 | 13 | public static IPackageInstallObserver asInterface(IBinder binder) { 14 | throw new UnsupportedOperationException(); 15 | } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/IPackageInstallObserver2.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface IPackageInstallObserver2 extends IInterface { 8 | 9 | abstract class Stub extends Binder implements IPackageInstallObserver2 { 10 | 11 | public static IPackageInstallObserver2 asInterface(IBinder binder) { 12 | throw new UnsupportedOperationException(); 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/IPackageInstaller.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.content.IntentSender; 4 | import android.os.Binder; 5 | import android.os.IBinder; 6 | import android.os.IInterface; 7 | import android.os.RemoteException; 8 | 9 | 10 | import java.util.List; 11 | 12 | /** {@hide} */ 13 | public interface IPackageInstaller extends IInterface { 14 | 15 | int createSession(android.content.pm.PackageInstaller.SessionParams params, String installerPackageName, 16 | String installerAttributionTag, int userId); 17 | int createSession(PackageInstaller.SessionParams params, String installerPackageName, int userId); 18 | 19 | void abandonSession(int sessionId) 20 | throws RemoteException; 21 | 22 | PackageInstaller.SessionInfo getSessionInfo(int sessionId); 23 | IPackageInstallerSession openSession(int sessionId) 24 | throws RemoteException; 25 | 26 | ParceledListSlice getMySessions(String installerPackageName, int userId) 27 | throws RemoteException; 28 | 29 | ParceledListSlice getAllSessions(int userId); 30 | 31 | 32 | //android 5 33 | void uninstall(String packageName, int flags, IntentSender statusReceiver, int userId); 34 | 35 | //android 8 以下 36 | void uninstall(String packageName, String callerPackageName, int flags, 37 | IntentSender statusReceiver, int userId); 38 | 39 | //Android 8 或者 以上 40 | void uninstall(VersionedPackage versionedPackage, String callerPackageName, int flags, 41 | IntentSender statusReceiver, int userId); 42 | 43 | void uninstallExistingPackage(VersionedPackage versionedPackage, String callerPackageName, 44 | IntentSender statusReceiver, int userId); 45 | 46 | void installExistingPackage(String packageName, int installFlags, int installReason, 47 | IntentSender statusReceiver, int userId, List whiteListedPermissions); 48 | 49 | void setPermissionsResult(int sessionId, boolean accepted); 50 | 51 | abstract class Stub extends Binder implements IPackageInstaller { 52 | 53 | public static IPackageInstaller asInterface(IBinder binder) { 54 | throw new UnsupportedOperationException(); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/IPackageInstallerSession.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.content.IntentSender; 4 | import android.os.Binder; 5 | import android.os.IBinder; 6 | import android.os.IInterface; 7 | import android.os.ParcelFileDescriptor; 8 | 9 | public interface IPackageInstallerSession extends IInterface { 10 | 11 | ParcelFileDescriptor openWrite(String name, long offsetBytes, long lengthBytes); 12 | ParcelFileDescriptor openRead(String name); 13 | 14 | void write(String name, long offsetBytes, long lengthBytes, ParcelFileDescriptor fd); 15 | void close(); 16 | void commit(IntentSender statusReceiver, boolean forTransferred); 17 | void transfer(String packageName); 18 | void abandon(); 19 | 20 | abstract class Stub extends Binder implements IPackageInstallerSession { 21 | 22 | public static IPackageInstallerSession asInterface(IBinder binder) { 23 | throw new UnsupportedOperationException(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/ManifestDigest.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface ManifestDigest extends IInterface { 8 | 9 | abstract class Stub extends Binder implements ManifestDigest { 10 | 11 | public static ManifestDigest asInterface(IBinder binder) { 12 | throw new UnsupportedOperationException(); 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/PackageParser.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import java.io.File; 4 | 5 | public class PackageParser { 6 | 7 | public static ApkLite parseApkLite(File apkFile, int flags) 8 | throws PackageParserException { 9 | return null; 10 | } 11 | 12 | public static class PackageParserException extends Exception { 13 | } 14 | public static class ApkLite { 15 | public final String codePath; 16 | public final String packageName; 17 | public final String splitName; 18 | public boolean isFeatureSplit; 19 | public final String configForSplit; 20 | public final String usesSplitName; 21 | public final int versionCode; 22 | public final int revisionCode; 23 | public final int installLocation; 24 | public final Signature[] signatures; 25 | public final boolean coreApp; 26 | public final boolean debuggable; 27 | public final boolean multiArch; 28 | public final boolean use32bitAbi; 29 | public final boolean extractNativeLibs; 30 | public final boolean isolatedSplits; 31 | 32 | 33 | public ApkLite(String codePath, String packageName, String splitName, String configForSplit, String usesSplitName, int versionCode, int revisionCode, int installLocation, Signature[] signatures, boolean coreApp, boolean debuggable, boolean multiArch, boolean use32bitAbi, boolean extractNativeLibs, boolean isolatedSplits) { 34 | this.codePath = codePath; 35 | this.packageName = packageName; 36 | this.splitName = splitName; 37 | this.configForSplit = configForSplit; 38 | this.usesSplitName = usesSplitName; 39 | this.versionCode = versionCode; 40 | this.revisionCode = revisionCode; 41 | this.installLocation = installLocation; 42 | this.signatures = signatures; 43 | this.coreApp = coreApp; 44 | this.debuggable = debuggable; 45 | this.multiArch = multiArch; 46 | this.use32bitAbi = use32bitAbi; 47 | this.extractNativeLibs = extractNativeLibs; 48 | this.isolatedSplits = isolatedSplits; 49 | } 50 | } 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/ParceledListSlice.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | public class ParceledListSlice extends BaseParceledListSlice { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/SuspendDialogInfo.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | public class SuspendDialogInfo implements Parcelable { 7 | protected SuspendDialogInfo(Parcel in) { 8 | } 9 | 10 | public static final Creator CREATOR = new Creator() { 11 | @Override 12 | public SuspendDialogInfo createFromParcel(Parcel in) { 13 | return new SuspendDialogInfo(in); 14 | } 15 | 16 | @Override 17 | public SuspendDialogInfo[] newArray(int size) { 18 | return new SuspendDialogInfo[size]; 19 | } 20 | }; 21 | 22 | @Override 23 | public int describeContents() { 24 | return 0; 25 | } 26 | 27 | @Override 28 | public void writeToParcel(Parcel parcel, int i) { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/UserInfo.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | public class UserInfo { 4 | 5 | public int id; 6 | public int serialNumber; 7 | public String name; 8 | public String iconPath; 9 | public int flags; 10 | public long creationTime; 11 | public long lastLoggedInTime; 12 | public String lastLoggedInFingerprint; 13 | public int profileGroupId; 14 | public int restrictedProfileParentId; 15 | public int profileBadge; 16 | public boolean partial; 17 | public boolean guestToRemove; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/android/content/pm/VerificationParams.java: -------------------------------------------------------------------------------- 1 | package android.content.pm; 2 | 3 | import android.net.Uri; 4 | import android.os.UserHandle; 5 | 6 | import java.io.File; 7 | 8 | public class VerificationParams { 9 | 10 | public static final int NO_UID = -1; 11 | 12 | public VerificationParams(Uri verificationURI, Uri originatingURI, Uri referrer, 13 | int originatingUid, ManifestDigest manifestDigest) { 14 | 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/android/internal/os/BinderInternal.java: -------------------------------------------------------------------------------- 1 | package android.internal.os; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | import android.os.IBinder; 5 | 6 | public class BinderInternal { 7 | 8 | @UnsupportedAppUsage 9 | public static final native IBinder getContextObject(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/Binder.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | import android.annotation.NonNull; 4 | import android.annotation.Nullable; 5 | 6 | import java.io.FileDescriptor; 7 | 8 | public class Binder implements IBinder { 9 | 10 | @Override 11 | public boolean transact(int code, @NonNull Parcel data, Parcel reply, int flags) { 12 | throw new RuntimeException("STUB"); 13 | } 14 | 15 | @Override 16 | public String getInterfaceDescriptor() { 17 | throw new RuntimeException("STUB"); 18 | } 19 | 20 | public boolean pingBinder() { 21 | throw new RuntimeException("STUB"); 22 | } 23 | 24 | @Override 25 | public boolean isBinderAlive() { 26 | throw new RuntimeException("STUB"); 27 | } 28 | 29 | @Override 30 | public IInterface queryLocalInterface(@NonNull String descriptor) { 31 | throw new RuntimeException("STUB"); 32 | } 33 | 34 | @Override 35 | public void dump(@NonNull FileDescriptor fd, String[] args) { 36 | throw new RuntimeException("STUB"); 37 | } 38 | 39 | @Override 40 | public void dumpAsync(@NonNull FileDescriptor fd, String[] args) { 41 | throw new RuntimeException("STUB"); 42 | } 43 | 44 | @Override 45 | public void linkToDeath(@NonNull DeathRecipient recipient, int flags) { 46 | throw new RuntimeException("STUB"); 47 | } 48 | 49 | @Override 50 | public boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags) { 51 | throw new RuntimeException("STUB"); 52 | } 53 | 54 | protected boolean onTransact(int code, @NonNull Parcel data, @Nullable Parcel reply, 55 | int flags) throws RemoteException { 56 | throw new RuntimeException("STUB"); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/Bundle.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class Bundle { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/FileBridge.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | import java.io.IOException; 4 | import java.io.OutputStream; 5 | 6 | public class FileBridge { 7 | 8 | public static class FileBridgeOutputStream extends OutputStream { 9 | public FileBridgeOutputStream(ParcelFileDescriptor clientPfd) { 10 | 11 | } 12 | 13 | @Override 14 | public void write(int i) throws IOException { 15 | 16 | } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/IInterface.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public interface IInterface { 4 | 5 | IBinder asBinder(); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/IServiceManager.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public interface IServiceManager extends IInterface{ 4 | 5 | public static final String descriptor = "android.os.IServiceManager"; 6 | 7 | public IBinder getService(String name) throws RemoteException; 8 | 9 | /** 10 | * Return a list of all currently running services. 11 | */ 12 | public String[] listServices() throws RemoteException; 13 | 14 | 15 | } -------------------------------------------------------------------------------- /app/src/main/java/android/os/IUserManager.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | import android.content.pm.UserInfo; 4 | 5 | import java.util.List; 6 | 7 | public interface IUserManager extends IInterface { 8 | 9 | List getUsers(boolean excludeDying); 10 | 11 | List getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated); 12 | 13 | 14 | UserInfo createUser( String name, int flags); 15 | UserInfo createProfileForUser( String name, int flags, int userHandle); 16 | UserInfo createProfileForUser(String name, int flags, int userHandle, String[] disallowedPackages); 17 | UserInfo createProfileForUserWithThrow(String name, String userType, int flags, int userId, String[] disallowedPackages); 18 | void setUserEnabled(int userHandle); 19 | boolean removeUser(int userHandle); 20 | UserInfo getUserInfo(int userHandle); 21 | 22 | abstract class Stub extends Binder implements IUserManager { 23 | public static IUserManager asInterface(IBinder obj) { 24 | throw new UnsupportedOperationException(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/Parcel.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class Parcel { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/RemoteException.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class RemoteException extends Exception { 4 | 5 | public RemoteException(String message) { 6 | throw new RuntimeException("STUB"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/android/os/ServiceManager.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class ServiceManager { 4 | 5 | public static IBinder getService(String name) { 6 | return null; 7 | } 8 | } -------------------------------------------------------------------------------- /app/src/main/java/android/os/SystemProperties.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public class SystemProperties { 4 | 5 | public static boolean getBoolean(String key, boolean def) { 6 | return false; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/android/permission/IPermissionManager.java: -------------------------------------------------------------------------------- 1 | package android.permission; 2 | 3 | import android.os.Binder; 4 | import android.os.IBinder; 5 | import android.os.IInterface; 6 | 7 | public interface IPermissionManager extends IInterface { 8 | 9 | 10 | //android11+ 11 | void grantRuntimePermission(String packageName, String permissionName, int userId); 12 | void revokeRuntimePermission(String packageName, String permissionName, int userId,String reason); 13 | 14 | abstract class Stub extends Binder implements IPermissionManager { 15 | 16 | public static IPermissionManager asInterface(IBinder obj) { 17 | throw new UnsupportedOperationException(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/android/internal/app/IAppOpsService.java: -------------------------------------------------------------------------------- 1 | package com.android.internal.app; 2 | 3 | import android.app.AppOpsManager; 4 | import android.os.Binder; 5 | import android.os.IBinder; 6 | import android.os.Parcelable; 7 | 8 | import java.util.List; 9 | 10 | public interface IAppOpsService { 11 | int checkOperation(int code, int uid, String packageName); 12 | int noteOperation(int code, int uid, String packageName); 13 | int permissionToOpCode(String permission); 14 | 15 | // Remaining methods are only used in Java. 16 | int checkPackage(int uid, String packageName); 17 | List getPackagesForOps( int[] ops); 18 | List getOpsForPackage(int uid, String packageName, int[] ops); 19 | List getUidOps(int uid, int[] ops); 20 | void setUidMode(int code, int uid, int mode); 21 | void setMode(int code, int uid, String packageName, int mode); 22 | void resetAllModes(int reqUserId, String reqPackageName); 23 | 24 | 25 | 26 | abstract class Stub extends Binder implements IAppOpsService { 27 | public static IAppOpsService asInterface(IBinder obj) { 28 | throw new UnsupportedOperationException(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/adapters/GeneralAdapter.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.BaseAdapter; 8 | import android.widget.CheckBox; 9 | import android.widget.CompoundButton; 10 | import android.widget.TextView; 11 | 12 | 13 | import com.easymanager.R; 14 | 15 | import java.io.File; 16 | import java.util.ArrayList; 17 | 18 | public class GeneralAdapter extends BaseAdapter { 19 | 20 | public GeneralAdapter(ArrayList list, Context context, ArrayList checkboxs) { 21 | this.list = (ArrayList) list.clone(); 22 | this.context = context; 23 | this.checkboxs = checkboxs; 24 | notifyDataSetChanged(); 25 | } 26 | 27 | private ArrayList list; 28 | private Context context; 29 | private ArrayList checkboxs; 30 | 31 | @Override 32 | public int getCount() { 33 | return list.size(); 34 | } 35 | 36 | @Override 37 | public Object getItem(int i) { 38 | return null; 39 | } 40 | 41 | @Override 42 | public long getItemId(int i) { 43 | return i; 44 | } 45 | 46 | 47 | private String getSize(double size,int count){ 48 | String size_type[] = {"b","KB","MB","GB","TB","PB"}; 49 | if(size > 1024){ 50 | double d_size= size/1024; 51 | count = count + 1; 52 | return getSize(d_size,count); 53 | } 54 | String sizestr=String.format("%.2f",size)+size_type[count]; 55 | return sizestr; 56 | } 57 | 58 | @Override 59 | public View getView(int i, View view, ViewGroup viewGroup) { 60 | int size = list.size(); 61 | int size1 = checkboxs.size(); 62 | view = LayoutInflater.from(context).inflate(R.layout.general_listview_item_layout,null); 63 | CheckBox checkBox=view.findViewById(R.id.glilcb); 64 | TextView text = view.findViewById(R.id.gliltv); 65 | TextView text2 = view.findViewById(R.id.gliltv2); 66 | if(i < size){ 67 | text.setText(list.get(i)); 68 | File file = new File(list.get(i)); 69 | if(file == null){ 70 | text2.setText(""); 71 | }else{ 72 | text2.setText(getSize(file.length(),0)); 73 | } 74 | 75 | if(i < size1){ 76 | checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { 77 | @Override 78 | public void onCheckedChanged(CompoundButton compoundButton, boolean b) { 79 | checkboxs.set(i,b); 80 | } 81 | }); 82 | checkBox.setChecked(checkboxs.get(i)); 83 | } 84 | 85 | 86 | } 87 | return view; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/api/FunctionAPI.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.api; 2 | 3 | public class FunctionAPI { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/api/baseAPI.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.api; 2 | 3 | public class baseAPI { 4 | 5 | //获取应用本身的uid,如果是adb授权模式,uid理应2000 6 | public int getMyuid(){ 7 | return android.os.Process.myUid(); 8 | } 9 | 10 | public int getMyuidHascode(){ 11 | return android.os.Process.myUserHandle().hashCode(); 12 | } 13 | 14 | //判断当前应用权限是否为root 15 | public boolean isRoot(){ 16 | return getMyuid() == 0; 17 | } 18 | 19 | //判断当前应用权限是否为adb 20 | public boolean isADB(){ 21 | return getMyuid() == 2000; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/entity/TransmissionEntity.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | public class TransmissionEntity implements Serializable { 6 | 7 | public TransmissionEntity(String pkgname, String opmodestr, String requestpkg, int opsmode, int uid) { 8 | this.pkgname = pkgname; 9 | this.opmodestr = opmodestr; 10 | this.requestpkg = requestpkg; 11 | this.opsmode = opsmode; 12 | this.uid = uid; 13 | } 14 | 15 | public String getPkgname() { 16 | return pkgname; 17 | } 18 | 19 | public void setPkgname(String pkgname) { 20 | this.pkgname = pkgname; 21 | } 22 | 23 | public String getOpmodestr() { 24 | return opmodestr; 25 | } 26 | 27 | public void setOpmodestr(String opmodestr) { 28 | this.opmodestr = opmodestr; 29 | } 30 | 31 | public String getRequestpkg() { 32 | return requestpkg; 33 | } 34 | 35 | public void setRequestpkg(String requestpkg) { 36 | this.requestpkg = requestpkg; 37 | } 38 | 39 | public int getOpsmode() { 40 | return opsmode; 41 | } 42 | 43 | public void setOpsmode(int opsmode) { 44 | this.opsmode = opsmode; 45 | } 46 | 47 | public int getUid() { 48 | return uid; 49 | } 50 | 51 | public void setUid(int uid) { 52 | this.uid = uid; 53 | } 54 | 55 | @Override 56 | public String toString() { 57 | return "TransmissionEntity{" + 58 | "pkgname='" + pkgname + '\'' + 59 | ", opmodestr='" + opmodestr + '\'' + 60 | ", requestpkg='" + requestpkg + '\'' + 61 | ", opsmode=" + opsmode + 62 | ", uid=" + uid + 63 | '}'; 64 | } 65 | 66 | private String pkgname; 67 | private String opmodestr; 68 | private String requestpkg; 69 | private int opsmode,uid; 70 | 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/entity/easyManagerClientEntity.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | public class easyManagerClientEntity implements Serializable { 6 | 7 | 8 | public easyManagerClientEntity(String cmdstr, TransmissionEntity transmissionEntity, int easyManagerMode) { 9 | this.cmdstr = cmdstr; 10 | this.transmissionEntity = transmissionEntity; 11 | this.easyManagerMode = easyManagerMode; 12 | } 13 | 14 | public String getCmdstr() { 15 | return cmdstr; 16 | } 17 | 18 | public void setCmdstr(String cmdstr) { 19 | this.cmdstr = cmdstr; 20 | } 21 | 22 | public TransmissionEntity getTransmissionEntity() { 23 | return transmissionEntity; 24 | } 25 | 26 | public void setTransmissionEntity(TransmissionEntity transmissionEntity) { 27 | this.transmissionEntity = transmissionEntity; 28 | } 29 | 30 | public int getEasyManagerMode() { 31 | return easyManagerMode; 32 | } 33 | 34 | public void setEasyManagerMode(int easyManagerMode) { 35 | this.easyManagerMode = easyManagerMode; 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return "easyManagerClientEntity{" + 41 | "cmdstr='" + cmdstr + '\'' + 42 | ", transmissionEntity=" + transmissionEntity.toString() + 43 | ", easyManagerMode=" + easyManagerMode + 44 | '}'; 45 | } 46 | 47 | private String cmdstr ; 48 | private TransmissionEntity transmissionEntity; 49 | private int easyManagerMode; 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/entity/easyManagerServiceEntity.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.entity; 2 | 3 | import com.easymanager.core.utils.CMD; 4 | 5 | import java.io.Serializable; 6 | 7 | public class easyManagerServiceEntity implements Serializable { 8 | 9 | private static final long serialVersionUID = 5459317133440313261L; 10 | 11 | public easyManagerServiceEntity(CMD cmd, Object object) { 12 | this.cmd = cmd; 13 | this.object = object; 14 | } 15 | 16 | public CMD getCmd() { 17 | return cmd; 18 | } 19 | 20 | public void setCmd(CMD cmd) { 21 | this.cmd = cmd; 22 | } 23 | 24 | public Object getObject() { 25 | return object; 26 | } 27 | 28 | public void setObject(Object object) { 29 | this.object = object; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "adfbEntity{" + 35 | "cmd=" + (cmd==null?"null":cmd.toString()) + 36 | ", object=" + (object==null?"null":object.toString()) + 37 | '}'; 38 | } 39 | 40 | private CMD cmd; 41 | private Object object; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/server/Singleton.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.server; 2 | 3 | public abstract class Singleton { 4 | 5 | private T mInstance; 6 | 7 | protected abstract T create(); 8 | 9 | public final T get() { 10 | synchronized (this) { 11 | if (mInstance == null) { 12 | mInstance = create(); 13 | } 14 | return mInstance; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/server/easyManagerBinderWrapper.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.server; 2 | 3 | import android.os.IBinder; 4 | import android.os.IInterface; 5 | import android.os.Parcel; 6 | import android.os.RemoteException; 7 | 8 | import java.io.FileDescriptor; 9 | import java.util.Objects; 10 | 11 | public class easyManagerBinderWrapper implements IBinder { 12 | 13 | private final IBinder ori; 14 | 15 | public easyManagerBinderWrapper(IBinder ori2) { 16 | this.ori = Objects.requireNonNull(ori2); 17 | } 18 | 19 | @Override 20 | public String getInterfaceDescriptor() throws RemoteException { 21 | return ori.getInterfaceDescriptor(); 22 | } 23 | 24 | @Override 25 | public boolean pingBinder() { 26 | return ori.pingBinder(); 27 | } 28 | 29 | @Override 30 | public boolean isBinderAlive() { 31 | return ori.isBinderAlive(); 32 | } 33 | 34 | @Override 35 | public IInterface queryLocalInterface(String s) { 36 | return ori.queryLocalInterface(s); 37 | } 38 | 39 | @Override 40 | public void dump(FileDescriptor fileDescriptor, String[] strings) throws RemoteException { 41 | ori.dump(fileDescriptor,strings); 42 | } 43 | 44 | @Override 45 | public void dumpAsync(FileDescriptor fileDescriptor, String[] strings) throws RemoteException { 46 | ori.dumpAsync(fileDescriptor, strings); 47 | } 48 | 49 | @Override 50 | public boolean transact(int i, Parcel parcel, Parcel parcel1, int i1) throws RemoteException { 51 | return ori.transact(i, parcel, parcel1, i1); 52 | } 53 | 54 | @Override 55 | public void linkToDeath(DeathRecipient deathRecipient, int i) throws RemoteException { 56 | ori.linkToDeath(deathRecipient, i); 57 | } 58 | 59 | @Override 60 | public boolean unlinkToDeath(DeathRecipient deathRecipient, int i) { 61 | return ori.unlinkToDeath(deathRecipient, i); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/core/utils/CMD.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.core.utils; 2 | 3 | import android.util.Log; 4 | 5 | import java.io.BufferedReader; 6 | import java.io.DataOutputStream; 7 | import java.io.InputStreamReader; 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 12 | * 调用系统命令功能实现 13 | * 14 | * */ 15 | 16 | public class CMD implements Serializable { 17 | 18 | private static final long serialVersionUID =8365470672561029830L; 19 | 20 | private StringBuilder sb = new StringBuilder(); 21 | private Integer resultCode=-1; 22 | 23 | /** 24 | * @param cmd 你要執行的命令 25 | * @param root 是否以root權限運行命令 26 | * */ 27 | public CMD(String cmd , Boolean root){ 28 | String cmdhead = root ?"su":"/system/bin/sh" ; 29 | Log.i("cmdstr ::: ",cmd); 30 | try{ 31 | String cmds[] = {cmdhead,"-c",cmd}; 32 | ProcessBuilder processBuilder = new ProcessBuilder(cmds); 33 | processBuilder.redirectErrorStream(true); 34 | Process exec = processBuilder.start(); 35 | DataOutputStream dos = new DataOutputStream(exec.getOutputStream()); 36 | dos.writeBytes(cmd + "\n"); 37 | dos.flush(); 38 | dos.writeBytes("exit\n"); 39 | dos.flush(); 40 | BufferedReader reader = new BufferedReader(new InputStreamReader(exec.getInputStream(),"UTF-8")); 41 | String line=""; 42 | while((line=reader.readLine()) != null){ 43 | sb.append(line+"\n"); 44 | } 45 | resultCode = exec.waitFor(); 46 | reader.close(); 47 | }catch (Exception e){ 48 | e.printStackTrace(); 49 | } 50 | } 51 | 52 | //默认以root身份运行命令 53 | public CMD(String cmd){ 54 | this(cmd,true); 55 | } 56 | 57 | //获取执行完命令后的状态码 58 | public Integer getResultCode(){ 59 | return resultCode; 60 | } 61 | 62 | //获取命令返回结果 63 | public String getResult(){ 64 | return sb.toString(); 65 | } 66 | 67 | public String toString(){ 68 | return resultCode+" -- "+sb.toString(); 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/entitys/MyActivityInfo.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.entitys; 2 | 3 | import java.io.Serializable; 4 | 5 | public class MyActivityInfo implements Serializable { 6 | public MyActivityInfo(String name, boolean enable, boolean exported) { 7 | this.name = name; 8 | this.enable = enable; 9 | this.exported = exported; 10 | } 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | 20 | public boolean isEnable() { 21 | return enable; 22 | } 23 | 24 | public void setEnable(boolean enable) { 25 | this.enable = enable; 26 | } 27 | 28 | public boolean isExported() { 29 | return exported; 30 | } 31 | 32 | public void setExported(boolean exported) { 33 | this.exported = exported; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "MyActivityInfo{" + 39 | "name='" + name + '\'' + 40 | ", enable=" + enable + 41 | ", exported=" + exported + 42 | '}'; 43 | } 44 | 45 | public String name; 46 | public boolean enable; 47 | public boolean exported; 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/entitys/MyApplicationInfo.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.entitys; 2 | 3 | import java.io.Serializable; 4 | 5 | public class MyApplicationInfo implements Serializable { 6 | public MyApplicationInfo(int flags, boolean enabled, String sourceDir) { 7 | this.flags = flags; 8 | this.enabled = enabled; 9 | this.sourceDir = sourceDir; 10 | } 11 | 12 | public int getFlags() { 13 | return flags; 14 | } 15 | 16 | public void setFlags(int flags) { 17 | this.flags = flags; 18 | } 19 | 20 | public boolean isEnabled() { 21 | return enabled; 22 | } 23 | 24 | public void setEnabled(boolean enabled) { 25 | this.enabled = enabled; 26 | } 27 | 28 | public String getSourceDir() { 29 | return sourceDir; 30 | } 31 | 32 | public void setSourceDir(String sourceDir) { 33 | this.sourceDir = sourceDir; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "MyApplicationInfo{" + 39 | "flags=" + flags + 40 | ", enabled=" + enabled + 41 | ", sourceDir='" + sourceDir + '\'' + 42 | '}'; 43 | } 44 | 45 | public int flags = 0; 46 | public boolean enabled; 47 | public String sourceDir; 48 | 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/entitys/MyAppopsInfo.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.entitys; 2 | 3 | import java.io.Serializable; 4 | 5 | public class MyAppopsInfo implements Serializable { 6 | public MyAppopsInfo(String pkgname, String OPS_PER_STR, String OPS_TO_PER_STR, String OPS_MODE_STR, int OPS_PER_CODE, int OPS_PER_MODE_CODE) { 7 | this.pkgname = pkgname; 8 | this.OPS_PER_STR = OPS_PER_STR; 9 | this.OPS_TO_PER_STR = OPS_TO_PER_STR; 10 | this.OPS_MODE_STR = OPS_MODE_STR; 11 | this.OPS_PER_CODE = OPS_PER_CODE; 12 | this.OPS_PER_MODE_CODE = OPS_PER_MODE_CODE; 13 | } 14 | 15 | public String getPkgname() { 16 | return pkgname; 17 | } 18 | 19 | public void setPkgname(String pkgname) { 20 | this.pkgname = pkgname; 21 | } 22 | 23 | public String getOPS_PER_STR() { 24 | return OPS_PER_STR; 25 | } 26 | 27 | public void setOPS_PER_STR(String OPS_PER_STR) { 28 | this.OPS_PER_STR = OPS_PER_STR; 29 | } 30 | 31 | public String getOPS_TO_PER_STR() { 32 | return OPS_TO_PER_STR; 33 | } 34 | 35 | public void setOPS_TO_PER_STR(String OPS_TO_PER_STR) { 36 | this.OPS_TO_PER_STR = OPS_TO_PER_STR; 37 | } 38 | 39 | public String getOPS_MODE_STR() { 40 | return OPS_MODE_STR; 41 | } 42 | 43 | public void setOPS_MODE_STR(String OPS_MODE_STR) { 44 | this.OPS_MODE_STR = OPS_MODE_STR; 45 | } 46 | 47 | public int getOPS_PER_CODE() { 48 | return OPS_PER_CODE; 49 | } 50 | 51 | public void setOPS_PER_CODE(int OPS_PER_CODE) { 52 | this.OPS_PER_CODE = OPS_PER_CODE; 53 | } 54 | 55 | public int getOPS_PER_MODE_CODE() { 56 | return OPS_PER_MODE_CODE; 57 | } 58 | 59 | public void setOPS_PER_MODE_CODE(int OPS_PER_MODE_CODE) { 60 | this.OPS_PER_MODE_CODE = OPS_PER_MODE_CODE; 61 | } 62 | 63 | @Override 64 | public String toString() { 65 | return "MyAppopsInfo{" + 66 | "pkgname='" + pkgname + '\'' + 67 | ", OPS_PER_STR='" + OPS_PER_STR + '\'' + 68 | ", OPS_TO_PER_STR='" + OPS_TO_PER_STR + '\'' + 69 | ", OPS_MODE_STR='" + OPS_MODE_STR + '\'' + 70 | ", OPS_PER_CODE=" + OPS_PER_CODE + 71 | ", OPS_PER_MODE_CODE=" + OPS_PER_MODE_CODE + 72 | '}'; 73 | } 74 | 75 | private String pkgname,OPS_PER_STR,OPS_TO_PER_STR,OPS_MODE_STR; 76 | private int OPS_PER_CODE,OPS_PER_MODE_CODE; 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/enums/AppInfoEnums.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.enums; 2 | 3 | public class AppInfoEnums { 4 | public final static int IS_PERMISSION=0; 5 | public final static int IS_COMPENT_OR_PACKAGE=1; 6 | public final static int GET_ACTIVITYS=2; 7 | public final static int GET_SERVICES=3; 8 | public final static int GET_PERMISSIOSN=4; 9 | public final static int GET_RECEIVERS=5; 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/enums/AppManagerEnum.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.enums; 2 | 3 | public class AppManagerEnum { 4 | public final static int APP_PERMISSION=1; 5 | public final static int APP_DISABLE_COMPENT=2; 6 | public final static int APP_FIREWALL=3; 7 | public final static int APP_INSTALL_LOCAL_FILE=4; 8 | public final static int APP_DUMP=5; 9 | public final static int APP_UNINSTALL=6; 10 | public final static int APP_CLEAN_PROCESS=7; 11 | public final static int APP_BACKUP=8; 12 | public final static int APP_RESTORY=9; 13 | public final static int APP_CLONE=10; 14 | public final static int APP_CLONE_MANAGE=11; 15 | public final static int APP_CLONE_REMOVE=12; 16 | public final static int MOUNT_LOCAL_IMG=13; 17 | public final static int CREATE_IMG=14; 18 | public final static int SET_NTP=15; 19 | public final static int SET_RATE=16; 20 | public final static int DEL_X=17; 21 | public final static int FILE_SHARED=18; 22 | public final static int APP_MANAGER=19; 23 | public final static int RUN_CMD=20; 24 | public final static int APP_INFO_LAYOUT=200; 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/enums/easyManagerEnums.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.enums; 2 | 3 | public class easyManagerEnums { 4 | 5 | public final static int IS_ROOT=0; 6 | public final static int DEAD=9008; 7 | public final static int IS_ADB=1; 8 | public final static int GET_SYSTEM_SERVICE=2000; 9 | public final static int KILL_PROCESS=2; 10 | public final static int SET_APPOPS=3; 11 | public final static int INSTALL_APK=4; 12 | public final static int UNINSTALL_APK=5; 13 | public final static int SET_COMPONENT_OR_PACKAGE_ENABLE_STATE=6; 14 | public final static int SET_PACKAGE_HIDE_STATE=7; 15 | public final static int SET_PACKAGE_REVOKE_RUNTIME_PERMISSION=8; 16 | public final static int SET_PACKAGE_GRANT_RUNTIME_PERMISSION=9; 17 | public final static int BACKUP_APK=10; 18 | public final static int RESTORY_APK=11; 19 | public final static int GRANT_USER=44566; 20 | public final static int CHANGE_USER=44567; 21 | public final static int GET_GRANT_USERS=44568; 22 | public final static int GET_SERVER_STATUS=47; 23 | public final static int SET_APPOPS_CORE=12; 24 | public final static int APP_CLONE=13; 25 | public final static int APP_CLONE_MANAGER=14; 26 | public final static int APP_CLONE_REMOVE=15; 27 | public static final int APP_CLONE_GETUSERS = 16; 28 | 29 | public final static int KILL_PROCESS_UID=20; 30 | public final static int INSTALL_APK_UID=21; 31 | public final static int UNINSTALL_APK_UID=22; 32 | public final static int SET_COMPONENT_OR_PACKAGE_ENABLE_STATE_UID=23; 33 | public final static int SET_PACKAGE_HIDE_STATE_UID=24; 34 | public final static int SET_PACKAGE_REVOKE_RUNTIME_PERMISSION_UID=25; 35 | public final static int SET_PACKAGE_GRANT_RUNTIME_PERMISSION_UID=26; 36 | public final static int BACKUP_APK_UID=27; 37 | public final static int RESTORY_APK_UID=28; 38 | 39 | 40 | public final static int QUERY_PACKAGES_UID=29; 41 | public final static int GET_PACKAGEINFO_UID=30; 42 | public final static int GET_CURRENT_USER_ID=31; 43 | public final static int START_USER_ID=32; 44 | public final static int GET_COMPONENT_ENABLED_SETTING=33; 45 | public final static int CHECK_OP=34; 46 | public final static int APP_FIREWALL=35; 47 | public final static int GET_APPOPS_PERMISSIONS=36; 48 | public final static int GET_APPOPS_PERMISSION_TO_OP=37; 49 | public final static int GET_APPOPS_PERMISSION_TO_OP_CODE=38; 50 | public final static int CHECK_PM_PERMISSION_CODE=39; 51 | public final static int GET_PATH_ALL_FILES=40; 52 | public final static int SET_PACKAGE_SUSPEND=41; 53 | public final static int GET_PACKAGE_SUSPEND=42; 54 | public final static int CLEAR_PACKAGE_DATA=43; 55 | public final static int ADD_RUNNING_PACKAGE=44; 56 | public final static int START_STOP_RUNNING_PACKAGE=45; 57 | public final static int DELETE_CLEAN_APP_CONFIG=46; 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/mylife/adbClient.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.mylife; 2 | 3 | import com.easymanager.core.entity.easyManagerClientEntity; 4 | import com.easymanager.core.entity.easyManagerServiceEntity; 5 | 6 | import java.io.ObjectInputStream; 7 | import java.io.ObjectOutputStream; 8 | import java.net.InetSocketAddress; 9 | import java.net.Socket; 10 | 11 | public class adbClient { 12 | private SocketListener listener; 13 | 14 | private easyManagerServiceEntity adbEn; 15 | 16 | public adbClient(easyManagerClientEntity adee2, SocketListener listener) { 17 | this.listener = listener; 18 | Thread thread = new Thread(new Runnable() { 19 | @Override 20 | public void run() { 21 | Socket socket = new Socket(); 22 | ObjectOutputStream oos; 23 | try { 24 | socket.connect(new InetSocketAddress("127.0.0.1", adbService.PORT)); 25 | oos = new ObjectOutputStream(socket.getOutputStream()); 26 | // 发送指令 27 | oos.writeObject(adee2); 28 | oos.flush(); 29 | 30 | // 读取服务端返回 31 | readServerData(socket,oos); 32 | } catch (Exception e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | }); 37 | thread.start(); 38 | try { 39 | thread.join(); 40 | } catch (InterruptedException e) { 41 | e.printStackTrace(); 42 | } 43 | } 44 | 45 | private synchronized void readServerData(final Socket socket,ObjectOutputStream oos) { 46 | try { 47 | ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); 48 | // cmd = (CMD)ois.readObject(); 49 | adbEn = (easyManagerServiceEntity) ois.readObject(); 50 | ois.close(); 51 | oos.close(); 52 | socket.close(); 53 | } catch (Exception e) { 54 | e.printStackTrace(); 55 | } 56 | } 57 | 58 | public easyManagerServiceEntity getAdbEntity(){ 59 | return adbEn; 60 | } 61 | 62 | public interface SocketListener { 63 | 64 | easyManagerServiceEntity getAdbEntity(easyManagerServiceEntity adfb); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/mylife/adbService.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.mylife; 2 | 3 | import android.os.StrictMode; 4 | 5 | import com.easymanager.core.entity.easyManagerClientEntity; 6 | import com.easymanager.core.entity.easyManagerServiceEntity; 7 | import com.easymanager.core.utils.CMD; 8 | 9 | import java.io.ObjectInputStream; 10 | import java.io.ObjectOutputStream; 11 | import java.net.ServerSocket; 12 | import java.net.Socket; 13 | import java.util.concurrent.ArrayBlockingQueue; 14 | import java.util.concurrent.ThreadPoolExecutor; 15 | import java.util.concurrent.TimeUnit; 16 | 17 | public class adbService { 18 | 19 | public final static int PORT = 43557; 20 | private SocketListener listener; 21 | 22 | public adbService(SocketListener listener) { 23 | this.listener = listener; 24 | try { 25 | // 利用ServerSocket类启动服务,然后指定一个端口 26 | ServerSocket serverSocket = new ServerSocket(PORT); 27 | System.out.println("easyManager adb server running " + PORT + " port"); 28 | ArrayBlockingQueue queue = new ArrayBlockingQueue<>(10); 29 | // 新建一个线程池用来并发处理客户端的消息 30 | ThreadPoolExecutor executor = new ThreadPoolExecutor( 31 | 5, 32 | 10, 33 | 50000, 34 | TimeUnit.MILLISECONDS, 35 | queue 36 | ); 37 | while (true) { 38 | Socket socket = serverSocket.accept(); 39 | // 接收到新消息 40 | executor.execute(new processMsg(socket)); 41 | } 42 | } catch (Exception e) { 43 | e.printStackTrace(); 44 | System.out.println("SocketServer create Exception:" + e.toString()); 45 | } 46 | } 47 | 48 | class processMsg implements Runnable { 49 | Socket socket; 50 | 51 | CMD cmd; 52 | Object o; 53 | 54 | public processMsg(Socket s) { 55 | socket = s; 56 | } 57 | 58 | public void run() { 59 | try { 60 | // 通过流读取内容 61 | ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); 62 | easyManagerClientEntity adbee2 = (easyManagerClientEntity) ois.readObject(); 63 | cmd = listener.sendCMD(adbee2.getCmdstr()); 64 | o = listener.doSomeThing(adbee2); 65 | ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream()); 66 | easyManagerServiceEntity a = new easyManagerServiceEntity(cmd,o); 67 | oos.writeObject(a); 68 | oos.flush(); 69 | oos.close(); 70 | socket.close(); 71 | //需要实现appops的功能 72 | } catch (Exception e) { 73 | e.printStackTrace(); 74 | } 75 | } 76 | } 77 | 78 | public interface SocketListener{ 79 | 80 | CMD sendCMD(String cmdstr); 81 | 82 | Object doSomeThing(easyManagerClientEntity adbEntity2); 83 | 84 | } 85 | 86 | 87 | } 88 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/utils/MyActivityManager.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.utils; 2 | 3 | import android.app.Activity; 4 | 5 | import java.util.ArrayList; 6 | 7 | public class MyActivityManager { 8 | 9 | private ArrayList list = new ArrayList<>(); 10 | 11 | private static MyActivityManager ins; 12 | 13 | public static MyActivityManager getIns(){ 14 | if(ins == null){ 15 | ins = new MyActivityManager(); 16 | } 17 | return ins; 18 | } 19 | 20 | //添加一个activity实现 21 | public void add(Activity activity){ 22 | list.add(activity); 23 | } 24 | 25 | //终止一个activity 26 | public void kill(Activity activity){ 27 | for (Activity a : list) { 28 | if(a == activity){ 29 | a.finish(); 30 | list.remove(a); 31 | } 32 | } 33 | } 34 | 35 | //终止所保存的activity实例 36 | public void killall(){ 37 | for (Activity activity : list) { 38 | activity.finish(); 39 | } 40 | System.exit(0); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/utils/ShellUtils.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.utils; 2 | 3 | import com.easymanager.core.entity.easyManagerClientEntity; 4 | import com.easymanager.core.entity.easyManagerServiceEntity; 5 | import com.easymanager.core.utils.CMD; 6 | import com.easymanager.mylife.adbClient; 7 | 8 | import java.io.File; 9 | 10 | public class ShellUtils { 11 | 12 | public ShellUtils(){} 13 | 14 | public CMD runADBCmd(String cmdstr){ 15 | 16 | easyManagerClientEntity adben2 = new easyManagerClientEntity(cmdstr,null,-1); 17 | 18 | adbClient adbSocketClient2 = new adbClient(adben2,new adbClient.SocketListener() { 19 | 20 | @Override 21 | public easyManagerServiceEntity getAdbEntity(easyManagerServiceEntity adfb) { 22 | return null; 23 | } 24 | }); 25 | return adbSocketClient2.getAdbEntity().getCmd(); 26 | } 27 | 28 | /** 29 | * 是否存在su命令,并且有执行权限 30 | * 31 | * @return 存在su命令,并且有执行权限返回true 32 | */ 33 | public boolean isSuEnable() { 34 | File file = null; 35 | String[] paths = {"/system/bin/", "/system/xbin/", "/system/sbin/", "/sbin/", "/vendor/bin/", "/su/bin/"}; 36 | try { 37 | for (String path : paths) { 38 | file = new File(path + "su"); 39 | if (file.exists() && file.canExecute()) { 40 | return testRoot(); 41 | } 42 | } 43 | } catch (Exception x) { 44 | x.printStackTrace(); 45 | } 46 | return false; 47 | } 48 | 49 | public boolean testRoot(){ 50 | CMD cmd = new CMD("id"); 51 | return cmd.getResultCode() == 0; 52 | } 53 | 54 | public boolean isADB(){ 55 | CMD cmd = runADBCmd("id|grep shell"); 56 | return !cmd.toString().isEmpty(); 57 | } 58 | 59 | public CMD getCMD(String cmdstr,Boolean isRoot){ 60 | if(isRoot){ 61 | return new CMD(cmdstr); 62 | }else{ 63 | return runADBCmd(cmdstr); 64 | } 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/utils/StringTools.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.utils; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | public class StringTools { 7 | 8 | public StringTools(){} 9 | 10 | /** 11 | *

12 | * 进行字符串正则提取 13 | */ 14 | public String getByString(String src, String regex, String re_str) { 15 | StringBuilder tmp = new StringBuilder(); 16 | Matcher m = Pattern.compile(regex).matcher(src); 17 | if (m.find()) { 18 | tmp.append(m.group().replaceAll(re_str, "") + "\n"); 19 | } 20 | return tmp.toString(); 21 | } 22 | 23 | /** 24 | *

25 | * 进行字符串正则提取 26 | */ 27 | public String getByAllString(String src, String regex, String re_str) { 28 | StringBuilder tmp = new StringBuilder(); 29 | Matcher m = Pattern.compile(regex).matcher(src); 30 | while (m.find()) { 31 | tmp.append(m.group().replaceAll(re_str, "") + "\n"); 32 | } 33 | return tmp.toString(); 34 | } 35 | 36 | //获取文件结尾类型 37 | public String getPathByLastNameType(String filePath) { 38 | return filePath.substring(filePath.lastIndexOf(".") + 1); 39 | } 40 | 41 | //获取路径文件名称 42 | public String getPathByLastName(String filePath) { 43 | return filePath.substring(filePath.lastIndexOf("/") + 1); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/utils/base/AppCloneUtils.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.utils.base; 2 | 3 | import com.easymanager.core.utils.CMD; 4 | import com.easymanager.utils.TextUtils; 5 | import com.easymanager.utils.dialog.PackageDialog; 6 | import com.easymanager.utils.dialog.SearchDialog; 7 | import com.easymanager.utils.dialog.UserDialog; 8 | import com.easymanager.utils.easyManagerUtils; 9 | 10 | public class AppCloneUtils { 11 | 12 | public UserDialog getUd() { 13 | return ud; 14 | } 15 | 16 | public void setUd(UserDialog ud) { 17 | this.ud = ud; 18 | } 19 | 20 | public PackageDialog getPd() { 21 | return pd; 22 | } 23 | 24 | public void setPd(PackageDialog pd) { 25 | this.pd = pd; 26 | } 27 | 28 | public SearchDialog getSd() { 29 | return sd; 30 | } 31 | 32 | public void setSd(SearchDialog sd) { 33 | this.sd = sd; 34 | } 35 | 36 | private UserDialog ud =new UserDialog(); 37 | private PackageDialog pd = new PackageDialog(); 38 | private SearchDialog sd = new SearchDialog(); 39 | 40 | public int getCurrentUserID(){ 41 | return getEasyManagerUtils().getCurrentUserID(); 42 | } 43 | 44 | public easyManagerUtils getEasyManagerUtils(){ 45 | return ud.easyMUtils; 46 | } 47 | 48 | public CMD runCMD(String cmdstr){ 49 | return getEasyManagerUtils().runCMD(cmdstr); 50 | } 51 | 52 | public TextUtils getTU(){ 53 | return ud.tu; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/easymanager/utils/base/DialogBaseUtils.java: -------------------------------------------------------------------------------- 1 | package com.easymanager.utils.base; 2 | 3 | import android.app.AlertDialog; 4 | import android.content.Context; 5 | import android.content.DialogInterface; 6 | import android.widget.TextView; 7 | 8 | import com.easymanager.R; 9 | import com.easymanager.utils.TextUtils; 10 | 11 | import java.lang.reflect.Field; 12 | 13 | public class DialogBaseUtils { 14 | 15 | public TextUtils tu = new TextUtils(); 16 | //显示一个弹窗 17 | public void showInfoMsg(Context con,String title , String msg){ 18 | AlertDialog.Builder ab = new AlertDialog.Builder(con); 19 | ab.setTitle(title); 20 | ab.setMessage(msg); 21 | ab.setNegativeButton(tu.getLanguageString(con, R.string.dialog_sure_text), new DialogInterface.OnClickListener() { 22 | @Override 23 | public void onClick(DialogInterface dialogInterface, int i) { 24 | dialogInterface.cancel(); 25 | } 26 | }); 27 | 28 | AlertDialog alertDialog = ab.create(); 29 | alertDialog.show(); 30 | TextView tv = alertDialog.getWindow().getDecorView().findViewById(android.R.id.message); 31 | tv.setTextIsSelectable(true); 32 | } 33 | 34 | /** 35 | * 通过反射 阻止关闭对话框 36 | */ 37 | public void preventDismissDialog(AlertDialog ddd) { 38 | try { 39 | Field field = ddd.getClass().getSuperclass().getDeclaredField("mShowing"); 40 | field.setAccessible(true); 41 | //设置mShowing值,欺骗android系统 42 | field.set(ddd, false); 43 | } catch (Exception e) { 44 | e.printStackTrace(); 45 | } 46 | } 47 | 48 | /** 49 | * 关闭对话框 50 | */ 51 | public void permittedDismissDialog(AlertDialog ddd) { 52 | try { 53 | Field field = ddd.getClass().getSuperclass().getDeclaredField("mShowing"); 54 | field.setAccessible(true); 55 | field.set(ddd, true); 56 | } catch (Exception e) { 57 | } 58 | ddd.dismiss(); 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/launcher_iconnn-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/launcher_iconnn-playstore.png -------------------------------------------------------------------------------- /app/src/main/manager_grant_app-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/manager_grant_app-playstore.png -------------------------------------------------------------------------------- /app/src/main/othertool-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrsEWE44/easyManager/ee4cbc5aabcd4e112b135c6d8536396f7c3eb89c/app/src/main/othertool-playstore.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/appclone_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/back_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/backup_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/clean_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/help.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/help_select_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/help_unselect_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/home_select_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/home_unselect_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/manager.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/manager_grant_app_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/othertool_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rombuild_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/text_underline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/unmanager_grant_app_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/usbmode_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 18 | 19 | 20 | 27 | 28 | 34 | 35 | 41 | 42 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_clone_manager.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 19 | 20 | 21 | 26 | 27 | 32 | 33 | 34 | 39 | 40 | 45 | 46 | 52 | 53 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_info_item_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | 21 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_info_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 17 | 18 | 23 | 24 | 29 | 30 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 50 | 51 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 67 | 68 | 73 | 74 | 35 | 36 | 41 | 42 | 46 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/manager_grant_user_fragment_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 | 20 | 21 | 25 | 26 | 27 | 34 | 35 | 36 | 37 | 38 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/manager_grant_user_item_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 17 | 18 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 52 | 58 | 59 | 65 | 66 | 67 | 68 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /app/src/main/res/layout/run_command_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 17 | 18 | 22 | 23 | 30 | 31 | 32 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/layout/search_view_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/usb_mode_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 |