How do I build my apk as a system app on Windows?

I have seen many guides online for how to do this, but they are all assuming a linux environment. I am developing using Android Studio on Windows, and am having trouble following these guides. Specifically, I do not know where to find the platform.pk8 and platform.x509​.pem files required for making my keys. The guides all say they are located in build/target/product/security, but I assume this is the corresponding linux directory. Where can I find these files on my windows device?


To have a system app in Android OS you need to sign your APK by the same key which the OS is signed. These key in the Android open source project can find in


But each company has got its own key and you cannot access to those key!
You can build your own Android image and load it your own development bard which probably is not easy. Then you have a system key. you can find useful information here

But the main reason if being a system app is to have the privileges of a system app.
What are those privileges? granting all permission and have access to the restricted area and secure setting for example.

So there is another possible way to be a system app.
If you can push(copy) your APK to /system/priv-app/ folder, then Android will grant all system privileges to your app automatically. (to all application in /system/priv-app/ folder not just to your app) .

How you can push your file into /system/priv-app/?

When you have Android Studio probably you can run adb. you can find some information here
You can connect to your android device using adb and through your local network

adb connect deviceip:port

port by default is 5555 and you don’t have normal type it.
For connecting to an Android device the device should in developer option. you can find some useful information here

when you connected to your device you check if your device is rooted and the system folder is mountable or not.
/System/ folder is protected by AVB and furthermore, you need to be a root user, so you use the following command

adb root

adb remount

if your device is rooted you can easily push your APK to system folder and have all privileges of a system app.

adb push <yourPackagePath> /system/priv-app/youtPackage/yourPackage.apk

if your device is not rooted you should search for how you can root your device