Android各种目录的区别
context.getDir("test", MODE_PRIVATE).getAbsolutePath()
----> /data/user/0/<packagename>/app_test
context.getFilesDir().getAbsolutePath()
----> /data/user/0/<packagename>/files
context.getApplicationInfo().dataDir
----> /data/user/0/<packagename>
没有root的手机怎么查看data目录
adb shell
run-as <packagename>
ls -l
total 96
drwxrwx--x 2 u0_a399 u0_a399 4096 2018-09-07 18:43 app_test
drwxrwx--x 2 u0_a399 u0_a399 4096 2018-09-07 15:15 cache
drwxrwx--x 2 u0_a399 u0_a399 4096 2018-09-07 15:15 code_cache
drwxrwx--x 2 u0_a399 u0_a399 4096 2018-09-07 15:15 files
drwx------ 3 u0_a399 u0_a399 4096 2018-09-07 15:15 patch_cache
drwxrwx--x 2 u0_a399 u0_a399 4096 2018-09-07 15:15 shared_prefs
ssh配置
查看本地有没有ssh-key
type %userprofile%\.ssh\id_rsa.pub (windows)
cat ~/.ssh/id_rsa.pub (macOS)
生成ssh-key
ssh-keygen -t rsa -C "your.email@example.com" -b 4096
拷贝ssh-key
type %userprofile%\.ssh\id_rsa.pub | clip (windows)
pbcopy < ~/.ssh/id_rsa.pub (macOS)