How to customize Active Edge on the Pixel 2/Pixel 2 XL
Google included a squeezable frame on its new flagship devices. When the edges of the device are squeezed, it automatically is set to launch the Google Assistant. This feature is called Active Edge.
Personally, I do not need another way to launch this considering the Google Assistant needs a voice to be able to fully take advantage of what it has to offer. It would have been so much better if Google allowed users to use Active Edge to open up other things or perform certain actions.
Fortunately, this can be done, thanks to an app called 'Button Mapper: Remap your keys,' by flar2. With this app, I was able to set my Active Edge to launch the camera when I squeeze my Pixel 2 XL. It does require some minimal work and a computer, but I have laid out step-by-step instructions on how to do so. Do not be intimidated by these instructions. It is quite easy. NOTE: these instructions are for Windows users. There is a way to do it for Mac and Linux as well.
Before beginning, make sure you have Active Edge enabled in the settings. Settings > System > Gestures > Active Edge.
Download 'Button Mapper: Remap your keys' app and proceed to open it after it finishes installing. Read through the beginning to get an idea what the app does. Keep in mind, the remapping only works when the screen is on and phone is unlocked.
At the bottom, you should be prompted to activate Button Mapper. Tap Go and it will take you to the Accessibility Service page for Button Mapper. You can also go to Settings > Accessibility to find this as well.
It will ask you to start accessibility service. Press ok, click on Button Mapper and turn it on.
You will be returned to the Button Mapper app. Under the Buttons header, click on the Active Edge option.
The app will ask you to connect your phone to your computer and run a script. Connect your phone via USB to your computer. Go to Settings and on top type in 'USB' and tap on 'USB connected devices.' Tap on USB on the bottom and choose 'File Transfer.'
Next, you must be a developer so if you aren't one already, go to Settings > System > About Phone and tap on the “Build Number” 7 times. You will then see a pop-up telling you that you are now a developer.
Go back to your settings menu and select "System." You will notice a "Developer Options" tab. Tap it. Scroll down and look for USB Debugging and enable it.
Now it's time to set up ADB (Android Debug Bridge) on your computer. On your computer, download the ADB Zip File for Windows.
Extract all the contents to a folder that's easy to find.
Open up Windows File Explorer (place where you can find all of your files and drives) and find the folder where you extracted the files. Go into the folder.
When in the folder, hold SHIFT and right-click within the folder. You then click the "open command window here"option or, if you have Windows 10, click "Powershell" instead.
In the command prompt, type - adb devices (some windows users may have to type in /.adb first then /.adb devices. It will let you know).
After doing step 13, you shall see a "Allow USB debugging" on your phone. Click ok (you can check off "always allow from this computer" if you want)
Back to your computer, re-enter the command from step 12. If you successfully completed all the steps above you will then see your phone's serial number.
Open up a command prompt (press your start button and type in CMD and press enter) and enter the following command (just type in): adb shell sh/data/data/flar2.homebutton/keyevent.sh
This will run a short script and will grant the Button Mapper application permission. This is a one-time thing unless you uninstall the app or factory reset your device.
Button Mapper will ask you to restart the application. Restart the app.
Once back in the app, tap on “Active Edge” again under the Buttons header. You can now select "Customize" and have Active Edge do whatever you desire. If you want to launch the camera like I have it set - press 'Single tap" > Actions > Applications and then choose your camera application.
Play around with it to see all that it can do. There's a lot! If you need any help with this, feel free to contact us!