236 Commits

Author SHA1 Message Date
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
9112a3a4f5 Introduce instrumentation tests 2024-12-13 12:07:42 -08:00
topjohnwu
4c14ae33f5 Properly configure Rust builds 2024-08-03 01:28:53 -07:00
topjohnwu
d4a9ef7b7f Cleanup build.py 2024-08-03 00:05:49 -07:00
topjohnwu
1539cfe888 Support setting custom ABI list
Also stop building riscv64 by default
2024-08-01 14:33:08 -07:00
topjohnwu
9093be1329 Run commands through shell on Windows 2024-07-31 17:21:18 -07:00
topjohnwu
606d076251 Build debug with thin lto 2024-07-31 17:00:01 -07:00
topjohnwu
33aebb5976 Stop embedding executables 2024-07-24 22:49:48 -07:00
topjohnwu
9c03514eb1 Create :app:clean task 2024-07-24 16:46:47 -07:00
topjohnwu
eb74b266e1 Do not modify args
Close #8242
2024-07-24 16:37:22 -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
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
topjohnwu
ef81cdab4f Prebuild Busybox
Prebuild with tools in ndk-box-kitchen
2024-07-17 02:58:31 -07:00
topjohnwu
fcbbe9a22e Move :app to :app:apk 2024-07-04 02:27:20 -07:00
topjohnwu
b168163ef0 Move :stub to :app:stub 2024-07-04 00:21:34 -07:00
topjohnwu
3e38b8fed1 Separate core codebase into its own module
- Separate UI specific code and resources outside of the core
  application logic
- Allow most of the code to move forward and use KSP for annotation
  processing and isolate rotton code that is stuck with databinding
- Make full UI rewrite more feasible
2024-07-04 00:02:42 -07:00
LoveSy
a07b9315a5 Add riscv64 support 2024-07-02 14:34:22 -07:00
LoveSy
2f710a564f allow more -v for build.py for more verbose output 2024-06-22 19:16:37 -07:00
topjohnwu
eb400f19b1 Support Python 3.12+ 2024-06-18 03:36:16 -07:00
topjohnwu
6f2c76b898 Fix build script 2024-05-09 02:19:24 -07:00
topjohnwu
f61827cbec Switch rustup_wrapper to Rust implementation
For better Windows portability
2024-05-09 02:19:07 -07:00
topjohnwu
3f2264f2c7 Support rustup wrapper 2024-05-09 00:34:12 -07:00
topjohnwu
c1cadf4bdc Update build.py to use pathlib 2024-05-09 00:31:41 -07:00
topjohnwu
b678afa4b6 Update to ONDK r27.0
Co-authored-by: LoveSy <shana@zju.edu.cn>
2024-04-26 03:09:44 -07:00
topjohnwu
24e46a5971 Build magiskboot with crt0 2024-02-29 02:36:05 -08:00
topjohnwu
907bbbda41 Remove usage of patched static lib 2024-02-25 22:11:34 -08:00
topjohnwu
365b373480 Make it easy to build without crt0 2024-02-24 22:32:22 -08:00
topjohnwu
0dbaf52566 Make all platforms build properly 2024-02-24 05:10:54 -08:00
topjohnwu
2ec29ade79 Add all missing syscalls 2024-02-23 14:35:12 -08:00
LoveSy
334554697d Enable rust parallel front-end
See https://blog.rust-lang.org/2023/11/09/parallel-rustc.html
2023-12-02 15:25:41 +08:00
LoveSy
9fbd079560 Refactor zygisk to use native bridge to inject
Co-authored-by: vvb2060 <vvb2060@gmail.com>
Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2023-11-07 14:25:57 -08:00
vvb2060
beaf636415 Use ccache for C code 2023-10-25 15:05:41 -07:00
topjohnwu
4e4ec73d94 Make gradle.properties optional 2023-10-19 15:44:34 -07:00
topjohnwu
4b8a0388e7 Make SELinux support a feature 2023-10-17 13:29:15 -07:00
topjohnwu
96e559fb0e Skip cargo build if possible 2023-09-02 06:03:39 -07:00
topjohnwu
350d0d600c Update build script 2023-08-08 01:05:32 -07:00
topjohnwu
5805573625 Update clean operation 2023-06-20 14:50:02 -07:00
topjohnwu
d2eaa6e6c1 Fix scripts on Windows 2023-06-15 05:57:19 -07:00
topjohnwu
d3e1c496ca Upgrade ONDK to r25.6 2023-06-15 01:26:54 -07:00
LoveSy
d2fbcd07b7 Use sccache on non CI env 2023-06-10 13:14:12 -07:00
topjohnwu
f8c38eab74 Proper Windows support 2023-06-05 02:27:02 -07:00
topjohnwu
7eebe62bb6 Do not realpath ANDROID_SDK_ROOT 2023-06-02 15:36:45 -07:00
topjohnwu
665c6bdc4b Provide easy access to the cargo command 2023-05-31 01:08:33 -07:00
topjohnwu
ad0da08610 Update native clean operation 2023-05-28 17:30:20 -07:00
topjohnwu
2e77a426b2 Fix build script 2023-05-19 15:32:14 -07:00
topjohnwu
2bcf2e76f1 Generate cxx binding in build.rs 2023-05-19 15:16:54 -07:00
topjohnwu
582cad1b8d Cleanup libc hacks 2023-05-19 03:23:43 -07:00
topjohnwu
2ea1a47bec Fix color printing 2023-05-16 02:41:39 -07:00
topjohnwu
e3cb5f8ddd Support setting ANDROID_STUDIO 2023-05-13 02:38:03 -07:00