515 Commits

Author SHA1 Message Date
topjohnwu
f5f9b285c0 Add module tests 2025-02-16 16:20:09 -08:00
topjohnwu
29043e1684 Consolidate setup methods 2025-02-16 16:20:09 -08:00
topjohnwu
15b7c4ccd1 Fix tmpfs mounts in avd_magisk.sh 2025-02-14 10:17:31 -08:00
Wang Han
5e35703091
Ensure target path exists before mknod
Co-authored-by: LoveSy <shana@zju.edu.cn>
2025-02-12 01:13:56 +08:00
Pzqqt
e73ff679ac scripts: flash_script.sh: Avoid overly dangerous code 2024-12-27 16:02:24 -08:00
LoveSy
d2768357da Support systemlessly deleting files or folders
After we refactor the magic mount and always mount folder as tmpfs,
we can easily support deleting files or folders now. We recognize
dummy devices with major number 0 and minor number 0 as an indicator
for removing files and folders. This indicator is borrowed from
overlayfs.
2024-12-27 15:57:54 -08:00
Wang Han
704541aef2 Use /metadata/watchdog as preinit dir if exists
Since Android 15, all domains are allowed to search /metadata so preinit
dir will be exposed. Use /metadata/watchdog when /metadata is chosen as
preinit device, and the dir is available (since Android 11).
2024-12-27 10:35:05 -08:00
topjohnwu
231a5d1853 Cleanup test code 2024-12-25 22:26:30 -08:00
topjohnwu
9e2b59060d Drive app migration tests through instrumentation
Make tests less flaky
2024-12-25 22:26:30 -08:00
topjohnwu
08ea937f7c Test su request via instrumentation 2024-12-25 22:26:30 -08:00
topjohnwu
2baedf74d1 Install and test LSPosed through test app 2024-12-25 22:26:30 -08:00
topjohnwu
32faa4ced6 Redesign test APK architecture
The test APK and the main APK share the same process and classloader,
and in the non-hidden case, the test APK's classes take precedence over
the ones in the main APK. This causes issues because the test APK and
main APK share some dependencies, but don't always use the same
version. This is especially problematic for the Kotlin stdlib and
AndroidX dependencies.

The solution here is to rely on R8's obfuscation feature and repackage
all potentially conflicting classes into a separate package in the test
APK. To ensure that the test classes are always using the same classes
as the main APK, we have to directly implement all tests inside the main
APK, making the test APK purely a "test runner with test dependencies".

As a result, the test APK can only be used when built in release mode,
because R8 no longer allow class obfuscation to be enabled when building
for debug versions.
2024-12-25 20:17:57 -08:00
topjohnwu
ccdb0b5d13 Add ability to skip certain test variants 2024-12-25 20:11:21 -08:00
topjohnwu
ce2e33bb20 Cleanup test scripts 2024-12-23 20:42:54 -08:00
topjohnwu
6707b72260 Fix AVD tests 2024-12-23 20:41:42 -08:00
topjohnwu
5885b8c20d Add new tests for app hiding 2024-12-18 17:22:31 -08:00
topjohnwu
9112a3a4f5 Introduce instrumentation tests 2024-12-13 12:07:42 -08:00
vvb2060
506961a10d flash module: ignore META-INF 2024-12-12 10:07:47 -08:00
topjohnwu
2e86d21c29 16k pages only work on Android B on x64
Some checks failed
Magisk Build / Build Magisk artifacts (push) Has been cancelled
Magisk Build / Test building on ${{ matrix.os }} (ubuntu-latest) (push) Has been cancelled
Magisk Build / Test building on ${{ matrix.os }} (windows-latest) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 23) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 24) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 25) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 26) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 27) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 28) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 29) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 30) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 31) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 32) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 33) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 34) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 35) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (google_apis, Baklava) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (google_apis_ps16k, Baklava) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (23) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (24) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (25) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (26) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (27) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (28) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (29) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (30) (push) Has been cancelled
Magisk Build / Test ${{ matrix.device }} (aosp-main, aosp_cf_x86_64_phone) (push) Has been cancelled
2024-12-09 20:13:27 -08:00
vvb2060
b09ceeb43c scripts: sync avd_magisk.sh with mgiskinit
Some checks are pending
Magisk Build / Build Magisk artifacts (push) Waiting to run
Magisk Build / Test building on ${{ matrix.os }} (ubuntu-latest) (push) Waiting to run
Magisk Build / Test building on ${{ matrix.os }} (windows-latest) (push) Waiting to run
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 23) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 24) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 25) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 26) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 27) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 28) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 29) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 30) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 31) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 32) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 33) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 34) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 35) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86_64) (google_apis, Baklava) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (23) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (24) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (25) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (26) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (27) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (28) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (29) (push) Blocked by required conditions
Magisk Build / Test API ${{ matrix.version }} (x86) (30) (push) Blocked by required conditions
Magisk Build / Test ${{ matrix.device }} (aosp-main, aosp_cf_x86_64_phone) (push) Blocked by required conditions
Magisk Build / Test ${{ matrix.device }} (aosp-main-throttled, aosp_cf_x86_64_phone_pgagnostic) (push) Blocked by required conditions
2024-12-06 02:21:17 -08:00
topjohnwu
837c679a31 Update avd_test API versions 2024-12-03 02:18:22 -08:00
topjohnwu
e1b847fbc5 Find boot image with MagiskInstaller
Some checks failed
Magisk Build / Build Magisk artifacts (push) Has been cancelled
Magisk Build / Test building on ${{ matrix.os }} (ubuntu-latest) (push) Has been cancelled
Magisk Build / Test building on ${{ matrix.os }} (windows-latest) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 23) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 24) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 25) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 26) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 27) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 28) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 29) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 30) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 31) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 32) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 33) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (, 34) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86_64) (google_apis, 35) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (23) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (24) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (25) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (26) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (27) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (28) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (29) (push) Has been cancelled
Magisk Build / Test API ${{ matrix.version }} (x86) (30) (push) Has been cancelled
Magisk Build / Test ${{ matrix.device }} (aosp-main, aosp_cf_x86_64_phone) (push) Has been cancelled
Magisk Build / Test ${{ matrix.device }} (aosp-main-throttled, aosp_cf_x86_64_phone_pgagnostic) (push) Has been cancelled
Fix #8211
2024-10-07 16:52:35 -07:00
LoveSy
310be7ab47 Return exit value of action.sh 2024-09-08 01:12:30 -07:00
LoveSy
fbebb6ac10 Add action.sh for user to manually trigger modules' functionality from app 2024-09-08 01:12:30 -07:00
vvb2060
869aa62328 ci: fix build 2024-09-05 21:50:46 -07:00
Salvo Giangreco
a82f17c594 Disable Samsung PROCA
Signed-off-by: Salvo Giangreco <giangrecosalvo9@gmail.com>
2024-09-04 01:49:02 -07:00
topjohnwu
7cf56b4406 Simplify ramdisk test 2024-08-21 16:46:37 -07:00
topjohnwu
e6bd2ff60f Fix stock image restore
Fix #8211
2024-08-20 02:23:20 -07:00
vvb2060
2cbec20238 find_boot_image: test GKI 1.0 2024-08-19 03:05:24 -07:00
vvb2060
4b724c7257 find_boot_image: test previous kernels (<=4.19) 2024-08-19 03:05:24 -07:00
vvb2060
ab04c6ab39 find_boot_image: keep symlink 2024-08-19 03:05:24 -07:00
topjohnwu
c76cc4c6bd Update cuttlefish hostside tools 2024-08-16 15:58:29 -07:00
topjohnwu
9db2e99086 Test 16k on Cuttlefish 2024-08-15 22:51:40 -07:00
Andrew Gunnerson
07835a3e0e util_functions.sh: Fix syntax error due to missing then
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2024-08-06 01:16:19 -07:00
topjohnwu
09131aca89 Fix find_boot_image
Close #8255
2024-08-05 11:24:30 -07:00
topjohnwu
ca36b42d79 Update release.sh 2024-08-03 01:55:03 -07:00
topjohnwu
3b27de3715 Output logs to files 2024-07-25 03:48:13 -07:00
topjohnwu
939bfac920 Make sure version is fetched correctly 2024-07-25 03:04:27 -07:00
topjohnwu
300a2a242c Add release script 2024-07-24 23:10:57 -07:00
topjohnwu
33aebb5976 Stop embedding executables 2024-07-24 22:49:48 -07:00
topjohnwu
a8789073f1 Run copy_preinit_files in run_migrations 2024-07-23 02:21:49 -07:00
vvb2060
d33b077a13 Remove NVBASE
We only move /cache/data_adb/magisk and /data/magisk to /data/adb/magisk (#7638), so NVBASE is redundant and we can just use MAGISKBIN.
2024-07-23 02:03:47 -07:00
vvb2060
2282365cf8 clean code 2024-07-23 02:02:56 -07:00
vvb2060
9a00b7b942 update copy_preinit_files 2024-07-23 02:02:56 -07:00
topjohnwu
6e22476acc Update test scripts 2024-07-22 03:39:04 -07:00
topjohnwu
b26db8cee6 Switch over to ANDROID_HOME
Keep ANDROID_SDK_ROOT as a fallback
2024-07-21 00:53:13 -07:00
topjohnwu
a177d3b022 Fix AVD test on API 23 2024-07-20 15:08:06 -07:00
topjohnwu
f919bb0e99 Minor changes 2024-07-20 04:52:25 -07:00
topjohnwu
93c3d36452 Add Cuttlefish tests in CI 2024-07-20 03:10:18 -07:00
topjohnwu
659dd09723 Do not modify system-images contents when patching 2024-07-19 16:47:12 -07:00