Jemy's Documents


  • Home

  • Categories

  • Archives

  • Search

Android init进程——属性服务

Posted on 2018-03-23

本文由 简悦 SimpRead 转码, 原文地址 https://blog.csdn.net/wzy_1988/article/details/44999103

概述

init是一个进程,确切的说,它是Linux系统中用户空间的第一个进程。由于Android是基于Linux内核的,所以init也是Android系统中用户空间的第一个进程。init的进程号是1。作为天字第一号进程,init有很多重要的工作:

  1. init提供property service(属性服务)来管理Android系统的属性。
  2. init负责创建系统中的关键进程,包括zygote。

以往的文章一上来就介绍init的源码,但是我这里先从这两个主要工作开始。搞清楚这两个主要工作是如何实现的,我们再回头来看init的源码。

这篇文章主要是介绍init进程的属性服务。

跟init属性服务相关的源码目录如下:

  1. system/core/init/
  2. bionic/libc/bionic/
  3. system/core/libcutils/

Read more »

Add Namecheap DDNS on DSM

Posted on 2017-08-04

1.SSH into your Synology NAS
2.Type:

1
sudo vi /usr/syno/bin/ddns/namecheap.php
Read more »

用sed替换跨行内容

Posted on 2017-07-07

Note: 转载自:http://www.fwolf.com/blog/post/346

sed是*nix下方便的行编辑工具,经常用来替换文件的内容,sed一般都是处理单行的,但通过它的一些内建功能,也能实现跨行替换(即要替换的内容有多行内容)。

解决方法主要来自网上搜到的一篇文章,但文中的大侠并没有解释得特别清楚,我对照着其他两个更晦涩的例子(一、二),结合man搞懂了之后,记录于此。

Read more »

pyenv

Posted on 2017-06-20
1
2
3
4
5
6
7
8
# install pyenv
curl -L https://raw.github.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
# install dependent libraries
sudo apt install libsqlite3 libbz2-dev libreadline-dev
# install specific version of python
pyenv install 3.6.1
pyenv virtualenv 3.6.1 xxx
pyenv activate xxx
Read more »

speed up the zsh under the git repo

Posted on 2017-04-20

¶Method 1

Uncomment the DISABLE_UNTRACKED_FILES_DIRTY="true" inside the .zshrc

Read more »

List loaded linux module parameter values

Posted on 2017-02-20

List loaded linux module parameter values

1
2
3
4
5
6
7
8
9
10
cat /proc/modules | cut -f 1 -d " " | while read module; do \
echo "Module: $module"; \
if [ -d "/sys/module/$module/parameters" ]; then \
ls /sys/module/$module/parameters/ | while read parameter; do \
echo -n "Parameter: $parameter --> "; \
cat /sys/module/$module/parameters/$parameter; \
done; \
fi; \
echo; \
done
Read more »

docker

Posted on 2017-01-05

¶Install

1
2
3
4
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
Read more »

ss-go build

Posted on 2016-12-27
1
2
3
4
5
6
7
mkdir -p gopath/src/github.com/orvice/shadowsocks-go
cd gopath/src/github.com/orvice/shadowsocks-go
git clone git@github.com:jemyzhang/shadowsocks-go.git .
export GOPATH=~/gopath
cd mu
go get
go build
Read more »

qt5中调用fcitx输入法

Posted on 2016-11-08
1
2
sudo apt install libfcitx-qt5-1
sudo cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so lib64/qt5/plugins/platforminputcontexts
Read more »

vim clipboard over ssh

Posted on 2016-10-20

The “clipboard” is a feature of X11, so you will need to enable “X11 forwarding” for the SSH connection in “trusted” mode:

1
$ ssh -Y myserver

(By default, X11 is forwarded in “untrusted” mode, which is somewhat too restrictive. -Y disables the restrictions.)

Read more »
12…4
jemyzhang

jemyzhang

40 posts
2 categories
54 tags
© 2018 jemyzhang
Powered by Hexo
|
Theme — NexT.Mist v6.0.6