The required hardware includes
After burning the corresponding android system, you only need a typeC USB cable to start app development.
As shown in the following figure, you can choose multiple templates here, if you want to operate the peripherals flexibly, you need to use JAVA+C, select Native C++
Then add the project name
The default firmware is provided by youyeetoo, when we build the firmware, we have already generated these two raw files, these two files are provided with the system firmware, as shown below, the latest version of the firmware and the signature can be downloaded from the wiki homepage
After downloading these two files, you need to convert them to jks format, the conversion needs to be done under Linux environment (such as ubuntu virtual machine), the command is
openssl pkcs8 -in platform.pk8 -inform DER -outform PEM -out platform.priv.pem -nocrypt
openssl pkcs12 -export -in platform.x509.pem -inkey platform.priv.pem -out platform.pk12 -name platform
keytool -importkeystore -destkeystore platform.keystore -srckeystore platform.pk12 -srcstoretype PKCS12 -srcstorepass platform -alias platform
-name -srcstorepass -alias can be specified, here I use the platform, the next step to use this information
This is the signature information I generated
Add the following information to build.gradle, where storePassword keyAlias keyPassword is filled with the three values from the previous step
Add the following information to AndroidManifest.xml
android:sharedUserId="android.uid.system”
tools:ignore="Deprecated”
After following the above instructions, the app is built with system privileges and can be installed on the device to verify it
Execute (com.example.testdemo instead of the package name you compiled) at the command line
dumpsys package com.example.testdemo | grep "flags="
If you see a
SYSTEM_FIXED|GRANTED_BY_DEFAULT|RESTRICTION_SYSTEM_EXEMPT
message, it means the app has system privileges