Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Naur -X ignore droid/system/core/debuggerd/tombstone.cpp droid_cm12/system/core/debuggerd/tombstone.cpp
- --- droid/system/core/debuggerd/tombstone.cpp 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/debuggerd/tombstone.cpp 2016-08-22 13:13:09.000000000 +0300
- @@ -744,26 +744,7 @@
- log.crashed_tid = tid;
- int fd = -1;
- - if ((mkdir(TOMBSTONE_DIR, 0755) == -1) && (errno != EEXIST)) {
- - _LOG(&log, logtype::ERROR, "failed to create %s: %s\n", TOMBSTONE_DIR, strerror(errno));
- - }
- - if(((fd = open(TOMBSTONE_DIR, O_NOFOLLOW|O_RDONLY)) != -1) ||((fd = open(TOMBSTONE_DIR, O_NOFOLLOW|O_WRONLY)) != -1)){
- - if (fchown(fd, AID_SYSTEM, AID_SYSTEM) < 0){
- - _LOG(&log, logtype::ERROR, "failed to change ownership of %s: %s\n", TOMBSTONE_DIR, strerror(errno));
- - close(fd);
- - return NULL;
- - }
- - close(fd);
- - } else {
- - _LOG(&log, logtype::ERROR, "failed to open %s: %s\n", TOMBSTONE_DIR, strerror(errno));
- - return NULL;
- - }
- - char* path = NULL;
- - if (selinux_android_restorecon(TOMBSTONE_DIR, 0) == 0) {
- - path = find_and_open_tombstone(&fd);
- - } else {
- - _LOG(&log, logtype::ERROR, "Failed to restore security context, not writing tombstone.\n");
- - }
- + char* path = find_and_open_tombstone(&fd);
- if (fd < 0) {
- _LOG(&log, logtype::ERROR, "Skipping tombstone write, nothing to do.\n");
- diff -Naur -X ignore droid/system/core/healthd/healthd_mode_charger.cpp droid_cm12/system/core/healthd/healthd_mode_charger.cpp
- --- droid/system/core/healthd/healthd_mode_charger.cpp 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/healthd/healthd_mode_charger.cpp 2016-08-22 13:13:09.000000000 +0300
- @@ -733,6 +733,8 @@
- accordingly. */
- if (property_get_bool("ro.enable_boot_charger_mode", false)) {
- LOGW("[%" PRId64 "] booting from charger mode\n", now);
- + set_backlight(false);
- + gr_fb_blank(true);
- property_set("sys.boot_from_charger_mode", "1");
- } else {
- LOGW("[%" PRId64 "] rebooting\n", now);
- diff -Naur -X ignore droid/system/core/init/bootchart.c droid_cm12/system/core/init/bootchart.c
- --- droid/system/core/init/bootchart.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/bootchart.c 2016-08-22 13:13:09.000000000 +0300
- @@ -32,6 +32,7 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <sys/stat.h>
- +#include <selinux/android.h>
- #include "bootchart.h"
- #define VERSION "0.8"
- @@ -332,6 +333,7 @@
- count = (timeout*1000 + BOOTCHART_POLLING_MS-1)/BOOTCHART_POLLING_MS;
- do {ret=mkdir(LOG_ROOT,0755);}while (ret < 0 && errno == EINTR);
- + selinux_android_restorecon(LOG_ROOT, 0);
- file_buff_open(log_stat, LOG_STAT);
- file_buff_open(log_procs, LOG_PROCS);
- diff -Naur -X ignore droid/system/core/init/bootchart.h droid_cm12/system/core/init/bootchart.h
- --- droid/system/core/init/bootchart.h 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/bootchart.h 2016-08-22 13:13:09.000000000 +0300
- @@ -26,6 +26,7 @@
- extern int bootchart_init(void);
- extern int bootchart_step(void);
- extern void bootchart_finish(void);
- +extern int bootchart_init_action(int nargs, char **args);
- # define BOOTCHART_POLLING_MS 200 /* polling period in ms */
- # define BOOTCHART_DEFAULT_TIME_SEC (2*60) /* default polling time in seconds */
- diff -Naur -X ignore droid/system/core/init/builtins.c droid_cm12/system/core/init/builtins.c
- --- droid/system/core/init/builtins.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/builtins.c 2016-08-22 13:13:09.000000000 +0300
- @@ -49,6 +49,10 @@
- #include <private/android_filesystem_config.h>
- +#if BOOTCHART
- +#include "bootchart.h"
- +#endif
- +
- int add_environment(const char *name, const char *value);
- extern int init_module(void *, unsigned long, const char *);
- @@ -622,8 +626,12 @@
- * not booting into ffbm then trigger that action.
- */
- property_get("ro.bootmode", boot_mode);
- - if (strncmp(boot_mode, "ffbm", 4))
- + if (strncmp(boot_mode, "ffbm", 4)) {
- +#if BOOTCHART
- + queue_builtin_action(bootchart_init_action, "bootchart_init");
- +#endif
- action_for_each_trigger("nonencrypted", action_add_queue_tail);
- + }
- } else if (ret == FS_MGR_MNTALL_DEV_NEEDS_RECOVERY) {
- /* Setup a wipe via recovery, and reboot into recovery */
- ERROR("fs_mgr_mount_all suggested recovery, so wiping data via recovery.\n");
- diff -Naur -X ignore droid/system/core/init/devices.c droid_cm12/system/core/init/devices.c
- --- droid/system/core/init/devices.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/devices.c 2016-08-22 13:13:09.000000000 +0300
- @@ -892,7 +892,7 @@
- } else if(!strncmp(uevent->subsystem, "misc", 4) &&
- !strncmp(name, "log_", 4)) {
- kernel_logger();
- - base = "/dev/alog/";
- + base = "/dev/log/";
- make_dir(base, 0755);
- name += 4;
- } else if (!strncmp(uevent->subsystem, "dvb", 3)) {
- diff -Naur -X ignore droid/system/core/init/init.c droid_cm12/system/core/init/init.c
- --- droid/system/core/init/init.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/init.c 2016-08-22 13:13:09.000000000 +0300
- @@ -57,6 +57,7 @@
- #include "util.h"
- #include "ueventd.h"
- #include "watchdogd.h"
- +#include "vendor_init.h"
- struct selabel_handle *sehandle;
- struct selabel_handle *sehandle_prop;
- @@ -514,6 +515,9 @@
- void handle_control_message(const char *msg, const char *arg)
- {
- + if (!vendor_handle_control_message(msg, arg))
- + return;
- +
- if (!strcmp(msg,"start")) {
- msg_start(arg);
- } else if (!strcmp(msg,"stop")) {
- @@ -857,7 +861,7 @@
- }
- #if BOOTCHART
- -static int bootchart_init_action(int nargs, char **args)
- +int bootchart_init_action(int nargs, char **args)
- {
- bootchart_count = bootchart_init();
- if (bootchart_count < 0) {
- @@ -1056,16 +1060,18 @@
- * together in the initramdisk on / and then we'll
- * let the rc file figure out the rest.
- */
- - /* In a hybris system the fs is managed for us
- mkdir("/dev", 0755);
- mkdir("/proc", 0755);
- mkdir("/sys", 0755);
- mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755");
- mkdir("/dev/pts", 0755);
- - */
- mkdir("/dev/socket", 0755);
- - /* indicate that booting is in progress to background fw loaders, etc */
- + mount("devpts", "/dev/pts", "devpts", 0, NULL);
- + mount("proc", "/proc", "proc", 0, NULL);
- + mount("sysfs", "/sys", "sysfs", 0, NULL);
- +
- + /* indicate that booting is in progress to background fw loaders, etc */
- close(open("/dev/.booting", O_WRONLY | O_CREAT, 0000));
- /* We must have some place other than / to create the
- @@ -1103,9 +1109,6 @@
- if (!is_ffbm)
- is_charger = !strcmp(bootmode, "charger") || charging_mode_booting();
- - /* FIXME: Mer will assume we're not on charger for now */
- - // is_charger = 0;
- -
- INFO("property init\n");
- property_load_boot_defaults();
- @@ -1147,17 +1150,6 @@
- /* run all property triggers based on current state of the properties */
- queue_builtin_action(queue_property_triggers_action, "queue_property_triggers");
- - /* run all device triggers based on current state of device nodes in /dev */
- - // queue_builtin_action(queue_device_triggers_action, "queue_device_triggers");
- -
- - /* Run actions when all boot up is done and init is ready */
- - action_for_each_trigger("ready", action_add_queue_tail);
- -
- -
- -#if BOOTCHART
- - queue_builtin_action(bootchart_init_action, "bootchart_init");
- -#endif
- -
- for(;;) {
- int nr, i, timeout = -1;
- diff -Naur -X ignore droid/system/core/init/property_service.c droid_cm12/system/core/init/property_service.c
- --- droid/system/core/init/property_service.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/property_service.c 2016-08-22 13:13:09.000000000 +0300
- @@ -322,11 +322,9 @@
- void handle_property_set_fd()
- {
- prop_msg msg;
- - int n;
- int s;
- int r;
- int res;
- - int ret;
- struct ucred cr;
- struct sockaddr_un addr;
- socklen_t addr_size = sizeof(addr);
- @@ -335,8 +333,6 @@
- struct pollfd ufds[1];
- const int timeout_ms = 2 * 1000; /* Default 2 sec timeout for caller to send property. */
- int nr;
- - char rproperty[PROP_VALUE_MAX];
- - const prop_info *pi;
- if ((s = accept(property_set_fd, (struct sockaddr *) &addr, &addr_size)) < 0) {
- return;
- @@ -409,30 +405,7 @@
- }
- freecon(source_ctx);
- break;
- - case PROP_MSG_GETPROP:
- - msg.name[PROP_NAME_MAX-1] = 0;
- - msg.value[0] = 0;
- - if (msg.name) {
- - /* If we have a value, copy it over, otherwise returns the default */
- - ret = property_get(msg.name, rproperty);
- - if (ret) {
- - strlcpy(msg.value, rproperty, sizeof(msg.value));
- - }
- - }
- -
- - /* Send the property value back */
- - r = TEMP_FAILURE_RETRY(send(s, &msg, sizeof(msg), 0));
- - close(s);
- - break;
- - case PROP_MSG_LISTPROP:
- - for(n = 0; (pi = __system_property_find_nth(n)); n++) {
- - msg.name[0] = msg.value[0] = 0;
- - __system_property_read(pi, msg.name, msg.value);
- - TEMP_FAILURE_RETRY(send(s, &msg, sizeof(msg), 0));
- - }
- - close(s);
- - break;
- default:
- close(s);
- break;
- diff -Naur -X ignore droid/system/core/init/vendor_init.c droid_cm12/system/core/init/vendor_init.c
- --- droid/system/core/init/vendor_init.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/vendor_init.c 2016-08-22 13:13:09.000000000 +0300
- @@ -28,6 +28,7 @@
- */
- #include "vendor_init.h"
- +#include <errno.h>
- /* init vendor override stubs */
- @@ -35,3 +36,9 @@
- void vendor_load_properties()
- {
- }
- +
- +__attribute__ ((weak))
- +int vendor_handle_control_message(const char *msg, const char *arg)
- +{
- + return -ENOSYS;
- +}
- diff -Naur -X ignore droid/system/core/init/vendor_init.h droid_cm12/system/core/init/vendor_init.h
- --- droid/system/core/init/vendor_init.h 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/init/vendor_init.h 2016-08-22 13:13:09.000000000 +0300
- @@ -30,4 +30,5 @@
- #ifndef __INIT_VENDOR__H__
- #define __INIT_VENDOR__H__
- extern void vendor_load_properties(void);
- +extern int vendor_handle_control_message(const char *msg, const char *arg);
- #endif /* __INIT_VENDOR__H__ */
- diff -Naur -X ignore droid/system/core/libbacktrace/BacktraceImpl.cpp droid_cm12/system/core/libbacktrace/BacktraceImpl.cpp
- --- droid/system/core/libbacktrace/BacktraceImpl.cpp 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/libbacktrace/BacktraceImpl.cpp 2016-08-22 13:13:09.000000000 +0300
- @@ -60,24 +60,8 @@
- return impl_->Unwind(num_ignore_frames, ucontext);
- }
- -extern "C" char* __cxa_demangle(const char* mangled, char* buf, size_t* len,
- - int* status);
- -
- std::string Backtrace::GetFunctionName(uintptr_t pc, uintptr_t* offset) {
- std::string func_name = impl_->GetFunctionNameRaw(pc, offset);
- - if (!func_name.empty()) {
- -#if defined(__APPLE__)
- - // Mac OS' __cxa_demangle demangles "f" as "float"; last tested on 10.7.
- - if (func_name[0] != '_') {
- - return func_name;
- - }
- -#endif
- - char* name = __cxa_demangle(func_name.c_str(), 0, 0, 0);
- - if (name) {
- - func_name = name;
- - free(name);
- - }
- - }
- return func_name;
- }
- diff -Naur -X ignore droid/system/core/liblog/Android.mk droid_cm12/system/core/liblog/Android.mk
- --- droid/system/core/liblog/Android.mk 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/liblog/Android.mk 2016-08-22 13:13:09.000000000 +0300
- @@ -17,11 +17,13 @@
- include $(CLEAR_VARS)
- ifneq ($(TARGET_USES_LOGD),false)
- -liblog_sources := logd_write.c log_event_write.c
- +liblog_sources := logd_write.c
- else
- liblog_sources := logd_write_kern.c
- endif
- +liblog_sources += log_event_write.c
- +
- # some files must not be compiled when building against Mingw
- # they correspond to features not used by our host development tools
- # which are also hard or even impossible to port to native Win32
- diff -Naur -X ignore droid/system/core/liblog/log_event_write.c droid_cm12/system/core/liblog/log_event_write.c
- --- droid/system/core/liblog/log_event_write.c 2016-10-03 16:35:28.235415891 +0300
- +++ droid_cm12/system/core/liblog/log_event_write.c 2016-08-22 13:13:09.000000000 +0300
- @@ -86,9 +86,3 @@
- return __android_log_bwrite(tag, buf, pos);
- }
- -
- -void __android_logPower_print(void) {}
- -
- -int isLogEnabled(void) {
- - return 0;
- -}
- \ В конце файла нет новой строки
- diff -Naur -X ignore droid/system/core/rootdir/init.environ.rc.in droid_cm12/system/core/rootdir/init.environ.rc.in
- --- droid/system/core/rootdir/init.environ.rc.in 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/rootdir/init.environ.rc.in 2016-08-22 13:13:09.000000000 +0300
- @@ -1,8 +1,6 @@
- # set up the global environment
- on init
- export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
- - # This is not 64-bit safe -stskeeps
- - export LD_LIBRARY_PATH /usr/libexec/droid-hybris/lib-dev-alog:/vendor/lib:/system/lib
- export ANDROID_BOOTLOGO 1
- export ANDROID_ROOT /system
- export ANDROID_ASSETS /system/app
- diff -Naur -X ignore droid/system/core/rootdir/init.rc droid_cm12/system/core/rootdir/init.rc
- --- droid/system/core/rootdir/init.rc 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/rootdir/init.rc 2016-08-22 13:13:09.000000000 +0300
- @@ -5,8 +5,7 @@
- #
- import /init.environ.rc
- -# Mer handles usb stuff
- -#import /init.usb.rc
- +import /init.usb.rc
- import /init.${ro.hardware}.rc
- import /init.${ro.zygote}.rc
- import /init.trace.rc
- @@ -15,6 +14,9 @@
- on early-init
- + # Set init and its forked children's oom_adj.
- + write /proc/1/oom_score_adj -1000
- +
- # Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
- write /sys/fs/selinux/checkreqprot 0
- @@ -25,13 +27,18 @@
- # Set the security context of /adb_keys if present.
- restorecon /adb_keys
- + start ueventd
- +
- + # create mountpoints
- mkdir /mnt 0775 root system
- on init
- sysclktz 0
- - loglevel 64
- + loglevel 3
- + # Backward compatibility
- + symlink /system/etc /etc
- symlink /sys/kernel/debug /d
- # Right now vendor lives on the same filesystem as system,
- @@ -40,6 +47,7 @@
- # Create cgroup mount point for cpu accounting
- mkdir /acct
- + mount cgroup none /acct cpuacct
- mkdir /acct/uid
- # Create cgroup mount point for memory
- @@ -84,8 +92,13 @@
- mkdir /mnt/obb 0700 root system
- mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
- + # memory control cgroup
- + mkdir /dev/memcg 0700 root system
- + mount cgroup none /dev/memcg memory
- +
- write /proc/sys/kernel/panic_on_oops 1
- write /proc/sys/kernel/hung_task_timeout_secs 0
- + write /proc/cpu/alignment 4
- write /proc/sys/kernel/sched_latency_ns 10000000
- write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
- write /proc/sys/kernel/sched_compat_yield 1
- @@ -105,6 +118,24 @@
- # set fwmark on accepted sockets
- write /proc/sys/net/ipv4/tcp_fwmark_accept 1
- + # Create cgroup mount points for process groups
- + mkdir /dev/cpuctl
- + mount cgroup none /dev/cpuctl cpu
- + chown system system /dev/cpuctl
- + chown system system /dev/cpuctl/tasks
- + chmod 0666 /dev/cpuctl/tasks
- + write /dev/cpuctl/cpu.shares 1024
- + write /dev/cpuctl/cpu.rt_runtime_us 800000
- + write /dev/cpuctl/cpu.rt_period_us 1000000
- +
- + mkdir /dev/cpuctl/bg_non_interactive
- + chown system system /dev/cpuctl/bg_non_interactive/tasks
- + chmod 0666 /dev/cpuctl/bg_non_interactive/tasks
- + # 5.0 %
- + write /dev/cpuctl/bg_non_interactive/cpu.shares 52
- + write /dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us 700000
- + write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000
- +
- # qtaguid will limit access to specific data based on group memberships.
- # net_bw_acct grants impersonation of socket owners.
- # net_bw_stats grants access to other apps' detailed tagged-socket stats.
- @@ -159,9 +190,9 @@
- on post-fs
- # once everything is setup, no need to modify /
- - # mount rootfs rootfs / ro remount
- + mount rootfs rootfs / ro remount
- # mount shared so changes propagate into child namespaces
- - # mount rootfs rootfs / shared rec
- + mount rootfs rootfs / shared rec
- # We chown/chmod /cache again so because mount is run as root + defaults
- chown system cache /cache
- @@ -255,6 +286,7 @@
- mkdir /data/app-lib 0771 system system
- mkdir /data/app 0771 system system
- mkdir /data/property 0700 root root
- + mkdir /data/tombstones 0771 system system
- # create dalvik-cache, so as to enforce our permissions
- mkdir /data/dalvik-cache 0771 root root
- @@ -302,9 +334,8 @@
- on boot
- # basic network init
- ifup lo
- -# Conflicts with Mer
- - #hostname localhost
- - #domainname localdomain
- + hostname localhost
- + domainname localdomain
- # set RLIMIT_NICE to allow priorities from 19 to -20
- setrlimit 13 40 40
- @@ -391,12 +422,8 @@
- # Define default initial receive window size in segments.
- setprop net.tcp.default_init_rwnd 60
- - # Allow system group to trigger vibrator
- - chmod 0664 /sys/class/timed_output/vibrator/enable
- class_start core
- - class_start main
- -# Never gets called, since Mer does its own 'mount_all'
- on nonencrypted
- class_start main
- class_start late_start
- @@ -411,10 +438,6 @@
- on property:sys.init_log_level=*
- loglevel ${sys.init_log_level}
- -# Mer needs to set this property when fs units are mounted
- -on property:droid.late_start=trigger_late_start
- - class_start late_start
- -
- on charger
- class_start charger
- @@ -458,8 +481,6 @@
- class core
- critical
- seclabel u:r:ueventd:s0
- -# Not used by Mer
- - disabled
- service logd /system/bin/logd
- class core
- @@ -472,8 +493,6 @@
- class core
- critical
- seclabel u:r:healthd:s0
- -# Not used by Mer - spams logs and small battery drain
- - disabled
- service console /system/bin/sh
- class core
- @@ -483,11 +502,9 @@
- group shell log
- seclabel u:r:shell:s0
- -# Disabled in Mer - together with CONFIG_AUDIT=n in mer-kernel-check
- service auditd /system/bin/auditd -k
- seclabel u:r:logd:s0
- class main
- - disabled
- on property:ro.debuggable=1
- start console
- @@ -505,8 +522,8 @@
- service lmkd /system/bin/lmkd
- class core
- + critical
- socket lmkd seqpacket 0660 system system
- - disabled
- service servicemanager /system/bin/servicemanager
- class core
- @@ -514,47 +531,22 @@
- group system
- critical
- onrestart restart healthd
- - onrestart restart minimedia
- - onrestart restart minisf
- - onrestart restart miniaf
- -# onrestart restart zygote
- -# onrestart restart media
- -# onrestart restart surfaceflinger
- -# onrestart restart drm
- -
- -service minimedia /usr/libexec/droid-hybris/system/bin/minimediaservice
- - class main
- - user media
- - group audio camera
- - ioprio rt 4
- -
- -service minisf /usr/libexec/droid-hybris/system/bin/minisfservice
- - class main
- - user system
- - group graphics
- -
- -service miniaf /usr/libexec/droid-hybris/system/bin/miniafservice
- - class main
- - user system
- - group audio
- + onrestart restart zygote
- + onrestart restart media
- + onrestart restart surfaceflinger
- + onrestart restart drm
- service vold /system/bin/vold
- class core
- socket vold stream 0660 root mount
- ioprio be 2
- - # Not used in Mer
- - disabled
- -# Disabled in Mer: conflicts with connman beyond usability
- -# This will no longer work for mako: `ndc softap fwreload wlan0 AP` to reload mako firmware
- -# mako (and similar fwreload) porters need to seek for alternative solution, see NEMO#793
- service netd /system/bin/netd
- class main
- socket netd stream 0660 root system
- socket dnsproxyd stream 0660 root inet
- socket mdns stream 0660 root system
- socket fwmarkd stream 0660 root inet
- - disabled
- service debuggerd /system/bin/debuggerd
- class main
- @@ -569,26 +561,22 @@
- user root
- group radio cache inet misc audio sdcard_rw qcom_diag log
- -# Disabled in Mer - used only during porting atm
- service surfaceflinger /system/bin/surfaceflinger
- class core
- user system
- group graphics drmrpc
- onrestart restart zygote
- - disabled
- service drm /system/bin/drmserver
- class main
- user drm
- group drm system inet drmrpc
- -# Disabled in Mer
- service media /system/bin/mediaserver
- class main
- user media
- group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm qcom_diag
- ioprio rt 4
- - disabled
- # One shot invocation to deal with encrypted volume.
- service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
- @@ -641,13 +629,10 @@
- disabled
- oneshot
- -# disabled in Mer
- service keystore /system/bin/keystore /data/misc/keystore
- class main
- user keystore
- group keystore drmrpc
- - # Not used in Mer
- - disabled
- service dumpstate /system/bin/dumpstate -s
- class main
- @@ -655,16 +640,15 @@
- disabled
- oneshot
- -service pre-recovery /system/bin/uncrypt
- +service mdnsd /system/bin/mdnsd
- class main
- + user mdnsr
- + group inet net_raw
- + socket mdnsd stream 0660 mdnsr inet
- disabled
- + oneshot
- -# This trigger is run by our modified init after boot has finished
- -on ready
- - class_start mer
- -
- -# Notify Mer's systemd that we're done
- -# This is started at the end of boot after both core and main classes
- -service droid_init_done /bin/sh /usr/bin/droid/droid-init-done.sh
- - class mer
- +service pre-recovery /system/bin/uncrypt
- + class main
- + disabled
- oneshot
- diff -Naur -X ignore droid/system/core/rootdir/init.zygote32.rc droid_cm12/system/core/rootdir/init.zygote32.rc
- --- droid/system/core/rootdir/init.zygote32.rc 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/rootdir/init.zygote32.rc 2016-08-22 13:13:09.000000000 +0300
- @@ -5,4 +5,4 @@
- onrestart write /sys/power/state on
- onrestart restart media
- onrestart restart netd
- - disabled
- \ В конце файла нет новой строки
- +
- diff -Naur -X ignore droid/system/core/rootdir/init.zygote64.rc droid_cm12/system/core/rootdir/init.zygote64.rc
- --- droid/system/core/rootdir/init.zygote64.rc 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/rootdir/init.zygote64.rc 2016-08-22 13:13:09.000000000 +0300
- @@ -5,4 +5,4 @@
- onrestart write /sys/power/state on
- onrestart restart media
- onrestart restart netd
- - disabled
- \ В конце файла нет новой строки
- +
- diff -Naur -X ignore droid/system/core/sdcard/sdcard.c droid_cm12/system/core/sdcard/sdcard.c
- --- droid/system/core/sdcard/sdcard.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/sdcard/sdcard.c 2016-08-22 13:13:09.000000000 +0300
- @@ -356,7 +356,7 @@
- ssize_t pathlen = 0;
- if (node->parent && node->graft_path == NULL) {
- - pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 2);
- + pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 1);
- if (pathlen < 0) {
- return -1;
- }
- diff -Naur -X ignore droid/system/core/toolbox/lsof.c droid_cm12/system/core/toolbox/lsof.c
- --- droid/system/core/toolbox/lsof.c 2016-08-24 10:01:33.000000000 +0300
- +++ droid_cm12/system/core/toolbox/lsof.c 2016-08-22 13:13:09.000000000 +0300
- @@ -99,10 +99,11 @@
- static void print_maps(struct pid_info_t* info)
- {
- FILE *maps;
- +
- size_t offset;
- char device[10];
- long int inode;
- - char file[PATH_MAX];
- + char file[1024];
- strlcat(info->path, "maps", sizeof(info->path));
- @@ -110,8 +111,8 @@
- if (!maps)
- goto out;
- - while (fscanf(maps, "%*x-%*x %*s %zx %s %ld %s\n", &offset, device, &inode,
- - file) == 4) {
- + while (fscanf(maps, "%*x-%*x %*s %zx %5s %ld %1023s\n",
- + &offset, device, &inode, file) == 4) {
- // We don't care about non-file maps
- if (inode == 0 || !strcmp(device, "00:00"))
- continue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement