Commit Graph

185 Commits

Author SHA1 Message Date
Tad
ef2fdb1d3e
More handling improvements
Signed-off-by: Tad <tad@spotco.us>
2023-03-08 16:14:51 -05:00
Tad
5d0ab40f0b
Robustness improvements
Signed-off-by: Tad <tad@spotco.us>
2023-03-08 01:14:06 -05:00
Tad
6ba784ac33
Some actual error handling 1/n
Signed-off-by: Tad <tad@spotco.us>
2023-03-08 00:03:23 -05:00
Tad
1511176a07
Update CVE patchers
Maybe some breakage

Signed-off-by: Tad <tad@spotco.us>
2023-01-28 20:33:44 -05:00
Tad
06254708be
Many fixes to get bluejay booting & working proper
- Enable APEX for Pixel 6/7, necessary for camera and pKVM
  - Also drop hack removing pKVM for Pixel 6/7
  - patch from GrapheneOS

- Extend hmalloc workaround to /apex

- Deblobber:
  - actually handle wildcard f/w/b overlays
  - move some stuff around
  - remove some more Pixel blobs
  - flag and disable removal of camera extensions, being able to use the second camera is nice

- Adjust what hardenDefconfig disables, caused boot issues
  minimal impact as most of these are already default-disabled
  can be narrowed down in future

- Disable some of the bionic hardening patches, causing more boot issues
  annoying to lose, but having a phone that boots is more important

- Add LTE only mode to 17.1, 18.1, 19.1, and 20.0, credit GrapheneOS

- Remove Pixel 2 ramdisk compression reverts, fixed upstream

And yes, I know I should've split up this commit...

Signed-off-by: Tad <tad@spotco.us>
2022-12-25 13:21:37 -05:00
Tad
82d2066021
Disable removal of aptX
Bluetooth audio is already awful enough, let's not make it worse

Signed-off-by: Tad <tad@spotco.us>
2022-12-18 22:58:21 -05:00
Tad
8bfedda18b
14/15/16: Fix compile failure with modern kernels
https://android-review.googlesource.com/c/platform/art/+/2226578
https://groups.google.com/g/Android-building/c/ZfUQQWt_ABI

Signed-off-by: Tad <tad@spotco.us>
2022-11-10 18:26:36 -05:00
Tad
11780d890f Churn
Signed-off-by: Tad <tad@spotco.us>
2022-10-24 22:53:41 -04:00
Tad
148df59b7e
Cleanup: Drop UnifiedNlp, FDroidPrivExt, and Silence
These haven't been included for a while

+remove some old cruft from 20.0

Signed-off-by: Tad <tad@spotco.us>
2022-10-19 12:15:24 -04:00
Tad
055ed9bfad
20.0: Initial bringup
Signed-off-by: Tad <tad@spotco.us>
2022-10-15 10:39:48 -04:00
Tad
fe95f700d8 Remove the CNE and DPM blobs + churn
Just say no!

Signed-off-by: Tad <tad@spotco.us>
2022-10-12 01:23:45 -04:00
Tad
da2e44c5f3
Add back the CNE and DPM blobs + churn
Signed-off-by: Tad <tad@spotco.us>
2022-10-02 11:47:58 -04:00
Tad
86ed884251
More verification
Signed-off-by: Tad <tad@spotco.us>
2022-08-26 23:14:15 -04:00
Tad
3618774d9f
GPG verification for all platform repositories
Signed-off-by: Tad <tad@spotco.us>
2022-08-26 22:40:27 -04:00
Tad
4bfedbc42d
Fixup and enable GPG verification
Signed-off-by: Tad <tad@spotco.us>
2022-08-24 15:52:55 -04:00
Tad
0d8ab187e3 Revert past two commits
Disabling extended sizes classes does not appear to have the savings it does on desktop.
Disabling the quarantine isn't acceptable given that default scudo implements it
2022-08-03 00:24:39 -04:00
Tad
a00fa2349e Switch to a memory efficient hardened_malloc variant
This should help 64-bit devices with <4GB RAM substantially, at reduced hardening.

clark for example only has 2.5GB of usable memory and idles at 1.6GB used.
After this change, idle usage drops to 1.1GB!

Signed-off-by: Tad <tad@spotco.us>
2022-08-02 20:29:10 -04:00
Tad
991e4c0642 Revert "Revert b5224f0"
I've triple checked that calls/data work fine without these blobs
and also have another report from walleye as the same.

I have no idea what is happening to those who have SIM issues.

This reverts commit dc392b17b6.
2022-05-17 18:42:38 -04:00
Tad
dc392b17b6 Revert b5224f0
Calling and data is tested working on my taimen
But there are multiple reports that say otherwise

Signed-off-by: Tad <tad@spotco.us>
2022-05-17 10:48:28 -04:00
Tad
05930af014 Various changes 2022-05-14 21:40:50 -04:00
Tad
b5224f0c79 Remove the Google carrier blobs
These were previously removed, and added back after a false report of breakage.

Data and VoLTE tested working on taimen

Signed-off-by: Tad <tad@spotco.us>
2022-05-03 14:28:51 -04:00
Tad
65883d9bc4 2022
Signed-off-by: Tad <tad@spotco.us>
2022-05-01 01:13:49 -04:00
Tad
36fabeca42 Deblob manifest.xml
Reverts 766219aa
Fixes https://github.com/Divested-Mobile/DivestOS-Build/issues/55

Signed-off-by: Tad <tad@spotco.us>
2022-04-29 09:44:36 -04:00
Tad
13a9997a0c 19.1: aura and beryllium + some fixes
Signed-off-by: Tad <tad@spotco.us>
2022-04-26 11:41:28 -04:00
Tad
e666a4a891 Update CVE patchers
TODO: maybe split CVE-2022-23960/4.9 to get back?

Signed-off-by: Tad <tad@spotco.us>
2022-04-19 14:38:44 -04:00
Tad
0e1266ac1f Drop Silence
Signed-off-by: Tad <tad@spotco.us>
2022-04-16 18:53:00 -04:00
Tad
42c9d22de9 Default disable exec spawning
Change the property too, so it takes effect next update.
Since 16.0 lacks a toggle, this effectively disables the feature for it.
Even devices with 4GB of RAM have usability severely impacted.

Plus some other tweaks/churn

Signed-off-by: Tad <tad@spotco.us>
2022-04-12 17:58:04 -04:00
Tad
d50a3a043b Switch 16.0/17.1/18.1 to the more robust GrapheneOS sensors permission patchset
Like done for 19.1

Signed-off-by: Tad <tad@spotco.us>
2022-04-10 21:12:03 -04:00
Tad
f747fb36e5 Various
Signed-off-by: Tad <tad@spotco.us>
2022-04-08 16:55:30 -04:00
Tad
a9e250afd9 Cleanup
Signed-off-by: Tad <tad@spotco.us>
2022-04-07 00:37:20 -04:00
Tad
18c840222b Simplify: always nochain
Signed-off-by: Tad <tad@spotco.us>
2022-04-06 15:45:20 -04:00
Tad
b026a7811c Actually enforce AVB + signing fixes
- Turns out AVB was set permissive this entire time :(
  --flags 2 == VERIFICATION_DISABLED
- APEX support from GrapheneOS
- Disable vbmeta chaining like GrapheneOS
  and optionally handle it like CalyxOS

taimen 19.1 boots with locked bootloader successfully after this

Signed-off-by: Tad <tad@spotco.us>
2022-04-06 15:16:12 -04:00
Tad
3a0659b9d8 19.1: more work, it compiles and boots!
- Add the manifest
- Add Pixel 2 series
- Add some missing patches
- More DNS files
- Drop Silence in 19.1

Signed-off-by: Tad <tad@spotco.us>
2022-04-05 23:44:15 -04:00
Tad
6c5a65622c Page sanitization improvements
This ensures init_on_alloc/free is used instead of page poisioning where available.

3.4 through 3.18 have a patch without a toggle for page sanitization.

Signed-off-by: Tad <tad@spotco.us>
2022-04-02 12:57:17 -04:00
Tad
e26908b9e0 Update CVE patchers
Signed-off-by: Tad <tad@spotco.us>
2022-03-31 21:30:56 -04:00
Tad
e2c499dd24 Enable Clang's -ftrivial-auto-var-init=zero on supported kernels
Signed-off-by: Tad <tad@spotco.us>
2022-03-31 21:00:31 -04:00
Tad
f481055ae9 Add the GrapheneOS always randomize MAC option to 17.1 and 18.1
The DHCP state patch was backported to 17.1

Signed-off-by: Tad <tad@spotco.us>
2022-03-29 22:27:09 -04:00
Tad
1bbb6f9b4e Fix and enable exec_spawning feature
This is the missing puzzle piece :)

Signed-off-by: Tad <tad@spotco.us>
2022-03-28 22:02:52 -04:00
Tad
a53062ca0b Backports
Adds ptrace_scope and timeout options to 17.1, tested working

Also adds hardened_malloc to 15.1, but failing to compile:
external/hardened_malloc/h_malloc.c:1688:18: error: use of undeclared identifier 'M_PURGE'
    if (param == M_PURGE) {
                 ^
external/hardened_malloc/h_malloc.c:1743:30: error: missing field 'ordblks' initializer [-Werror,-Wmissing-field-initializers]
    struct mallinfo info = {0};
                             ^

Signed-off-by: Tad <tad@spotco.us>
2022-03-21 18:06:49 -04:00
Tad
0c33d328b7 Partially re-enable the bionic hardening patchset
These uncommented patches have been ruled out, leaving 7 more to test

shamu is tested booting with this

Signed-off-by: Tad <tad@spotco.us>
2022-03-19 20:25:24 -04:00
Tad
a56e3a3016 Disable the bionic hardening patchset to fix boot issues
10+4 devices tested working with bionic hardening patches enabled
but hammerhead and shamu do not boot...

2 of the patches were already found to have issues and disabled
3 other patches were ruled out:
- Stop implicitly marking mappings as mergeable
- Make __stack_chk_guard read-only at runtime
- On 64-bit, zero the leading stack canary byte
Leaves 11+1 patches remaining that need to be tested
But I don't have either of the two known impacted devices.

Signed-off-by: Tad <tad@spotco.us>
2022-03-19 16:19:00 -04:00
Tad
a9f6672fed hardened_malloc fixes for broken devices
- enable the patchset for 18.1
- add an ugly patch that extends the Pixel 3* camera workaround to all camera executables

Signed-off-by: Tad <tad@spotco.us>
2022-03-16 02:01:19 -04:00
Tad
181519cf38 Add bionic hardening patchsets from GrapheneOS
11 b3a0c2c5db
11 5412c37195 #explicit zero
11 31456ac632 #brk
11 58ebc243ea #random
11 5323b39f7e #undefined
11 6a91d9dddb #merge
11 a042b5a0ba #vla formatting
11 9ec639de1b #pthread
11 49571a0a49 #read only
11 149cc5ccb8 #zero
11 2e613ccbe7 #fork mmap
11 e239c7dff8 #memprot pthread
11 0b03d92b7f #xor
11 de08419b82 #junk
11 897d4903e2 #guard
11 648cd68ca3 #ptrhread guard
11 0bc4dbcbd2 #stack rand
10 aa9cc05d07
10 a8cdbb6352 #explicit zero
10 b28302c668 #brk
10 9f8be7d07c #random
10 cb91a7ee3a #undefined
10 08279e2fdd #merge
10 6a18bd565d #vla formatting
10 2f392c2d08 #pthread
10 8bbce1bc50 #read only
10 725f61db82 #zero
10 4cd257135f #fork mmap
10 9220cf622b #memprot pthread
10 8ef71d1ffd #memprot exit
10 0eaef1abbd #xor
10 64f1cc2148 #junk
10 5c42a527cf #guard
10 5cc8c34e60 #pthread guard
10 7f61cc8a1c #stack rand
9  abdf523d26
9  e4b9b31e6f #explicit zero
9  a3a22a63d2 #brk
9  7444dbc3cf #random
9  dcd3b72ac9 #undefined
9  543e1df342 #merge
9  611e5691f7 #vla formatting
9  8de97ce864 #pthread
9  a475717042 #read only
9  7f0947cc0e #zero
9  e9751d3370 #fork mmap
9  83cd86d0d5 #memprot pthread
9  1ebb165455 #memprot exit
9  488ba483cf #xor
9  f9351d884b #junk
9  85e5bca0a5 #move

Signed-off-by: Tad <tad@spotco.us>
2022-03-15 16:56:46 -04:00
Tad
1878cd19ab Fix/Add hardened malloc patchsets from GrapheneOS
11 8c0f3c0e04
11 4e6320c247
11 108754debb
10 818be3fc1d
10 010949662f
10 ede5e38f5b
9 80754c93bf
9 20160b8161

Signed-off-by: Tad <tad@spotco.us>
2022-03-15 16:24:56 -04:00
Tad
f015dd348f Add the JNINativeMethod table constification patchsets from GrapheneOS
11 63b9f96a12
11 d8a62b5156
11 e3a4d64f29
11 e41f1d7f8e
11 c34b037486
11 dce2d0f64f
11 c99c35cb2a
10 07071814db
10 a48ba29b98
10 157fa78115
10 b914409e05
10 20a51f508b
10 b8afb8af37
10 e1b6653db7
9 ff688b68a7
9 866f0df315
9 77c9fa981a
9 fbf620e59c
9 ceaf63c790
9 253247fc39
9 76bf4c46f0

Signed-off-by: Tad <tad@spotco.us>
2022-03-15 15:26:48 -04:00
Tad
844227a4f4 18.1: add the ptrace_scope patchset from GrapheneOS
ad017fba58
3b89605581
8b0419ac04
52ea603339

Signed-off-by: Tad <tad@spotco.us>
2022-03-15 14:29:34 -04:00
Tad
07bd5a3a0e Automatic reboot and Bluetooth/Wi-Fi shutoff from GrapheneOS and CalyxOS
Closes https://github.com/Divested-Mobile/DivestOS-Build/issues/59
Tested on 18.1
Untested on 17.1

Signed-off-by: Tad <tad@spotco.us>
2022-03-15 01:27:08 -04:00
Tad
f65c7a4ccd Tweaks
Signed-off-by: Tad <tad@spotco.us>
2022-03-12 11:48:23 -05:00
Tad
5e1521700f Port the GrapheneOS NETWORK permission to 17.1 and 18.1
Some patches were ported from 12 to 10/11
Some patches from 11 were ported to 10
This 10/11 port should be very close to 12

BOUNS: 16.0 patches, disabled

Signed-off-by: Tad <tad@spotco.us>
2022-02-25 16:52:51 -05:00
Tad
21c97c6967 Tweak
Signed-off-by: Tad <tad@spotco.us>
2022-02-21 23:30:45 -05:00