Discover what’s next for Android development across Android Studio and the terminal with Android CLI. In this session, we unveil the latest in Android Studio Canary and Stable—from AI-assisted code migrations to Compose and Agent Client Protocol (ACP) support, to Lightbuild’s declarative architecture. We’ll also dive into the latest updates to the Android CLI toolchain. Learn how you can use it to automate your inner-loop workflows with improved access to devices, diagnostics tools for local and production issues, profiling workflows that let your agents test and validate optimizations and much more.
Transcript
Good morning, everyone.
My name is Adarsh Fernando.
I am a group product manager on the Android developer experience team.
And I am Esteban de la Canal, and I am a software engineer in the developer tools team.
Now, feels like every day AI is completely changing how we work, and we feel there's never been a more exciting time to be an Android developer.
And equally, we think there's never been a more exciting time to build the tools that evolve alongside your workflow to help you do more, build more ambitiously, at a higher quality and faster than ever.
In this session, we're actually going to spend a good amount of time showing you how we're optimizing tools across a number of surfaces you use every day to be more productive.
Let's start with the most foundational of these tools, Android CLI.
As coding agents become a bigger part of your daily workflow, you need tools that are optimized for how agents operate.
Now, traditional command line tools often require human interpretation, manual input, or have limited capabilities that don't really push what agents are capable of doing.
Android CLI is built from the ground up for modern agents as a modern solution, predictable commands, structured outputs, zero interactive prompts, and a growing list of capabilities to drive deeper developer workflows with agentic assistance.
It is the foundation that enables Android developer experiences across a number of agentic environments, from Claude Code in your terminal, to Google Antigravity, to Android Studio.
To see how this works in practice, we'll be using Pocket Casts.
It's an open source podcast app with millions of users, myself included.
I use it for audio playback, video playback, background sync, and it has an active 40-module codebase.
So, to kick off our tour of what Android CLI can do, I'll pass it to Esteban.
Thank you, Adarsh.
All right, we're going to switch to live demos with AI.
What can go wrong?
In the We're going to start demoing today from the ground up, starting from CLI all the way up to Android Studio.
But, in true CLI fashion, I'm going to show you my agenda in a terminal.
So, first, what I want to show you is what we have done new in Android CLI.
I have Android CLI installed, of course.
And this are the text of wall of text of commands.
But I added for us today an ADS flag.
So, I wanted to show you what we have done since we announced this tool at Google I/O.
We have a bunch of new commands.
You will see throughout all the demos all these commands in action.
But we have now the ability to analyze APKs for check how the configuration of R8 is doing, so your agent can check if if the APK or the AAB is in the right shape.
We have added the ability to log in into Google services to access certain tools that I will show in a second.
We have added the ability for Android CLI to know how to build your projects.
Of course, you can build in the command line using Gradle or whatever thing you build, but why is it important that Android CLI knows how to build?
Because we have launched the preview command, that allows you to render a Compose preview directly on the terminal without having Android Studio.
For that, Android CLI needed to build.
You have that available.
We also have a new device command that I will show in a second, that allows you to rent physical remote devices and mirror screens.
We'll see that in a bit.
We have a new input command that allows you to manipulate the app.
Of course, you have UI Automator and other existing APIs, but this makes it easier for the agent to not have to deal with too many details and, yeah, improve the speed of interacting with your app.
Like I said, we have the preview command.
We have a new install command.
Of course, you can use ADB, but this brings the power of Android Studio deployment, which only pushes the bit of the APK that has changed.
So, if you have a large APK of 500 MB, this will only, and you change one file, this will only delta push what has changed.
We have added a new signals command so you can look at the crashes in Crashlytics and all the production data to download and heap dumps, so the agent can We'll see that right now in a second.
And we have a new profiler command that allows you to easily profile, take system traces, or heap dumps in the command line.
We'll see that live in a bit.
Okay.
Let's start doing some stuff.
So, the first command that I want to show you is the Android device remote models, where you can list all the devices that you can rent if you're logged in.
These are all devices that I could rent.
I was going to do this demo on a physical remote device, but I did not want to tempt the demo gods this much, and I'm going to use a physical device that I have here.
And to show you all my physical device, we have a new command called Device Hub that mirrors the screen of your connected devices, your remote devices, or your emulators.
So, I'm going to leave this open here, for you all to see what's happening on my phone.
Okay, first demo.
I'll kick it off, and I'll advance my high-tech slides, and I'll explain what what this is going to try to do.
So, I didn't want to do a demo where I kick it off, and then I go back like in those baking shows that they put the cake and then they say, "This is how it looks like."
And it was nothing like this before.
So, this is going to try to be a real thing.
Now, what this is trying to do is going through Crashlytics, listing the crashes of my app.
Let me pull the app.
Listing all the crashes, it's going to pick one.
It's going to try to reproduce it.
I know the crash.
The crash is if you double-tap on, "I forgot my password," the app crashes.
So now, the agent is going to try to reproduce that using the input command, and the app crashed.
So, I tweaked my AGENTS.md to do two things.
One, I have all prebuilt, so we don't have to watch build an app.
That'll be quite boring.
It identified a fix that was on a neighboring file, so it already fixed it, and it's going to use, again, the deployment and input commands to try and see if the crash reproduces again.
It already installed the app, and it should go now to the screen, the, "I forgot my password," screen.
Perfect.
And it will double-tap on the new, "I forgot my password," and, hopefully, it shouldn't crash, and it should go to the screen that says, Enter your email to reset the password."
Okay, here we are.
Don't crash if you actually fixed it.
There we go.
The bug is fixed.
And now, I did tweak my AGENTS.md just for you to tell, "Show me all the Android CLI commands you used to make this happen."
And they're popping up.
So, it used Android signals to list the crashes.
It used Android install to install the APK, input tap to go there.
It can build, but it could have called Gradle.
And that's it.
We just fixed a crash in about 1 minute 42 seconds.
Next one up is a bit more ambitious.
So, I'm going to kick it off.
There we go.
So, I want to improve the application startup time of Pocket Casts.
For that, on the only thing I say is, "Hey, I think we could, you know, startup could be faster, read the docs, and make it faster."
And what this is going to do is it's going to, profile the app.
Hopefully, it it's going to change baseline profile.
It's going to rebuild the app, run it again, profile, compare the two traces, and tell me if something improved.
This should take about 2 minutes, so this one I'm going to leave baking while we switch to the next demo.
It's doing its thing?
It's doing its thing.
Okay.
The next thing I want to show you is how to reduce APK footprint.
I mentioned at the beginning that we have a new command called Android Analyze.
I'm going to ask the agent to improve and this is the way you phrase it, "Our release feels bigger than it should be.
Go for it."
And we're going to let the agent do do its thing.
Two things are going to happen here.
Hopefully, we will see, There we go.
The agent is looking at the ProGuard configuration.
We change it and compare the two APKs before and after this change, and see how they compare.
Like I said before, I have them pre-built, so the agent should know and pick up the previous APKs.
There we go.
It used Android Analyze to analyze the previous APK, the new one, and compare the sizes.
We have an improvement on the dex size of half a meg, and you can see all the deltas of how many things were were removed from the APK.
And there we go in 24 seconds.
Now, and this is real, by the way, on the Pocket Casts app.
This is not fake or anything like that.
The only things I tweaked are for you not to see the build happening, but, in a few minutes, we got a smaller APK.
Let me go back, and this is done.
So, is the cake is done.
Now, we have optimized the startup time of Pocket Casts.
And you can see a 17% improvement on main thread CPU.
And most importantly, we see a time to initial display improvement of also 17% from 400 milliseconds to 380 milliseconds.
That's great, in about a couple of minutes.
And what did this do?
It run the Android Docs fetch command, so it learned how to do baseline profile and how to update it.
It run the profiler command twice, one before and one after, and compare the two startups.
And we got an improvement here.
So that is on this third demo, and the last demo.
And that's all I have for you except one more thing.
Yeah, I like terminals.
That That's me.
There's one thing that I wanted to show you, all of this is released.
You can go, you can download Android CLI, you can try them.
But we are very excited about this.
If you were in the keynote, pretend you didn't see the keynote, so.
I'm going to show you this thing that we built.
Can we go back to think we can go back to the demo unit, please?
Oh.
Can we go back to demo one, please?
Thank you.
So, I have a bunch of APKs here.
And I'm going to run I have a Compose APK.
This is These are regular off-the-shelf APKs built for Android x86.
And This is a regular app running fully.
Why this is, I find it super cool is, it's just a single process.
You can see Logcat in standard out.
There's nothing else running.
You can run obviously multiple of this.
It's super lightweight.
It doesn't need nested virtualization.
It runs on a VM.
It runs with your agent, if you have a cloud of agents, it would run there.
And let me show you how capable this is.
So, we have one of our our Google reference apps, Now in Android.
This app has network access.
And you can see the things.
In fact, Android Dev Summit 2022 is coming up, so be ready for it.
But, let me a bigger app, particularly a real app, the Pocket Casts app.
This app has actual SOs in it.
So, we have a translation layer to be able to run SOs natively on This is on Linux for now.
But the I'm not going to play a podcast, but we have audio.
And the last bit, to show you how powerful this can be, let's say you have a full-on native activity where the majority of this app is, I'm going to go easy, is an OpenGL.
It's an old OpenGL ES 1 app, but we also have a translation to run on desktop, and there we go, having a I'm playing.
Sorry.
We have this running on your desktop.
And that's it.
Thank you so much.
Back to Adarsh.
Thanks, Esteban.
So, the same capabilities you just saw Esteban demo from the command line is also incredibly useful to agents you use through desktop apps, like Google Antigravity, Claude Code, and Codex from OpenAI.
As a reminder, at I/O this year, we introduced support for Android development bundled directly inside Antigravity with the official Android CLI plug-in.
The plug-in bootstraps the agent with, of course, the Android CLI, but also official Android skills and knowledge.
So, the agent always has the most up-to-date guidelines and architectural standards, rather than outdated training data.
And today, Android CLI plug-in for Antigravity has been updated to build deeper integrations specifically for Android developers, starting with the ability to support rendering and viewing Compose Previews and interacting with devices directly from Antigravity.
Now, it's a lot cooler to show you, so let's do that.
So, here I am in Antigravity, and I'm just going to kick this off.
I've loaded the Pocket Casts app, and what I'm going to ask the agent to do is, hey, analyze one of these screens, which was built in views.
I've converted it to Compose, but help me optimize it for larger screens.
Make it adaptive.
Utilize more of that screen real estate.
And I gave it a few reference devices that it's going to work through and do some of those things.
While that is working away, let me just show you how easy it is to get set up.
In the side menu, all I have to go is to Customizations, and we can see there's a number of integrations available.
And under the Build with Google section is the Android CLI plug-in.
So here I can look at all the cool things that it does, a lot of which we've demoed today.
We can see the skills that come bundled with the plug-in.
Of course, it enables you to then add a whole number of others skills, and some of the deeper integrations that we're going to talk about and show you right now.
So, if I go back here, it's just kind of doing some of the final steps.
And what it's going to do is actually analyze that preview and show me what it sees as, along with some of the guidance and optimizations that it recommends.
So we'll just give it a moment here.
Obviously everyone's wake waking up, starting up their agent, so I'm competing a little bit.
Okay, cool.
So it's done that.
As I can see it's set up some of those reference devices, and I can click this chip here that's very useful for me.
So to just seamlessly pop out this view, I'm staying in the flow, I'm looking at some of the guidance that it's providing, saying, "Hey, you know, obviously like there's a vertical layout, especially for some of these wider screens, that's not useful.
Let's go into a dual-pane kind of layout."
So, we're not here to kind of test Antigravity's ability to solve that, I've actually gone and done that, so I'm just going to switch branches.
To just show you how quickly it is to iterate, I'm just going to reload, and, of course, I can be in a conversation with the agent, I can make tweaks here and there, I don't have to manually even reload the previews.
The agent will do it automatically for me, and without having to do expensive build and deploy, I can iterate super quickly right into right inside Antigravity.
Of course, we also do want to see how this looks on a real device.
So, like for that, I can open up Android Device Hub.
So, let me just back up here real quick.
So, if this looks familiar to you, it is very similar to the device manager in Android Studio, where I can see a lot of the devices I already have set up.
If I connected to remote devices, I would also see that here.
And if there's a device I need that Android CLI can create, I can create it pretty quickly here, too.
Again, all of this is powered by under Android CLI under the hood.
So let me go here, and I can connect to the device.
And if I unlock it, oops.
I can see that updated app right here.
And I can interact with it, verifying that the app is behaving how I expect.
And I can also check that it is adaptive.
Let me just go back here.
Look at these handy buttons I can use.
Okay.
Oh, no.
Okay, there we go.
Let me put this into a split screen layout, and I can see it automatically adapts to that single pane layout.
And if I open this back up again, again, it adapts back and forth.
So, that is the updated Android CLI plug-in for Google Antigravity, not not only with all the latest capabilities that we demoed for you, but these deep integrations.
We also have official plug-ins for Claude Code and Codex available today with some of these deeper integrations coming soon.
Okay.
All right.
So with Android CLI skills and our official agent plug-ins, we are enabling agents to accomplish much more at higher quality and in less time.
For example, here, we asked Claude Opus to navigate an app across six distinct user journeys on six different devices and use Android CLI to find and plug memory leaks.
But we also asked Claude Opus to try the exact same challenge without Android CLI.
The impact that Android CLI has had on agent efficiency is clear.
When using Android CLI, we can see that Claude agents are able to complete tasks twice as fast, using significantly fewer tokens.
Android CLI isn't just a nice convenience for developers, it fundamentally changes how efficiently AI agents navigate challenging Android developer tasks.
And we also saw similar gains with many of the other commands we introduced today.
For example, with preview, instead of slow compile and run loops to inspect composables, agents render previews instantly and are able to show that to you, reducing iteration times by up to 77%.
With the Analyze command, complex build and inspections that took dozens of round trips boil down to a single structured command, resulting in using five and a half fewer output tokens.
And the CLI's Input command now uses structured semantic actions to avoid agent hallucinations and complex coordinate calculations, resulting in 25% faster overall task execution.
So, the takeaway here is simple: giving agents structured Android-native CLI tools doesn't just save time and tokens, it eliminates friction right where where most agents fail.
So, while these were our internal tests, we do invite you all to update Android CLI and try it out yourself.
All right.
Now let's go to the destination built end to end for the Android developer, talking editor, build system, emulator, profilers, inspectors, and so much more.
Of course, I'm talking about Android Studio.
So, Android Studio led agent-driven development in the IDE by deeply integrating Gemini.
And today, it's never been more easy to access Gemini from Android Studio.
You can now use quota from your existing Google AI Pro or AI Ultra subscription, or connect through your organization's Gemini Enterprise account.
But we've also heard from developers, "Hey, me and my team, we already have an agent that we use that isn't Gemini.
We pay for it, we've configured it.
How can we use that in Android Studio?"
Well, let's take a quick look at how you can do just that with support for Bring Your Own Agent in Android Studio Rabbit 2.
If we can go to the demo unit.
Great.
Okay, cool.
So, here I am with the Pocket Casts app inside Android Studio.
And the first thing I want to do is set up my agent.
So, I'm going to go to the Settings window.
Under Tools, AI, and then Agents, I can see the new screen to set up my the agent of my choice.
There is already a built-in agent that ships with Android Studio, but as you can see, I've configured a few more and authenticated, including the Claude agent, which already uses my subscription that I use with Claude Code outside of Android Studio.
But I can also, you know, point it to an API key or config.
And if you don't see the agent that you prefer or use, there is the growing marketplace of agents that you can choose from.
So, definitely check that out.
All right.
I've done that, so I'm going to jump into the Agent window.
Let's start with something simple.
Hey, who are you?
And what Android Studio tools do you have access to?
Okay.
So, here I already selected the Claude agent, but you can see that I can select from any of the other agents I have configured, as well as choosing any of the models I have access to via my subscription.
And here it's confirmed, "Hey, I am Claude Code.
You're using Opus 5.5."
And here's all the tools that we've craft crafted over the years optimized for Android development, that the agent now has access to via Android Studio.
From finding and modifying files, doing static analysis and analyzing files, building, syncing, rendering Compose previews, deploying device, and, of course, access to a wealth of knowledge baked right in.
Okay, let's try something a little bit more challenging.
Got to copy my little cheat sheet here.
We know that as agents are generating more and more code every day, it's still a challenge to review all that code.
And you as developers are still responsible for the quality of the code that ships to your users, and we wanted to help with that.
So, here is the Change Review feature.
Let's go get.
And what it's going to do is it doesn't have to be changes that are local.
I'm just pointing this to a pull request that is already part of the version history for Pocket Casts, and it's going to analyze that.
This takes a little bit of time, so I've already generated one.
So, here it is.
I don't need to go through the 15 files that were changed or the hundred 800 lines of code.
I can go here, and immediately it tells me the nature of the changes within this pull request.
And essentially, the team added full-swipe gestures to add or remove bookmarks.
But already, I can see that there are some issues that the Change Review feature has found.
And essentially what happens is that it triggers a full-swipe action at every recomposition.
So, if I did something like delete a bookmark, I would see that confirmation dialogue appear over and over again.
And it's super cool.
It pulled up these major issues, along with a number of other ones.
I can view and see, understand in-depth what the issues are.
It references the relevant code, and it has a fix locked and loaded.
And it's great, because I have full transparency into what the fix would be that gets sent to the agent.
And if there is anything that I want to modify, or I want to tweak, I can do that right here.
I can go through this list checking off the ones I want to fix.
And at the end, I can say, "Hey, fix all the selected issues."
But I can also create a walkthrough.
If I wanted to get even deeper into understanding how all these changes came together across different topics.
So here in the walkthrough, we can see the changes in this pull request grouped by topic.
And here we can see the issue that we were talking about a little earlier, where a full swipe action can run more than once while the row recomposes.
I can understand what the diff is, what the changes in the code were.
I can go along and accept as reviewed, these changes.
I can obviously jump into the editor if I wanted to go deeper, and of course, Android Studio makes it super easy to navigate your code base.
So that was AI Change Review and support for Bring Your Own Agent, both of which are in the stable version of Android Studio Rabbit 2 along with much more: from planning mode that helps you really craft more complex tasks alongside your agent, allowing you to do even more simultaneously through parallel chats, the ability to fix and debug issues, whether it's from the field or locally, access to offline Gemma 4, and so much more.
So if you're not on the latest Canary version, which is Android Studio Rabbit 3, do make sure you're on the latest stable version.
Okay, so we today we looked at modern Android development across three distinct surfaces.
In With Android CLI from the terminal, we're providing access to field metrics, the ability to connect to devices remote or local, the ability to analyze the performance of your app with complex profiling and tracing, and so much more.
And these commands are made all that more much more powerful in the hands of agents like Google Antigravity.
Where the official Android CLI plugin has been updated to provide deeper integrations crafted specifically for Android developers.
And again, we also have official plugins for Codex and Claude Code with some of those deeper integrations coming a little bit later.
And then finally, we showed how we're bringing Bring Your Own Agent via ACP directly into Android Studio Rabbit 2, along with compelling features that harness those agents, such as AI Change Review.
But in the Canary channel, there's even more that we haven't had a chance to touch on, like our declarative build system built specifically for Android called Lightbuild, as well as migration assistants that leverage agents to help you more quickly, accurately, and at high quality convert your views over to Compose.
Now, this talk was a rapid overview of a lot of great areas we're investing in.
So to go deeper on the topics we touched on today, do check out some of these other amazing sessions we have here at the summit.
But before we let you go, we hope that one message that you heard loud and clear, whether it was Android prototype, or us bringing you know, choose your own a Bring Your Own Agent into Android Studio, or the invest- investments we've made into Android CLI, we are listening to the community, and we really need your feedback to make sure that we are serving you as best as we can.
So do scan this QR code, answer a few questions to please continue giving us that great feedback.
And with that, that's it for Esteban and I.
Thank you all so much, and have a fantastic Android Dev Summit.