shadow53

joined 2 years ago
[–] shadow53@programming.dev 4 points 1 day ago

The short answer is that Graphene is focused on making Android more secure, while Lineage is more about making Android devices live longer. Graphene also makes upstream contributions when possible to get those security improvements to more people. Not sure how much Lineage does that.

Some things Graphene has introduced include sandboxed Google Play (install Google Play Services as user apps instead of system apps with special permissions), SeedVault Backup (now used by Lineage and others), memory hardening, and a lot more.

[–] shadow53@programming.dev 1 points 3 weeks ago (1 children)

Algorithmically, I think you'd want to use a binary search algorithm to find the index of the threshold value, or the index of where it should be. Since the value at that index is either the threshold or the first value greater than the threshold, you can check the value at that index and, if not equal to the threshold, subtract one from the index. Then it's a matter of making a subslice of the list of values starting at that index until the end of the list.