ChromePad - Chromium OS for ThinkPad

415 views 156 slides Mar 23, 2018
Slide 1
Slide 1 of 156
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120
Slide 121
121
Slide 122
122
Slide 123
123
Slide 124
124
Slide 125
125
Slide 126
126
Slide 127
127
Slide 128
128
Slide 129
129
Slide 130
130
Slide 131
131
Slide 132
132
Slide 133
133
Slide 134
134
Slide 135
135
Slide 136
136
Slide 137
137
Slide 138
138
Slide 139
139
Slide 140
140
Slide 141
141
Slide 142
142
Slide 143
143
Slide 144
144
Slide 145
145
Slide 146
146
Slide 147
147
Slide 148
148
Slide 149
149
Slide 150
150
Slide 151
151
Slide 152
152
Slide 153
153
Slide 154
154
Slide 155
155
Slide 156
156

About This Presentation

My presentation for Google Developer Group San Francisco. Step-by-step guide to turning a ThinkPad X220 into a Chromium OS Android development machine. Covers flashing modified Coreboot firmware, building and installing Chromium OS from source, and hardware upgrades.
Updated slides at https://goo.g...


Slide Content

ChromePad Chromium OS ThinkPad X220 Andrew Wright

About me Android Engineer GNU/Linux Enthusiast Big fan of Chromium/Chromium OS

About this This guide was tested on Debian Stretch as setup in an earlier blog post .

Chromium OS Coreboot Build Chromium OS Hardware Upgrades Android Studio

Chromium OS and Chromium

Why Chromium OS for Android Development? Why not Chrome OS for Android Development?

Everything explained in Part 2 is doable in Chrome OS, if you have a Google Pixel Chromebook. 8GB or 16GB of RAM = Good to Go If you don’t have a Google Pixel Chromebook, or another powerful Chromebook with 8-16GB of RAM it’s not going to work so well.

The Problem is with Chromebooks, not Chrome OS. They come with a fixed amount of RAM memory.

For development we’re going to want as much ram as we can afford, and it’s nice to have the ability to move the RAM around between devices. The X220 RAM is held in place by 2 screws and is directly accessible on the underside of the laptop.

Install Chrome OS on a ThinkPad? The short answer is No. Google Chrome OS is the Google product that OEMs ship on Chromebooks for general consumer use. However, we can install Chromium OS on a ThinkPad, or any other compatible laptop.

What is Chromium OS?

Chromium OS is the open-source development version of Google’s Chrome operating system. https://www.chromium.org/chromium-os

It’ s the open source project, used primarily by developers, with code that is available for anyone to checkout, modify, and build.

Disambiguation: What is Chromium?

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. https://www.chromium.org/Home

Chromium is the open source browser inside of the open source Chromium operating system. They both share an attractive icon:

What are experimental settings?

chrome://flags

WARNING: EXPERIMENTAL FEATURES AHEAD! By enabling these features, you could lose browser data or compromise your security or privacy. Enabled features apply to all users of this browser.

Chromium OS - Experimental Features The key to getting the most out of Chromium OS is utilizing chrome://flags In your Chromium browser navigate to chrome://flags and bookmark it. In Chromium OS flags extend to system settings, such as enabling Night Light or the Zip archiver (both of which are extremely useful).

Chromium Experimental Features The key to getting the most out of Chromium is making use of chrome://flags In your Chromium browser navigate to chrome://flags and bookmark it. The flags are essentially settings that you can enable or disable to enable or disable a wide range of new features.

Sounds Cool. How?

The easiest way to try Chromium is to use the Chromium browser on the PC or Android that you already have. https://download-chromium.appspot.com The link is an official Chromium source, Just download, unzip and install.

For Android it’s even easier, you can use my open source app getChromium. https://github.com/andDevW/getChromium

Awesome browser. So how do I put Chromium OS on my ThinkPad?

If we want to play it safe, according to the official documentation the best we can do is the ThinkPad R60. https://www.chromium.org/chromium-os/getting-dev-hardware/dev-hardware-list

The good news is that Chromium OS works great with Coreboot, and we can install Coreboot on some great ThinkPads.

Chromium OS on the ThinkPad X220

Updated Dev-Hardware-List WiFi Ethernet TrackPad Suspend/Resume Lenovo X220 NO YES YES YES Coreboot X220 YES YES YES YES X220 with stock Lenovo BIOS and X220 with Coreboot

ThinkPad X220 - The Great (AKA Hardware) The last ThinkPad made with “the good keyboard”. Compact enough that it’s actually usable in today’s world. No shortage of models with the 2.5GHz i5. Works wonderfully with Coreboot. OEM replacement parts are affordable and easy to obtain. Great battery life, batteries are cheap and swappable. Easily/cheaply upgradable IPS display. Arguably still looks cool.

ThinkPad X220 - The Bad (AKA Firmware) Extremely s low boot time WiFi card whitelist locks out the ability to upgrade WiFi RAM speed limited to 1866MHz Firmware level malware Lenovo Service Engine (LSE), etc. Intel ME *All of these things can either be mitigated or negated by installing Coreboot.

A wide range of ThinkPads have Great Hardware paired with Terrible Firmware.

We Can Fix Some. I haven’t tested this, but it looks like we should be able to do what I’ve done with the ThinkPad X220 with at least some ThinkPads that meet the following criteria: amd64 Supported by Coreboot If you’ve tested Chromium OS on other Coreboot ThinkPads I’d love to add that info to the Updated Hardware List . Contact me at [email protected]

Let’s get rid of the Firmware.

2. Coreboot

Advantages of Coreboot Boot time is drastically reduced. Allows use of mini PCIE WiFi cards Allows use of faster RAM Allows booting from ExpressCard Allows cool extras (games like Tint) Coreboot is an open source project Intel ME neutered https://www.coreboot.org/Intel_Management_Engine Lenovo Malicious Firmware neutered (security bonus)

X220 Coreboot Install Requirements Update Lenovo BIOS Configure BeagleBone Configure Coreboot Flash Coreboot

Requirements What you need: 1x ThinkPad X220 1x PC Running *Debian/Ubuntu 1x Micro SD Card 4GB+ (Faster is better) 1x BeagleBone Black (Raspberry Pi can also be used) 1x USB 2 Mini USB Cable (comes with the BeagleBone) 1x PC PSU(any old PC’s power supply) LOTS of JUMPER WIRES - In all of the available configs (FF/FM/MM) *Easy Debian Install Walk-Through https://goo.gl/VmYKE5

Sources BeagleBone Black https://www.digikey.com/product-detail/en/ghi-electronics-llc/BBB01-SC-505/BBB01-SC-505-ND/6210999 Pomona 5250 https://www.digikey.com/products/en/test-and-measurement/test-clips-ic/624?k=pomona%205250 Jumper Cables - Get one of each type https://www.digikey.com/product-detail/en/adafruit-industries-llc/825/1528-1161-ND/5353621 https://www.digikey.com/product-detail/en/adafruit-industries-llc/759/1528-1155-ND/5353615 https://www.digikey.com/product-detail/en/adafruit-industries-llc/794/1528-1159-ND/5353619 PSU - An old PC will have one of these (It’s the part that the power cord connects to). http://www.instructables.com/id/How-to-power-up-an-ATX-Power-Supply-without-a-PC/

Plug-and-Play Hardware Upgrades WiFi Upgrade Atheros AR9285 Half Mini PCI-E Card - NOT the AzureWave Bluetooth Upgrade Foxconn 4.0 daughter card - FRU 60Y3303 Cmos Upgrade CR2032 CMOS - Odds are that your battery is old RAM Upgrade (16GB 2× 8GB DDR3 SO-DIMM ) - Get 2 of the same USB 3.0 Upgrade AKE USB 3.0 Card 54mm - The AKE model with 2 USB ports Display Upgrade LP125WH2-SLT1 - Lenovo Twist S230U touch screen unit Battery Upgrade Lenovo ThinkPad Battery 44++(9 Cell) - NEW via Lenovo

Update Lenovo BIOS

Configure X220 UEFI BIOS Coreboot utilizes proprietary binary blobs that are extracted from the factory firmware image. In order to build Coreboot with the latest binary blobs the factory firmware needs to be updated prior to flashing with Coreboot. Boot the X220, holding down the blue ThinkVantage key. At the Startup Interrupt Menu hit F1 Set the boot order to USB HDD Save and Exit.

Updating UEFI BIOS - Part 1 Download the latest factory BIOS from Lenovo https://download.lenovo.com/pccbbs/mobiles/8duj28us.iso Verify the ISO Checksum and Convert ISO to IMG $ echo ‘cf433cc5adfabf62f49146f87ae814c9d990f83db386bae1d581878908e5032e8duj28us.iso’ | sha256sum -c $ sudo apt-get install genisoimage $ geteltorito -o bios.img fwss31.iso Burn IMG to USB $ sudo dd if=bios.img of=/dev/sdX bs=4M status=progress

Updating UEFI BIOS - Part 2 1. Plug the X220 into the AC adapter, insert the USB with the bios.img and boot. 2. In the Main Menu Window select #2 Update System Program 3. At the prompts hit the Y key and the Enter key to proceed. 4. After the reboot select #3 in the Main Menu Window 5. Continue through the prompts with Y and Enter.

// DISCLAIMER The final key requirement is a willingness to completely destroy your X220 motherboard in the pursuit of making a superior one-off device.

X220 Service Manual PDF This is a great resource for identifying FRUs. FRUs are ThinkPad part ID numbers that can simplify purchasing replacement parts online. https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/0a60739.pdf

Getting at the Chip Illustrated Description on Pages 73 - 78 in X220 Manual Turn the X220 over and remove the following parts in the following order: Battery HDD Screws required to remove both the Palmrest and the Keyboard. Keyboard Palmrest WiFi Card (swap with the Atheros AR9285 card) Bluetooth daughter card CMOS battery (swap with fresh new battery)

Upgrade Bluetooth Bluetooth daughter card check: Look at the card to determine if you have 2.0 or 4.0 Bluetooth 4.0 - FRU 60Y3303 or FRU 60Y3305 Bluetooth 2.1 - FRU 60Y3271 or FRU 60Y3275 I

Configuring the BeagleBone Black - 001 KEY and COLOR CODE PC = Debian system that is connected to the BeagleBone via USB BB = Terminal SSH X220 = ThinkPad we are modifying Download Bone Debian 7.8 (works for flashing) https://debian.beagleboard.org/images/bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz Verify the image: $ echo ‘bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz c848627722b7a5f7bc89791cc8949e3b’ | md5sum -c Unpack the image and write it to an sd card $ xz -d BBB*.xz $ sudo dd if=BBB*.img of=/dev/sdX bs=512k status=progress I

Configuring the BeagleBone Black - 002 Insert the sd card into the BeagleBone and connect the BeagleBone to your PC via the USB cable. Plug an Ethernet cable with an Internet connection into the BeagleBone. In your PC open a terminal. $ ssh 192.167.7.2 -l root Say yes and proceed through the prompts. Now in your BB terminal $ apt-get update && apt-get upgrade $ apt-get install ntp I Open a terminal in your PC

Configuring the BeagleBone Black - 003 # apt-get install bash-completion vim build-essential pciutils usbutils libpci-dev libusb-dev \ libftdi-dev zlib1g-dev curl wget zip # wget https://elinux.org/images/1/1f/BB-SPI0-01-00A0.txt # dtc -O dtb -o BB-SPI0-01-00A0.dtbo -b 0 -@ BB-SPI0-01-00A0.dts # cp BB-SPI0-01-00A0.dtbo /lib/firmware/ # echo BB-SPI0-01 > /sys/devices/bone_capemgr.*/slots

Configuring the BeagleBone Black - 004 Check to see that installation worked # cat /sys/devices/bone_capemgr.*/slots The last line of the result should match this: 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI0-01

Configuring the BeagleBone Black - 005 Verify that spidev exists # ls -al /dev/spid* Which should print out something like this crw-rw---T 1 root spi 153, 0 Feb 29 05:39 /dev/spidev1.0 Make the last line of the file /etc/default/capemgr read CAPE=BB-SPI0-01

Configuring the BeagleBone Black - 006 On your PC download https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/libreboot_r20160907_util.tar.xz Verify download $ echo ‘ c5bfa5a06d55c61e5451e70cd8da3f430b5e06686f9a74c5a2e9fe0e9d155505867b0ca3428d85a983741146c4e024a6b0447638923423000431c98d048bd473 libreboot_r20160907_util.tar.xz’ | sha512sum -c - Transfer the utility to your BB sd card. In the BB terminal $ tar xf libreboot_r20160907_util.tar.xz # chmod u+x libreboot_util/ich9deblob/armv7l/ich9gen libreboot_util/flashrom/armv7l/flashrom

Configuring the BeagleBone Black - 007 Connect the BB to the Pomona clip and connect the clip to the SOIC-8 as specified https://www.coreboot.org/Board:lenovo/x220 Don’t connect the power cable until the clip is correctly attached to the SOIC, only connecting the ground cable initially. For the 2 wires delivering power from the PSU, which have to be long, it’s best to use twisted pair cabling to cancel out any interference. For the rest of the jumper cables keep the length of everything as short as possible.

Read the flash two times. # /libreboot_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r flash_01.bin # /libreboot_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r flash_02.bin # diff flash_01.bin flash_02.bin If they don’t match, don’t proceed. If they do match(you get no response after running diff) save a copy on external media .

https://www.coreboot.org/Build_HOWTO $ sudo apt-get install git build-essential gnat flex bison libncurses5-dev wget zlib1g-dev $ cd ~ $ git clone https://review.coreboot.org/coreboot $ cd coreboot $ git submodule update --init --recursive

Use the ifdtool to recover descriptor and me firmware $ cd ~/coreboot/util/ifdtool $ make $ sudo make install $ ifdtool -x ~/flash01.bin ifdtool -x /path/to/extracted/flash.bin

$ mkdir -p ~/coreboot/3rdparty/blobs/mainboard/lenovo/x220 $ cd ~/coreboot/3rdparty/blobs/mainboard/lenovo/x220 $ mv ~/flashregion_0_flashdescriptor.bin descriptor.bin $ mv ~/flashregion_2_intel_me.bin me.bin $ mv ~/flashregion_3_gbe.bin gbe.bin

Get Coreboot - 001 Go to https://www.coreboot.org/Supported_Motherboards and search for X220. Click the "upstream tree" link to find the commit hash and then check it out. $ cd ~/coreboot $ git checkout <hash> $ git submodule update --checkout

Configure Coreboot - 001 $ cd ~/coreboot $ make nconfig General Setup [*] Compress ramstage with LZMA [*] Include the coreboot . config file into the ROM image (NEW) [*] Allow use of binary-only repository Mainboard Mainboard vendor (Lenovo) Mainboard model (ThinkPad X220) Rom chip size (8192 KB (8MB))

Configure Coreboot - 002 chipset [*] Enable VMX for virtualization [*] Ignore vendor programmed fuses that limit max. DRAM frequency (NEW) [*] Ignore XMP profile max DIMMs per channel [*] Beep on fatal error (NEW) [*] Flash LEDs on fatal error (NEW) [*] Add Intel descriptor.bin file (NEW) [*] Add Intel ME/TXE firmware [*] Add gigabit ethernet firmware

Configure Coreboot - 003 display - Nothing additional checked generic drivers [*] Support Intel PCI-e WiFi adapters [*] PS/2 keyboard init [*] Enable TPM support [*] Silicon Image SIL3114 (NEW) Security - Nothing additional checked

Configure Coreboot - 004 Console [*] Squelch AP CPUs from early console [*] Show POST codes on the debug console System tables [*] Generate SMBIOS tables (NEW) Payload [*] SeaBIOS version (master) [*] Load coreinfo as a secondary payload [*] Load tint as a secondary payload

Configure Coreboot - 005 Hit F6, then hit the Enter key. Hit F9 to exit. Copy $ make crossgcc-i386 CPUS=4 $ make iasl $ make

Flash Coreboot - 001 When make finishes, your new rom is located at ~/coreboot/build/coreboot.rom Flash it # /libreboot_util/flashrom/armv7l/flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w /coreboot/build/coreboot.rom You may have to play around with the clip to get a successful flash.

Resources https://www.coreboot.org/Build_HOWTO https://www.coreboot.org/Board:lenovo/x220 https://karlcordes.com/coreboot-x220/ https://tylercipriani.com/blog/2016/11/13/coreboot-on-the-thinkpad-x220-with-a-raspberry-pi/

Building Chromium OS

Prerequisites An x86_64 64-bit Debian or Ubuntu system with at least 8GB of RAM An Internet connection (faster is better) A good amount of free disk space and time A 16GB USB drive

Read more: https://www.chromium.org/chromium-os/developer-guide

One-Time Setup Install the requisite packages $ sudo apt-get install git-core gitk git-gui curl lvm2 thin-provisioning-tools python-pkg-resources python-virtualenv Configure Git $ git config --global user.email "[email protected]" $ git config --global user.name "Your Name"

Install depot_tools $ cd ~ $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Make Sudo More Permissive $ cd /tmp Copy and paste, or carefully type each of the following lines one at a time, hitting the Enter key after each. $ cat > ./sudo_editor <<EOF #!/bin/sh echo Defaults \!tty_tickets > \$1 # Entering your password in one shell affects all shells echo Defaults timestamp_timeout=180 >> \$1 # Minutes between re-requesting your password EOF $ chmod +x ./sudo_editor $ sudo EDITOR=./sudo_editor visudo -f /etc/sudoers.d/relax_requirements

Configuring Environmental Variables $ vi ~/.bashrc Add the following line at the very bottom of your .bashrc file: export PATH=$PATH:~/depot_tools Source .bashrc $ . ~/.bashrc

Get the Source Code Make a directory for Chromium OS $ mkdir -p ${HOME}/chromiumos $ cd ${HOME}/chromiumos $ repo init -u https://chromium.googlesource.com/chromiumos/manifest.git --repo-url https://chromium.googlesource.com/external/repo.git $ repo sync -j4

Add Google API Keys - 001 This needs to be completed prior to building the Chromium OS image. https://www.chromium.org/developers/how-tos/api-keys Subscribe to Chromium Dev’s Google Group (mandatory) Navigate to https://console.cloud.google.com/ At top left, between Google Cloud Platform and the search bar, select the menu with 3 dots. In the pop-up menu click on box with the + the in the top right corner. Create a project . Click on the hamburger menu in the top left corner, then scroll down to APIs & Services in the new menu. In the submenu select Credentials . Select Create credentials > API key

Add Google API Keys - 002 6. In the API key created dialog copy your API key. 7. Open a new terminal window and cd to your home directory 8. Make a file .googleapikeys , adding in your own keys as you get them: google_api_key = "your_api_key" google_default_client_id = "your_client_id" google_default_client_secret = "your_client_secret"

Add Google API Keys - 003 9. You should have the API key already. Follow the rest of the steps as outlined here to obtain your own client id and client secret . Paste these credentials into the .googleapikeys file and save it. After completing this step the API keys will be automatically baked-in to all of your Chromium OS builds.

Build Steps The Formula Enter Chroot Select Board Set Chronos User Password Build Packages Build Disk Image Write Chromium OS Image to USB

Create a chroot $ cd ~/chromiumos/chromium Enter the command to download and enter the chroot $ cros_sdk While inside the chroot you will see a special cros-chroot prompt ~/trunk/src/scripts $ After the initial download cros_sdk enters the chroot.

Select a board ~/trunk/src/scripts $ export BOARD=amd64-generic

Set the Chronos User Password Set the password that you will use to enter the command line in Chromium OS. You need to repeat this step every time you build a new image. ~/trunk/src/scripts $ ./set_shared_user_password.sh

Build Packages Build all of the packages for the board ~/trunk/src/scripts $ ./build_packages --board=${BOARD}

Build a Disk Image Build the developer image with the additional developer packages built-in ~/trunk/src/scripts $ ./build_image --board=${BOARD} --noenable_rootfs_verification dev

Write the Chromium OS Image to USB Making a Chromium OS USB installer is easy. Plug a 16GB USB drive into your PC. ~/trunk/src/scripts $ cros flash usb:// ${BOARD}/latest Select the USB device from the options and confirm. cros_flash writes the image while keeping you informed of its progress.

Great Job ! Remove the USB and take a moment to feel like something of a technical badass. If you skipped the API keys part you’re going to be devastated to learn that your build is *useless, so go back and finish that, and then repeat the steps for Building Chromium OS . Also, use this time to remind yourself that using Chromium OS is an involved process that requires you repeating this process (or other manual update process) every single time you want to update. *It will boot and install to a SSD, but you’re going to be sad.

// DISCLAIMER Chromium OS and Chromium don’t auto-update. Chromium OS isn’t for general consumer use.

Dual-Use Chromium OS USB Installer 1. Boot the X220 from the USB and run Chromium OS as-is 2. Boot the X220 from the USB and install Chromium OS to the SSD We want the second option, because it’s always going to be faster than running Chromium OS from a USB drive. The general rule for read/write speed is SSD> HDD> USB 3> USB 2 *Coreboot allows us to enable booting from the ExpressCard, which we can outfit with a USB 3.0 adapter, enabling us to boot from a USB 3.0 drive.

Installing Chromium OS on a SSD

Insert the USB drive into the X220 and boot. At the Welcome screen enter VT2 by pressing Alt + Ctrl + F3 login: chronos Log in with the password that you set earlier .

Installing Chromium OS to a SSD Make sure that you have a SSD in your X220. $ sudo /usr/sbin/chromeos-install --dst /dev/sda Hit the y key and let everything run, it will throw errors. Exit VT2 by pressing Ctrl + Alt + F1 Power off and remove the USB drive.

Boot Chromium OS from SSD At the Welcome screen enter VT2 by pressing Alt + Ctrl + F3 Log in. Make your rootfs writable $ sudo /usr/share/vboot/bin/make_dev_ssd.sh --force --remove_rootfs_verification

Exit by hitting Alt + Ctrl + F1 Remove the USB drive and boot into your new Chromium OS ThinkPad X220.

Experimental Settings Here are some of the flags that I find useful. To check them out just enter them in your Chromium browser’s omnibox. #ash-enable-night-light #enable-zip-archiver-packer #smooth-scrolling #enable-easyunlock-promotions Search in chrome://flags for md and enable the material design components. This looks promising, as it should work with X220 hardware #quick-unlock-fingerprint

X220 Hardware Upgrades

Install Backlit DropIn IPS Screen Deactivate palmrest touchpad Install Cellular Modem

X220 Backlit IPS Upgrade You can u pgrade to the superior backlit IPS screen for well under $100. The best drop-in screen is the LP125WH2-SLT1, which is used in Lenovo’s S230U Twist. There isn’t a lot of documentation on disassembling the Twist Lid, as it seems to have been designed for replacement rather than repair. These are available online as the entire top half of the Twist for around $60. Carefully disassemble the unit, taking care to only destroy the parts that you aren’t keeping. So you don’t have to worry about wrecking the outer touch-screen side of the display, but don’t scratch the inner backlit display. Alternatively, there are some more serious screen upgrades requiring soldering. I can’t personally vouch for these.

X220 Backlit IPS Upgrade - Requirements Lenovo S230U Twist LP125WH2-SLT1 screen 2mm adhesive sticker tape (double sided) for cell phone repair X220 laptop Optional - WebCam Upgrade If your X220 doesn’t have a WebCam this is the perfect time to install one. Webcam - Integrated Webcam Camera Kit 04W1364 Bezel with webcam cover

Cut out the plugs that cover the screws on the front of the lid. Then remove the screws. These parts don’t need to be saved.

With the screws out the bottom section lifts off and can be discarded or recycled. The next step will be pulling the bottom half away from the top half. The bottom slides out from under the top. BOTTOM-HALF TOP-HALF

I was unable to get a good shot of the separation between the two halves, but in this image they’ve been pulled apart. The green and yellow arrows point to the edges of the bottom and top halves, respectively. The top half can now be pulled up away from the bottom half easily. BE VERY CAREFUL WITH THE TOP HALF FROM THIS POINT ON. The back half is not important to us.

The two halves split apart. Don’t damage the components inside the green outline box, that’s our backlit screen.

The backlit screen we need is currently bonded to the touch-screen. We need to carefully separate the two, being very careful not to tear or rip the metallic colored tape. Basically use a very thin opening tool to slide under the metal frame around its perimeter, only allowing the blade to cut into the touch-screen, and not letting it rip open the metallic tape on the inside of the backlit screen. TOUCH-SCREEN BACKLIT SCREEN

Peel up the transparent tape and unplug the screen cable.

Carefully prying the touch-screen away from the backlit screen. Try not to bend the backlit screen.

Almost…

The trick is separating the double-sided tape on the touch-screen from the metallic tape on the backlit screen, without damaging the metallic tape in the process.

Ta-dow! Everything looks wonderful after straightening the badly bent part that says “Don’t Touch!”. The circles are highlighting the mounts that make this part a drop-in replacement.

Now to remove the old screen from the ThinkPad. The stickers highlighted by the circles need to be peeled off carefully.

The key when doing this type of work is to know which part to destroy and which part not to destroy. The sticker is going to be cheaper and easier to source than the screen bezel, so wreck the sticker. Remove both stickers and unscrew the screws underneath.

Pry the bezel away from the screen, lifting from the inside. I’m not worried about scratching the screen, but I don’t want the bezel getting scratched. Work your way around until the bezel pops off.

Remove the screws holding the screen in place, then remove the screen.

Mind the screen cable, which you need to carefully unplug.

Make sure to have something in place to protect the front of the backlit screen from scratches. Line the new screen up with the lid.

Line the new screen up and connect the cable, securing the connected cable with the transparent tape.

Pro-Tip: It looks great, but don’t secure it with the screws until after testing it. If we broke it the last thing we want to do is make it harder to remove and replace.

Testing, Testing...

And we’re good (The artifact in the image is from the camera). Secure the screen with the screws.

Take the bezel and remove the old double-sided tape. Anhydrous alcohol and Q-tips work great for this type of residual goo removal.

When the bezel is clean, carefully lay down lines of new 2mm adhesive tape. There are grooves to serve as guides.

Remove the white backing from the tape and secure the bezel to the lid, snapping it back in place. Secure with the screws and re-apply the black square screw cover stickers. Enjoy!

X220 Palmrest Upgrade IMO the worst part of the X220 is the terrible touchpad. I’m a huge fan of the TrackPad, and want the touchpad gone. I mod my X220s so that the touchpad is deactivated and physically one with the palmrest. It literally will not move. If you’re interested in ridding your X220 of its touchpad, here’s one way to do it.

X220 Palmrest Upgrade - Requirements Old credit card Epoxy ( cyanoacrylate is not something you want to use for this) X220

On the underside of the palmrest, unplug the cable from the connector next to the arrow. Cut a piece of credit card(smooth on both sides) to fit under the metal frame.

Test to make sure that your touchpad is solid with the card insert in place, then use epoxy to make it permanent. Notice that the fingerprint reader is still connected on the right side.

And now you have the ideal palmrest, free of distracting inadvertent clicking. Somebody clever should remold these without the touchpad and sell them online.

X220 Cellular Modem Upgrade By default the X220 universally supports SIM modems. An additional wireless card is required, and there may be additional antennas that you’ll have to install, depending on which specific X220 model you’re starting with. The Chromium Project has more info on cellular modems: https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/get-a-3g-modem-running

X220 Cellular Modem Upgrade - Requirements Sierra Wireless MC8355 - Gobi 3000(TM) Module Compatible SIM Card

Install the Sierra Wireless Card Remove the Battery and insert the SIM card into the SIM card slot. Remove the Keyboard and Palmrest. Insert the Sierra Wireless Card into the MiniPCI Express slot to the left of the Atheros WiFi card. Secure with a silver screw. Connect the Blue and Red antennas to their respective contacts on the wireless card and secure with tape. Replace the Battery.

Enable Mobile Data in Settings Settings > Network > Mobile Data > On

More Information Enter crosh with Ctrl + T $ shell chronos@localhost / $ modem status

3. Chromium OS for Android Development

// DISCLAIMER Android Studio on Chromium OS/Chrome OS™ isn’t 100%. Mainly AVD and Virtualization aren’t working. It’s good, but it’s not perfect.

Question: How do we run Android Studio in Chromium OS?

Answer: Inside of Debian OS, inside of a Crouton. *With 8GB of RAM or better.

Debian - The Universal Operating System

Crouton Chromium OS Universal Chroot Environment https://github.com/dnschneid/crouton Star it on GitHub, and check out the documentation.

Download the latest Crouton https://goo.gl/fd3zc Open up a shell: Ctrl + Alt + T Then type shell and hit Enter.

Install Debian in a Crouton Install the Crouton Chrome Extension https://goo.gl/OVQOEt $ sudo sh -e ~/Downloads/crouton -r sid -t xiwi,xfce -n debiandroid Let everything download. At the prompt create a user name and a password.

Start Debian $ sudo startxfce4 -n debiandroid -X xiwi -b

Configure Debian At the prompt select ‘Use default config’ Right click on the Desktop and select open terminal here. $ sudo vi /etc/apt/sources.list

Update /etc/apt/sources.list deb http://ftp.us.debian.org/debian/ stretch main non-free contrib deb-src http://ftp.us.debian.org/debian/ stretch main non-free contrib deb http://ftp.us.debian.org/debian/ stretch-backports main contrib non-free deb-src http://ftp.us.debian.org/debian/ stretch-backports main contrib non-free deb http://security.debian.org/ stretch/updates main contrib non-free deb-src http://security.debian.org/ stretch/updates main contrib non-free *You can copy and paste from GitHub https://goo.gl/pVfVHZ

$ sudo dpkg –add-architecture i386 $ sudo apt-get update && sudo apt-get upgrade Outside of the Crouton navigate to https://developer.android.com/studio/index.html#downloads Download the Linux platform package. Go back into your Chroot $ sudo apt-get install openjdk-8-jdk gradle $ unzip ~/Downloads/android-studio-ide-171.4443003-linux.zip $ ./android-studio/bin/studio.sh

Configure Android Studio

Add a Desktop Launcher

How to Start Your Debian Crouton Open up a shell: Ctrl+Alt+T Type shell and hit enter. Debian in a Chromium Tab $ sudo startxfce4 -n debiandroid -X xiwi-tab -b Debian in its own Chromium Window $ sudo startxfce4 -n debiandroid -X xiwi -b

Enjoy your Chromium OS ThinkPad X220! Please don’t hesitate to reach out if you have questions/comments/issues etc.

Contact github.com/andDevW [email protected] My blog andDevW.com

Attributions Chromium ™, Chrome OS ™, Chromebook ™, Chromebook Pixel ™ are trademarks of Google LLC . Lenovo™ and ThinkPad® are trademarks of Lenovo in the United States, other countries, or both.