Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 936ac6ec authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Add FP5 profile for safetynet

parent 9105c575
Loading
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -96,8 +96,11 @@ object ProfileManager {
    private fun getProfileData(context: Context, profile: String, realData: Map<String, String>): Map<String, String> {
        try {
            if (profile in listOf(PROFILE_REAL, PROFILE_NATIVE)) return realData
            Log.d(TAG, "0")
            val profileResId = getProfileResId(context, profile)
            Log.d(TAG, "1 resId = $profileResId")
            if (profileResId == 0) return realData
            Log.d(TAG, "2")
            val resultData = mutableMapOf<String, String>()
            resultData.putAll(realData)
            val parser = getProfileXml(context, profile)
@@ -289,10 +292,8 @@ object ProfileManager {

    private fun applyProfile(context: Context, profile: String, serial: String = getSerial(context, profile)) {
        val profileData = getProfileData(context, profile, getRealData())
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
        for ((key, value) in profileData) {
                Log.v(TAG, "<data key=\"$key\" value=\"$value\" />")
            }
            Log.d(TAG, "<data key=\"$key\" value=\"$value\" />")
        }
        applyProfileData(profileData)
        Build.SERIAL = serial
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<profile name="FairPhone 5 (Android 13.0)" device="FP5" sdk="33" id="FP5_33" auto="true">
    <data key="Build.VERSION.DEVICE_INITIAL_SDK_INT" value="32" />
    <serial template="005b56ffff999111" />
</profile>