1. ECDH
ECDH是用来交换密码的,Alice和Boc使用椭圆函数secp256k1,生成各自的公钥和私钥,然后用自己的私钥和对方的公钥,生成一个screate key, 这个screate key是一样的。
2-factor authentication (2FA) :可以选一个可信设备,也可以选手机号。现在的AppleId如果涉及到开发,都是必须要启用2fa的。fastlane的工作机制是基于session,而session是通过cookie来标识的,所以如果遇到session过期,session不支持,那么首先考虑的就是新建一个session,而新建session的方法是通过刷新cookie。
legacy 2-step verification (2SV):选一个手机号。
fastlane CI上面说有三种方法:
Instant App depends on Play Dynamic Delivery, Dynamic Delivery depends on Dynamic Features.
Developers submit .aab file to GooglePlay, then Goole Play use tool bundletool
to extract the apks from this bundle file. Note: apks is a file format means apk set, it’s not equal to apk.
We cannot use adb install
to install .apks archive, we need a new tool ia
coming from Google to install .apks file. This process also happens when users run instant apps published on GoolgePlay.
Actually, we needn’t to use bundletool & ia to launch instant app now, the Android Studio already can launch the intant app conveniently.
按照文档集成之后,发现查询DynamicLinks的数据返回403
,那么就需要到GCP(Google Cloud Platform)中检查用户email的权限,这个权限根具体内容相关,默认的Firebase Admin SDK的权限只有两个,需要什么服务自己加上。
1.Find the client_email in the service account file
2.Go to GCP > select your Firebase project > click IAM & admin > click IAM https://console.cloud.google.com/iam-admin/iam?project=_
3.Make sure the IAM row for the client_email in step 1 has the Firebase App Distribution Admin role, or add it if it is missing. Check by clicking the “edit” pencil icon to the right-side of the row and a panel will show the current roles. If Firebase App Distribution Admin isn’t there, press “+ ADD ANOTHER ROLE” and include it.
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android’s Java VM implementation.
smali 芬兰语中的编译
baksmali 芬兰语中的反编译
dex文件是组装smali后文件格式: dx工具会把class转为smali,dexdump查看dex中的smali。
Android Dalvik虚拟机
Java虚拟机运行的是Java字节码,Dalvik虚拟机运行的是Dalvik字节码
Dalvik虚拟机通过解释DEX来执行这些字节码
Dalvik可执行文件体积更小
dx工具负责将Java字节码转换位Dalvik字节码
Java虚拟机与Dalvik虚拟机架构不同
Java虚拟机基于栈架构,Dalvik虚拟机基于寄存器架构
1 | $ javac -source 1.6 -target 1.6 Hello.java |
dx和dexdump在/sdk/build_tools/android目录下
2014年6月25日,Android L 正式亮相于召开的谷歌I/O大会,Android L 改动幅度较大,谷歌将直接删除Dalvik,代替它的是传闻已久的ART。
协程就是轻量级线程,或者称绿色线程,跟线程相似可以并发执行,不同点是:
https://www.infoq.cn/article/RuBcSfg9bFt4gwdToyd7
协程最重要的地方就是它们可以挂起和恢复,所以表现出并发的能力,它是由调度器提供的。
可以用WireShark通过分析Tcp报来得知,工具显示得很清楚。
下面的含义只针对其标志位为1的情况,比如SYN=1才代表握手阶段。FIN=1代表挥手阶段。
SYN 表示新建连接
ACK 表示响应
如果发送数据为空的话,可以发送同一个Seq的多个ACK,这个可以用来保活和窗口协商。这个单个ACK只能TCP协议实现发送,应用层只能发[ACK+PSH]
FIN (Finish)表示关闭连接
PSH (Push)表示传输数据
RST (Reset)表示连接重置
这个RST的原因是因为close连接时,本地接受缓冲区还有数据。避免RST的方法就是调用close的之前,调用shutdown。netty称之为优雅关闭。
Nonce
CWR
ECN-Echo
Urgent
Flags 一共16位,目前只用到9位,剩下的7位是保留位。
Seq(Sequence number): 本次发送得顺序号
Ack(Acknowledgment number): 确认号,其值 = 对方的seq
+ 对方的Tcp Segement size
, 其含义代表我收到你seq号的数据了,长度是多少。
Next sequence number: 这个是期待对方返回的Ack值,这个不是在TCP协议内。
注意ACK是标志位, Ack是确认号。大小写不一样,含义也不同。