Files
multirom_m86/trampoline_encmnt/fake_properties.c
Zhuowei Zhang 42d2dcb3cf trampoline: Add new pre/post encrypt hooks, fake system properties library
These are needed on Snapdragon 810 where an extra daemon (qseecomd) must
be started prior to decryption, and where the decryption library polls
a system property to make sure that daemon is running

Also fix missing fonts log spam in trampoline_encmnt by symlinking the one available font
2016-02-10 20:19:16 -08:00

34 lines
1.1 KiB
C

/*
* This file is part of MultiROM.
*
* MultiROM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MultiROM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MultiROM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include <sys/system_properties.h>
/* MultiROM doesn't initialize the property service,
* but decryption on Nexus 6P waits for one property to become true
* so we hardcode it here
*/
int property_get(const char *key, char *value, const char *default_value)
{
if (!strcmp(key, "sys.listeners.registered"))
default_value = "true";
if (default_value)
strncpy(value, default_value, PROP_VALUE_MAX);
return strlen(value);
}