I've just read the following topic on StackOverflow and I think that it can be very useful to replicate the procedure here.
Add to manifest android:sharedUserId="android.uid.system"
Download System signatures files: platform.x509.pem platform.pk8
link: https://android.googlesource.com/platform/build/+/android-8.0.0_r17/target/product/security/
- Sign app through terminal (java -jar signapk.jar platform.x509.pem platform.pk8 unsigned.apk signed.apk) (first you must put all files to one folder), or make certificate with keytool-importkeypair to make google_certificate.keystore and then
link for keytool-importkeypair download and explanation:
https://github.com/getfatday/keytool-importkeypair
- After that steps install your signed system app to your device.