Tag Archives: Google

How to Install LineageOS on OnePlus 3T with GApps

This is the minimal guide for installing LineageOS 17.1 on OnePlus 3T abtracted from LineageOS offical guide. It works at the time of writing so no gurantee for further updates.

  1. Enable OEM unlocking and USB debugging on your phone with developer mode.
  2. Download latest Android platform tools for Windows, for Linux, or for macOS from Google. The full guide can be found at Using ADB and fastboot.
  3. Connect your phone into your computer with USB mode.
  4. Install the built-in OnePlus USB Drivers or use UniversalAdbDriver.
  5. cd to the platform-tools directory, run adb devices to see if your phone is connected.
  6. Run adb reboot bootloader to boot your phone into bootloader mode.
  7. Run fastboot devices while in bootloader mode to see if your computer still connects to it.
  8. Run fastboot oem unlock. Your phone should be reset and reboot automatically.
  9. Setup your phone. Then re-enable USB debugging.
  10. Download latest custom recovery from TWRP.
  11. Run adb reboot bootloader to boot your phone into bootloader mode. Also make sure your phone can be find in fastboot mode by re-typing fastboot devices.
  12. Run fastboot flash twrp-3.4.0-0-oneplus3.img to flash custom recovery.
  13. Run fastboot boot twrp-3.4.0-0-oneplus3.img to boot into new recovery mode.
  14. Download the LineageOS installation package.
  15. Download Google Apps using the arm64 architecture. Choose the packages you prefer (I recommend nano package).
  16. In recovery mode, tap Swipe Format Data
  17. Return to the previous menu and tap Advanced Wipe, then select the Cache and System partitions and then Swipe to Wipe.
  18. Sideload the LineageOS and Google Apps packages:
    1. On your phone, tap AdvancedADB Sideload, then swipe to begin sideload
    2. On your computer, sideload the package using adb sideload lineage-17.1-20201026-nightly-oneplus3-signed.zip.
    3. Then sideload the Google Apps using adb sideload open_gapps-arm64-10.0-nano-20201031.zip.
  19. Back to recovery main menu. Reboot your device.
  20. Setup your LineageOS.

Run `sudo` with Ansible `become` Option on Google Compute Engine

Playbook config:

- name: basic setup
  hosts: default
  user: user
  become: true
  become_user: root
  become_method: sudo
  roles:
    - tasks

If you got the following errors:

GATHERING FACTS *************************************************************** 
failed: [server1] => {"failed": true, "parsed": false}
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /Users/user/.ssh/config
debug1: /Users/user/.ssh/config line 139: Applying options for server1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
sudo: sorry, you must have a tty to run sudo

Then visudo and disable requiretty:

Defaults    !requiretty

Google+ 是要失败的

我在 2005 年就成功预测过,Delicious 、 Flickr 、 Firefox 这种东西大概是没什么前途的,你看,Delicious 现在阳痿了,Flickr 还算活跃?但看看他亲娘是谁我就不觉得有希望,Firefox?除了苦逼搞开发的和死宅,真的有正常的用户在用么?

要我说 Google+ 为什么没前途,总之从出生时,我看到第一眼的时候就觉得不是当大官,混名流的料,为什么?掐指一算就算出来啦

前天还在日历上做了备忘:Transfer feeds in GR to Twitter,今天竟然得到了 Google 要关闭 Google Reader 的传言。这真是太好了,都不用自己手动清理了,虽然只提前两天算了出来,也没有把预测结果公布出来呢

于是等晚上有时间了,删掉 Google+ 上的所有好友(就加了两个,噗),撤销掉之前所有在 Google Reader 里分享的条目,世界好清净

再预测一个,Things 早晚要完蛋,光凭提高软件的价格是锁不住用户的

從 Google Apps 帳戶轉到 Google 帳戶小技巧備忘

換郵箱是非常麻煩的一件事情,許多與之綁定的帳號都需要修改,都改的話非常的繁瑣,無疑是一項體力活

目前就 Google Apps 的應用來說,與 Google 的服務集成的還不夠完整,當然,有人會說,Google Apps 本身就是面向企業的,企業一般也就用 Gmail 、 Docs 、 Calendar 這三個服務,也的確,而且在 Google Apps 中我也的確只用這三個,(Contacts 算是從 Gmail 中分離出來的小服務)。可惜的是,其他有趣的服務還是無法集成到 Apps 中,例如 Google Reader

作為 Google 上癮者,還是打算把郵箱改回到 Google 的普通帳號,以下是一些備忘

從 Google 的聯繫人說起,Android 用戶一般都會將 Contacts 與 Google 的 Contacts 集成,這裡需要注意!不要因為有導入導出功能,就直接將要導入的郵箱的舊聯繫人刪除,這樣的直接結果就是你的 Google Profile 中的 follow 人數清空。並且 Google Reader 中你不再會 follow 任何人!所以,記得將就聯繫人先轉移到其他的分類,然後再導入新聯繫人,如果你沒有 follow 過幾個人並且認為舊聯繫人實在沒必要,可以直接刪除然後導入導出

再說下郵件過濾規則,首先要把郵件 Filter 規則同步到新郵箱。在兩個郵箱的 Labs 中同時開啟 Filter import/export 即可。很方便

然後郵件,郵件的話當然是希望全部轉移到新郵箱,這樣的話可以選擇使用 POP 來收,在新郵箱的設置中根據提示設置即可,Gmail 的服務器為 pop.gmail.com,端口 995,需要開 SSL,詳細參考 這裡,開啟後 Gmail 會自動定時抓取郵件,當然自動抓取速度會有些慢(間隔時間比較長),如果舊郵箱郵件比較多的話可能要花上 3 、 4 天才能全部抓取過來,這時建議在 Labs 中開啟一個叫 Refresh POP accounts 的擴展來加快刷新速度。導入後會自動應用上之前的 labels,不必要重新創建,不過 labels 不會有自定義顏色,目前好像沒導入的方法,手動改一下就可以了,也不會很麻煩

Calendar,舊的日曆直接分享訂閱即可,一些公共的訂閱也可以直接訂到,但有時一些比較 out of date 的日曆不會出現在訂閱列表中,這是進入舊賬戶將日曆通過 email 的方式分享出去就可以訂閱了

關於 Gmail 和 Calendar 中的 Tasks,可以直接一次性複製,先在舊列表中選擇 email 列表,全選複製然後直接在新列表中粘貼即可,Tasks 會自動根據換行符為內容進行換行

最後說下 Docs,因為是 Google Apps 轉到 Google 普通帳號,所以之前的舊文檔不可以通過轉移 owner 來實現文件轉移。而且,目前 Docs 的批量打包下載存在問題,所有非英文字符的文件名都會變成一長串橫線,如果檔案量很大的話,這也的確是一鍵痛苦的事,所以唯一省時省力的方法就是用 Share 功能分享出去,這樣在新帳號那邊同樣會出現文章的列表,並且可以設置是否可以編輯他們,只不過 owner 並不屬於新帳號

都轉移完畢後,就是一些善後工作了,例如,要在舊賬戶中將所有到達此郵箱中的郵件自動轉發到新郵箱,停止在新郵箱中接 POP,轉移 GTalk 好友,聯繫人也需要仔細的看一下

另外需要說明,Android 系統的移動終端如果需要更改郵箱,是一定要恢復原廠才可以進行的