Educational purposes only. This repository is a reverse-engineering and learning exercise. It is not affiliated with, endorsed by, or connected to Anthropic in any way.
This project is a Kotlin reconstruction of the Claude Android application, built by analyzing the decompiled APK using Smali bytecode analysis. The goal is to understand the architecture, networking patterns, and component structure of a production-grade Android app.
This repository exists solely for educational purposes β to study Android architecture, Jetpack Compose patterns, service design, and networking implementation. It is not intended for distribution, commercial use, or as a functional replacement for the original application.
The code in this repository may differ from, be incomplete, or contain errors compared to the original Anthropic application. The reconstruction is based on Smali decompilation, which involves interpretation of obfuscated bytecode. Some logic may be inaccurate, missing, or approximated.
If you attempt to compile and run this project on a physical device or emulator, it will most likely fail for the following reasons:
- Missing signing keys: The original Claude app is signed with Anthropic's private certificate.
- Missing API keys and secrets: Firebase, Datadog, Sentry, Segment, and other third-party services require credentials (
google-services.json, API tokens, etc.) that are not included in this repository. - Play Protect restrictions: Android's Play Protect system may block installation without a matching signature.
- Missing
google-services.json: Excluded from the repo via.gitignore. Firebase will fail without it. - Server-side authentication: The app communicates with Anthropic's backend using session tokens obtained through a proprietary login flow.
claudio_kotlin/
app/src/main/java/com/anthropic/claude/
β
βββ agentchat/ AgentChatDestination
β
βββ analytics/ AnalyticsProperties, AnalyticsTraits
β βββ ads/ GooglePlayReferrer
β βββ events/ AnalyticsEvent, AnalyticsEnums (AgeSignals/AppLaunch/PushFailureCause),
β β LifecycleNetworkingEvents (AgeSignalsEvents/AppStartEvents/
β β CronetAnalyticsEvents/NetworkingEvents + enums),
β β AppLifecycleEvents (AgeSignalsEvents/AppStartEvents),
β β PushEvents, ScreenSource
β βββ screens/ AnalyticsScreens
β
βββ api/
β βββ account/ Account, AccountProfile, AccountSettings, AccountConsentModels,
β β AccountDeletableResponse, AccountId, AccountGrowthBookModels
β β (CurrentUserAccess, FeatureAccess, GrowthBookExperiment/Result/
β β Feature/Rule/Track, UpdateOrbitSettingsRequest),
β β CheckConsentRequest, FeatureAccessStatus, UpdateAccountProfileRequest,
β β UpdateAccountRequest, GrowthBookModels, GrowthBookSchema,
β β Membership, Organization, OrganizationSettings, RavenType,
β β SubscriptionLevel, BillingType
β βββ artifacts/ ArtifactModels
β βββ chat/ ChatConversation, ChatConversationSettings, ChatCompletionEvent,
β β ChatCompletionRequest, ChatFeedback, ChatFeedbackType,
β β ChatMessage, ChatResponseTypes, ChatModeModels,
β β ChatUtilityRequests (GenerateChatTitleRequest, FillSensitiveTextRequest),
β β ConversationSearch, CreateChatRequest, DeleteMessageFlagRequest,
β β InputMode, MessageAssets, MessageAttachment,
β β MessageFileAttachments (MessageImageFile, MessageDocumentFile, MessageBlobFile),
β β MessageFileTypes (MessageFile sealed, RenderingMode),
β β MessageSender, MoveChatsRequest, RecordToolApprovalRequest,
β β RecordToolResultRequest, SensitiveTextField, ToolState,
β β UpdatableChatConversationSettings, UpdateChatRequest
β β βββ citation/ CitationModels
β β βββ messages/ BellNoteDelta, CompactionStatus, CompactionStatusEvent,
β β β CompletionMessage, ContentBlocks (ThinkingBlock, VoiceNoteBlock),
β β β ContentBlock, ContentBlockDelta, FlagBlock,
β β β McpAuthRequiredEvent, MessageDelta, MessageFlag,
β β β MessageStreamEvents, SseEventTypes (MessageStartEvent,
β β β MessageStopEvent, ConversationReadyEvent, ContentBlockStartEvent,
β β β ContentBlockDeltaEvent, MessageDeltaEvent, FlagDelta,
β β β ThinkingSummaryDelta, CitationStartDelta, CitationEndDelta),
β β β StreamDeltaModels, StreamEvent, TextBlock, TextThinkingDeltas,
β β β ThinkingSummary, ToolResultBlock, ToolUseBlock,
β β β ToolUseBlockUpdateDelta, UnknownContentBlock
β β βββ tool/ ArrayProperty, BooleanProperty, GenericSourceMetadata,
β β GoogleDocMetadata, InputSchema, IntegerProperty, JsonBlockDisplayContent,
β β KnownTool, NumberProperty, ObjectProperty, StringProperty,
β β TableDisplayContent, ToolResultImage, ToolResultImageGallery,
β β ToolResultText, ToolSchemaDisplayModels, CustomToolDefinition
β βββ common/ ConsistencyLevel, RateLimit, RateLimitWithinLimit
β βββ consent/ ConsentModels, RevokeConsentRequest, UserConsentRequest
β βββ conway/ ConwayModels
β βββ errors/ ApiErrors
β βββ events/ BatchEventModels (EventAuth, BatchEventLoggingRequest),
β β EventLoggingRequests (FeatureEvaluation, ExperimentExposure),
β β ExperimentModels (ExperimentMetadata, GrowthBookExperiment),
β β GrowthBookEventData (GrowthBookExperimentEventData,
β β GrowthBookFeatureEvaluationEventData)
β βββ experience/ ExperienceModels, Experience, SpotlightContent, BannerContent,
β β ChatTooltipContent, ExperienceDismissed, ExperienceShown,
β β ExperienceRateLimit, ExperienceTrackModels (ExperienceActionRequest,
β β ExperienceRules, TrackActionedData, TrackDismissedData, TrackShownData),
β β OpenLinkAction, RefreshCacheAction
β βββ export/ ExportModels
β βββ feature/ Feature, FeatureSettings
β βββ feedback/ FeedbackModels
β βββ kyc/ KycModels
β βββ login/ CodeConfiguration, SendMagicLinkRequest,
β β VerifyAuthRequests (VerifyGoogleMobileRequest, VerifyMagicLinkRequest)
β βββ mcp/ McpAuthStatus, McpModels, McpServer, McpTool, McpToolAnnotations,
β β DirectoryServer, DirectoryServerType,
β β AttachMcpPromptRequest, CreateMcpRemoteServerRequest
β βββ memory/ MemorySynthesisResponse
β βββ mobile/ MobileModels
β βββ model/ ModelOption, ThinkingModeOption, ModelCapabilities
β βββ notification/ NotificationModels, NotificationPreferenceModels,
β β NotificationPreferenceParams (Preferences,
β β NotificationPreferencesUpsertParams,
β β NotificationPreferencesUpdateParams), TestPushRequest
β βββ orbit/ OrbitModels
β βββ project/ Project, ProjectActorAccount, ProjectDoc, ProjectDocsCreateParams,
β β ProjectEnums, ProjectMutationParams (ProjectCreateParams,
β β ProjectUpdateParams), ProjectType, PaginatedProjectsResponse
β βββ purchase/ PurchaseReceipt, VerifyPurchaseResponse
β βββ result/ ApiResult<T> sealed (Success/Error/NetworkError)
β βββ share/ ChatSnapshotModels
β βββ styles/ Style, StyleModels, CustomStyle, DefaultStyle, StylesConfig
β βββ sync/ AuthStatus, SyncAuthModels, FinishAuthRequest
β βββ tasks/ ApproveTaskRequest, SendTaskMessageRequest, TaskModels,
β β TaskAgentModels, McpToolUseEvent, CustomToolUseEvent,
β β AgentToolUseEvent
β βββ trusteddevice/ EnrollTrustedDeviceRequest, EnrollTrustedDeviceResponse
β βββ usage/ UsageModels
β βββ verification/ PhoneVerificationModels
β βββ wiggle/ WiggleDeleteFileRequest, WiggleModels
β
βββ app/
β βββ main/ MainAppScreens (LoggedIn/LoggedOut/InternalSettings/
β β β RequiredUpdate/AddAccount/UiDemoApp)
β β βββ loggedin/ BootstrapScreen, LoggedInScreens
β β β (ClaudeApp/Onboarding/AccountVerification/SupervisedUserBlocked)
β β βββ loggedout/ LoggedOutAppDestination (LoginApp)
β βββ appstart/ AppStartResponse, CachedData
β βββ onboarding/v2/ OnboardingPage (7-step sealed)
β βββ verification/ VerificationScreens
β βββ ChatAppDestination, ClaudeAppFullScreenOverlay, ClaudeAppListDestination,
β β ClaudeAppOverlayExtra (None/CreateEnvironment/CreateProject),
β β ExperienceSpotlightSheet, SettingsScreenParams
β
βββ application/ ClaudeApplication
β
βββ artifact/
β βββ details/ ArtifactFullScreenParams
β βββ dialog/ ArtifactDialogModels
β βββ model/ ArtifactMetadata, ArtifactType (9-subtype sealed)
β βββ sheet/ ArtifactSheetParams
β
βββ audio/ MicrophoneAudioException
β
βββ bell/
β βββ api/ BellApiModels
β βββ assist/ ClaudeRecognitionService, ClaudeVoiceInteractionService,
β β ClaudeVoiceInteractionSessionService, ClaudeVoiceSession
β βββ tts/ TTSPlaybackService
β βββ BellModeService, VoiceSessionSummary
β
βββ chat/
β βββ bottomsheet/ ChatScreenActionSheets, ChatScreenApprovalSheetDestination
β β β (ToolApproval/LocalToolApproval/SshHelplines),
β β β ChatScreenBottomSheetModels, ChatScreenContentDestinations,
β β β ChatScreenMediaSheetDestination (Feedback/PreviewImage/
β β β PreviewPdf/ViewCombinedSources),
β β β ChatScreenModalDestinations (ChatScreenModalBottomSheetDestination,
β β β ChatScreenArtifactSheetDestination2),
β β β ChatScreenModalBottomSheetExtras, PreviewAttachment, PreviewLink,
β β β ViewAllWiggleArtifacts, ViewCombinedSources, ViewResearchDetails, ViewSources
β β βββ model/ ChatBottomSheetModels,
β β β ModelSelectorBottomSheetDestination (Closed/SelectModel/MoreModels)
β β βββ options/ ChatOptionsBottomSheetDestination (Closed/AddToChat/Connectors/
β β ConnectorDirectory/ConnectorDirectoryDetail/AddFromMcpServer/
β β McpServerTools/McpPromptTemplate/SelectProject/SelectStyle/SelectToolAccess),
β β ConnectorDirectoryDestinations
β βββ dialogs/ ChatScreenDialog, ChatScreenDialogFull
β β (Dismissed/Rename/Delete/StopResearch/VoiceShortcut/ShareArtifact)
β βββ input/draft/ DraftModels
β βββ menu/ ChatItemMenuDialogDestination
β β (Rename/Dismissed/Delete/ChangeProject)
β βββ modelselector/ ModelRedirect
β βββ parse/ ParsedContentBlock
β β βββ sse/ ServerSentEvents
β βββ queue/ QueueModels
β βββ share/ ChatShareModels
β βββ ChatScreenOverlay, ChatScreenOverlayFull (BrowserTakeover/None),
β β ChatScreenParams, MessageSseService
β
βββ chatlist/all/
β βββ bottomsheet/ AllChatsListBottomSheetDestination
β βββ overlays/ AllChatsListOverlay
β
βββ code/remote/
β βββ bottomsheet/ CodeRemoteBottomSheetModels
β βββ notification/ CCRPermissionActionReceiver/Worker,
β β SessionReplyActionReceiver/Worker
β βββ CodeRemoteModels
β
βββ configs/
β βββ flags/ AgentChatOnboardingConfig, AgentChatWorkerTypesConfig,
β β AgentMcpConfigs, ConditionalMcpDirectoryServersConfig,
β β FileUploadConfig, FlagConfigs, McpQueueSearchConfigs
β β (MessageQueueConfig/TaskAgentOverridesDebugConfig/ToolSearchConfig),
β β OnboardingConfig, SendRetryConfig, SseConfig,
β β StreamSmoothingConfig, ToolQueueConfigs, UploadConfig
β βββ FlexibleUpdateConfig, GrowthBookConfigs, MobileObservabilityConfig
β
βββ connector/auth/ McpAuthException, McpConnectorAuthException
β
βββ conway/
β βββ protocol/ ConwayProtocol, ConwayProtocolExtras
β βββ AppForegroundDetector, ConwayAppScreen, ConwayScopeHolder, ConwayWakeWorker
β
βββ core/
β βββ logging/ EmptyDestination
β βββ telemetry/ SilentException
β
βββ db/ ClaudeDatabase (table name constants stub)
β
βββ deeplink/ DeepLinkActivity
βββ firebase/fcm/ AnthropicFirebaseMessagingService
β
βββ login/ AuthIntentData (MagicLinkIntentData/SSOIntentData),
β LoginNavigationScreens, LoginScreensFull
β (Welcome/MagicLinkSent/SupervisedUserBlocked),
β LoginStateModels, MagicLinkSentConfig,
β OverlayScreensFull (None/MagicLinkVerify)
β
βββ mainactivity/ AssistantOverlayActivity, IntentRouter, MainActivity
β
βββ mcpapps/
β βββ transport/ HostCapabilities, HostContext, InitializeResult,
β β JsonRpc, McpCapabilities, UiResources
β βββ McpAppModels
β
βββ model/ IncomingPayload
β
βββ models/
β βββ organization/
β β βββ configtypes/ AlarmCreateInputDescriptions, AvailableModelsConfig,
β β β BetaToolsConfig, CalendarSearchToolDescriptions,
β β β ChartDisplayInputDescriptions, ChartHealthUpsellConfigs
β β β (ChartDisplayXAxisDescription/ChartDisplayYAxisDescription/
β β β HealthConnectQueryQueriesItemDescription/UpsellConfig),
β β β ChartDisplaySeriesItemDescription, EventToolDescriptions
β β β (EventRecurrenceDescription/EventCreateNewEventsItemDescription/
β β β EventUpdateEventUpdatesItemDescription/EventCreateInputDescriptions/
β β β EventSearchInputDescriptions), GroveConfig, GroveConfigStrings,
β β β MobileAppUseToolConfig, ModelFallbacksConfig,
β β β ProjectPromptStarters, ProjectsLimitsConfig,
β β β ProjectTemplatesCopyConfig, SpeechInputConfig,
β β β StickyConfig, StickyDeedeeConfigs,
β β β ToolInputDescriptions, WidgetToolConfig
β β βββ DefaultModelConfig
β βββ StickyModelSelection
β
βββ networking/ β COMPLETE NETWORKING LAYER
β βββ ApiEndpoints.kt 55+ endpoint path constants grouped by domain:
β β Auth / Account / Consent / Chat / Files (Wiggle) /
β β Artifacts / Projects / Styles / Memory / Notifications /
β β Orbit / Tasks / Sessions / MCP / Experiences
β βββ AnthropicApiClient OkHttp client β 30+ typed methods using ApiEndpoints
β βββ NetworkInterceptors SessionInterceptor (cookie + headers) +
β β AuthExpiredInterceptor (401 β logout callback)
β βββ NetworkingModule Factory for OkHttpClient + AnthropicApiClient
β βββ ApiResult ApiResult<T> sealed (Success/Error/NetworkError) +
β β ClaudeApiError / ClaudeApiErrorDetail
β βββ cookies/serializer/ SerializableCookie
β
βββ policy/ PermissionsRationaleActivity
β
βββ project/
β βββ create/ CreateTemplateProjectScreenParams, UploadMaterialsScreenParams
β βββ details/ ProjectDetailsDialogDestination, ProjectDetailsScreenParams
β β βββ custominstructions/ CustomInstructionsDialogRoute
β βββ knowledge/ ProjectKnowledgeParams
β βββ menu/ ProjectMenuModels
β
βββ protos/push/ ConwayWakeRequest, LoggedInPushOperationsService,
β OpenChatRequest, OpenRequestProtos,
β PushOperationProtos (OpenCodeSessionRequest/OpenDispatchRequest/
β OpenOrbitRequest/PushOperationEnvelope), PushProtos
β
βββ sessions/
β βββ api/ ControlRequestContent
β βββ types/ BridgeEnvironmentInfo, ControlResponsePayload,
β CreatePullRequestRequest, CreateShareRequest,
β EnvironmentResource, GitProxyFileRequest, GitProxyRequests,
β PostTurnSummary, PrSubscriptionRequest,
β ReportClientPresenceRequest, RepoSessionRequests,
β ScanSecretsRequest, SendEventsRequest, SessionContext,
β SessionMutationParams (CreateSessionParams/
β EnvironmentCreateRequest/GenerateTitleAndBranchParams/
β GetBatchBranchStatusRequest/GetOrCreateDispatchSessionRequest/
β GitProxyCompareRequest/RepoResyncParams/
β SetPrAutoMergeRequest/UpdateSessionParams),
β SessionRequestModels, SessionResource, SessionTitleParams,
β SessionTypes, SharedSessionData
β
βββ settings/
β βββ internal/ InternalSettingsScreens
β β βββ growthbook/ GrowthBookModels
β βββ SettingsAppScreen
β
βββ stt/repo/ SpeechToTextLanguageNotFoundException
β βββ api/ STTApiMessage
β
βββ tasks/ui/ TasksBottomSheetDestination, TasksListOverlay
β
βββ tool/
β βββ calendar/ CalendarModels
β βββ custom/ CustomToolOutputs, DisplaySearchOutputs
β β (ImageSearchOutput/RecipeDisplayOutput),
β β PhoneCallMonitorEvent, PhoneUseOutput
β βββ mcp/ McpCapabilityFrames (ToolsFrame/ResourcesFrame/PromptsFrame),
β β McpFrames, ServerBaseFrame, ServerListFrame
β βββ model/ AlarmCreateV0Input, CalendarAlarmPhoneModels,
β β CalendarEventErrorModels,
β β CalendarSearchV0OutputCalendarSearchError,
β β CalendarUserToolInputs, ChartDisplayV0Input,
β β ComposeTaskInputs, ConnectorFileToolInputs,
β β DisplayToolInputs, EventCreateV0Input, EventSearchV0Input,
β β FileSearchHealthModels, HealthConnectQueryResult,
β β HealthMapModels, LocationFormComposeHealthModels
β β (UserLocationV0OutputUserLocationResult/RequestFormInputFromUserInput/
β β MessageComposeV0Input/MessageComposeV1Input/TaskProposeInput/
β β HealthConnectQueryV0OutputHealthConnectQueryResult),
β β LocationFormMessageModels, PhoneCalendarConnectorModels
β β (PhoneCallCompletedOutput/EventSearchV0Input/
β β SuggestConnectorsOutputConnectorsItem/EventCreateV0Input),
β β PhoneCallCompletedInput, RequestUserBrowserTakeoverOutput,
β β RichDisplayToolInputs (RecipeDisplayV0Input/PlacesMapDisplayV0Input/
β β ChartDisplayV0Input), SuggestConnectorsOutput,
β β TaskProposeOutput, TimeHealthInputs, TimerLocationToolInputs,
β β ToolErrorModels, ToolModels, ToolOutputResults, WebSearchTool
β βββ ui/chat/ ToolSheetDestinations
β βββ ToolIdentifier
β
βββ types/
β βββ environment/ AppEnvironment (PRODUCTION/STAGING/DEVELOPMENT)
β βββ strings/ CapabilityModeTypes (Capability/ToolSearchMode/ResearchMode),
β ChatId, DomainTypes (20+ inline value classes),
β McpStringTypes (McpToolKey/McpToolApprovalKey/McpServerId/
β MessageId/StyleId/EmailAddress/ThinkingMode),
β ModelId, OrgSessionIds (OrganizationId/AppSessionId),
β ProjectId
β
βββ ui/
β βββ code/ CodeUiModels
β βββ MainScreen
β
βββ wear/ AuthSyncCredentials, PhoneWearableListenerService,
β SerializableCookieSlim
βββ widget/ ClaudeAppWidgetReceiver
Total: 448 Kotlin files across 105+ packages (commit f7e1734)
| Layer | Technology |
|---|---|
| Language | Kotlin 2.1.20 |
| UI | Jetpack Compose 1.10.4 + Material3 1.5.0-alpha12 |
| Architecture | MVVM + StateFlow |
| Networking | OkHttp 5.5.0 + Retrofit 2.11.0 + Moshi 1.15.2 |
| Async | Coroutines 1.10.2 |
| Serialization | kotlinx.serialization 1.8.1 |
| Storage | Room 2.8.4 + DataStore 1.3.0-alpha06 |
| Protobuf | Wire 5.5.0 |
| Analytics | Firebase 33.13.0, Datadog 2.18.1, Sentry 8.8.0, Segment 1.19.1 |
| Min SDK | 32 (Android 12L) |
| Target SDK | 36 (Android 16) |
This project is shared for educational and research purposes only. All trademarks, service marks, and brand names belong to their respective owners. Claudeβ’ is a trademark of Anthropic, PBC.