Posted by Terence Zhang – Developer Relations Engineer, and Adrien Couque – Software program Engineer
AI can improve the person expertise and productiveness of Android apps. If you happen to’re seeking to construct GenAI options that profit from extra knowledge privateness or offline inference, on-device GenAI is an effective selection because it processes prompts instantly in your gadget with none server calls.
Gemini Nano is probably the most environment friendly mannequin in Google’s Gemini household, and Android’s foundational mannequin for working on-device GenAI. It is supported by AICore, a system service that works behind the scenes to centralize the mannequin’s runtime, guarantee its secure execution, and defend your privateness. With Gemini Nano, apps can provide extra personalised and dependable AI experiences with out sending your knowledge off the gadget.
On this weblog publish, we’ll present an introductory look into how Gemini Nano and AICore work collectively to ship highly effective on-device AI capabilities whereas prioritizing customers’ privateness and security.
Personal Compute Core (PCC) compliance
At Google I/O 2021, we launched Personal Compute Core (PCC), a safe atmosphere designed to maintain your knowledge non-public. At I/O in 2024, we shared that AICore is PCC compliant, that means that it operates underneath strict privateness guidelines. It may solely work together with a restricted set of different system packages which are additionally PCC compliant, and it can not instantly entry the web. Any requests to obtain fashions or different info are routed by means of a separate, open-source companion APK known as Personal Compute Companies.
This framework helps defend your privateness whereas nonetheless permitting apps to learn from the ability of Gemini Nano. Think about a keyboard software utilizing Gemini Nano for a reply suggestion function. With out PCC, the keyboard would require direct entry to the dialog context. With PCC, the code that has entry to the dialog runs in a safe sandbox and interacts instantly with Gemini Nano to generate strategies on behalf of the keyboard. This enables the keyboard app to learn from Gemini Nano’s capabilities with out instantly accessing or storing delicate dialog knowledge. You’ll find out extra about how this works within the PCC Whitepaper.
Defending your privateness by means of knowledge isolation
AICore is constructed to isolate every request to guard your privateness. This prevents apps from accessing knowledge that doesn’t belong to them. Requests are dealt with independently and processed from a single app at a time to mitigate the chance of knowledge being uncovered to different apps.
Moreover, AICore would not retailer any document of the enter knowledge or the ensuing outputs after processing every request. This design, mixed with the truth that Gemini Nano’s inference occurs instantly in your gadget, helps guarantee your app’s knowledge stays non-public and safe.
Prioritizing Security in Gemini Nano

We’re dedicated to constructing AI responsibly, and that features ensuring Gemini Nano is secure. We have applied a number of layers of safety to restrict dangerous or unintended outcomes:
- Native mannequin security: All Gemini fashions, together with Gemini Nano, are educated to be safety-aware out of the field. This implies security issues are constructed into the core of the mannequin, not simply added as an afterthought.
- Security conscious fine-tuning: We use a LoRA fine-tuning block to adapt Gemini Nano for the wants of particular apps. After we prepare the LoRA block, we incorporate security knowledge particular to the app’s use case to protect and even improve the mannequin’s security options throughout fine-tuning the place relevant.
- Security filters on enter and output: As a closing safeguard, each the enter immediate and outcomes generated by the Gemini Nano runtime are evaluated towards our security filters earlier than offering the outcomes to the app. This helps forestall unsafe content material from slipping by means of, with none loss in high quality.
These layers of safety work collectively to make sure that Gemini Nano offers a secure and useful expertise for everybody.
Get began
Be taught extra about Gemini Nano for app improvement, and strive it out in your personal app!
Make sure to try the opposite wonderful AI on Android Highlight week content material!