Skip to content

Commit 82819ca

Browse files
committed
update
1 parent 095a00d commit 82819ca

File tree

6 files changed

+57
-52
lines changed

6 files changed

+57
-52
lines changed

_drafts/Linux/ssh相关原理学习与常见错误总结.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@
1212

1313
ssh-keygen 产生出 id_rsa, id_rsa.pub, 已经都放到正确位置(.ssh), 但是联机时却出现下述讯息:`Agent admitted failure to sign using the key`。解决方法是在自己的机器上, 执行 ssh-add, 会出现: `Identity added: /home/user/.ssh/id_rsa (/home/user/.ssh/id_rsa)`
1414

15-
## 解决SSH超时断开连接问题
15+
## sshd相关配置优化
1616

1717
```sh
18-
# 修改/etc/ssh/sshd_config
18+
# 修改/etc/ssh/sshd_config(注意是sshd_config,不是ssh_config)
1919

20-
ClientAliveInterval # 指定服务器向客户端请求消息的时间间隔,默认是0表示不发送;可以改为60表示每分钟发送一次
21-
ClientAliveCountMax # 表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开
20+
ClientAliveInterval 60 # 指定服务器向客户端请求消息的时间间隔,默认是0表示不发送;可以改为60表示每分钟发送一次
21+
ClientAliveCountMax 86400 # 表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开
2222

23-
service sshd restart
23+
PermitRootLogin yes # 允许root用户登录
2424
```
2525

26+
ubuntu@ubuntu:~$ sudo service ssh restart
27+
2628
## sftp子系统申请已拒绝 请确保ssh连接的sftp子系统设置有效
2729

2830
```shell

_drafts/setup-environment/2024-06-22-Aloys-Build-Manual.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,22 @@ http://www.cnblogs.com/edward2013/p/5269465.html
1818
### 在Windows上安装Repo,同步AOSP代码【不推荐】
1919

2020
第一个想到的方案是在Windows上配置Repo,然后下载AOSP源码,参考:
21-
Windows安装repo的真正解决方案:https://ysy950803.blog.csdn.net/article/details/104188793
22-
但是就像Repo官网(https://gerrit.googlesource.com/git-repo/+/HEAD/docs/windows.md)说的那样:
23-
Repo is primarily developed on Linux with a lot of users on macOS. Windows is, unfortunately, not a common platform. There is support in repo for Windows, but there might be some rough edges.
24-
Keep in mind that Windows in general is “best effort” and “community supported”. That means we don't actively test or verify behavior, but rely heavily on users to report problems back to us, and to contribute fixes as needed.
21+
Windows安装repo的真正解决方案:<https://ysy950803.blog.csdn.net/article/details/104188793>
22+
但是就像Repo官网<https://gerrit.googlesource.com/git-repo/+/HEAD/docs/windows.md>说的那样:
23+
24+
Repo is primarily developed on Linux with a lot of users on macOS. Windows is, unfortunately, not a common platform. There is support in repo for Windows, but there might be some rough edges.
25+
Keep in mind that Windows in general is “best effort” and “community supported”. That means we don't actively test or verify behavior, but rely heavily on users to report problems back to us, and to contribute fixes as needed.
26+
2527
Windows版的Repo虽然可用,但是可能会出现各种各样的问题,这些问题可能会让我们在解决环境问题上分心过多,所以不推荐这种方式。
2628

2729
### 在Linux上安装Repo,同步AOSP代码【推荐】
2830

2931
根据实际情况有两种工作模式:
30-
1、 Linux作为AOSP代码的同步、存储、查看、修改、编译环境,大部分工作都是在Linux上完成,Android Studio也是安装在Linux上,这种我觉得是最完美的模式。但是要求Linux的性能足够好。由于我这边没有实际的Linux机器,是在Windows上用虚拟机配置的Linux环境,所以没有采用这种方法。
31-
2、 Linux作为AOSP代码的同步、存储、编译环境,查看和修改工作在Windows上完成,具体的实现方式有两种:
32-
a) 用Samba服务器把Linux上的AOSP代码共享到Windows平台,然后在Windows平台上安装IDE环境,直接打开远程AOSP代码目录,查看和修改,这种方式的优点是配置简单,不用代码同步。但是我这边网速一般,而AOSP代码量太大,导致Android Studio经常卡死,所以我也放弃了这种方式。
33-
b) 将android.iml/android.ipr以及常用的仓(比如frameworks/base frameworks/native等)使用rsync等工具同步到Windows平台,然后在Windows上使用Android Studio导入,进行查看和修改,修改完成后通过Beyondcompare工具将修改的内容同步到Linux平台进行编译等工作。这个各方面折中的方案。后续主要介绍这种工作环境的配置。
32+
33+
1. Linux作为AOSP代码的同步、存储、查看、修改、编译环境,大部分工作都是在Linux上完成,Android Studio也是安装在Linux上,这种我觉得是最完美的模式。但是要求Linux的性能足够好。由于我这边没有实际的Linux机器,是在Windows上用虚拟机配置的Linux环境,所以没有采用这种方法。
34+
2. Linux作为AOSP代码的同步、存储、编译环境,查看和修改工作在Windows上完成,具体的实现方式有两种:
35+
1. 用Samba服务器把Linux上的AOSP代码共享到Windows平台,然后在Windows平台上安装IDE环境,直接打开远程AOSP代码目录,查看和修改,这种方式的优点是配置简单,不用代码同步。但是我这边网速一般,而AOSP代码量太大,导致Android Studio经常卡死,所以我也放弃了这种方式。
36+
2. 将android.iml/android.ipr以及常用的仓(比如frameworks/base frameworks/native等)使用rsync等工具同步到Windows平台,然后在Windows上使用Android Studio导入,进行查看和修改,修改完成后通过Beyondcompare工具将修改的内容同步到Linux平台进行编译等工作。这个各方面折中的方案。后续主要介绍这种工作环境的配置。
3437

3538
#### 安装配置Linux环境
3639

@@ -39,18 +42,16 @@ b) 将android.iml/android.ipr以及常用的仓(比如frameworks/base framewor
3942

4043
#### 下载AOSP源码
4144

42-
在配置好的Linux环境中下载AOSP源码,Google官方的下载AOSP源码的方式:https://source.android.com/docs/setup/build/downloading。
43-
但是由于墙的原因,这种方式不容易实现,所以推荐使用清华的镜像,使用指导:https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/。
44-
Repo的使用方式可以参考:Repo实践指南:https://www.cnblogs.com/jiangxinnju/p/14274982.html
45+
在配置好的Linux环境中下载AOSP源码,Google官方的下载AOSP源码的方式:<https://source.android.com/docs/setup/build/downloading>
46+
但是由于墙的原因,这种方式不容易实现,所以推荐使用清华的镜像,使用指导:<https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/>
47+
Repo的使用方式可以参考:Repo实践指南:<https://www.cnblogs.com/jiangxinnju/p/14274982.html>
4548

4649
#### 配置Windows上的工具
47-
1、 安装SSH客户端工具,这里推荐MobaXTerm,因为它不仅免费还自带了rsync命令行工具,可以非常方便从Linux上同步代码到Windows。
48-
a) mkdir -p /drives/d/Code/sync/aosp/frameworks
49-
b) rsync -az --progress --delete --exclude=".git" [email protected]:/home/android/aosp/frameworks/base /drives/d/Code/sync/aosp/frameworks/
50-
c) rsync -az --progress --delete --exclude=".git" [email protected]:/home/android/aosp/frameworks/native /drives/d/Code/sync/aosp/frameworks/
51-
2、 安装BeyondCompare工具,方便对比,将修改的代码同步到Linux环境。
52-
3、 安装Android Sudio,将AOSP源码导入到Android Studio进行查看:https://www.cnblogs.com/jiangxinnju/p/14426645.html
53-
4、 安装Source Insight工具,AS查看AOSP的Java代码比较合适,但是C/C++代码不支持跳转,着色也比较差,看这部分代码还是SI比较好用。
50+
51+
1. 安装SSH客户端工具,这里推荐MobaXTerm,因为它不仅免费还自带了rsync命令行工具,可以非常方便从Linux上同步代码到Windows。
52+
2. 安装BeyondCompare工具,方便对比,将修改的代码同步到Linux环境。
53+
3. 安装Android Sudio,将AOSP源码导入到Android Studio进行查看:<https://www.cnblogs.com/jiangxinnju/p/14426645.html>
54+
4. 安装Source Insight工具,AS查看AOSP的Java代码比较合适,但是C/C++代码不支持跳转,着色也比较差,看这部分代码还是SI比较好用。
5455

5556
## TensorFlow环境搭建
5657

_drafts/setup-environment/2024-06-22-Tencent-Cloud-Environment-Setup.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,7 @@ ubuntu@ubuntu:~$ sudo reboot
2828

2929
## 调整SSH配置
3030

31-
```bash
32-
# 注意是sshd_config,不是ssh_config
33-
ubuntu@ubuntu:~$ sudo vim /etc/ssh/sshd_config
34-
```
35-
36-
修改或者取消注释如下内容
37-
38-
```bash
39-
# 允许root用户登录
40-
PermitRootLogin yes
41-
42-
# 防止SSH经常断连
43-
ClientAliveInterval 30
44-
ClientAliveCountMax 86400
45-
```
46-
47-
```bash
48-
ubuntu@ubuntu:~$ sudo service ssh restart
49-
```
31+
5032

5133
## 安装JDK
5234

_posts/android/2021-02-21-Import-AOSP-To-AS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ rsync -az --progress --delete --exclude=".git" ${USER_NAME}@${IP}:/${REMOTE_DIR}
3939
比如:
4040

4141
```shell
42+
mkdir -p /drives/d/Code/sync/aosp
4243
rsync -az --progress --delete --exclude=".git" [email protected]:/home/jiangxin/aosp/frameworks /drives/d/aosp/
4344
```
4445

_posts/the-way-of-learning/2015-05-19-Android学习之路.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Android开发者网站包含了以下内容:
4646
* AOSP项目官网:<https://source.android.com>
4747
* AOSP项目官网国内镜像(可以在国内不搭梯子直接访问):<https://source.android.google.cn>
4848

49-
### AOSP源码
49+
### AOSP源码下载与查看
5050

5151
* Android Code Search: <https://cs.android.com/>
5252
* Android OS: <https://www.androidos.net.cn/sourcecode>
@@ -581,6 +581,12 @@ Android开发者网站包含了以下内容:
581581
* HapticGenerator: <https://developer.android.com/reference/android/media/audiofx/HapticGenerator>
582582
* 空间音频和头部追踪: <https://source.android.com/docs/core/audio/spatial>
583583

584+
### Telephony
585+
586+
* 深入理解 android telephony 系列第一集 初识telephony: <https://www.jianshu.com/p/ff51295b84a1>
587+
* Android Telephony架构讲解: <https://blog.csdn.net/gongjdde/article/details/138583469>
588+
* Android telephony整体结构简要介绍(RILJ、RILD详解): <https://www.jianshu.com/p/ff51295b84a1>
589+
584590
### 蜂窝端距
585591

586592
* android 红外ConsumerIrService: <https://blog.51cto.com/u_16213390/12806113>
@@ -737,10 +743,6 @@ Android开发者网站包含了以下内容:
737743

738744
* 安卓应用在各大应用市场上架方法整理: <https://blog.csdn.net/niezhipeng8/article/details/79103436>
739745

740-
* Android8.0及以上,获取模拟器root权限: <https://blog.csdn.net/weixin_42814931/article/details/81253678>
741-
* Android真机安装sqlite3的方法: <https://www.cnblogs.com/jiangxinnju/p/8227625.html>
742-
* 使用 Intel HAXM 为 Android 模拟器加速,媲美真机: <http://www.cnblogs.com/beginor/archive/2013/01/13/2858228.html>
743-
* [Android] 为Android安装BusyBox —— 完整的bash shell: <https://www.cnblogs.com/xiaowenji/archive/2011/03/12/1982309.html>
744746
* MIUI ROM适配之旅第一天——认识Android手机: <http://www.miui.com/thread-402302-1-1.html>
745747

746748
* C++之std::forward(完美转发)-CSDN博客: <https://blog.csdn.net/haokan123456789/article/details/134980411>
@@ -941,10 +943,23 @@ Android开发者网站包含了以下内容:
941943

942944
## Android实体机与模拟器
943945

944-
* 了解 Google Pixel 手机何时会收到软件更新: <https://support.google.com/pixelphone/answer/4457705>
945-
* Magisk(安卓获取 ROOT 的主流方式): <https://magiskcn.com/>
946+
* Cuttlefish virtual Android devices: <https://source.android.com/docs/devices/cuttlefish>
947+
* Use Android Emulator virtual devices: <https://source.android.com/docs/setup/test/avd>
948+
* 搭建 Cuttlefish 运行环境: <https://gitee.com/aosp-riscv/working-group/blob/master/articles/20230111-cuttlefish-setup.md>
949+
* 编完 aosp 还在刷机?云安卓了解一下,来试试网页版模拟器吧(Cuttlefish): <https://juejin.cn/post/7160930401844723720>
950+
946951
* Genymotion: <https://www.genymotion.com/>
947952

953+
* ~~HAXM: <https://github.com/intel/haxm>~~
954+
* ~~使用 Intel HAXM 为 Android 模拟器加速,媲美真机: <https://beginor.github.io/2013/01/10/accelerate-android-eumlator-with-intel-haxm.html>~~
955+
956+
* Magisk(Root的主流方式): <https://magiskcn.com/>
957+
* rootAVD(虚拟机Root): <https://gitlab.com/newbit/rootAVD>
958+
959+
* 了解 Google Pixel 手机何时会收到软件更新: <https://support.google.com/pixelphone/answer/4457705>
960+
* Android真机安装sqlite3的方法: <https://www.cnblogs.com/jiangxinnju/p/8227625.html>
961+
* 为Android安装BusyBox —— 完整的bash shell: <https://www.cnblogs.com/xiaowenji/archive/2011/03/12/1982309.html>
962+
948963
## App Development Platform
949964

950965
* Firebase: <https://firebase.google.com/>

_posts/the-way-of-learning/2015-05-19-版本管理学习之路.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,13 @@ git push origin master:b1
184184

185185
## Gerrit
186186

187-
* <https://www.gerritcodereview.com/>
188-
* <https://gerrit-documentation.storage.googleapis.com/Documentation/2.14.5.1/install.html>
189-
* <https://gerrit-documentation.storage.googleapis.com/Documentation/2.15.1/user-search.html>
187+
* Gerrit: <https://www.gerritcodereview.com/>
188+
* User Guide: <https://gerrit-review.googlesource.com/Documentation/intro-user.html>
189+
* Standalone Daemon Installation Guide: <https://gerrit-review.googlesource.com/Documentation/install.html>
190+
* Attention Set: <https://gerrit-review.googlesource.com/Documentation/user-attention-set.html>
191+
* Gitiles: <https://gerrit.googlesource.com/gitiles>
192+
* Gerrit Gitiles Plugin: <https://gerrit.googlesource.com/plugins/gitiles/>
193+
* Searching Changes: <https://gerrit-review.googlesource.com/Documentation/user-search.html>
190194
* 如何搭建开源code review gerrit服务器: <https://www.cnblogs.com/tesky0125/p/5877536.html>
191195
* Resolving a merge conflict on gerrit: <https://www.entropywins.wtf/blog/2013/07/01/resolving-a-merge-conflict-on-gerrit/>
192196

0 commit comments

Comments
 (0)