2017-04-15 18:42:24 +00:00
|
|
|
/* late_start.c - late_start service actions
|
|
|
|
*/
|
|
|
|
|
2017-04-21 22:33:40 +00:00
|
|
|
#include <stdlib.h>
|
2017-04-15 18:42:24 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
2017-04-17 08:36:49 +00:00
|
|
|
#include "magisk.h"
|
2017-04-15 18:42:24 +00:00
|
|
|
#include "daemon.h"
|
2017-04-21 22:33:40 +00:00
|
|
|
#include "utils.h"
|
2017-04-15 18:42:24 +00:00
|
|
|
|
|
|
|
void late_start(int client) {
|
2017-04-17 08:36:49 +00:00
|
|
|
LOGI("** late_start service mode running\n");
|
2017-04-15 18:42:24 +00:00
|
|
|
// ack
|
|
|
|
write_int(client, 0);
|
|
|
|
close(client);
|
|
|
|
|
|
|
|
// Wait till the full patch is done
|
|
|
|
pthread_join(sepol_patch, NULL);
|
2017-04-21 22:33:40 +00:00
|
|
|
|
|
|
|
// Run scripts after full patch, most reliable way to run scripts
|
|
|
|
exec_common_script("service");
|
2017-04-15 18:42:24 +00:00
|
|
|
}
|