Clean up more codes

This commit is contained in:
LoveSy 2023-03-17 20:08:31 +08:00 committed by John Wu
parent 5c325d9466
commit 54ecc001f4
10 changed files with 8 additions and 23 deletions

View File

@ -6,7 +6,7 @@
## Introduction
Magisk is a suite of open source software for customizing Android, supporting devices higher than Android 5.0.<br>
Magisk is a suite of open source software for customizing Android, supporting devices higher than Android 6.0.<br>
Some highlight features:
- **MagiskSU**: Provide root access for applications

View File

@ -23,8 +23,6 @@ public class ConcealableBottomNavigationView extends BottomNavigationView {
};
private boolean isHidden;
private int lastHeight = -1;
public ConcealableBottomNavigationView(@NonNull Context context) {
this(context, null);
}
@ -42,14 +40,6 @@ public class ConcealableBottomNavigationView extends BottomNavigationView {
}
private void recreateAnimator(int height) {
if (lastHeight == height) return;
lastHeight = height;
// End the current animation before setting a new one
// otherwise it crashes on Android 5.0
StateListAnimator lastAnimator = getStateListAnimator();
if (lastAnimator != null) lastAnimator.jumpToCurrentState();
Animator toHidden = ObjectAnimator.ofFloat(this, "translationY", height);
toHidden.setDuration(175);
toHidden.setInterpolator(new FastOutLinearInInterpolator());

View File

@ -178,7 +178,7 @@ The `customize.sh` script runs in Magisk's BusyBox `ash` shell with "Standalone
- `ZIPFILE` (path): your module's installation zip
- `ARCH` (string): the CPU architecture of the device. Value is either `arm`, `arm64`, `x86`, or `x64`
- `IS64BIT` (bool): `true` if `$ARCH` is either `arm64` or `x64`
- `API` (int): the API level (Android version) of the device (e.g. `21` for Android 5.0)
- `API` (int): the API level (Android version) of the device (e.g. `23` for Android 6.0)
##### Functions

View File

@ -126,7 +126,6 @@ ifdef B_POLICY
include $(CLEAR_VARS)
LOCAL_MODULE := magiskpolicy
LOCAL_STATIC_LIBRARIES := \
libbase \
libbase \
libpolicy \
libpolicy-rs
@ -143,7 +142,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := resetprop
LOCAL_STATIC_LIBRARIES := \
libbase \
libcompat \
libnanopb \
libsystemproperties \
libmagisk-rs

View File

@ -14,10 +14,7 @@ static void zygisk_loader() {
android_dlextinfo info = {
.flags = ANDROID_DLEXT_FORCE_LOAD
};
// Android 5.x doesn't support ANDROID_DLEXT_FORCE_LOAD
void *handle =
android_dlopen_ext(SECOND_STAGE_PATH, RTLD_LAZY, &info) ?:
dlopen(SECOND_STAGE_PATH, RTLD_LAZY);
void *handle = android_dlopen_ext(SECOND_STAGE_PATH, RTLD_LAZY, &info);
if (handle) {
void(*entry)(void*) = dlsym(handle, "zygisk_inject_entry");
if (entry) {

View File

@ -3,7 +3,7 @@
# AVD Magisk Setup
#####################################################################
#
# Support API level: 21 - 33
# Support API level: 23 - 33
#
# With an emulator booted and accessible via ADB, usage:
# ./build.py emulator

View File

@ -3,7 +3,7 @@
# AVD MagiskInit Setup
#####################################################################
#
# Support API level: 23 - 33 (21 and 22 images do not have SELinux)
# Support API level: 23 - 33
#
# With an emulator booted and accessible via ADB, usage:
# ./build.py avd_patch path/to/booted/avd-image/ramdisk.img

View File

@ -48,7 +48,7 @@ ui_print "- Target image: $BOOTIMAGE"
# Detect version and architecture
api_level_arch_detect
[ $API -lt 21 ] && abort "! Magisk only support Android 5.0 and above"
[ $API -lt 23 ] && abort "! Magisk only support Android 6.0 and above"
ui_print "- Device platform: $ABI"

View File

@ -186,7 +186,7 @@ public class DownloadActivity extends Activity {
File dir = new File(getCodeCacheDir(), "res");
dir.mkdirs();
// addAssetPath requires a directory containing AndroidManifest.xml on Android 5
// addAssetPath requires a directory containing AndroidManifest.xml on Android 6.0
try (var stubApk = new ZipFile(getPackageCodePath());
var manifest = new FileOutputStream(new File(dir, "AndroidManifest.xml"))) {
var stubManifest = stubApk.getInputStream(

View File

@ -188,7 +188,7 @@ public class DynLoad {
mcl.set(loadedApk, new DelegateClassLoader());
} catch (Exception e) {
// Actually impossible as this method is only called on API < 29,
// and API 21 - 28 do not restrict access to these fields.
// and API 23 - 28 do not restrict access to these fields.
Log.e(DynLoad.class.getSimpleName(), "", e);
}
}