├── settings.gradle
├── app
├── libs
│ └── AndroidHiddenAPI.jar
├── src
│ └── main
│ │ ├── res
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values
│ │ │ ├── bool.xml
│ │ │ ├── dimens.xml
│ │ │ ├── attrs.xml
│ │ │ ├── donottranslate.xml
│ │ │ ├── colors.xml
│ │ │ ├── arrays.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-sw600dp
│ │ │ ├── bool.xml
│ │ │ └── styles.xml
│ │ ├── layout
│ │ │ ├── color_icon_preview.xml
│ │ │ ├── activity_container.xml
│ │ │ ├── list_sticky_header_download.xml
│ │ │ ├── toolbar.xml
│ │ │ ├── activity_download_details_not_found.xml
│ │ │ ├── framework_zip_item.xml
│ │ │ ├── framework_zip_group.xml
│ │ │ ├── download_moreinfo.xml
│ │ │ ├── activity_welcome.xml
│ │ │ ├── xposed_not_active_note.xml
│ │ │ ├── download_details.xml
│ │ │ ├── icon_preference_item.xml
│ │ │ ├── download_view.xml
│ │ │ ├── list_item_download.xml
│ │ │ ├── tab_logs.xml
│ │ │ ├── activity_download_details.xml
│ │ │ ├── tab_downloader.xml
│ │ │ ├── activity_installation.xml
│ │ │ ├── list_item_module.xml
│ │ │ └── list_item_version.xml
│ │ ├── drawable
│ │ │ ├── toolbar_shadow.xml
│ │ │ ├── ic_flash.xml
│ │ │ ├── background_card_dark.xml
│ │ │ ├── background_card_light.xml
│ │ │ ├── background_card_black.xml
│ │ │ ├── ic_verified.xml
│ │ │ ├── ic_phone.xml
│ │ │ ├── background_card_normal_light.xml
│ │ │ ├── background_card_normal_black.xml
│ │ │ ├── background_card_normal_dark.xml
│ │ │ ├── background_card_pressed_light.xml
│ │ │ ├── background_card_pressed_black.xml
│ │ │ └── background_card_pressed_dark.xml
│ │ ├── xml
│ │ │ ├── file_paths.xml
│ │ │ ├── module_prefs.xml
│ │ │ └── prefs.xml
│ │ ├── drawable-anydpi
│ │ │ ├── ic_send.xml
│ │ │ ├── ic_warning.xml
│ │ │ ├── ic_menu_sort.xml
│ │ │ ├── ic_warning_grey.xml
│ │ │ ├── ic_bookmark.xml
│ │ │ ├── ic_delete.xml
│ │ │ ├── ic_close.xml
│ │ │ ├── ic_error.xml
│ │ │ ├── ic_no_image.xml
│ │ │ ├── ic_scroll_down.xml
│ │ │ ├── ic_scroll_top.xml
│ │ │ ├── ic_bookmark_outline.xml
│ │ │ ├── ic_check_circle.xml
│ │ │ ├── ic_person.xml
│ │ │ ├── ic_chip.xml
│ │ │ ├── ic_description.xml
│ │ │ ├── ic_info.xml
│ │ │ ├── ic_nav_downloads.xml
│ │ │ ├── ic_save.xml
│ │ │ ├── ic_nav_about.xml
│ │ │ ├── ic_menu_refresh.xml
│ │ │ ├── ic_menu_search.xml
│ │ │ ├── ic_help.xml
│ │ │ ├── ic_nav_support.xml
│ │ │ ├── ic_cloud.xml
│ │ │ ├── ic_notification.xml
│ │ │ ├── ic_nav_modules.xml
│ │ │ ├── ic_cloud_download.xml
│ │ │ ├── ic_donate.xml
│ │ │ ├── ic_cloud_off.xml
│ │ │ ├── ic_action_share.xml
│ │ │ ├── ic_nav_logs.xml
│ │ │ ├── ic_android.xml
│ │ │ ├── ic_github.xml
│ │ │ ├── ic_nav_settings.xml
│ │ │ ├── ic_language.xml
│ │ │ ├── ic_no_connection.xml
│ │ │ └── ic_nav_install.xml
│ │ ├── animator
│ │ │ ├── fade_in.xml
│ │ │ └── fade_out.xml
│ │ ├── menu
│ │ │ ├── context_menu_modules_bookmark.xml
│ │ │ ├── menu_download.xml
│ │ │ ├── menu_download_details.xml
│ │ │ ├── context_menu_modules.xml
│ │ │ ├── menu_installer.xml
│ │ │ ├── menu_logs.xml
│ │ │ ├── menu_modules.xml
│ │ │ └── drawer.xml
│ │ ├── values-sw600dp-v21
│ │ │ └── styles.xml
│ │ ├── layout-v23
│ │ │ └── list_item_download.xml
│ │ ├── values-v21
│ │ │ └── styles.xml
│ │ ├── values-gl
│ │ │ └── strings.xml
│ │ ├── values-ar
│ │ │ └── strings.xml
│ │ ├── values-id
│ │ │ └── strings.xml
│ │ └── values-ko
│ │ │ └── strings.xml
│ │ ├── java
│ │ └── de
│ │ │ └── robv
│ │ │ └── android
│ │ │ └── xposed
│ │ │ └── installer
│ │ │ ├── util
│ │ │ ├── RunnableWithParam.java
│ │ │ ├── chrome
│ │ │ │ ├── ServiceConnectionCallback.java
│ │ │ │ ├── CustomTabsURLSpan.java
│ │ │ │ ├── ServiceConnection.java
│ │ │ │ ├── LinkTransformationMethod.java
│ │ │ │ └── CustomTabActivityHelper.java
│ │ │ ├── ThemeUtil.java
│ │ │ ├── OnlineLoader.java
│ │ │ ├── HashUtil.java
│ │ │ ├── AssetUtil.java
│ │ │ ├── NavUtil.java
│ │ │ ├── Loader.java
│ │ │ └── PrefixedSharedPreferences.java
│ │ │ ├── repo
│ │ │ ├── Repository.java
│ │ │ ├── ModuleVersion.java
│ │ │ ├── Module.java
│ │ │ └── ReleaseType.java
│ │ │ ├── widget
│ │ │ ├── ListPreferenceSummaryFix.java
│ │ │ ├── IntegerListPreference.java
│ │ │ └── IconListPreference.java
│ │ │ ├── receivers
│ │ │ ├── DownloadReceiver.java
│ │ │ └── PackageChangeReceiver.java
│ │ │ ├── installation
│ │ │ ├── FlashCallback.java
│ │ │ ├── Flashable.java
│ │ │ ├── FlashRecoveryAuto.java
│ │ │ └── FlashDirectly.java
│ │ │ ├── XposedBaseActivity.java
│ │ │ ├── DownloadDetailsSettingsFragment.java
│ │ │ ├── SupportActivity.java
│ │ │ └── DownloadDetailsFragment.java
│ │ └── AndroidManifest.xml
├── lint.xml
├── proguard-rules.pro
└── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── XposedInstaller.iml
├── gradlew.bat
└── gradlew
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/libs/AndroidHiddenAPI.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/app/libs/AndroidHiddenAPI.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values/bool.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android-hacker/XposedInstaller/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp/bool.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.apk
2 | *.ap_
3 | *.iml
4 | *.dex
5 | *.class
6 | .idea/
7 | .gradle/
8 | build/
9 | local.properties
10 | app/lint.xml
11 | app/proguard-project.txt
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/RunnableWithParam.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | public interface RunnableWithParam {
4 | public void run(T param);
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/color_icon_preview.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Oct 29 16:17:02 CET 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/toolbar_shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/repo/Repository.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.repo;
2 |
3 | public class Repository {
4 | public String name;
5 | public String url;
6 | public boolean isPartial = false;
7 | public String partialUrl;
8 | public String version;
9 |
10 | /*package*/ Repository() {}
11 | }
12 |
--------------------------------------------------------------------------------
/app/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_flash.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_warning.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_menu_sort.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_warning_grey.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_bookmark.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_close.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_error.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_no_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_scroll_down.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_scroll_top.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_bookmark_outline.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_verified.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_check_circle.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_person.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_chip.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_phone.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4dp
4 |
5 |
6 | 0dp
7 | 264dp
8 | 148dp
9 | 650dp
10 | 500dp
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_description.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_info.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_downloads.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_save.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_about.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/context_menu_modules_bookmark.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/repo/ModuleVersion.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.repo;
2 |
3 | public class ModuleVersion {
4 | public final Module module;
5 | public String name;
6 | public int code;
7 | public String downloadLink;
8 | public String md5sum;
9 | public String changelog;
10 | public boolean changelogIsHtml = false;
11 | public ReleaseType relType = ReleaseType.STABLE;
12 | public long uploaded = -1;
13 |
14 | /* package */ ModuleVersion(Module module) {
15 | this.module = module;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_menu_refresh.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_menu_search.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_help.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_support.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_cloud.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/module_prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/chrome/ServiceConnectionCallback.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util.chrome;
2 |
3 | import android.support.customtabs.CustomTabsClient;
4 |
5 | /**
6 | * Callback for events when connecting and disconnecting from Custom Tabs
7 | * Service.
8 | */
9 | public interface ServiceConnectionCallback {
10 | /**
11 | * Called when the service is connected.
12 | *
13 | * @param client
14 | * a CustomTabsClient
15 | */
16 | void onServiceConnected(CustomTabsClient client);
17 |
18 | /**
19 | * Called when the service is disconnected.
20 | */
21 | void onServiceDisconnected();
22 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_notification.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_modules.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_cloud_download.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_download.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/donottranslate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Xposed Installer
5 | http://forum.xda-developers.com/xposed/xposed-faq-issues-t2735540
6 | http://repo.xposed.info/donate
7 | https://github.com/rovo89
8 | http://forum.xda-developers.com/xposed
9 | Android %1$s (%2$s, API %3$d)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/chrome/CustomTabsURLSpan.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util.chrome;
2 |
3 | import android.app.Activity;
4 | import android.text.style.URLSpan;
5 | import android.view.View;
6 |
7 | import de.robv.android.xposed.installer.util.NavUtil;
8 |
9 | /**
10 | * Created by Nikola D. on 12/23/2015.
11 | */
12 | public class CustomTabsURLSpan extends URLSpan {
13 |
14 | private Activity activity;
15 |
16 | public CustomTabsURLSpan(Activity activity, String url) {
17 | super(url);
18 | this.activity = activity;
19 | }
20 |
21 | @Override
22 | public void onClick(View widget) {
23 | String url = getURL();
24 | NavUtil.startURL(activity, url);
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/widget/ListPreferenceSummaryFix.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 |
6 | import com.afollestad.materialdialogs.prefs.MaterialListPreference;
7 |
8 | public class ListPreferenceSummaryFix extends MaterialListPreference {
9 | public ListPreferenceSummaryFix(Context context) {
10 | super(context);
11 | }
12 |
13 | public ListPreferenceSummaryFix(Context context, AttributeSet attrs) {
14 | super(context, attrs);
15 | }
16 |
17 | @Override
18 | public void setValue(String value) {
19 | super.setValue(value);
20 | notifyChanged();
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_donate.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_cloud_off.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_action_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_logs.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_sticky_header_download.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_download_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/context_menu_modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/receivers/DownloadReceiver.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.receivers;
2 |
3 | import android.app.DownloadManager;
4 | import android.content.BroadcastReceiver;
5 | import android.content.Context;
6 | import android.content.Intent;
7 |
8 | import de.robv.android.xposed.installer.util.DownloadsUtil;
9 |
10 | public class DownloadReceiver extends BroadcastReceiver {
11 | @Override
12 | public void onReceive(final Context context, final Intent intent) {
13 | String action = intent.getAction();
14 | if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(action)) {
15 | long downloadId = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, 0);
16 | DownloadsUtil.triggerDownloadFinishedCallback(context, downloadId);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/installation/FlashCallback.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.installation;
2 |
3 | import de.robv.android.xposed.installer.util.RootUtil;
4 | import eu.chainfire.libsuperuser.Shell;
5 |
6 | public interface FlashCallback extends RootUtil.LineCallback {
7 | void onStarted();
8 | void onDone();
9 | void onError(int exitCode, String error);
10 |
11 | int OK = 0;
12 | int ERROR_GENERIC = 1;
13 |
14 | // SU errors
15 | int ERROR_TIMEOUT = Shell.OnCommandResultListener.WATCHDOG_EXIT;
16 | int ERROR_SHELL_DIED = Shell.OnCommandResultListener.SHELL_DIED;
17 | int ERROR_NO_ROOT_ACCESS = Shell.OnCommandResultListener.SHELL_EXEC_FAILED;
18 |
19 | // ZIP errors
20 | int ERROR_INVALID_ZIP = -100;
21 | int ERROR_NOT_FLASHABLE_IN_APP = -101;
22 | int ERROR_INSTALLER_NEEDS_UPDATE = -102;
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/repo/Module.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.repo;
2 |
3 | import android.util.Pair;
4 |
5 | import java.util.ArrayList;
6 | import java.util.LinkedList;
7 | import java.util.List;
8 |
9 | public class Module {
10 | public final Repository repository;
11 | public final List> moreInfo = new LinkedList>();
12 | public final List versions = new ArrayList();
13 | public final List screenshots = new ArrayList();
14 | public String packageName;
15 | public String name;
16 | public String summary;
17 | public String description;
18 | public boolean descriptionIsHtml = false;
19 | public String author;
20 | public String support;
21 | public long created = -1;
22 | public long updated = -1;
23 |
24 | /* package */ Module(Repository repository) {
25 | this.repository = repository;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_android.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/repo/ReleaseType.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.repo;
2 |
3 | import de.robv.android.xposed.installer.R;
4 |
5 | public enum ReleaseType {
6 | STABLE(R.string.reltype_stable),
7 | BETA(R.string.reltype_beta),
8 | EXPERIMENTAL(R.string.reltype_experimental);
9 |
10 | private static final ReleaseType[] sValuesCache = values();
11 | private final int mTitleId;
12 |
13 | ReleaseType(int titleId) {
14 | mTitleId = titleId;
15 | }
16 |
17 | public static ReleaseType fromString(String value) {
18 | if (value == null) {
19 | return STABLE;
20 | }
21 | switch (value) {
22 | case "stable":
23 | default:
24 | return STABLE;
25 | case "beta":
26 | return BETA;
27 | case "experimental":
28 | return EXPERIMENTAL;
29 | }
30 | }
31 |
32 | public static ReleaseType fromOrdinal(int ordinal) {
33 | return sValuesCache[ordinal];
34 | }
35 |
36 | public int getTitleId() {
37 | return mTitleId;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/XposedInstaller.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_normal_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_normal_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_normal_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_pressed_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_pressed_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_card_pressed_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_github.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_installer.xml:
--------------------------------------------------------------------------------
1 |
2 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_download_details_not_found.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
14 |
15 |
22 |
23 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_settings.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/framework_zip_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
25 |
26 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | -dontobfuscate
20 |
21 | # Required when -dontobfuscate is set, see http://stackoverflow.com/a/7587680
22 | -optimizations !code/allocation/variable
23 |
24 | # Make sure that getActiveXposedVersion() is actually called
25 | # (instead of always using it's seemingly static value -1)
26 | -optimizations !method/propagation/returnvalue,!method/inlining/*
27 |
28 | # See https://code.google.com/p/android/issues/detail?id=58508
29 | -keep class android.support.v7.widget.SearchView { *; }
30 |
31 | -dontwarn com.squareup.okhttp.**
32 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_language.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_no_connection.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/framework_zip_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
19 |
20 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 27
5 |
6 | defaultConfig {
7 | applicationId "de.robv.android.xposed.installer"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 43
11 | versionName "3.1.5"
12 | archivesBaseName = "XposedInstaller_${versionName}".replace(' ', '_')
13 | }
14 |
15 | buildTypes {
16 | release {
17 | minifyEnabled true
18 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
19 | }
20 | debug {
21 | pseudoLocalesEnabled true
22 | }
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation 'com.android.support:cardview-v7:27.0.2'
28 | implementation 'com.android.support:design:27.0.2'
29 | implementation 'com.android.support:customtabs:27.0.2'
30 | implementation 'com.android.support:support-v13:27.0.2'
31 | implementation 'com.afollestad.material-dialogs:commons:0.9.0.2'
32 | implementation 'se.emilsjolander:stickylistheaders:2.7.0'
33 | implementation 'eu.chainfire:libsuperuser:1.0.0.201608240809'
34 | implementation 'com.squareup.picasso:picasso:2.5.2'
35 | implementation 'de.psdev.licensesdialog:licensesdialog:1.8.1'
36 | compileOnly fileTree(dir: 'libs', include: ['*.jar'])
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_logs.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/chrome/ServiceConnection.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util.chrome;
2 |
3 | import android.content.ComponentName;
4 | import android.support.customtabs.CustomTabsClient;
5 | import android.support.customtabs.CustomTabsServiceConnection;
6 |
7 | import java.lang.ref.WeakReference;
8 |
9 | /**
10 | * Implementation for the CustomTabsServiceConnection that avoids leaking the
11 | * ServiceConnectionCallback
12 | */
13 | public class ServiceConnection extends CustomTabsServiceConnection {
14 | // A weak reference to the ServiceConnectionCallback to avoid leaking it.
15 | private WeakReference mConnectionCallback;
16 |
17 | public ServiceConnection(ServiceConnectionCallback connectionCallback) {
18 | mConnectionCallback = new WeakReference<>(connectionCallback);
19 | }
20 |
21 | @Override
22 | public void onCustomTabsServiceConnected(ComponentName name, CustomTabsClient client) {
23 | ServiceConnectionCallback connectionCallback = mConnectionCallback.get();
24 | if (connectionCallback != null)
25 | connectionCallback.onServiceConnected(client);
26 | }
27 |
28 | @Override
29 | public void onServiceDisconnected(ComponentName name) {
30 | ServiceConnectionCallback connectionCallback = mConnectionCallback.get();
31 | if (connectionCallback != null)
32 | connectionCallback.onServiceDisconnected();
33 | }
34 | }
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/ThemeUtil.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import android.content.Context;
4 | import android.content.res.Resources.Theme;
5 | import android.content.res.TypedArray;
6 |
7 | import de.robv.android.xposed.installer.R;
8 | import de.robv.android.xposed.installer.XposedApp;
9 | import de.robv.android.xposed.installer.XposedBaseActivity;
10 |
11 | public final class ThemeUtil {
12 | private static int[] THEMES = new int[] {
13 | R.style.Theme_XposedInstaller_Light,
14 | R.style.Theme_XposedInstaller_Dark,
15 | R.style.Theme_XposedInstaller_Dark_Black, };
16 |
17 | private ThemeUtil() {
18 | }
19 |
20 | public static int getSelectTheme() {
21 | int theme = XposedApp.getPreferences().getInt("theme", 0);
22 | return (theme >= 0 && theme < THEMES.length) ? theme : 0;
23 | }
24 |
25 | public static void setTheme(XposedBaseActivity activity) {
26 | activity.mTheme = getSelectTheme();
27 | activity.setTheme(THEMES[activity.mTheme]);
28 | }
29 |
30 | public static void reloadTheme(XposedBaseActivity activity) {
31 | int theme = getSelectTheme();
32 | if (theme != activity.mTheme)
33 | activity.recreate();
34 | }
35 |
36 | public static int getThemeColor(Context context, int id) {
37 | Theme theme = context.getTheme();
38 | TypedArray a = theme.obtainStyledAttributes(new int[] { id });
39 | int result = a.getColor(0, 0);
40 | a.recycle();
41 | return result;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/download_moreinfo.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
21 |
22 |
28 |
29 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_welcome.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/xposed_not_active_note.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
21 |
22 |
28 |
29 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
10 |
14 |
18 |
22 |
23 |
26 |
30 |
34 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/OnlineLoader.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.net.ConnectivityManager;
6 | import android.net.NetworkInfo;
7 | import android.support.annotation.CallSuper;
8 |
9 | import de.robv.android.xposed.installer.XposedApp;
10 |
11 | public abstract class OnlineLoader extends Loader {
12 | protected SharedPreferences mPref = XposedApp.getPreferences();
13 | protected String mPrefKeyLastUpdateCheck = CLASS_NAME + "_last_update_check";
14 | protected int mUpdateFrequency = 24 * 60 * 60 * 1000;
15 |
16 | private static final ConnectivityManager sConMgr
17 | = (ConnectivityManager) XposedApp.getInstance().getSystemService(Context.CONNECTIVITY_SERVICE);
18 |
19 | protected boolean shouldUpdate() {
20 | long now = System.currentTimeMillis();
21 | long lastUpdateCheck = mPref.getLong(mPrefKeyLastUpdateCheck, 0);
22 | if (now < lastUpdateCheck + mUpdateFrequency) {
23 | return false;
24 | }
25 |
26 | NetworkInfo netInfo = sConMgr.getActiveNetworkInfo();
27 | if (netInfo == null || !netInfo.isConnected()) {
28 | return false;
29 | }
30 |
31 | mPref.edit().putLong(mPrefKeyLastUpdateCheck, now).apply();
32 | return true;
33 | }
34 |
35 | @CallSuper
36 | @Override
37 | protected void onClear() {
38 | resetLastUpdateCheck();
39 | }
40 |
41 | public void resetLastUpdateCheck() {
42 | mPref.edit().remove(mPrefKeyLastUpdateCheck).apply();
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-anydpi/ic_nav_install.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/download_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
21 |
22 |
29 |
30 |
35 |
36 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/XposedBaseActivity.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer;
2 |
3 | import android.os.Build;
4 | import android.os.Bundle;
5 | import android.support.annotation.StringRes;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.view.WindowManager;
8 |
9 | import de.robv.android.xposed.installer.util.ThemeUtil;
10 |
11 | public abstract class XposedBaseActivity extends AppCompatActivity {
12 | public int mTheme = -1;
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceBundle) {
16 | super.onCreate(savedInstanceBundle);
17 | ThemeUtil.setTheme(this);
18 | }
19 |
20 | @Override
21 | protected void onResume() {
22 | super.onResume();
23 |
24 | ThemeUtil.reloadTheme(this);
25 | }
26 |
27 | @SuppressWarnings("deprecation")
28 | public void setFloating(android.support.v7.widget.Toolbar toolbar, @StringRes int details) {
29 | boolean isTablet = getResources().getBoolean(R.bool.isTablet);
30 | if (isTablet) {
31 | WindowManager.LayoutParams params = getWindow().getAttributes();
32 | params.height = getResources().getDimensionPixelSize(R.dimen.floating_height);
33 | params.width = getResources().getDimensionPixelSize(R.dimen.floating_width);
34 | params.alpha = 1.0f;
35 | params.dimAmount = 0.6f;
36 | params.flags |= 2;
37 | getWindow().setAttributes(params);
38 |
39 | if (details != 0) {
40 | toolbar.setTitle(details);
41 | }
42 | toolbar.setNavigationIcon(R.drawable.ic_close);
43 | setFinishOnTouchOutside(true);
44 | }
45 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
46 | getWindow().setStatusBarColor(getResources().getColor(R.color.colorPrimaryDark));
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #2196f3
5 | #1976d2
6 | #727272
7 | #FF9800
8 | #777
9 | #F44336
10 | @color/red_500
11 | @color/darker_green
12 | #4CAF50
13 | #FFC107
14 |
15 |
16 | #ffeeeeee
17 | #fff
18 | #fff
19 | #dfdfdf
20 | #dbdbdb
21 | #222
22 | #e5e5e5
23 |
24 |
25 | #ff303030
26 | #363636
27 | #363636
28 | #505050
29 | #161616
30 | #222
31 | #505050
32 |
33 |
34 | #000000
35 | #181818
36 | #181818
37 | #303030
38 | #121212
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/icon_preference_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
30 |
31 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/chrome/LinkTransformationMethod.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util.chrome;
2 |
3 | import android.app.Activity;
4 | import android.graphics.Rect;
5 | import android.text.Spannable;
6 | import android.text.Spanned;
7 | import android.text.method.TransformationMethod;
8 | import android.text.style.URLSpan;
9 | import android.text.util.Linkify;
10 | import android.view.View;
11 | import android.widget.TextView;
12 |
13 | /**
14 | * Created by Nikola D. on 12/23/2015.
15 | */
16 | public class LinkTransformationMethod implements TransformationMethod {
17 |
18 | private Activity activity;
19 |
20 | public LinkTransformationMethod(Activity activity) {
21 | this.activity = activity;
22 | }
23 |
24 | @Override
25 | public CharSequence getTransformation(CharSequence source, View view) {
26 | if (view instanceof TextView) {
27 | TextView textView = (TextView) view;
28 | Linkify.addLinks(textView, Linkify.WEB_URLS);
29 | if (textView.getText() == null || !(textView.getText() instanceof Spannable)) {
30 | return source;
31 | }
32 | Spannable text = (Spannable) textView.getText();
33 | URLSpan[] spans = text.getSpans(0, textView.length(), URLSpan.class);
34 | for (int i = spans.length - 1; i >= 0; i--) {
35 | URLSpan oldSpan = spans[i];
36 | int start = text.getSpanStart(oldSpan);
37 | int end = text.getSpanEnd(oldSpan);
38 | String url = oldSpan.getURL();
39 | text.removeSpan(oldSpan);
40 | text.setSpan(new CustomTabsURLSpan(activity, url), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
41 | }
42 | return text;
43 | }
44 | return source;
45 | }
46 |
47 | @Override
48 | public void onFocusChanged(View view, CharSequence sourceText, boolean focused, int direction, Rect previouslyFocusedRect) {
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/download_view.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
7 |
8 |
15 |
16 |
23 |
24 |
33 |
34 |
42 |
43 |
44 |
45 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v23/list_item_download.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
19 |
20 |
28 |
29 |
37 |
38 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/HashUtil.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.IOException;
6 | import java.io.InputStream;
7 | import java.security.MessageDigest;
8 | import java.security.NoSuchAlgorithmException;
9 |
10 | public class HashUtil {
11 | public static final String hash(String input, String algorithm) {
12 | try {
13 | MessageDigest md = MessageDigest.getInstance(algorithm);
14 | byte[] messageDigest = md.digest(input.getBytes());
15 | return toHexString(messageDigest);
16 | } catch (NoSuchAlgorithmException e) {
17 | throw new IllegalArgumentException(e);
18 | }
19 | }
20 |
21 | public static final String md5(String input) {
22 | return hash(input, "MD5");
23 | }
24 |
25 | public static final String hash(File file, String algorithm) throws IOException {
26 | try {
27 | MessageDigest md = MessageDigest.getInstance(algorithm);
28 | InputStream is = new FileInputStream(file);
29 | byte[] buffer = new byte[8192];
30 | int read = 0;
31 | while ((read = is.read(buffer)) > 0) {
32 | md.update(buffer, 0, read);
33 | }
34 | is.close();
35 | byte[] messageDigest = md.digest();
36 | return toHexString(messageDigest);
37 | } catch (NoSuchAlgorithmException e) {
38 | throw new IllegalArgumentException(e);
39 | }
40 | }
41 |
42 | public static final String md5(File input) throws IOException {
43 | return hash(input, "MD5");
44 | }
45 |
46 | private static String toHexString(byte[] bytes) {
47 | StringBuilder sb = new StringBuilder();
48 | for (byte b : bytes) {
49 | int unsignedB = b & 0xff;
50 | if (unsignedB < 0x10)
51 | sb.append("0");
52 | sb.append(Integer.toHexString(unsignedB));
53 | }
54 | return sb.toString();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/widget/IntegerListPreference.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.widget;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.util.AttributeSet;
6 |
7 | import com.afollestad.materialdialogs.prefs.MaterialListPreference;
8 |
9 | public class IntegerListPreference extends MaterialListPreference {
10 | public IntegerListPreference(Context context) {
11 | super(context);
12 | }
13 |
14 | public IntegerListPreference(Context context, AttributeSet attrs) {
15 | super(context, attrs);
16 | }
17 |
18 | public static int getIntValue(String value) {
19 | if (value == null)
20 | return 0;
21 |
22 | return (int) ((value.startsWith("0x"))
23 | ? Long.parseLong(value.substring(2), 16)
24 | : Long.parseLong(value));
25 | }
26 |
27 | @Override
28 | public void setValue(String value) {
29 | super.setValue(value);
30 | notifyChanged();
31 | }
32 |
33 | @Override
34 | protected boolean persistString(String value) {
35 | return value != null && persistInt(getIntValue(value));
36 |
37 | }
38 |
39 | @Override
40 | protected String getPersistedString(String defaultReturnValue) {
41 | SharedPreferences pref = getPreferenceManager().getSharedPreferences();
42 | String key = getKey();
43 | if (!shouldPersist() || !pref.contains(key))
44 | return defaultReturnValue;
45 |
46 | return String.valueOf(pref.getInt(key, 0));
47 | }
48 |
49 | @Override
50 | public int findIndexOfValue(String value) {
51 | CharSequence[] entryValues = getEntryValues();
52 | int intValue = getIntValue(value);
53 | if (value != null && entryValues != null) {
54 | for (int i = entryValues.length - 1; i >= 0; i--) {
55 | if (getIntValue(entryValues[i].toString()) == intValue) {
56 | return i;
57 | }
58 | }
59 | }
60 | return -1;
61 | }
62 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_download.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
20 |
21 |
29 |
30 |
38 |
39 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tab_logs.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
17 |
18 |
24 |
25 |
26 |
27 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_download_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
19 |
20 |
29 |
30 |
31 |
32 |
38 |
39 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
26 |
27 |
33 |
34 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - @string/download_sorting_status
6 | - @string/download_sorting_updated
7 | - @string/download_sorting_created
8 |
9 |
10 |
11 | - @string/settings_theme_light
12 | - @string/settings_theme_dark
13 | - @string/settings_theme_black
14 |
15 |
16 |
17 | - @string/nav_item_install
18 | - @string/nav_item_modules
19 | - @string/nav_item_download
20 | - @string/nav_item_logs
21 |
22 |
23 |
24 | - 0
25 | - 1
26 | - 2
27 |
28 |
29 |
30 | - 0
31 | - 1
32 | - 2
33 | - 3
34 |
35 |
36 |
37 | - @string/reltype_stable_summary
38 | - @string/reltype_beta_summary
39 | - @string/reltype_experimental_summary
40 |
41 |
42 |
43 | - stable
44 | - beta
45 | - experimental
46 |
47 |
48 |
49 | - @string/reltype_use_global_summary
50 | - @string/reltype_stable_summary
51 | - @string/reltype_beta_summary
52 | - @string/reltype_experimental_summary
53 |
54 |
55 |
56 |
57 | - stable
58 | - beta
59 | - experimental
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/AssetUtil.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import android.content.res.AssetManager;
4 | import android.os.Build;
5 | import android.os.FileUtils;
6 | import android.util.Log;
7 |
8 | import java.io.File;
9 | import java.io.FileOutputStream;
10 | import java.io.IOException;
11 | import java.io.InputStream;
12 |
13 | import de.robv.android.xposed.installer.XposedApp;
14 |
15 | public class AssetUtil {
16 | public static final File BUSYBOX_FILE = new File(XposedApp.getInstance().getCacheDir(), "busybox-xposed");
17 |
18 | @SuppressWarnings("deprecation")
19 | public static String getBinariesFolder() {
20 | if (Build.CPU_ABI.startsWith("arm")) {
21 | return "arm/";
22 | } else if (Build.CPU_ABI.startsWith("x86")) {
23 | return "x86/";
24 | } else {
25 | return null;
26 | }
27 | }
28 |
29 | public static File writeAssetToFile(AssetManager assets, String assetName, File targetFile, int mode) {
30 | try {
31 | if (assets == null)
32 | assets = XposedApp.getInstance().getAssets();
33 | InputStream in = assets.open(assetName);
34 | writeStreamToFile(in, targetFile, mode);;
35 | return targetFile;
36 | } catch (IOException e) {
37 | Log.e(XposedApp.TAG, "could not extract asset", e);
38 | if (targetFile != null)
39 | targetFile.delete();
40 |
41 | return null;
42 | }
43 | }
44 |
45 | public static void writeStreamToFile(InputStream in, File targetFile, int mode) throws IOException {
46 | FileOutputStream out = new FileOutputStream(targetFile);
47 |
48 | byte[] buffer = new byte[1024];
49 | int len;
50 | while ((len = in.read(buffer)) > 0) {
51 | out.write(buffer, 0, len);
52 | }
53 | in.close();
54 | out.close();
55 |
56 | FileUtils.setPermissions(targetFile.getAbsolutePath(), mode, -1, -1);
57 | }
58 |
59 | public synchronized static void extractBusybox() {
60 | if (BUSYBOX_FILE.exists())
61 | return;
62 |
63 | AssetManager assets = null;
64 | writeAssetToFile(assets, getBinariesFolder() + "busybox-xposed", BUSYBOX_FILE, 00700);
65 | }
66 |
67 | public synchronized static void removeBusybox() {
68 | BUSYBOX_FILE.delete();
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tab_downloader.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
19 |
20 |
28 |
29 |
36 |
37 |
42 |
43 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/NavUtil.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.net.Uri;
7 | import android.provider.Browser;
8 | import android.support.annotation.AnyThread;
9 | import android.support.annotation.NonNull;
10 | import android.support.customtabs.CustomTabsIntent;
11 | import android.text.Spannable;
12 | import android.text.SpannableString;
13 | import android.text.style.URLSpan;
14 | import android.text.util.Linkify;
15 |
16 | import com.afollestad.materialdialogs.MaterialDialog;
17 |
18 | import de.robv.android.xposed.installer.R;
19 | import de.robv.android.xposed.installer.XposedApp;
20 |
21 | public final class NavUtil {
22 |
23 | public static Uri parseURL(String str) {
24 | if (str == null || str.isEmpty())
25 | return null;
26 |
27 | Spannable spannable = new SpannableString(str);
28 | Linkify.addLinks(spannable, Linkify.WEB_URLS | Linkify.EMAIL_ADDRESSES);
29 | URLSpan spans[] = spannable.getSpans(0, spannable.length(), URLSpan.class);
30 | return (spans.length > 0) ? Uri.parse(spans[0].getURL()) : null;
31 | }
32 |
33 | public static void startURL(Activity activity, Uri uri) {
34 | if (!XposedApp.getPreferences().getBoolean("chrome_tabs", true)) {
35 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
36 | intent.putExtra(Browser.EXTRA_APPLICATION_ID, activity.getPackageName());
37 | activity.startActivity(intent);
38 | return;
39 | }
40 |
41 | CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
42 | customTabsIntent.setShowTitle(true);
43 | customTabsIntent.setToolbarColor(activity.getResources().getColor(R.color.colorPrimary));
44 | customTabsIntent.build().launchUrl(activity, uri);
45 | }
46 |
47 | public static void startURL(Activity activity, String url) {
48 | startURL(activity, parseURL(url));
49 | }
50 |
51 | @AnyThread
52 | public static void showMessage(final @NonNull Context context, final CharSequence message) {
53 | XposedApp.runOnUiThread(new Runnable() {
54 | @Override
55 | public void run() {
56 | new MaterialDialog.Builder(context)
57 | .content(message)
58 | .positiveText(android.R.string.ok)
59 | .show();
60 | }
61 | });
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/DownloadDetailsSettingsFragment.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.SharedPreferences;
6 | import android.os.Bundle;
7 | import android.preference.Preference;
8 | import android.preference.Preference.OnPreferenceChangeListener;
9 | import android.preference.PreferenceFragment;
10 | import android.preference.PreferenceManager;
11 |
12 | import java.util.Map;
13 |
14 | import de.robv.android.xposed.installer.repo.Module;
15 | import de.robv.android.xposed.installer.util.PrefixedSharedPreferences;
16 | import de.robv.android.xposed.installer.util.RepoLoader;
17 |
18 | public class DownloadDetailsSettingsFragment extends PreferenceFragment {
19 | private DownloadDetailsActivity mActivity;
20 |
21 | @Override
22 | public void onAttach(Activity activity) {
23 | super.onAttach(activity);
24 | mActivity = (DownloadDetailsActivity) activity;
25 | }
26 |
27 | @Override
28 | public void onCreate(Bundle savedInstanceState) {
29 | super.onCreate(savedInstanceState);
30 |
31 | final Module module = mActivity.getModule();
32 | if (module == null)
33 | return;
34 |
35 | final String packageName = module.packageName;
36 |
37 | PreferenceManager prefManager = getPreferenceManager();
38 | prefManager.setSharedPreferencesName("module_settings");
39 | PrefixedSharedPreferences.injectToPreferenceManager(prefManager, module.packageName);
40 | addPreferencesFromResource(R.xml.module_prefs);
41 |
42 | SharedPreferences prefs = getActivity().getSharedPreferences("module_settings", Context.MODE_PRIVATE);
43 | SharedPreferences.Editor editor = prefs.edit();
44 |
45 | if (prefs.getBoolean("no_global", true)) {
46 | for (Map.Entry k : prefs.getAll().entrySet()) {
47 | if (prefs.getString(k.getKey(), "").equals("global")) {
48 | editor.putString(k.getKey(), "").apply();
49 | }
50 | }
51 |
52 | editor.putBoolean("no_global", false).apply();
53 | }
54 |
55 | findPreference("release_type").setOnPreferenceChangeListener(
56 | new OnPreferenceChangeListener() {
57 | @Override
58 | public boolean onPreferenceChange(Preference preference,
59 | Object newValue) {
60 | RepoLoader.getInstance().setReleaseTypeLocal(packageName, (String) newValue);
61 | return true;
62 | }
63 | });
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/receivers/PackageChangeReceiver.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.receivers;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.net.Uri;
7 |
8 | import de.robv.android.xposed.installer.util.ModuleUtil;
9 | import de.robv.android.xposed.installer.util.ModuleUtil.InstalledModule;
10 | import de.robv.android.xposed.installer.util.NotificationUtil;
11 |
12 | public class PackageChangeReceiver extends BroadcastReceiver {
13 | private final static ModuleUtil mModuleUtil = ModuleUtil.getInstance();
14 |
15 | private static String getPackageName(Intent intent) {
16 | Uri uri = intent.getData();
17 | return (uri != null) ? uri.getSchemeSpecificPart() : null;
18 | }
19 |
20 | @Override
21 | public void onReceive(final Context context, final Intent intent) {
22 | if (intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED) && intent.getBooleanExtra(Intent.EXTRA_REPLACING, false))
23 | // Ignore existing packages being removed in order to be updated
24 | return;
25 |
26 | String packageName = getPackageName(intent);
27 | if (packageName == null)
28 | return;
29 |
30 | if (intent.getAction().equals(Intent.ACTION_PACKAGE_CHANGED)) {
31 | // make sure that the change is for the complete package, not only a
32 | // component
33 | String[] components = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_COMPONENT_NAME_LIST);
34 | if (components != null) {
35 | boolean isForPackage = false;
36 | for (String component : components) {
37 | if (packageName.equals(component)) {
38 | isForPackage = true;
39 | break;
40 | }
41 | }
42 | if (!isForPackage)
43 | return;
44 | }
45 | }
46 |
47 | InstalledModule module = ModuleUtil.getInstance().reloadSingleModule(packageName);
48 | if (module == null
49 | || intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED)) {
50 | // Package being removed, disable it if it was a previously active
51 | // Xposed mod
52 | if (mModuleUtil.isModuleEnabled(packageName)) {
53 | mModuleUtil.setModuleEnabled(packageName, false);
54 | mModuleUtil.updateModulesList(false);
55 | }
56 | return;
57 | }
58 |
59 | if (mModuleUtil.isModuleEnabled(packageName)) {
60 | mModuleUtil.updateModulesList(false);
61 | NotificationUtil.showModulesUpdatedNotification();
62 | } else {
63 | NotificationUtil.showNotActivatedNotification(packageName, module.getAppName());
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/SupportActivity.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer;
2 |
3 | import android.app.Fragment;
4 | import android.os.Bundle;
5 | import android.support.v7.app.ActionBar;
6 | import android.support.v7.widget.Toolbar;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.TextView;
11 |
12 | import de.robv.android.xposed.installer.util.NavUtil;
13 | import de.robv.android.xposed.installer.util.ThemeUtil;
14 |
15 | public class SupportActivity extends XposedBaseActivity {
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | ThemeUtil.setTheme(this);
20 | setContentView(R.layout.activity_container);
21 |
22 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
23 | setSupportActionBar(toolbar);
24 |
25 | toolbar.setNavigationOnClickListener(new View.OnClickListener() {
26 | @Override
27 | public void onClick(View view) {
28 | finish();
29 | }
30 | });
31 |
32 | ActionBar ab = getSupportActionBar();
33 | if (ab != null) {
34 | ab.setTitle(R.string.nav_item_support);
35 | ab.setDisplayHomeAsUpEnabled(true);
36 | }
37 |
38 | setFloating(toolbar, 0);
39 |
40 | if (savedInstanceState == null) {
41 | getFragmentManager().beginTransaction().add(R.id.container, new SupportFragment()).commit();
42 | }
43 | }
44 |
45 | public static class SupportFragment extends Fragment {
46 | @Override
47 | public void onCreate(Bundle savedInstanceState) {
48 | super.onCreate(savedInstanceState);
49 | }
50 |
51 | @Override
52 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
53 | Bundle savedInstanceState) {
54 | View v = inflater.inflate(R.layout.tab_support, container, false);
55 |
56 | View installerSupportView = v.findViewById(R.id.installerSupportView);
57 | View faqView = v.findViewById(R.id.faqView);
58 | View donateView = v.findViewById(R.id.donateView);
59 | TextView txtModuleSupport = (TextView) v.findViewById(R.id.tab_support_module_description);
60 |
61 | txtModuleSupport.setText(getString(R.string.support_modules_description,
62 | getString(R.string.module_support)));
63 |
64 | setupView(installerSupportView, R.string.about_support);
65 | setupView(faqView, R.string.support_faq_url);
66 | setupView(donateView, R.string.support_donate_url);
67 |
68 | return v;
69 | }
70 |
71 | public void setupView(View v, final int url) {
72 | v.setOnClickListener(new View.OnClickListener() {
73 | @Override
74 | public void onClick(View v) {
75 | NavUtil.startURL(getActivity(), getString(url));
76 | }
77 | });
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/installation/Flashable.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.installation;
2 |
3 | import android.content.Context;
4 | import android.os.Parcel;
5 | import android.os.Parcelable;
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 | import java.util.Set;
10 | import java.util.zip.ZipFile;
11 |
12 | import de.robv.android.xposed.installer.util.FrameworkZips;
13 | import de.robv.android.xposed.installer.util.InstallZipUtil;
14 | import de.robv.android.xposed.installer.util.InstallZipUtil.ZipCheckResult;
15 | import de.robv.android.xposed.installer.util.RootUtil;
16 |
17 | import static de.robv.android.xposed.installer.util.InstallZipUtil.closeSilently;
18 | import static de.robv.android.xposed.installer.util.InstallZipUtil.reportMissingFeatures;
19 | import static de.robv.android.xposed.installer.util.InstallZipUtil.triggerError;
20 |
21 | public abstract class Flashable implements Parcelable {
22 | public static final String KEY = "flash";
23 |
24 | protected final File mZipPath;
25 | protected final FrameworkZips.Type mType;
26 | protected final String mTitle;
27 |
28 | public Flashable(File zipPath, FrameworkZips.Type type, String title) {
29 | mZipPath = zipPath;
30 | mType = type;
31 | mTitle = title;
32 | }
33 |
34 | protected Flashable(Parcel in) {
35 | mZipPath = (File) in.readSerializable();
36 | mType = (FrameworkZips.Type) in.readSerializable();
37 | mTitle = in.readString();
38 | }
39 |
40 | public abstract void flash(Context context, FlashCallback callback);
41 |
42 | protected ZipCheckResult openAndCheckZip(FlashCallback callback) {
43 | // Open the ZIP file.
44 | ZipFile zip;
45 | try {
46 | zip = new ZipFile(mZipPath);
47 | } catch (IOException e) {
48 | triggerError(callback, FlashCallback.ERROR_INVALID_ZIP, e.getLocalizedMessage());
49 | return null;
50 | }
51 |
52 | // Do some checks.
53 | ZipCheckResult zipCheck = InstallZipUtil.checkZip(zip);
54 | if (!zipCheck.isValidZip()) {
55 | triggerError(callback, FlashCallback.ERROR_INVALID_ZIP);
56 | closeSilently(zip);
57 | return null;
58 | }
59 |
60 | if (zipCheck.hasXposedProp()) {
61 | Set missingFeatures = zipCheck.getXposedProp().getMissingInstallerFeatures();
62 | if (!missingFeatures.isEmpty()) {
63 | reportMissingFeatures(missingFeatures);
64 | triggerError(callback, FlashCallback.ERROR_INSTALLER_NEEDS_UPDATE);
65 | closeSilently(zip);
66 | return null;
67 | }
68 | }
69 |
70 | return zipCheck;
71 | }
72 |
73 | public FrameworkZips.Type getType() {
74 | return mType;
75 | }
76 |
77 | public String getTitle() {
78 | return mTitle;
79 | }
80 |
81 | public RootUtil.RebootMode getRebootMode() {
82 | return RootUtil.RebootMode.NORMAL;
83 | }
84 |
85 | @Override
86 | public int describeContents() {
87 | return 0;
88 | }
89 |
90 | @Override
91 | public void writeToParcel(Parcel dest, int flags) {
92 | dest.writeSerializable(mZipPath);
93 | dest.writeSerializable(mType);
94 | dest.writeString(mTitle);
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
17 |
18 |
28 |
29 |
39 |
40 |
46 |
47 |
53 |
54 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_installation.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
21 |
22 |
31 |
32 |
41 |
42 |
43 |
44 |
45 |
46 |
51 |
52 |
62 |
63 |
74 |
75 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/DownloadDetailsFragment.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer;
2 |
3 | import android.app.Activity;
4 | import android.app.Fragment;
5 | import android.net.Uri;
6 | import android.os.Bundle;
7 | import android.text.method.LinkMovementMethod;
8 | import android.util.Pair;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 | import android.widget.TextView;
13 |
14 | import de.robv.android.xposed.installer.repo.Module;
15 | import de.robv.android.xposed.installer.repo.RepoParser;
16 | import de.robv.android.xposed.installer.util.NavUtil;
17 | import de.robv.android.xposed.installer.util.chrome.LinkTransformationMethod;
18 |
19 | public class DownloadDetailsFragment extends Fragment {
20 | private DownloadDetailsActivity mActivity;
21 |
22 | @Override
23 | public void onAttach(Activity activity) {
24 | super.onAttach(activity);
25 | mActivity = (DownloadDetailsActivity) activity;
26 | }
27 |
28 | @Override
29 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
30 | final Module module = mActivity.getModule();
31 | if (module == null)
32 | return null;
33 |
34 | final View view = inflater.inflate(R.layout.download_details, container, false);
35 |
36 | TextView title = (TextView) view.findViewById(R.id.download_title);
37 | title.setText(module.name);
38 |
39 | TextView author = (TextView) view.findViewById(R.id.download_author);
40 | if (module.author != null && !module.author.isEmpty())
41 | author.setText(getString(R.string.download_author, module.author));
42 | else
43 | author.setText(R.string.download_unknown_author);
44 |
45 | TextView description = (TextView) view
46 | .findViewById(R.id.download_description);
47 | if (module.description != null) {
48 | if (module.descriptionIsHtml) {
49 | description.setText(RepoParser.parseSimpleHtml(getActivity(), module.description, description));
50 | description.setTransformationMethod(new LinkTransformationMethod(getActivity()));
51 | description.setMovementMethod(LinkMovementMethod.getInstance());
52 | } else {
53 | description.setText(module.description);
54 | }
55 | } else {
56 | description.setVisibility(View.GONE);
57 | }
58 |
59 | ViewGroup moreInfoContainer = (ViewGroup) view.findViewById(R.id.download_moreinfo_container);
60 | for (Pair moreInfoEntry : module.moreInfo) {
61 | View moreInfoView = inflater.inflate(R.layout.download_moreinfo, moreInfoContainer, false);
62 | TextView txtTitle = (TextView) moreInfoView.findViewById(android.R.id.title);
63 | TextView txtValue = (TextView) moreInfoView.findViewById(android.R.id.message);
64 |
65 | txtTitle.setText(moreInfoEntry.first + ":");
66 | txtValue.setText(moreInfoEntry.second);
67 |
68 | final Uri link = NavUtil.parseURL(moreInfoEntry.second);
69 | if (link != null) {
70 | txtValue.setTextColor(txtValue.getLinkTextColors());
71 | moreInfoView.setOnClickListener(new View.OnClickListener() {
72 | @Override
73 | public void onClick(View v) {
74 | NavUtil.startURL(getActivity(), link);
75 | }
76 | });
77 | }
78 |
79 | moreInfoContainer.addView(moreInfoView);
80 | }
81 |
82 | return view;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/installation/FlashRecoveryAuto.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.installation;
2 |
3 | import android.content.Context;
4 | import android.os.Parcel;
5 | import android.os.Parcelable;
6 |
7 | import java.io.File;
8 |
9 | import de.robv.android.xposed.installer.R;
10 | import de.robv.android.xposed.installer.util.FrameworkZips;
11 | import de.robv.android.xposed.installer.util.InstallZipUtil.ZipCheckResult;
12 | import de.robv.android.xposed.installer.util.RootUtil;
13 |
14 | import static de.robv.android.xposed.installer.util.InstallZipUtil.closeSilently;
15 |
16 | public class FlashRecoveryAuto extends Flashable {
17 | public FlashRecoveryAuto(File zipPath, FrameworkZips.Type type, String title) {
18 | super(zipPath, type, title);
19 | }
20 |
21 | @Override
22 | public void flash(Context context, FlashCallback callback) {
23 | ZipCheckResult zipCheck = openAndCheckZip(callback);
24 | if (zipCheck == null) {
25 | return;
26 | } else {
27 | closeSilently(zipCheck.getZip());
28 | }
29 |
30 | final String zipName = mZipPath.getName();
31 | String cmd;
32 |
33 | // Execute the flash commands.
34 | RootUtil rootUtil = new RootUtil();
35 | if (!rootUtil.startShell(callback)) {
36 | return;
37 | }
38 |
39 | callback.onStarted();
40 |
41 | // Make sure /cache/recovery/ exists.
42 | if (rootUtil.execute("ls /cache/recovery", null) != 0) {
43 | callback.onLine(context.getString(R.string.file_creating_directory, "/cache/recovery"));
44 | if (rootUtil.executeWithBusybox("mkdir /cache/recovery", callback) != 0) {
45 | callback.onError(FlashCallback.ERROR_GENERIC,
46 | context.getString(R.string.file_create_directory_failed, "/cache/recovery"));
47 | return;
48 | }
49 | }
50 |
51 | // Copy the ZIP to /cache/recovery/.
52 | callback.onLine(context.getString(R.string.file_copying, zipName));
53 | cmd = "cp -a " + RootUtil.getShellPath(mZipPath) + " /cache/recovery/" + zipName;
54 | if (rootUtil.executeWithBusybox(cmd, callback) != 0) {
55 | callback.onError(FlashCallback.ERROR_GENERIC,
56 | context.getString(R.string.file_copy_failed, zipName, "/cache/recovery"));
57 | return;
58 | }
59 |
60 | // Write the flashing command to /cache/recovery/command.
61 | callback.onLine(context.getString(R.string.file_writing_recovery_command));
62 | cmd = "echo --update_package=/cache/recovery/" + zipName + " > /cache/recovery/command";
63 | if (rootUtil.execute(cmd, callback) != 0) {
64 | callback.onError(FlashCallback.ERROR_GENERIC,
65 | context.getString(R.string.file_writing_recovery_command_failed));
66 | return;
67 | }
68 |
69 | callback.onLine(context.getString(R.string.auto_flash_note, zipName));
70 | callback.onDone();
71 | }
72 |
73 | @Override
74 | public RootUtil.RebootMode getRebootMode() {
75 | return RootUtil.RebootMode.RECOVERY;
76 | }
77 |
78 | public static final Parcelable.Creator CREATOR
79 | = new Parcelable.Creator() {
80 | @Override
81 | public FlashRecoveryAuto createFromParcel(Parcel in) {
82 | return new FlashRecoveryAuto(in);
83 | }
84 |
85 | @Override
86 | public FlashRecoveryAuto[] newArray(int size) {
87 | return new FlashRecoveryAuto[size];
88 | }
89 | };
90 |
91 | protected FlashRecoveryAuto(Parcel in) {
92 | super(in);
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/installation/FlashDirectly.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.installation;
2 |
3 | import android.content.Context;
4 | import android.os.Parcel;
5 | import android.os.Parcelable;
6 | import android.util.Log;
7 |
8 | import java.io.File;
9 | import java.io.IOException;
10 | import java.util.zip.ZipEntry;
11 | import java.util.zip.ZipFile;
12 |
13 | import de.robv.android.xposed.installer.XposedApp;
14 | import de.robv.android.xposed.installer.util.AssetUtil;
15 | import de.robv.android.xposed.installer.util.FrameworkZips;
16 | import de.robv.android.xposed.installer.util.InstallZipUtil.ZipCheckResult;
17 | import de.robv.android.xposed.installer.util.RootUtil;
18 |
19 | import static de.robv.android.xposed.installer.util.InstallZipUtil.closeSilently;
20 | import static de.robv.android.xposed.installer.util.InstallZipUtil.triggerError;
21 | import static de.robv.android.xposed.installer.util.RootUtil.getShellPath;
22 |
23 | public class FlashDirectly extends Flashable {
24 | private final boolean mSystemless;
25 |
26 | public FlashDirectly(File zipPath, FrameworkZips.Type type, String title, boolean systemless) {
27 | super(zipPath, type, title);
28 | mSystemless = systemless;
29 | }
30 |
31 | public void flash(Context context, FlashCallback callback) {
32 | ZipCheckResult zipCheck = openAndCheckZip(callback);
33 | if (zipCheck == null) {
34 | return;
35 | }
36 |
37 | // Do additional checks.
38 | ZipFile zip = zipCheck.getZip();
39 | if (!zipCheck.isFlashableInApp()) {
40 | triggerError(callback, FlashCallback.ERROR_NOT_FLASHABLE_IN_APP);
41 | closeSilently(zip);
42 | return;
43 | }
44 |
45 | // Extract update-binary.
46 | ZipEntry entry = zip.getEntry("META-INF/com/google/android/update-binary");
47 | File updateBinaryFile = new File(XposedApp.getInstance().getCacheDir(), "update-binary");
48 | try {
49 | AssetUtil.writeStreamToFile(zip.getInputStream(entry), updateBinaryFile, 0700);
50 | } catch (IOException e) {
51 | Log.e(XposedApp.TAG, "Could not extract update-binary", e);
52 | triggerError(callback, FlashCallback.ERROR_INVALID_ZIP);
53 | return;
54 | } finally {
55 | closeSilently(zip);
56 | }
57 |
58 | // Execute the flash commands.
59 | RootUtil rootUtil = new RootUtil();
60 | if (!rootUtil.startShell(callback)) {
61 | return;
62 | }
63 |
64 | callback.onStarted();
65 |
66 | rootUtil.execute("export NO_UIPRINT=1", callback);
67 | if (mSystemless) {
68 | rootUtil.execute("export SYSTEMLESS=1", callback);
69 | }
70 |
71 | int result = rootUtil.execute(getShellPath(updateBinaryFile) + " 2 1 " + getShellPath(mZipPath), callback);
72 | if (result != FlashCallback.OK) {
73 | triggerError(callback, result);
74 | return;
75 | }
76 |
77 | callback.onDone();
78 | }
79 |
80 | public static final Parcelable.Creator CREATOR
81 | = new Parcelable.Creator() {
82 | @Override
83 | public FlashDirectly createFromParcel(Parcel in) {
84 | return new FlashDirectly(in);
85 | }
86 |
87 | @Override
88 | public FlashDirectly[] newArray(int size) {
89 | return new FlashDirectly[size];
90 | }
91 | };
92 |
93 | @Override
94 | public void writeToParcel(Parcel dest, int flags) {
95 | super.writeToParcel(dest, flags);
96 | dest.writeInt(mSystemless ? 1 : 0);
97 | }
98 |
99 | protected FlashDirectly(Parcel in) {
100 | super(in);
101 | mSystemless = in.readInt() == 1;
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/prefs.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
17 |
18 |
19 |
20 |
23 |
24 |
32 |
33 |
57 |
58 |
66 |
67 |
74 |
75 |
76 |
77 |
80 |
81 |
87 |
88 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_module.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
25 |
26 |
30 |
31 |
39 |
40 |
43 |
44 |
52 |
53 |
66 |
67 |
68 |
75 |
76 |
84 |
85 |
86 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/Loader.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import android.support.v4.widget.SwipeRefreshLayout;
4 |
5 | import java.util.List;
6 | import java.util.concurrent.CopyOnWriteArrayList;
7 |
8 | import de.robv.android.xposed.installer.XposedApp;
9 |
10 | public abstract class Loader implements SwipeRefreshLayout.OnRefreshListener {
11 | protected final String CLASS_NAME = getClass().getSimpleName();
12 | private boolean mIsLoading = false;
13 | private boolean mReloadTriggeredOnce = false;
14 | private final List> mListeners = new CopyOnWriteArrayList<>();
15 | private SwipeRefreshLayout mSwipeRefreshLayout;
16 |
17 | public void triggerReload(final boolean force) {
18 | synchronized (this) {
19 | if (!mReloadTriggeredOnce) {
20 | onFirstLoad();
21 | mReloadTriggeredOnce = true;
22 | }
23 | }
24 |
25 | if (!force && !shouldUpdate()) {
26 | return;
27 | }
28 |
29 | synchronized (this) {
30 | if (mIsLoading) {
31 | return;
32 | }
33 | mIsLoading = true;
34 | updateProgressIndicator();
35 | }
36 |
37 | new Thread("Reload" + CLASS_NAME) {
38 | public void run() {
39 | boolean hasChanged = onReload();
40 | if (hasChanged) {
41 | notifyListeners();
42 | }
43 |
44 | synchronized (this) {
45 | mIsLoading = false;
46 | updateProgressIndicator();
47 | }
48 | }
49 | }.start();
50 | }
51 |
52 | protected synchronized void onFirstLoad() {
53 | // Empty by default.
54 | }
55 |
56 | protected boolean shouldUpdate() {
57 | return true;
58 | }
59 |
60 | protected abstract boolean onReload();
61 |
62 | public void clear(boolean notify) {
63 | synchronized (this) {
64 | // TODO Stop reloading repository when it should be cleared
65 | if (mIsLoading) {
66 | return;
67 | }
68 | onClear();
69 | }
70 |
71 | if (notify) {
72 | notifyListeners();
73 | }
74 | }
75 |
76 | protected abstract void onClear();
77 |
78 | public void triggerFirstLoadIfNecessary() {
79 | synchronized (this) {
80 | if (mReloadTriggeredOnce) {
81 | return;
82 | }
83 | }
84 | triggerReload(false);
85 | }
86 |
87 | public synchronized boolean isLoading() {
88 | return mIsLoading;
89 | }
90 |
91 | public interface Listener {
92 | void onReloadDone(T loader);
93 | }
94 |
95 | public void addListener(Listener listener) {
96 | if (!mListeners.contains(listener)) {
97 | mListeners.add(listener);
98 | }
99 | }
100 |
101 | public void removeListener(Listener listener) {
102 | mListeners.remove(listener);
103 | }
104 |
105 | protected void notifyListeners() {
106 | for (Listener listener : mListeners) {
107 | //noinspection unchecked
108 | listener.onReloadDone((T) this);
109 | }
110 | }
111 |
112 | public synchronized void setSwipeRefreshLayout(SwipeRefreshLayout swipeRefreshLayout) {
113 | this.mSwipeRefreshLayout = swipeRefreshLayout;
114 | if (swipeRefreshLayout == null) {
115 | return;
116 | }
117 |
118 | swipeRefreshLayout.setRefreshing(mIsLoading);
119 | swipeRefreshLayout.setOnRefreshListener(this);
120 | }
121 |
122 | @Override
123 | public void onRefresh() {
124 | triggerReload(true);
125 | }
126 |
127 | private synchronized void updateProgressIndicator() {
128 | if (mSwipeRefreshLayout == null) {
129 | return;
130 | }
131 |
132 | XposedApp.runOnUiThread(new Runnable() {
133 | @Override
134 | public void run() {
135 | synchronized (Loader.this) {
136 | if (mSwipeRefreshLayout != null) {
137 | mSwipeRefreshLayout.setRefreshing(mIsLoading);
138 | }
139 | }
140 | }
141 | });
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_version.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
24 |
25 |
29 |
30 |
37 |
38 |
43 |
44 |
50 |
51 |
52 |
59 |
60 |
68 |
69 |
77 |
78 |
79 |
80 |
84 |
85 |
93 |
94 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/widget/IconListPreference.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.widget;
2 |
3 | /*
4 | * Copyright (C) 2013 The Android Open Source Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | import android.annotation.SuppressLint;
20 | import android.app.Activity;
21 | import android.app.AlertDialog.Builder;
22 | import android.content.Context;
23 | import android.content.res.TypedArray;
24 | import android.graphics.drawable.Drawable;
25 | import android.preference.ListPreference;
26 | import android.util.AttributeSet;
27 | import android.view.LayoutInflater;
28 | import android.view.View;
29 | import android.view.ViewGroup;
30 | import android.widget.ArrayAdapter;
31 | import android.widget.CheckedTextView;
32 | import android.widget.ImageView;
33 | import android.widget.ListAdapter;
34 |
35 | import java.util.ArrayList;
36 | import java.util.List;
37 |
38 | import de.robv.android.xposed.installer.R;
39 |
40 | public class IconListPreference extends ListPreference {
41 |
42 | private List mEntryDrawables = new ArrayList<>();
43 |
44 | public IconListPreference(Context context, AttributeSet attrs) {
45 | super(context, attrs);
46 |
47 | TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.IconListPreference, 0, 0);
48 |
49 | CharSequence[] drawables;
50 |
51 | try {
52 | drawables = a.getTextArray(R.styleable.IconListPreference_icons);
53 | } finally {
54 | a.recycle();
55 | }
56 |
57 | for (CharSequence drawable : drawables) {
58 | int resId = context.getResources().getIdentifier(drawable.toString(), "mipmap", context.getPackageName());
59 |
60 | Drawable d = context.getResources().getDrawable(resId);
61 |
62 | mEntryDrawables.add(d);
63 | }
64 |
65 | setWidgetLayoutResource(R.layout.color_icon_preview);
66 | }
67 |
68 | protected ListAdapter createListAdapter() {
69 | final String selectedValue = getValue();
70 | int selectedIndex = findIndexOfValue(selectedValue);
71 | return new AppArrayAdapter(getContext(), R.layout.icon_preference_item, getEntries(), mEntryDrawables, selectedIndex);
72 | }
73 |
74 | @Override
75 | protected void onBindView(View view) {
76 | super.onBindView(view);
77 |
78 | String selectedValue = getValue();
79 | int selectedIndex = findIndexOfValue(selectedValue);
80 |
81 | Drawable drawable = mEntryDrawables.get(selectedIndex);
82 |
83 | ((ImageView) view.findViewById(R.id.preview)).setImageDrawable(drawable);
84 | }
85 |
86 | @Override
87 | protected void onPrepareDialogBuilder(Builder builder) {
88 | builder.setAdapter(createListAdapter(), this);
89 | super.onPrepareDialogBuilder(builder);
90 | }
91 |
92 | public class AppArrayAdapter extends ArrayAdapter {
93 | private List mImageDrawables = null;
94 | private int mSelectedIndex = 0;
95 |
96 | public AppArrayAdapter(Context context, int textViewResourceId,
97 | CharSequence[] objects, List imageDrawables,
98 | int selectedIndex) {
99 | super(context, textViewResourceId, objects);
100 | mSelectedIndex = selectedIndex;
101 | mImageDrawables = imageDrawables;
102 | }
103 |
104 | @Override
105 | @SuppressLint("ViewHolder")
106 | public View getView(int position, View convertView, ViewGroup parent) {
107 | LayoutInflater inflater = ((Activity) getContext()).getLayoutInflater();
108 | View view = inflater.inflate(R.layout.icon_preference_item, parent, false);
109 | CheckedTextView textView = (CheckedTextView) view.findViewById(R.id.label);
110 | textView.setText(getItem(position));
111 | textView.setChecked(position == mSelectedIndex);
112 |
113 | ImageView imageView = (ImageView) view.findViewById(R.id.icon);
114 | imageView.setImageDrawable(mImageDrawables.get(position));
115 | return view;
116 | }
117 | }
118 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
48 |
49 |
50 |
51 |
52 |
53 |
56 |
59 |
62 |
65 |
69 |
70 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
85 |
86 |
87 |
88 |
89 |
92 |
93 |
98 |
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/PrefixedSharedPreferences.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.SharedPreferences;
5 | import android.preference.PreferenceManager;
6 |
7 | import java.lang.reflect.Field;
8 | import java.util.HashMap;
9 | import java.util.Map;
10 | import java.util.Map.Entry;
11 | import java.util.Set;
12 |
13 | public class PrefixedSharedPreferences implements SharedPreferences {
14 | private final SharedPreferences mBase;
15 | private final String mPrefix;
16 |
17 | public PrefixedSharedPreferences(SharedPreferences base, String prefix) {
18 | mBase = base;
19 | mPrefix = prefix + "_";
20 | }
21 |
22 | public static void injectToPreferenceManager(PreferenceManager manager, String prefix) {
23 | SharedPreferences prefixedPrefs = new PrefixedSharedPreferences(manager.getSharedPreferences(), prefix);
24 |
25 | try {
26 | Field fieldSharedPref = PreferenceManager.class.getDeclaredField("mSharedPreferences");
27 | fieldSharedPref.setAccessible(true);
28 | fieldSharedPref.set(manager, prefixedPrefs);
29 | } catch (Throwable t) {
30 | throw new RuntimeException(t);
31 | }
32 | }
33 |
34 | @Override
35 | public Map getAll() {
36 | Map baseResult = mBase.getAll();
37 | Map prefixedResult = new HashMap(baseResult);
38 | for (Entry entry : baseResult.entrySet()) {
39 | prefixedResult.put(mPrefix + entry.getKey(), entry.getValue());
40 | }
41 | return prefixedResult;
42 | }
43 |
44 | @Override
45 | public String getString(String key, String defValue) {
46 | return mBase.getString(mPrefix + key, defValue);
47 | }
48 |
49 | @Override
50 | public Set getStringSet(String key, Set defValues) {
51 | return mBase.getStringSet(mPrefix + key, defValues);
52 | }
53 |
54 | @Override
55 | public int getInt(String key, int defValue) {
56 | return mBase.getInt(mPrefix + key, defValue);
57 | }
58 |
59 | @Override
60 | public long getLong(String key, long defValue) {
61 | return mBase.getLong(mPrefix + key, defValue);
62 | }
63 |
64 | @Override
65 | public float getFloat(String key, float defValue) {
66 | return mBase.getFloat(mPrefix + key, defValue);
67 | }
68 |
69 | @Override
70 | public boolean getBoolean(String key, boolean defValue) {
71 | return mBase.getBoolean(mPrefix + key, defValue);
72 | }
73 |
74 | @Override
75 | public boolean contains(String key) {
76 | return mBase.contains(mPrefix + key);
77 | }
78 |
79 | @SuppressLint("CommitPrefEdits")
80 | @Override
81 | public Editor edit() {
82 | return new EditorImpl(mBase.edit());
83 | }
84 |
85 | @Override
86 | public void registerOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) {
87 | throw new UnsupportedOperationException("listeners are not supported in this implementation");
88 | }
89 |
90 | @Override
91 | public void unregisterOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) {
92 | throw new UnsupportedOperationException("listeners are not supported in this implementation");
93 | }
94 |
95 | private class EditorImpl implements Editor {
96 | private final Editor mEditorBase;
97 |
98 | public EditorImpl(Editor base) {
99 | mEditorBase = base;
100 | }
101 |
102 | @Override
103 | public Editor putString(String key, String value) {
104 | mEditorBase.putString(mPrefix + key, value);
105 | return this;
106 | }
107 |
108 | @Override
109 | public Editor putStringSet(String key, Set values) {
110 | mEditorBase.putStringSet(mPrefix + key, values);
111 | return this;
112 | }
113 |
114 | @Override
115 | public Editor putInt(String key, int value) {
116 | mEditorBase.putInt(mPrefix + key, value);
117 | return this;
118 | }
119 |
120 | @Override
121 | public Editor putLong(String key, long value) {
122 | mEditorBase.putLong(mPrefix + key, value);
123 | return this;
124 | }
125 |
126 | @Override
127 | public Editor putFloat(String key, float value) {
128 | mEditorBase.putFloat(mPrefix + key, value);
129 | return this;
130 | }
131 |
132 | @Override
133 | public Editor putBoolean(String key, boolean value) {
134 | mEditorBase.putBoolean(mPrefix + key, value);
135 | return this;
136 | }
137 |
138 | @Override
139 | public Editor remove(String key) {
140 | mEditorBase.remove(mPrefix + key);
141 | return this;
142 | }
143 |
144 | @Override
145 | public Editor clear() {
146 | mEditorBase.clear();
147 | return this;
148 | }
149 |
150 | @Override
151 | public boolean commit() {
152 | return mEditorBase.commit();
153 | }
154 |
155 | @Override
156 | public void apply() {
157 | mEditorBase.apply();
158 | }
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/app/src/main/res/values-gl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Unha actualización está dispoñible para Xposed Framework.
8 |
9 |
10 |
11 |
12 | Instalar/Actualizar
13 | Desinstalar
14 | Reinicie Software
15 | Reinicie
16 |
17 |
18 |
19 |
20 | Xposed módulo aínda non está activo
21 | (Sen descrición se forneceu)
22 | Este módulo e non ofrece unha interface de usuario
23 | Non hai módulos instalados!
24 | Lista de modulos Xposed actualizada\nOs cambios serán activadas no reinicio
25 | Este módulo require unha versión máis recente de Xposed (%d) e, polo tanto, non pode ser activado.
26 | Este módulo non especifica a versión que precisa de Xposed.
27 | Este módulo foi creado para a versión %1$d de Xposed, pero debido a un cambio incompatible na versión %2$d, foi desactivado.
28 |
29 |
30 | Buscar
31 | Recargar
32 | Mudanzas:
33 | Por %s
34 | Autor descoñecido
35 | Instalada (versión %s)
36 | Actualización dispoñible (versión %1$s \u2192 %2$s)
37 | Engadido el %1$s \u00b7 Actualizado el %2$s
38 | Ordenar por
39 | Ordenar por estado
40 | Ordenar por última actualización
41 | Ordenar por data de creación
42 | Framework
43 | Actualización dispoñible
44 | Instalado
45 | Non instalado
46 | Nas últimas 24 horas
47 | Nas ultimos 7 días
48 | Nas ultimos 30 días
49 | Máis de 30 días
50 |
51 |
52 | Descargar
53 | Experimental
54 |
55 |
56 |
57 |
58 |
59 |
60 | Desarrolladores principales:
61 | rovo89 e Tungstwenty
62 | Traductor:
63 | David_Vaz
64 | Versión deste aplicación:
65 | Código fonte:
66 | Librerias usadas:
67 |
68 |
69 | Descarga
70 | Instalar
71 | Cancelar
72 | Ligazón a descarga non está dispoñible
73 | A descarga está en execución (%1$,d of %2$,d kB)
74 | Esperando para descargar…
75 | Descarga rematou
76 | Error de descarga (error %d)
77 |
78 |
79 | Suma MD5 incorrecta (descargada: %1$s, original: %2$s)
80 | Non se puido ler o arquivo descargado: %s
81 | O arquivo descargado non é un APK válido (ou compatible)
82 | Nome do paquete incorrecto (descargado: %1$s, original: %2$s)
83 |
84 |
85 | Descargando %1$s fallido: %2$d (%3$s)
86 | Descargando %1$s fallido: %2$s
87 | Non se puido cargar o repositorio do %1$s:\n%2$s
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ar/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | يتوفر تحديث لإطار إكسبوسيد.
8 |
9 |
10 |
11 |
12 | تثبيت/تحديث
13 | إلغاء تثبيت
14 | اعادة تشغيل سريعة
15 | اعادة التشغيل
16 |
17 |
18 |
19 |
20 | لم يتم تنشيط الوحدة النمطية إكسبوسيد بعد
21 | (لا يوجد وصف المقدمة)
22 | هذه الوحدة النمطية لا توفر واجهة المستخدم
23 | لم يتم العثور على أية وحدات إكسبوسيد!
24 | "تم تحديث قائمة الوحدة النمطية إكسبوسيد التغييرات سوف تصبح نشطة على إعادة التشغيل"
25 | هذه الوحدة يتطلب إصدار أحدث Xposed (%d) وبالتالي لا يمكن تفعيلها.
26 | لا تحدد هذه الوحدة النمطية إصدار إكسبوسيدبريدجي يحتاج إليها.
27 | تم إنشاء هذه الوحدة لإصدار Xposed %1$d, ولكن نظرا للتغيرات غير متوافقة في الإصدار %2$d, فقد تم تعطيله.
28 | بدء تشغيل واجهة المستخدم
29 | تحميل/تحديث
30 | الدعم
31 | معلومات التطبيق
32 | إلغاء تثبيت
33 |
34 |
35 | بحث
36 | إعادة تحميل
37 | التغييرات:
38 | من قبل %s
39 | مؤلف غير معروف
40 | تثبيت (version %s)
41 | تحديث متوفر (version %1$s \u2190 %2$s)
42 | تشغيل الاضافة %1$s \u00b7 تشغيل التحديث %2$s
43 | ترتيب الفرز
44 | فرز حسب الحالة
45 | فرز حسب آخر تحديث
46 | فرز حسب تاريخ الإنشاء
47 | الإطار
48 | تحديث متوفر
49 | تثبيت
50 | لم يتم تثبيت
51 | ال 24 ساعة الماضية
52 | آخر 7 أيام
53 | آخر 30 يوما
54 | منذ أكثر من 30 يوما
55 |
56 |
57 | تحميل
58 | التجريبية
59 |
60 |
61 |
62 |
63 |
64 |
65 | مطوري الرئيسية:
66 | rovo89 و Tungstwenty
67 | ترجمات:
68 | aljohanei
69 | إصدار من هذا التطبيق:
70 | التعليمات البرمجية المصدر:
71 | المكتبات المستخدمة:
72 |
73 |
74 | تحميل
75 | تثبيت
76 | الغاء
77 | الصفحة غير متوفرة
78 | تحميل قيد التشغيل (%1$,d of %2$,d kB)
79 | في انتظار التحميل
80 | تم التحميل
81 | فشل التحميل (error %d)
82 |
83 |
84 | مجموع MD5 غير صحيحة (downloaded: %1$s, expected: %2$s)
85 | لا يمكن قراءة الملف الذي تم تنزيله: %s
86 | الملف الذي تم تنزيله ليس APK صالح (or incompatible)
87 | اسم الحزمة غير صحيح (downloaded: %1$s, expected: %2$s)
88 |
89 |
90 | تحميل %1$s فشل: %2$d (%3$s)
91 | تحميل %1$s فشل: %2$s
92 | لايمكن التحميل من المستودع %1$s:\n%2$s
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/app/src/main/res/values-id/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Update tersedia.
8 |
9 |
10 |
11 |
12 | Install/Update
13 | Hapus
14 | Reboot cepat
15 | Reboot
16 |
17 |
18 |
19 |
20 | Modul Xposed belum diaktifkan
21 | (tidak ada deskripsi)
22 | Modul ini tidak ada tampilan utama
23 | Tidak ada modul Xposed detemukan!
24 | Daftar modul telah diupdate\nAkan aktif setelah reboot.
25 | Modul ini membutuhkan Xposed yang lebih baru (%d) dan tidak dapat diaktifkan.
26 | Modul ini tidak memberitahukan versi Xposed yang dibutuhkan.
27 | Modul ini dibuat untuk Xposed versi %1$d, tetapi karena ketidakcocoknya di versi %2$d, maka modul dimatikan.
28 | Buka UI
29 | Unduhan/Update
30 | Dukungan
31 | Informasi Aplikasi
32 | Hapus
33 |
34 |
35 | Cari
36 | Reload
37 | Perubahan:
38 | oleh %s
39 | pembuat tdk diketahui
40 | Terinstall (versi %s)
41 | Update tersedia (versi %1$s \u2192 %2$s)
42 | Ditambahkan pada %1$s \u00b7 Diupdate pada %2$s
43 | Urutan sortir
44 | Sortir menurut status
45 | Sortir menurut update terakhir
46 | Sortir menurut tanggal pembuatan
47 | Framework
48 | Update tersedia
49 | Terinstall
50 | Tidak terinstall
51 | 24 jam yang lalu
52 | Seminggu yang lalu
53 | Sebulan yang lalu
54 | Lebih dari sebulan yang lalu
55 |
56 |
57 | Unduh
58 | Uji coba
59 |
60 |
61 |
62 |
63 |
64 |
65 | Pengembang utama:
66 | rovo89 and Tungstwenty
67 | Penerjemah:
68 | AngSanley
69 | Versi aplikasi:
70 | Source code:
71 | Library yang digunakan:
72 |
73 |
74 | Unduh
75 | Pasang
76 | Batal
77 | URL tidak tersedia
78 | Unduhan sedang berlangsung (%1$,d dari %2$,d kB)
79 | Unduhan sedang menunggu
80 | Unduhan selesai
81 | Unduhan gagal (error %d)
82 |
83 |
84 | MD5 sum salah (terunduh: %1$s, diharapkan: %2$s)
85 | Tidak dapat membaca file: %s
86 | File terunduh bukan file APK (atau tidak didukung)
87 | Nama package salah (terunduh: %1$s, diharapkan: %2$s)
88 |
89 |
90 | Mengunduh %1$s gagal: %2$d (%3$s)
91 | Mengunduh %1$s gagal: %2$s
92 | Tidak dapat menambil daftar dari %1$s:\n%2$s
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 보내기
6 | 내장 메모리에 저장
7 | 현재 최신 버전의 Xposed 프레임워크가 활성화되지 않고 있습니다. 프레임워크 설치 후 시스템을 재시작하세요.
8 |
9 |
10 | 새로운 버전의 Xposed 프레임워크를 설치할 수 있습니다.
11 |
12 |
13 |
14 |
15 | Xposed 프레임워크 설치 및 업데이트
16 | Xposed 프레임워크 제거
17 | 빠른 재시작
18 | 기본 재시작(권장)
19 |
20 |
21 |
22 |
23 | Xposed 모듈이 아직 활성화 되지 않았습니다.
24 | (설명없음)
25 | 이 모듈은 UI(사용자 환경)를 제공하지 않습니다.\n따라서 이 모듈은 활성화 하더라도 어플리케이션의 형태로 실행되어 화면에 출력되는 바는 없습니다.
26 | 그 어떠한 Xposed 모듈도 찾을 수 없습니다.
27 | Xposed 모듈이 업데이트 되었습니다.\n변경 사항은 시스템을 재시작 해야 반영됩니다.
28 | 이 모듈은 새로운 Xposed이 요구되며 (%d) 이러한 이유로 활성화 될 수 없습니다.
29 | 이 모듈은 요구되는 최소한의 Xposed의 버전이 설정되지 않았습니다.
30 | 이 모듈은 Xposed 버전 %1$d에 맞춰 제작되었으나 Xposed 버전 %2$d에선 호환되지 않으므로 비활성화 됩니다.
31 | 모듈 실행
32 | 내려받기 / 업데이트
33 | 지원
34 | 모듈에 대한 애플리케이션 정보
35 | 모듈 제거
36 |
37 |
38 | 검색
39 | 새로고침
40 | 변경 이력 :
41 | 개발자 : %s
42 | 정의된 개발자 이름 없음.
43 | 설치됨 (version %s)
44 | 업데이트가 가능합니다. (버전 %1$s \u2192 버전 %2$s)
45 | 등록 날짜 : %1$s \u00b7 업데이트 날짜 : %2$s
46 | 정렬 순서
47 | 상태 순서(설치/비설치)로 정렬
48 | 최신의 업데이트 순서로 정렬
49 | 모듈이 Xposed Repository 서버에 등록된 순서로 정렬
50 | 설치된 설치 도구
51 | 업데이트가 가능한 모듈들
52 | 설치된 모듈들
53 | 설치되지 않은 모듈들
54 | 지난 24시간 동안 등록된 모듈들
55 | 지난 7일간 등록된 모듈들
56 | 지난 30일동안 등록된 모듈들
57 | 30일보다 더 오래 전에 등록된 모듈들
58 |
59 |
60 | 내려받기
61 | 실험적인 기능 들
62 |
63 |
64 |
65 |
66 | 내장 메모리에 내역을 저장할 수 없습니다 :
67 | 내장 메모리에 데이터를 쓸 수 없거나 내장 메모리를 찾을 수 없습니다.
68 |
69 |
70 | 대표 개발자 :
71 | rovo89 와 Tungstwenty
72 | 번역자 :
73 | 김민우(marbulas@XDA / Stan Wayne on NAVER)
74 | 이 설치 도구의 버전 :
75 | 소스 코드 :
76 | 사용된 라이브러리들 :
77 |
78 |
79 | 내려받기
80 | 설치
81 | 취소
82 | 내려받기에 필요한 URL이 사용 가능하지 않습니다.
83 | 내려받기가 진행중입니다.\n(전체 %2$,dKB 중 %1$,dKB를 받음.)
84 | 내려받기가 시작되길 기다리고 있습니다.
85 | 내려받기가 완료되었습니다.
86 | 다운로드가 실패했습니다. (에러코드 %d)
87 |
88 |
89 | MD5 무결성 검사를 통과하지 못했습니다.\n(현재 내려받은 것 : %1$s, 내려받았어야 할 것 : %2$s)
90 | 내려받은 파일을 읽을 수 없습니다 : %s
91 | 내려받은 파일이 올바른 앱이 아니거나 호환되지 않습니다.
92 | 앱의 이름이 올바르지 않습니다. (현재 내려받은 것 : %1$s, 내려받았어야 할 것 : %2$s)
93 |
94 |
95 | %1$s의 내려받기가 실패했습니다 : %2$d (%3$s)
96 | %1$s의 내려받기가 실패했습니다 : %2$s
97 | %1$s로부터 정보를 읽어들이지 못했습니다 : \n%2$s
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/app/src/main/java/de/robv/android/xposed/installer/util/chrome/CustomTabActivityHelper.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed.installer.util.chrome;
2 |
3 | import android.app.Activity;
4 | import android.net.Uri;
5 | import android.os.Bundle;
6 | import android.support.customtabs.CustomTabsClient;
7 | import android.support.customtabs.CustomTabsIntent;
8 | import android.support.customtabs.CustomTabsServiceConnection;
9 | import android.support.customtabs.CustomTabsSession;
10 |
11 | import java.util.List;
12 |
13 | /**
14 | * This is a helper class to manage the connection to the Custom Tabs Service.
15 | */
16 | public class CustomTabActivityHelper implements ServiceConnectionCallback {
17 | private CustomTabsSession mCustomTabsSession;
18 | private CustomTabsClient mClient;
19 | private CustomTabsServiceConnection mConnection;
20 | private ConnectionCallback mConnectionCallback;
21 |
22 | /**
23 | * Opens the URL on a Custom Tab if possible. Otherwise fallsback to opening
24 | * it on a WebView.
25 | *
26 | * @param activity The host activity.
27 | * @param customTabsIntent a CustomTabsIntent to be used if Custom Tabs is available.
28 | * @param uri the Uri to be opened.
29 | * @param fallback a CustomTabFallback to be used if Custom Tabs is not
30 | * available.
31 | */
32 | public static void openCustomTab(Activity activity, CustomTabsIntent customTabsIntent, Uri uri, CustomTabFallback fallback) {
33 | String packageName = CustomTabsHelper.getPackageNameToUse(activity);
34 |
35 | // If we cant find a package name, it means theres no browser that
36 | // supports
37 | // Chrome Custom Tabs installed. So, we fallback to the webview
38 | if (packageName == null) {
39 | if (fallback != null) {
40 | fallback.openUri(activity, uri);
41 | }
42 | } else {
43 | customTabsIntent.intent.setPackage(packageName);
44 | customTabsIntent.launchUrl(activity, uri);
45 | }
46 | }
47 |
48 | /**
49 | * Unbinds the Activity from the Custom Tabs Service.
50 | *
51 | * @param activity the activity that is connected to the service.
52 | */
53 | public void unbindCustomTabsService(Activity activity) {
54 | if (mConnection == null)
55 | return;
56 | activity.unbindService(mConnection);
57 | mClient = null;
58 | mCustomTabsSession = null;
59 | mConnection = null;
60 | }
61 |
62 | /**
63 | * Creates or retrieves an exiting CustomTabsSession.
64 | *
65 | * @return a CustomTabsSession.
66 | */
67 | public CustomTabsSession getSession() {
68 | if (mClient == null) {
69 | mCustomTabsSession = null;
70 | } else if (mCustomTabsSession == null) {
71 | mCustomTabsSession = mClient.newSession(null);
72 | }
73 | return mCustomTabsSession;
74 | }
75 |
76 | /**
77 | * Register a Callback to be called when connected or disconnected from the
78 | * Custom Tabs Service.
79 | *
80 | * @param connectionCallback
81 | */
82 | public void setConnectionCallback(ConnectionCallback connectionCallback) {
83 | this.mConnectionCallback = connectionCallback;
84 | }
85 |
86 | /**
87 | * Binds the Activity to the Custom Tabs Service.
88 | *
89 | * @param activity
90 | * the activity to be binded to the service.
91 | */
92 | public void bindCustomTabsService(Activity activity) {
93 | if (mClient != null)
94 | return;
95 |
96 | String packageName = CustomTabsHelper.getPackageNameToUse(activity);
97 | if (packageName == null)
98 | return;
99 |
100 | mConnection = new ServiceConnection(this);
101 | CustomTabsClient.bindCustomTabsService(activity, packageName, mConnection);
102 | }
103 |
104 | /**
105 | * @return true if call to mayLaunchUrl was accepted.
106 | * @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
107 | */
108 | public boolean mayLaunchUrl(Uri uri, Bundle extras,
109 | List otherLikelyBundles) {
110 | if (mClient == null)
111 | return false;
112 |
113 | CustomTabsSession session = getSession();
114 | if (session == null)
115 | return false;
116 |
117 | return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
118 | }
119 |
120 | @Override
121 | public void onServiceConnected(CustomTabsClient client) {
122 | mClient = client;
123 | mClient.warmup(0L);
124 | if (mConnectionCallback != null)
125 | mConnectionCallback.onCustomTabsConnected();
126 | }
127 |
128 | @Override
129 | public void onServiceDisconnected() {
130 | mClient = null;
131 | mCustomTabsSession = null;
132 | if (mConnectionCallback != null)
133 | mConnectionCallback.onCustomTabsDisconnected();
134 | }
135 |
136 | /**
137 | * A Callback for when the service is connected or disconnected. Use those
138 | * callbacks to handle UI changes when the service is connected or
139 | * disconnected.
140 | */
141 | public interface ConnectionCallback {
142 | /**
143 | * Called when the service is connected.
144 | */
145 | void onCustomTabsConnected();
146 |
147 | /**
148 | * Called when the service is disconnected.
149 | */
150 | void onCustomTabsDisconnected();
151 | }
152 |
153 | /**
154 | * To be used as a fallback to open the Uri when Custom Tabs is not
155 | * available.
156 | */
157 | public interface CustomTabFallback {
158 | /**
159 | * @param activity The Activity that wants to open the Uri.
160 | * @param uri The uri to be opened by the fallback.
161 | */
162 | void openUri(Activity activity, Uri uri);
163 | }
164 |
165 | }
--------------------------------------------------------------------------------