How to Remap the Pixel 2's Active Edge Squeezing

Google's new Pixel 2 smartphones allow you to squeeze its sizes to activate Google Assistant, the digital helper that taps into Google's knowledge base. But what if you'd rather trigger another action when you squeeze your Pixel?

Credit: Shaun Lucas/Tom's Guide

(Image credit: Shaun Lucas/Tom's Guide)

A new tool allows you to change what the Pixel 2 does when you squeeze it, so gripping your phone hard from its sides can turn on the its flashlight, enable Do Not Disturb mode, toggle silent mode on and many other tricks.

The app, called Button Mapper, is available for free on the Google Play Store, but it comes with some privacy concerns and requires a Mac or PC and some work in the command line application on that machine. The app warns you of the former with an alert saying it needs to "observe your actions" and "observe text you type" — which of course can include personal information including passwords and credit cards.

If that doesn't put you off, the amount of work you have to do detailed below may also dissuade you from giving Button Mapper a try. It's also why I wish Google would build an option for re-mapping Active Edge squeezes into the Pixel phones by default. (Then again, Galaxy S8 owners also have to jump through hoops to remap the Bixby button on their phones.)

But, if you're up for it, here's how to change the Pixel 2's Active Edge actions, using ADB, the Android Debug Bridge:

MORE: Pixel 2 vs Pixel 2 XL: Here's How They're Different

How to use Button Mapper to change Active Edge controls

1. Open Button Mapper and tap Active Edge.

2. Tap Customize, which will bring up a window titled "Grant READ_LOGS permission."

3. Open the Settings app, tap System and then tap About phone.

4. Scroll to the bottom and tap seven times on the "Build number" line.

5. Go back to System, tap Developer options and enable USB Debugging.

6. Connect your Pixel 2 to your computer via a USB Type-C cable, because it's time to use ADB, the Android Debug Bridge.

7. Unlock your phone slide down the notification pane, open the Android System USB options and select Transfer Files, though that may read "file transfer (MTP)" mode instead.

How to get use ADB Mapper working via a PC

These instructions came from the XDA developers site:

1. Download the file located here and unzip it.

2. Hold Shift while right-clicking within the folder you've just unzipped.

3. Select "open command window here" (it may say "command prompt" or "PowerShell" instead of "command window").

Credit: XDA

(Image credit: XDA)

4. Type "adb devices" (without the quotation marks) into the Command Prompt window and click Enter.

5. Unlock your Pixel 2 and tap the OK to allow USB Debugging. Back on your PC, you may need to type "adb devices" and hit enter again.

6. In the command prompt, enter "adb shell sh /data/data/flar2.homebutton/keyevent.sh" (again, minus the quotation marks) and hit enter.

Now, open Button Mapper on your phone, and after it restarts, you'll now be able to change what Active Edge controls!

How to get Button Mapper working via a Mac

When testing Button Mapper out, I used a MacBook Pro and downloaded the ADB tool from here, unzipping that file and making sure that the Platform tools folder you get is in the Downloads directory. The following ADB instructions come from this Stack Overflow page and the Button Mapper instructions come from XDA, and together, they worked like a charm.

For the following commands, you're going to copy and paste everything between the quotation marks, and Terminal will perform the actions without you needing to hit enter.

1. Open Terminal by hitting Command+Space, typing "Terminal" and opening that app.

2. Paste a series of commands (minus the quotation marks) into Terminal, one at a time, in order. Paste only the text between the quotation marks at the start and end of each line, and Terminal will process each without you needing to hit return.

"cd ~/Downloads/"

"mkdir ~/.android-sdk-macosx"

"mv platform-tools/ ~/.android-sdk-macosx/platform-tools"

"echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile"

"source ~/.bash_profile"

3. Unlock your Pixel 2 and tap the OK to allow USB Debugging. Back on your PC, paste "adb devices" in again.

4. Then, enter these commands:

"adb devices"

"adb shell sh /data/data/flar2.homebutton/keyevent.sh"

Open Button Mapper on your phone, and after it restarts, you'll now be able to change what Active Edge controls.

TOPICS
Henry T. Casey
Managing Editor (Entertainment, Streaming)

Henry is a managing editor at Tom’s Guide covering streaming media, laptops and all things Apple, reviewing devices and services for the past seven years. Prior to joining Tom's Guide, he reviewed software and hardware for TechRadar Pro, and interviewed artists for Patek Philippe International Magazine. He's also covered the wild world of professional wrestling for Cageside Seats, interviewing athletes and other industry veterans.