AOSP is open source. The GrapheneOS developers are capable of reverting any hostile changes if need be.