An early-stage native Android app for on-device Word/Excel/PowerPoint editing via structured AI tools, cloud or fully offline.
C#
2
6 commits
updated Aug 13, 2026
OfficeGemma is an early proof of concept for a native Android app that opens, edits, and renders real Word, Excel, and PowerPoint files entirely on-device — no backend, no MCP stdio, no subprocess, no localhost server. An AI agent (cloud or fully offline) edits the open document through a small set of structured tools; it never runs shell commands and never touches the filesystem beyond the document itself.
This is a glimpse of where on-device document editing is headed, not a finished product. It genuinely works end to end, but the results are closer to a rough sketch than a polished document — the agent is explicitly told to keep edits simple rather than pretty — and the local model still fumbles tool calls often enough that you'll notice. See Status below before you point it at a file you care about.

.docx/.xlsx/.pptx from Android's document picker. The app
copies it into app-private storage and opens it through an in-process
document engine — the same engine renders it to HTML for a live preview
inside a WebView, patched in place on every edit (not a full reload).document_outline, document_get, document_query,
document_set, document_add, document_remove, document_batch).
These are the only way the model can touch the document; there is no
shell, no subprocess, no arbitrary file access.This is a 0.1.0, actively-developed proof of concept, not a finished
product. It is a demonstration that on-device document editing by an LLM
is possible and can be made reasonably safe (structured tools only, no
shell, no arbitrary file access) — it is not yet something to rely on.
Known rough edges:
finetuning/) is a work in progress; expect tool-calling
errors, dropped requests, or the agent giving up mid-task, especially on
smaller/older devices or with anything but simple requests. The Gemma 4
E4B option is an even rawer base model with no fine-tuning for this tool
schema yet.officecli.mobilecore, a wrapper over the
OfficeCLI engine). Neither
officecli.mobilecore nor the Android multi-targeting change to
officecli itself has been accepted upstream yet, so this repo vendors
them via a git submodule at vendor/OfficeCLI — a
fork (IoannisMaras/OfficeCLI-android,
branch feat/android-multitargeting) pinned by commit. Once the PR to
iOfficeAI/OfficeCLI is opened and merged, the submodule should be
repointed at upstream main (or replaced with a published NuGet package)
and the fork retired. Clone with git clone --recurse-submodules, or run
git submodule update --init after a plain clone.assets/.$env:LOCALAPPDATA\Android\Sdk or pass -AndroidSdk to
the build script)Clone with submodules (or run git submodule update --init after a plain
clone):
git clone --recurse-submodules <this repo's URL>
Restore, then build. A plain dotnet build's implicit restore parallelizes
project restores and can race on a clean checkout, missing the vendored
submodule's opt-in Android target across two levels of project references
(seen intermittently, not on every clean checkout) — restore first,
explicitly, with parallel restore off:
dotnet restore src\OfficeCliMobile.Android\OfficeCliMobile.Android.csproj `
-p:AndroidSdkDirectory=$env:LOCALAPPDATA\Android\Sdk `
-p:IncludeAndroidTarget=true `
-p:RestoreDisableParallel=true
dotnet build src\OfficeCliMobile.Android\OfficeCliMobile.Android.csproj `
-p:AndroidSdkDirectory=$env:LOCALAPPDATA\Android\Sdk `
-p:IncludeAndroidTarget=true `
--no-restore
IncludeAndroidTarget=true opts the vendored officecli/officecli.mobilecore
submodule into its net10.0-android target, which is off by default so the
upstream desktop CLI's own build/publish/CI is unaffected (see
vendor/OfficeCLI). Run the restore once; run-android-native.ps1
below re-restores itself the same way for every later build.
Full build, install, and launch on a connected device:
.\run-android-native.ps1
By default this does a fast incremental deploy (assemblies only — requires the app to already be installed once). Useful flags:
-Standalone — full standalone build and signed-APK install
(adb install -r --no-incremental); required after any native/AOT-
affecting change, since fast deployment loads assemblies outside the APK.-InstallOnly — reinstall the last build without rebuilding.-RestartOnly — force-stop and relaunch without building or installing.-Fast — explicit fast incremental deploy (the default when no other
flag is passed).The script requires exactly one authorized adb-connected device.
OfficeGemma/
├── src/OfficeCliMobile.Android/ the app: UI, agent orchestration, LiteRT-LM runtime
│ ├── MainActivity.cs fields + activity lifecycle only (no XML layouts)
│ ├── MainActivity.UiKit.cs generic view-builder atoms (Row, Label, buttons, Dp, ...)
│ ├── MainActivity.Workspace.cs app bar, document bar, AI bubble, empty state
│ ├── MainActivity.Assistant.cs "Edit with AI" sheet, agent run + log
│ ├── MainActivity.Document.cs open/create/save/close, WebView link handling
│ ├── MainActivity.Settings.cs the Settings sheet
│ ├── OnDeviceDocumentAgent.cs agent loop (cloud provider), tool execution/verification
│ ├── OnDeviceDocumentAgent.ToolSchema.cs system prompt + tool schema/descriptions
│ ├── GemmaLocalRuntime.cs on-device Gemma via LiteRT-LM, tool-call bridging
│ ├── GemmaModelManager.cs resumable/verified model download, model catalog
│ ├── DiagnosticLog.cs bounded, redacted local diagnostic log
│ └── Resources/ Material3 theme, icons, adaptive launcher icon
├── assets/ logo/branding source files
├── docs/screenshots/ app screenshots
├── finetuning/ status of the Gemma tool-calling fine-tune
├── vendor/OfficeCLI/ git submodule: the document engine (see "Status")
└── run-android-native.ps1 build/install/launch script
See CONTRIBUTING.md — it points at where help actually matters right now (upstreaming the OfficeCLI fork, the Gemma fine-tune, device testing) instead of prescribing process.
Apache License 2.0 — see LICENSE.
An early-stage native Android app for on-device Word/Excel/PowerPoint editing via structured AI tools, cloud or fully offline.
C#
2
6 commits
updated Aug 13, 2026
OfficeGemma is an early proof of concept for a native Android app that opens, edits, and renders real Word, Excel, and PowerPoint files entirely on-device — no backend, no MCP stdio, no subprocess, no localhost server. An AI agent (cloud or fully offline) edits the open document through a small set of structured tools; it never runs shell commands and never touches the filesystem beyond the document itself.
This is a glimpse of where on-device document editing is headed, not a finished product. It genuinely works end to end, but the results are closer to a rough sketch than a polished document — the agent is explicitly told to keep edits simple rather than pretty — and the local model still fumbles tool calls often enough that you'll notice. See Status below before you point it at a file you care about.

.docx/.xlsx/.pptx from Android's document picker. The app
copies it into app-private storage and opens it through an in-process
document engine — the same engine renders it to HTML for a live preview
inside a WebView, patched in place on every edit (not a full reload).document_outline, document_get, document_query,
document_set, document_add, document_remove, document_batch).
These are the only way the model can touch the document; there is no
shell, no subprocess, no arbitrary file access.This is a 0.1.0, actively-developed proof of concept, not a finished
product. It is a demonstration that on-device document editing by an LLM
is possible and can be made reasonably safe (structured tools only, no
shell, no arbitrary file access) — it is not yet something to rely on.
Known rough edges:
finetuning/) is a work in progress; expect tool-calling
errors, dropped requests, or the agent giving up mid-task, especially on
smaller/older devices or with anything but simple requests. The Gemma 4
E4B option is an even rawer base model with no fine-tuning for this tool
schema yet.officecli.mobilecore, a wrapper over the
OfficeCLI engine). Neither
officecli.mobilecore nor the Android multi-targeting change to
officecli itself has been accepted upstream yet, so this repo vendors
them via a git submodule at vendor/OfficeCLI — a
fork (IoannisMaras/OfficeCLI-android,
branch feat/android-multitargeting) pinned by commit. Once the PR to
iOfficeAI/OfficeCLI is opened and merged, the submodule should be
repointed at upstream main (or replaced with a published NuGet package)
and the fork retired. Clone with git clone --recurse-submodules, or run
git submodule update --init after a plain clone.assets/.$env:LOCALAPPDATA\Android\Sdk or pass -AndroidSdk to
the build script)Clone with submodules (or run git submodule update --init after a plain
clone):
git clone --recurse-submodules <this repo's URL>
Restore, then build. A plain dotnet build's implicit restore parallelizes
project restores and can race on a clean checkout, missing the vendored
submodule's opt-in Android target across two levels of project references
(seen intermittently, not on every clean checkout) — restore first,
explicitly, with parallel restore off:
dotnet restore src\OfficeCliMobile.Android\OfficeCliMobile.Android.csproj `
-p:AndroidSdkDirectory=$env:LOCALAPPDATA\Android\Sdk `
-p:IncludeAndroidTarget=true `
-p:RestoreDisableParallel=true
dotnet build src\OfficeCliMobile.Android\OfficeCliMobile.Android.csproj `
-p:AndroidSdkDirectory=$env:LOCALAPPDATA\Android\Sdk `
-p:IncludeAndroidTarget=true `
--no-restore
IncludeAndroidTarget=true opts the vendored officecli/officecli.mobilecore
submodule into its net10.0-android target, which is off by default so the
upstream desktop CLI's own build/publish/CI is unaffected (see
vendor/OfficeCLI). Run the restore once; run-android-native.ps1
below re-restores itself the same way for every later build.
Full build, install, and launch on a connected device:
.\run-android-native.ps1
By default this does a fast incremental deploy (assemblies only — requires the app to already be installed once). Useful flags:
-Standalone — full standalone build and signed-APK install
(adb install -r --no-incremental); required after any native/AOT-
affecting change, since fast deployment loads assemblies outside the APK.-InstallOnly — reinstall the last build without rebuilding.-RestartOnly — force-stop and relaunch without building or installing.-Fast — explicit fast incremental deploy (the default when no other
flag is passed).The script requires exactly one authorized adb-connected device.
OfficeGemma/
├── src/OfficeCliMobile.Android/ the app: UI, agent orchestration, LiteRT-LM runtime
│ ├── MainActivity.cs fields + activity lifecycle only (no XML layouts)
│ ├── MainActivity.UiKit.cs generic view-builder atoms (Row, Label, buttons, Dp, ...)
│ ├── MainActivity.Workspace.cs app bar, document bar, AI bubble, empty state
│ ├── MainActivity.Assistant.cs "Edit with AI" sheet, agent run + log
│ ├── MainActivity.Document.cs open/create/save/close, WebView link handling
│ ├── MainActivity.Settings.cs the Settings sheet
│ ├── OnDeviceDocumentAgent.cs agent loop (cloud provider), tool execution/verification
│ ├── OnDeviceDocumentAgent.ToolSchema.cs system prompt + tool schema/descriptions
│ ├── GemmaLocalRuntime.cs on-device Gemma via LiteRT-LM, tool-call bridging
│ ├── GemmaModelManager.cs resumable/verified model download, model catalog
│ ├── DiagnosticLog.cs bounded, redacted local diagnostic log
│ └── Resources/ Material3 theme, icons, adaptive launcher icon
├── assets/ logo/branding source files
├── docs/screenshots/ app screenshots
├── finetuning/ status of the Gemma tool-calling fine-tune
├── vendor/OfficeCLI/ git submodule: the document engine (see "Status")
└── run-android-native.ps1 build/install/launch script
See CONTRIBUTING.md — it points at where help actually matters right now (upstreaming the OfficeCLI fork, the Gemma fine-tune, device testing) instead of prescribing process.
Apache License 2.0 — see LICENSE.