topjohnwu
bbe4b69c8d
Fix LZ4FEncoder constructor
2019-03-07 19:58:59 -05:00
topjohnwu
7f08c06943
Remove unnecessary '--' from magiskboot actions
2019-03-07 18:07:23 -05:00
topjohnwu
0442d6d509
Only compress kernel and ramdisk if input not compressed
2019-03-07 07:24:20 -05:00
topjohnwu
e72c6685ed
Support A only System-as-root Devices
...
Most Chinese devices (and supposedly Galaxy S10) running Android Pie
is using system-as-root without A/B partition.
https://source.android.com/devices/bootloader/system-as-root#about-system-as-root
According to the docs above, these devices will have a ramdisk block
with size 0 in their boot images. Since magiskinit can run independently
on system-as-root devices, we simply just create an empty ramdisk with
magiskinit added as init.
Huge thanks to @vvb2060 for the heads up and original PR.
Close #980 , close #1102
2019-02-28 05:46:36 -05:00
topjohnwu
c9fa8118d1
Some code adjustments
2019-02-24 23:09:34 -05:00
topjohnwu
63b18246d8
Add compressed ramdisk support
2019-02-24 20:39:01 -05:00
topjohnwu
16ec37a226
Fix compression without outname
2019-02-24 17:45:08 -05:00
topjohnwu
c84023bdc2
Fix crashes when removing verity_key
2019-02-24 04:29:15 -05:00
topjohnwu
86f778c0aa
Group unsupported formats into the same code
2019-02-24 02:30:04 -05:00
topjohnwu
340bac7e42
Add decompression command
2019-02-23 16:53:51 -05:00
topjohnwu
4a398642b8
Set mode in constructor
2019-02-23 15:22:11 -05:00
topjohnwu
9c89e56c56
Add ramdisk compression option
2019-02-23 15:04:15 -05:00
topjohnwu
75939047d1
Fix bugs in compression
2019-02-23 04:51:13 -05:00
topjohnwu
2d7f130d2c
Introduce Java-like OutputStream
2019-02-23 04:51:13 -05:00
topjohnwu
f7ae72a36c
Move CPIO to libutils
2019-02-23 02:42:26 -05:00
topjohnwu
391783e268
Introduce mmap based CPIO class
2019-02-23 02:23:24 -05:00
topjohnwu
6f12c08204
Use ordered map to store CPIO entries
2019-02-22 22:53:20 -05:00
topjohnwu
cb8fe70734
Modernize CPIO code
2019-02-22 02:56:18 -05:00
topjohnwu
69d10b747a
Directly use FDT headers for detection
2019-02-21 05:24:05 -05:00
topjohnwu
da3394f34e
Move image parsing out of header searching
2019-02-21 05:08:38 -05:00
topjohnwu
b4c2a9f49f
More macro magic
2019-02-21 04:14:52 -05:00
topjohnwu
7cee77f57a
Some C++ magic to make code cleaner
2019-02-21 02:54:37 -05:00
topjohnwu
f28bd1972f
Adjust LZ4F block size
2019-02-21 00:52:47 -05:00
topjohnwu
0f92d1de1b
Fix bzip2 decompression
2019-02-20 20:53:54 -05:00
topjohnwu
e59c5c8780
Modernize compress and decompress
2019-02-20 20:49:26 -05:00
kirill9617
86d8026301
Update format.h
...
GZIP magic is \x1f\x8b\x08 not \x1f\x8b\x08\x00
2019-02-20 03:53:41 -05:00
topjohnwu
d67b827338
Rewrite compression with OOP
2019-02-20 02:10:06 -05:00
topjohnwu
ed027ec3ee
Refactor build flags
2019-02-12 05:17:02 -05:00
topjohnwu
71ecbb3af3
Clean/refactor includes
2019-02-10 03:57:51 -05:00
topjohnwu
9275975b2c
Re-organize functions
2019-01-26 06:00:23 -05:00
topjohnwu
3e4c12cf56
Migrate to STL
2019-01-19 23:59:37 -05:00
topjohnwu
b245931c79
Prevent duplicates when "." or ".." occurs
2018-12-09 22:12:04 -05:00
topjohnwu
1fae89cbb6
Add new cpio command: "exists", to magiskboot
2018-12-05 20:27:48 -05:00
topjohnwu
08cd5b81d1
Try to repair boot_hdr v1 entries
2018-12-04 03:30:43 -05:00
topjohnwu
83ae66daea
Change stock boot image SHA1 backup method
2018-11-15 00:33:20 -05:00
topjohnwu
3603b7c82b
Move cmdline and extra_cmdline to the same line
2018-11-08 20:57:30 -05:00
topjohnwu
8745c7884e
Rename Array to Vector
...
Finally get rid of the C style vector, rename the template class to its proper name
2018-11-08 05:03:59 -05:00
topjohnwu
7c12bf7fa1
Modernize code base
2018-11-07 02:10:38 -05:00
topjohnwu
ca35a9681f
Minor code improvements
2018-11-06 05:02:30 -05:00
topjohnwu
3e2afd4b1d
Better debugging output
2018-11-01 01:16:15 -04:00
topjohnwu
2efc423cf8
Add missing flags and move debug logging logic to libutils
2018-10-28 04:25:31 -04:00
topjohnwu
6add02702b
Fix bug in MagiskBoot
2018-10-26 17:02:07 -04:00
topjohnwu
4ecbf8c12c
Remove recovery_dtbo when cleanup
2018-10-24 22:23:14 -04:00
topjohnwu
fc8a3c5fb4
Migrate MagiskBoot to C++
2018-10-24 22:23:14 -04:00
topjohnwu
018c0064cd
Make sure boot_img is initialized correctly
2018-10-22 01:58:50 -04:00
topjohnwu
74aae523ba
Properly support boot image header v1
...
Close #695
2018-10-20 00:27:56 -04:00
topjohnwu
df8b047bca
Generalize logging interface
2018-09-27 03:11:10 -04:00
topjohnwu
190646d50c
Fix incorrect magisk metadata in ramdisk
2018-08-11 16:31:46 +08: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