Functional Bytes

Android dev quick reference

Wireless Debugging

  • Settings > System > Developer options > Wireless debugging
  • First pair with paring code (has its own port)
adb pair x.x.x.x:xxxx
  • Then connect using the port on the main screen
adb connect x.x.x.x:xxxx
  • Build and push
./gradlew :app:assemblePreview
adb install app/build/outputs/apk/preview/app-preview.apk

Preview build with optimizations

app/build.gradle.kts

// ...
    buildTypes {
        release {
            optimization {
                enable = false
            }
        }
        create("preview") {
            initWith(getByName("release"))
            optimization {
                enable = true
            }
            isProfileable = true
            signingConfig = signingConfigs.getByName("debug")
        }
    }
// ...