topjohnwu
59ba350f34
Fix copy and move assigments of Array
2018-11-07 04:09:37 -05:00
topjohnwu
7c12bf7fa1
Modernize code base
2018-11-07 02:10:38 -05:00
topjohnwu
9fe5f37337
Minor code improvements
2018-11-05 14:37:47 -05:00
topjohnwu
cda57dd4b4
Fully migrate Magisk to C++
2018-11-04 04:15:51 -05:00
topjohnwu
4351de503f
Migrate exec function to C++ arrays
2018-11-03 04:03:11 -04:00
topjohnwu
6339ba6bfb
Upgrade libutils to C++
2018-11-03 03:06:01 -04:00
topjohnwu
11c33d4447
Migrate resetprop to C++
2018-11-02 23:56:15 -04:00
topjohnwu
27c688252d
Store hidelist in magisk database
2018-11-01 13:23:12 -04:00
topjohnwu
2efc423cf8
Add missing flags and move debug logging logic to libutils
2018-10-28 04:25:31 -04:00
topjohnwu
6dc9ccad75
Use const char*
2018-10-26 17:02:56 -04:00
topjohnwu
9954154ca2
Move functions out of libutils
2018-10-24 22:23:14 -04:00
topjohnwu
fc8a3c5fb4
Migrate MagiskBoot to C++
2018-10-24 22:23:14 -04:00
topjohnwu
a9121fa28f
Reorganize libutils and cleanups
2018-10-12 21:46:09 -04:00
topjohnwu
d5a56d9e85
Fix bootloop for some devices with two /data
...
Close #654
2018-10-12 00:54:55 -04:00
topjohnwu
e8e39e0f3c
Use poll instead of select
...
Close #637
2018-10-04 15:06:13 -04:00
topjohnwu
cce636224c
Reorganization
2018-09-27 18:26:41 -04:00
topjohnwu
60b3b8ddce
Better incremental builds
2018-09-27 03:56:56 -04:00
topjohnwu
41446ec9ba
Separate libutils and libsystemproperties
2018-09-27 03:30:16 -04:00
topjohnwu
df8b047bca
Generalize logging interface
2018-09-27 03:11:10 -04:00
topjohnwu
1d53335ae5
Dynamic load libselinux
2018-09-27 00:09:59 -04:00
yuchenlin
0ab6ffefb4
utils/misc.c: prevent file staying opened when function leaving
...
The utils function may be called in any situation, such as in daemon. We
should guarantee that all the resource got from this function released
normally.
Signed-off-by: yuchenlin <npes87184@gmail.com>
2018-09-20 16:55:48 -04:00
topjohnwu
6f41d9855b
Randomize service names
...
Fix Aniplex Game detections.
Close #502 , close #513
2018-09-08 23:17:00 -04:00
topjohnwu
7a0025673c
Use libsystemproperties in resetprop
...
Upstream to latest Android Pie
2018-09-06 02:57:02 -04:00
topjohnwu
5bac442b18
Reorganize sources
2018-08-10 03:49:25 +08:00
topjohnwu
6add682705
Remove high compression mode
2018-08-10 03:49:25 +08:00
topjohnwu
7b5d79d313
Kill all processes using the same UID of the target
...
To workaround OOS embryo optimization
2018-08-08 05:47:58 +08:00
topjohnwu
91818cfa1a
Support compiling split cils via magiskpolicy CLI
2018-07-21 05:12:22 +08:00
topjohnwu
3c1aca114f
Wrap accept4 since some device does not have it
2018-07-17 06:52:23 +08:00
topjohnwu
18d0fd9d2a
MagiskInit optimizations
2018-07-17 06:18:36 +08:00
topjohnwu
f339a087a2
Let Magisk compile against SDK 16
2018-07-13 22:14:32 +08:00
topjohnwu
1affb91f17
Support compiling against lower SDK
...
Reduce even more size for static binaries
2018-07-13 05:41:29 +08:00
topjohnwu
1283167595
Maintain our own set of loop devices
2018-07-07 01:32:58 +08:00
topjohnwu
23c2e22910
Update image functions
2018-07-06 22:04:06 +08:00
topjohnwu
5d5ec08566
Test the log buffers before running command
2018-07-06 07:32:16 +08:00
topjohnwu
e7a2144def
Optimize magiskhide to work with the log daemon
2018-07-04 01:52:23 +08:00
topjohnwu
7265450e2e
Precise free space calculation for magisk.img
...
1. Introduce new applet: imgtool for better separation from the main program
2. Actually mount the image and check statvfs for free space in the image
This shall eliminate any possible module installation failure from image resizing issues.
2018-06-22 06:18:06 +08:00
topjohnwu
838f3cc01e
Simplify hiding conditions
2018-06-17 05:16:52 +08:00
topjohnwu
a6958ac139
Fix adbd on GSIs
2018-06-17 01:25:27 +08:00
topjohnwu
d2e8ecc646
Fix error return code when patching dtb
2018-06-10 20:36:18 +08:00
topjohnwu
34dcf49fbc
Update restorecon implementation
2018-06-03 14:43:03 +08:00
topjohnwu
b436bce565
Minor optimizations
2018-05-26 21:25:59 +08:00
topjohnwu
87f6018468
Massive sepolicy refactor
2018-04-15 03:18:18 +08:00
topjohnwu
5665e04014
Force using system binaries
2018-03-17 21:42:42 +08:00
topjohnwu
e4e5269836
Android P have no make_ext4fs, use mke2fs as fallback
2018-03-11 02:52:24 +08:00
topjohnwu
7da205f4c8
Round sizes to nearest integer
2018-02-12 04:56:50 +08:00
topjohnwu
bd7766b17e
Prevent small memory leak
2018-02-11 21:55:57 +08:00
Andrew Gunnerson
70b7d73453
utils/cpio.c: Fix off-by-one error in cpio_vec_insert
...
Previously, if `cpio_vec_insert()` needed to replace a file and the file
already exists as the first entry, then a duplicate entry would get
created.
This fixes the bug I reported at:
https://forum.xda-developers.com/showpost.php?p=75449768&postcount=22647
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
2018-02-11 18:50:42 +08:00
Andrew Gunnerson
5ad4702a5b
utils/file.c: NULL terminate all files read into memory
...
Some functions, like `patch_init_rc()`, treat buffers read into memory
as a string instead of a byte buffer. Since the buffers weren't
NULL-terminated, this resulted in out-of-bounds reads and caused crashes
in certain conditions.
THis commit updates fd_full_read() to always NULL-terminate the buffers
so that they can be treated as strings when working with text files.
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
2018-02-11 18:50:42 +08:00
topjohnwu
ebd509d92d
Obfuscate socket name to prevent detection
...
Because why not
2018-02-11 03:59:54 +08:00
topjohnwu
599ae95251
Support moving files across filesystems
2018-02-02 04:47:16 +08:00