Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Find out the commits that failed CorePatch #39

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Grant Execute Permission for gradlew
run: chmod +x gradlew

- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v5
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
[submodule "external/xz-embedded"]
path = external/xz-embedded
url = https://github.com/tukaani-project/xz-embedded
[submodule "apache/commons-lang"]
path = apache/commons-lang
url = https://github.com/apache/commons-lang
16 changes: 16 additions & 0 deletions apache/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
val androidSourceCompatibility: JavaVersion by rootProject.extra
val androidTargetCompatibility: JavaVersion by rootProject.extra

plugins {
id("java-library")
}

java {
sourceCompatibility = androidSourceCompatibility
targetCompatibility = androidTargetCompatibility
sourceSets {
main {
java.srcDirs("commons-lang/src/main/java", "local")
}
}
}
1 change: 1 addition & 0 deletions apache/commons-lang
Submodule commons-lang added at c2cd05
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.commons.lang3.local.reflect;
package org.apache.commons.lang3.reflect;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/java/org/lsposed/manager/ConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,25 @@ public static boolean setVerboseLogEnabled(boolean enabled) {
}
}

public static boolean isLogWatchdogEnabled() {
try {
return LSPManagerServiceHolder.getService().isLogWatchdogEnabled();
} catch (RemoteException e) {
Log.e(App.TAG, Log.getStackTraceString(e));
return false;
}
}

public static boolean setLogWatchdog(boolean enabled) {
try {
LSPManagerServiceHolder.getService().setLogWatchdog(enabled);
return true;
} catch (RemoteException e) {
Log.e(App.TAG, Log.getStackTraceString(e));
return false;
}
}

public static ParcelFileDescriptor getLog(boolean verbose) {
try {
return verbose ? LSPManagerServiceHolder.getService().getVerboseLog() : LSPManagerServiceHolder.getService().getModulesLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,9 @@ public void onLoadCleared(@Nullable Drawable placeholder) {
holder.root.setAlpha(moduleUtil.isModuleEnabled(item.packageName) ? 1.0f : .5f);
holder.itemView.setOnClickListener(v -> {
searchView.clearFocus();
safeNavigate(ModulesFragmentDirections.actionModulesFragmentToAppListFragment(item.packageName, item.userId));
if (isLoaded()) {
safeNavigate(ModulesFragmentDirections.actionModulesFragmentToAppListFragment(item.packageName, item.userId));
}
});
holder.itemView.setOnLongClickListener(v -> {
searchView.clearFocus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
prefVerboseLogs.setOnPreferenceChangeListener((preference, newValue) -> ConfigManager.setVerboseLogEnabled(!(boolean) newValue));
}

MaterialSwitchPreference prefEnableLog = findPreference("enable_log_watchdog");
if (prefEnableLog != null) {
prefEnableLog.setEnabled(!BuildConfig.DEBUG && installed);
prefEnableLog.setChecked(!installed || ConfigManager.isLogWatchdogEnabled());
prefEnableLog.setOnPreferenceChangeListener((preference, newValue) -> ConfigManager.setLogWatchdog((boolean) newValue));
}

MaterialSwitchPreference prefDexObfuscate = findPreference("enable_dex_obfuscate");
if (prefDexObfuscate != null) {
prefDexObfuscate.setEnabled(installed);
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@
<string name="settings_group_framework">Framework</string>
<string name="settings_disable_verbose_log">Disable verbose logs</string>
<string name="settings_disable_verbose_log_summary">Report issues request to include verbose logs</string>
<string name="settings_enable_log_watchdog">Enable log watchdog</string>
<string name="settings_enable_log_watchdog_summary">Log watchdog of LSPosed modifies system properties, which could be exploited to detect LSPosed</string>
<string name="pure_black_dark_theme">Black dark theme</string>
<string name="pure_black_dark_theme_summary">Use the pure black theme if dark theme is enabled</string>
<string name="settings_group_theme">Theme</string>
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/xml/prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@
android:summary="@string/settings_disable_verbose_log_summary"
android:title="@string/settings_disable_verbose_log" />

<rikka.material.preference.MaterialSwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_outline_assignment_24"
android:key="enable_log_watchdog"
android:persistent="false"
android:summary="@string/settings_enable_log_watchdog_summary"
android:title="@string/settings_enable_log_watchdog" />

<rikka.material.preference.MaterialSwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_outline_shield_24"
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ copy {

dependencies {
api(libs.libxposed.api)
implementation(libs.commons.lang3)
implementation(projects.apache)
implementation(projects.axml)
implementation(projects.hiddenapi.bridge)
implementation(projects.services.daemonService)
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/de/robv/android/xposed/XposedHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import org.apache.commons.lang3.local.ClassUtils;
import org.apache.commons.lang3.local.reflect.MemberUtilsX;
import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.reflect.MemberUtilsX;

import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
Expand Down
154 changes: 0 additions & 154 deletions core/src/main/java/org/apache/commons/lang3/local/ArrayUtils.java

This file was deleted.

Loading