Skip to content

Instantly share code, notes, and snippets.

@benbaxter
benbaxter / talkback.sh
Created July 31, 2020 21:14
Talkback enable/disable script
# Copyright 2020 Google LLC.
# SPDX-License-Identifier: Apache-2.0
function talkback() {
if [[ -z $1 ]]; then
echo "Usage: $0 [on/off]"
exit
fi
if [[ $1 == 'on' ]]; then
@benbaxter
benbaxter / TwoTruths.java
Created August 25, 2020 16:25
two truths and a lie
public void two_truths_and_a_lie() {
assertThat(benjamin.lovesRoadTrips()).isTrue()
assertThat(benjamin.lovesSkiing()).isTrue()
assertThat(benjamin.lovesPizza()).isTrue()
}
adb shell cmd package compile -m speed-profile -f <package name>
adb shell am force-stop <package name>
# Download record_android_trace following the instructions here:
# https://perfetto.dev/docs/quickstart/android-tracing#recording-a-trace-through-the-cmdline
~/android-scripts/traces/record_android_trace -c /path/to/default_perfetto_config.textproto