Posts

Showing posts from December, 2025

Compose Metrics REVEALED 🔥: Make 80% of Your Composable Functions SKIPPABLE

Image
  The Hidden Truth About Your Compose UI Performance You’ve written beautiful Jetpack Compose UIs. They look smooth in preview. But on real devices with real data? Jank. Why? Compose is restarting composables it could skip. And you have zero visibility into what’s happening. Until now. Compose 1.2+ ships with compiler metrics that reveal exactly how Compose sees your code: "skippableComposables" : 64 , "restartableComposables" : 76 // 12 functions = performance leaks! This single JSON file tells you which 12 functions are killing your 60fps. What Do “Restartable” vs “Skippable” Actually Mean? Restartable = Recomposition Boundary ✅ restartable fun MyComposable (show: ShowUiModel ) Good: Compose can restart just this function when state changes Default behavior: All @Composable functions are restartable Think: “This is a checkpoint where recomposition starts” Skippable = Performance Rocket Fuel ðŸš€ restartable skippable fun MyComposable (show: ShowUiModel ) El...

Android Device Security: Sandboxing, Rooting, and Attestation Explained

Image
  As Android developers, understanding device security is essential to protect our apps and users. In this comprehensive guide, we’ll explore Android’s security architecture, including sandboxing, rooting and jailbreaking, and how to implement device attestation using SafetyNet and Play Integrity. We’ll cover each topic in detail, providing code snippets and best practices, following. What is Sandboxing in Android? Sandboxing is the security mechanism that isolates each app’s code and data from other apps and from the underlying system. In Android, this ensures that one app cannot freely read or modify another app’s private data or perform privileged operations unless explicit permissions or IPC channels are used.​ High-Level Idea Each app runs in its own isolated environment with: Its own Linux user ID (UID) and process. Its own private data directory (e.g., /data/data/<package_name>/ ). By default: One app cannot directly access another app’s files. An app cannot perfo...

IPC: A buzz word in Modern Android Development Paradigm

Image
  Inter-process communication (IPC) in Android is how different apps and system components talk to each other safely, even though each runs in its own isolated Linux process. Android achieves this with a kernel driver called Binder, wrapped in familiar APIs like Intents, Services, ContentProviders, AIDL, and Messenger.​ 1. Story first: apartments and the intercom Imagine every Android app as a separate apartment in a high-security building. Each apartment (process) has: Its own space (memory). Its own keys (UID/permissions). No direct access to other apartments. Yet, apps need to talk: Food-delivery app → asks Google Maps for routes. Camera app → sends photos to the gallery. Music app → asks the system if it can play over an ongoing call. Whenever this conversation crosses apartment boundaries (processes), you are doing IPC. Binder is the building’s intercom system that connects apartments and the building’s control room (system services).​ You already use IPC whenever you: St...