)
32 | endif()
33 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_round_error_outline_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_settings_backup_restore_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 | -
22 |
23 |
24 |
27 |
28 |
29 | -
32 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_outline_speaker_notes_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_round_check_circle_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
29 |
30 |
--------------------------------------------------------------------------------
/core/src/main/java/org/lsposed/lspd/util/Hookers.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of LSPosed.
3 | *
4 | * LSPosed is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * LSPosed is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with LSPosed. If not, see .
16 | *
17 | * Copyright (C) 2020 EdXposed Contributors
18 | * Copyright (C) 2021 LSPosed Contributors
19 | */
20 |
21 | package org.lsposed.lspd.util;
22 |
23 | import android.app.ActivityThread;
24 |
25 | public class Hookers {
26 |
27 | public static void logD(String prefix) {
28 | Utils.logD(String.format("%s: pkg=%s, prc=%s", prefix, ActivityThread.currentPackageName(),
29 | ActivityThread.currentProcessName()));
30 | }
31 |
32 | public static void logE(String prefix, Throwable throwable) {
33 | Utils.logE(String.format("%s: pkg=%s, prc=%s", prefix, ActivityThread.currentPackageName(),
34 | ActivityThread.currentProcessName()), throwable);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/magisk-loader/magisk_module/daemon:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | dir=${0%/*}
4 | tmpLspdApk="/data/local/tmp/daemon.apk"
5 | debug=@DEBUG@
6 | flavor=@FLAVOR@
7 |
8 | if [ -r $tmpLspdApk ]; then
9 | java_options="-Djava.class.path=$tmpLspdApk"
10 | debug="true"
11 | else
12 | java_options="-Djava.class.path=$dir/daemon.apk"
13 | fi
14 |
15 | if [ $debug = "true" ]; then
16 | os_version=$(getprop ro.build.version.sdk)
17 | if [ "$os_version" -eq "27" ]; then
18 | java_options="$java_options -Xrunjdwp:transport=dt_android_adb,suspend=n,server=y -Xcompiler-option --debuggable"
19 | elif [ "$os_version" -eq "28" ]; then
20 | java_options="$java_options -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y -Xcompiler-option --debuggable"
21 | else
22 | java_options="$java_options -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y"
23 | fi
24 | fi
25 |
26 | mount tmpfs -t tmpfs /data/resource-cache
27 |
28 | if [ ! -S "/dev/socket/zygote" ]; then
29 | timeout 0.5 inotifyd - /dev/socket:near | while read -r line; do
30 | $debug && log -p v -t "LSPosed" "inotify: $line"
31 | if [ -S "/dev/socket/zygote" ]; then
32 | $debug && log -p v -t "LSPosed" "zygote started"
33 | touch /dev/socket&
34 | exit
35 | fi
36 | done
37 | fi
38 | $debug && log -p d -t "LSPosed" "start $flavor daemon $*"
39 |
40 | # shellcheck disable=SC2086
41 | exec /system/bin/app_process $java_options /system/bin --nice-name=lspd org.lsposed.lspd.Main "$@" >/dev/null 2>&1
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/scrollable_dialog.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
23 |
24 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/core/src/main/java/org/apache/commons/lang3/reflect/MemberUtilsX.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.commons.lang3.reflect;
19 |
20 | import java.lang.reflect.Constructor;
21 | import java.lang.reflect.Method;
22 |
23 | public class MemberUtilsX {
24 | public static int compareConstructorFit(final Constructor> left, final Constructor> right, final Class>[] actual) {
25 | return MemberUtils.compareConstructorFit(left, right, actual);
26 | }
27 |
28 | public static int compareMethodFit(final Method left, final Method right, final Class>[] actual) {
29 | return MemberUtils.compareMethodFit(left, right, actual);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/hiddenapi/stubs/src/main/java/android/annotation/NonNull.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package android.annotation;
17 |
18 | import java.lang.annotation.Retention;
19 | import java.lang.annotation.Target;
20 |
21 | import static java.lang.annotation.ElementType.FIELD;
22 | import static java.lang.annotation.ElementType.METHOD;
23 | import static java.lang.annotation.ElementType.PARAMETER;
24 | import static java.lang.annotation.RetentionPolicy.SOURCE;
25 |
26 | /**
27 | * Denotes that a parameter, field or method return value can never be null.
28 | *
29 | * This is a marker annotation and it has no specific attributes.
30 | *
31 | * @paramDoc This value must never be {@code null}.
32 | * @returnDoc This value will never be {@code null}.
33 | * @hide
34 | */
35 | @Retention(SOURCE)
36 | @Target({METHOD, PARAMETER, FIELD})
37 | public @interface NonNull {
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/org/lsposed/manager/util/chrome/CustomTabsURLSpan.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of LSPosed.
3 | *
4 | * LSPosed is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * LSPosed is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with LSPosed. If not, see .
16 | *
17 | * Copyright (C) 2020 EdXposed Contributors
18 | * Copyright (C) 2021 LSPosed Contributors
19 | */
20 |
21 | package org.lsposed.manager.util.chrome;
22 |
23 | import android.app.Activity;
24 | import android.text.style.URLSpan;
25 | import android.view.View;
26 |
27 | import org.lsposed.manager.util.NavUtil;
28 |
29 | public class CustomTabsURLSpan extends URLSpan {
30 |
31 | private final Activity activity;
32 |
33 | public CustomTabsURLSpan(Activity activity, String url) {
34 | super(url);
35 | this.activity = activity;
36 | }
37 |
38 | @Override
39 | public void onClick(View widget) {
40 | String url = getURL();
41 | NavUtil.startURL(activity, url);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_outline_format_color_fill_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_home.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_assignment_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_extension_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
29 |
30 |
--------------------------------------------------------------------------------
/core/src/main/jni/src/symbol_cache.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of LSPosed.
3 | *
4 | * LSPosed is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * LSPosed is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with LSPosed. If not, see .
16 | *
17 | * Copyright (C) 2020 EdXposed Contributors
18 | * Copyright (C) 2021 LSPosed Contributors
19 | */
20 |
21 | //
22 | // Created by kotori on 2/7/21.
23 | //
24 |
25 | #include "symbol_cache.h"
26 | #include "elf_util.h"
27 | #include
28 | #include "macros.h"
29 | #include "config.h"
30 | #include
31 | #include
32 |
33 | namespace lspd {
34 | std::unique_ptr &GetArt(bool release) {
35 | static std::unique_ptr kArtImg = nullptr;
36 | if (release) {
37 | kArtImg.reset();
38 | } else if (!kArtImg) {
39 | kArtImg = std::make_unique(kLibArtName);
40 | }
41 | return kArtImg;
42 | }
43 | } // namespace lspd
44 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_attach_file.xml:
--------------------------------------------------------------------------------
1 |
20 |
21 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_outline_translate_24.xml:
--------------------------------------------------------------------------------
1 |
19 |
20 |
26 |
29 |
30 |
--------------------------------------------------------------------------------
/core/src/main/java/de/robv/android/xposed/IXposedHookLoadPackage.java:
--------------------------------------------------------------------------------
1 | package de.robv.android.xposed;
2 |
3 | import android.app.Application;
4 |
5 | import de.robv.android.xposed.callbacks.XC_LoadPackage;
6 | import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
7 |
8 | /**
9 | * Get notified when an app ("Android package") is loaded.
10 | * This is especially useful to hook some app-specific methods.
11 | *
12 | * This interface should be implemented by the module's main class. Xposed will take care of
13 | * registering it as a callback automatically.
14 | */
15 | public interface IXposedHookLoadPackage extends IXposedMod {
16 | /**
17 | * This method is called when an app is loaded. It's called very early, even before
18 | * {@link Application#onCreate} is called.
19 | * Modules can set up their app-specific hooks here.
20 | *
21 | * @param lpparam Information about the app.
22 | * @throws Throwable Everything the callback throws is caught and logged.
23 | */
24 | void handleLoadPackage(LoadPackageParam lpparam) throws Throwable;
25 |
26 | /** @hide */
27 | final class Wrapper extends XC_LoadPackage {
28 | private final IXposedHookLoadPackage instance;
29 | public Wrapper(IXposedHookLoadPackage instance) {
30 | this.instance = instance;
31 | }
32 | @Override
33 | public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
34 | instance.handleLoadPackage(lpparam);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/core/src/main/jni/include/config_bridge.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of LSPosed.
3 | *
4 | * LSPosed is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * LSPosed is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with LSPosed. If not, see .
16 | *
17 | * Copyright (C) 2022 LSPosed Contributors
18 | */
19 | #pragma once
20 |
21 | #include