# TikTok (com.zhiliaoapp.musically) — features.md

---

## 1. Core Features

TikTok is a short-form and long-form video social platform centered on algorithmically-curated video feeds, live streaming, social interaction, and video creation. Its primary differentiators are:

- **For You Page (FYP)** — a personalized, vertically-scrolling video feed driven by a recommendation engine (`/aweme/v1/feed/`)
- **Short Video Creation** — in-app camera with effects, filters, music, stickers, and editing tools
- **LIVE Streaming** — full bidirectional live broadcast system with gifts, multi-guest linkup, games, and commerce
- **TikTok Shop / E-Commerce** — integrated in-feed and live shopping with product display pages (PDP), SKU selection, checkout, and order management
- **AI Creation Tools** — AI-generated video and image content with multiple quality/speed modes
- **Duet & Stitch** — collaborative video response features tied to existing posts
- **Direct Messaging (DM)** — in-app messaging with fortune cookies, suggested questions, welcome messages, stickers
- **Effect/Filter Platform** — downloadable, real-time AR effects powered by ByteDance Effect SDK (`com.bef.effectsdk`)

---

## 2. Feature Categories

### 2.1 Video Feed & Discovery

- **For You Feed** — personalized feed served from `/aweme/v1/feed/`; aliases tracked include: `for you feed`, `for you page`, `my for you feed`, `my for you page`, `for you tab`, `my for you tab`, `my feed`, `recommendations`, `recommended videos`, `hot videos`, `best videos`, `new videos`
- **Following Feed** — feed of followed accounts; aliases: `following feed`, `my following feed`, `following page`, `following tab`, `following videos`
- **Friend Feed** — `/aweme/v1/friend/feed/`
- **Spotlight / Relation Feed** — `/aweme/v1/spotlight/relation/`
- **Story Feed** — `/aweme/v1/story/`; supports `sub_only_story`, `reveal_only`, `reveal_story` modes
- **Hashtag Discovery** — UI label: **"Hashtags"** (`eyd`); search endpoint `/aweme/v1/general/search/`
- **Search** — general search with history (`search_history`), suggestions (`search_sug`), highlighted positions (`highlight_pos`), word records, source tracking (`search_source`, `search_id`)
- **Trending / Latest tabs** — array `t`: `Trending`, `Latest`
- **Restricted Mode** — UI label: **"Restricted Mode"** (`g64`)

### 2.2 Video Playback

- **Multi-codec video player** — supports H.264 (`play_addr_h264`), ByteVC1 (`play_addr_bytevc1`), ByteVC2; codec selection via `codecType`
- **DASH bitrate streaming** — adaptive bitrate with `hasDashBitrate`, `hitDashVideoBitrate`, `hitDashAudioBitrate`
- **HDR playback** — detected via `hdrType` flags (1 = HDR10, 2 = HLG)
- **3D Video** — `is_3d` flag with `play_addr_3d_fallback`
- **VR playback** — `mVr` flag on `VideoUrlModel`
- **DRM / Token Auth** — `token_auth` / `PlayTokenAuth`; `is_drm_source` / Intertrust DRM
- **Data Saver mode** — UI labels: **"Data-saving first"** / **"High-resolution first"** (array `ai`)
- **Loop play, seek, speed change** — full `OnUIPlayListener` interface with `onLoopPlay`, `onSeekStart`, `onSeekEnd`, `onSpeedChanged`
- **Pillar-box / fake landscape** — `pillarBoxVideoInfo`, `fakeLandscapeInfo`
- **AI-generated covers** — `aiCover`, `aiDynamicCover`, `aiDynamicCoverBak`
- **Video captions/subtitles** — `captionDownloadAddr`, `CaptionModel` (`cla_info`)
- **Download without watermark** — `download_no_watermark_addr`; copyright restriction message: **"Can't save video with this sound due to copyright regulations."** (`egr`)

### 2.3 Video Creation (Short Video / Camera)

Entry point: `FTCVideoRecordNewActivity`, `VideoRecordPermissionActivity`

- **Camera recording** — multi-clip recording, speed modes, timer, flash, flip camera
- **Video duration selection** — `video_duration_select` event
- **Upload from gallery** — UI: **"Select from Gallery"** (`bwh`), **"Take photo"** (`bwi`)
- **Video trimming** — `click_video_trim`, `video_trim_next`, `video_trim_back`
- **Draft management** — `click_drafts`, `M2_DRAFT_CLEAN_COUNT`, `M2_DRAFT_CLEAN_LAST_TIME`; UI: **"Discard last clip?"** (`g3w`)
- **Music / Sound** — online sound library and "My Sound" (array `k`); `add_music`, `favorite_song`, `cancel_favorite_song`, `enter_song_category`; copyright enforcement
- **Voice effects** — `select_voice_effect`
- **Beauty / AR filters** — UI: **"Beauty"** (`drn`); `click_beauty`, `click_filter`
- **Effects platform** — downloadable effects via `EffectPlatform`; `click_effect`, `add_effect_favourite`, `remove_effect`
- **Stickers** — face stickers (`FaceStickerBean`), `AbstractStickerFragment`
- **Text overlay** — `enter_text`, `edit_text`, `complete_text`; `dby` = **"Search for an account to mention"**
- **Cover selection** — `select_cover`
- **Video description / hashtags** — `describe_video`
- **Rotate** — `click_rotate`
- **Volume control** — `select_volume`
- **AutoCut** — UI: **"AutoCut"** (`creation_autocut_entry_point`), CapCut integration buttons: **"CapCut AutoCut"** (`ccug_ttGallery_btn_autocut`), **"CapCut edit"** (`ccug_ttGallery_btn_edit`), **"More templates in CapCut"** (`ccug_ttGallery_bn_title`)

### 2.4 Effect Inspector (Advanced Effect Editing)

Fine-grained per-parameter controls exposed via `AME_editEffect_inspector_*` strings:

- **Aberration**, **Angle**, **Bending**, **Bling**, **Blur**, **Border**, **Brightness**, **Color**, **Coolness**, **Crease**, **Definition**, **Deformation**, **Degree**, **Diameter**, **Direction**
- **Displacement 1 / 2**, **Frequency**, **Glare**, **Grain**, **Haze**, **Height**, **Horizontal**, **Intensity**
- **Left Size / Right Size**, **Low quality**, **Glow** (luminous), **Texture** (material1)
- **Noise**, **Offset / Offset 1 / Offset 2**, **Opacity**, **Pattern**, **Position / Position 1 / Position 2**
- **Quantity**, **Radius**, **Velocity** (rate), **Ratio**, **Ridges**, **Ripple**, **Rotation**, **Y-axis rotation**, **X-axis rotation**
- **Saturation**, **Zoom** (scope), **Scratch**, **Sharpness**, **Size / Size 1-3**, **Speed**, **Tempo**, **Vignette**, **Vortex**, **Width**
- **X-axis**, **X-offset**, **Y-axis**, **Y-offset**, **Zoom 1 / 2 / 3**

### 2.5 Makeup AR Tools

- **Color** (`AME_makeup_color`), **Texture** (`AME_makeup_finish`), **Style** (`AME_makeup_style`)
- Property switching: **"Tap to switch properties"** (`AME_makeup_switchProperty_tooltip`)
- Toast: **"Select current property first"** (`AME_makeup_selectProperty_toast`)

### 2.6 Video Filter Presets

Array `ab`: **Normal**, **Black/White**, **Arts**, **Vintage**, **Retrolux**, **Saturated**, **Chrome**
Array `ax`: **Normal**, **F1**, **F2**, **F3**, **F4**

### 2.7 LIVE Streaming

Full live streaming SDK (`com.bytedance.android.livesdk`):

- **Go Live** — OBS intro page at `https://inapp.tiktokv.com/falcon/webcast_mt/page/obs_intro/index.html`; latency tracking from go-live click (`show_latency_from_go_live_click`)
- **Live Drawer** — tabbed side drawer with feeds, search, game entries, following entrances; routes: `livesdk_drawer_start_loading`, `livesdk_drawer_tab_switch`, `livesdk_drawer_tab_landing`, `livesdk_manage_feeds_popup_show`
- **Live Explore** — `livesdk_explore_page_show`, `livesdk_explore_entrance_show`; non-personalized mode (`is_non_personalized`)
- **Multi-Guest / LinkMic** — multi-participant live broadcast (`tikcast.linkmic.common`, `webcast.data.multi_guest_play`); invite list fold count controlled by `MultiGuestEnableInviteListFoldCountSetting` (default: 10,000); showdown panel with winner/loser rank images and emoji overlays
- **Live Games** — drawer game tabs; routes: `game_drawer_is_game`, `game_drawer_guessing`, `game_drawer_drops`; game metadata: `game_name`, `game_label`, `game_tab_rank`, `game_tab_show_type`, `new_game`, `drops_game`, `game_category`
- **Live Gifts** — gift list from `/webcast/gift/list/`; all-gifts image assets on tiktokcdn
- **Live Search** — `live_search_container`, `normal_search`, `tag_live_search_intermediate`
- **Live Decoration Editing** — `livesdk_decoration_editing_page`, `rec_template_id`, `decoration_set_id`
- **PCS Onboarding** — `tiktok_live_pcs_onboarding_2`, `pcs_onboarding_close`, `pcs_track_context`
- **Live Playbook** — matchmaking; `playbook_match_cover_icon`, `playbook_default` assets
- **Live Noticeboard** — `noticeboard_default_image`
- **Window mode** — `live_window_mode`, `small_picture` (picture-in-picture style)
- **Viewer count** — `viewer_count` navigation parameter
- **QoS node sort** — `/webcast/qos/node_sort/`
- **Webcast settings / i18n** — `/webcast/setting/`, `/webcast/setting/i18n/package/`

### 2.8 AI Theater / AI Creation

- **AI Theater** — asynchronous AI video creation sessions; invite card (`aitheater_msg_invite_card`), cast card (`aitheater_msg_cast_card`), join card (`join_card`), profile intro (`ai_theater_profile_intro`), invite page (`ai_theatre_crt_page_invite`)
- **AI Video Modes:**
  - **Fast** — `aiCreate_videoMode_fast`: "Faster generation, supports multi-shots"
  - **High quality** — `aiCreate_videoMode_highQuality`: "Cinematic and detailed, supports multi-shots and audio"
  - **Seedance 2** — `aiCreate_modes_seedance2_desc`: "Cinematic and detailed. Supports multi-shots and audio, but doesn't support real-person faces."
- **AI Image Modes:**
  - **Fast** — `aiCreate_imagemode_fast`
  - **High quality** — `aiCreate_imagemode_highQuality`
- **Multi-reference video** — `aiCreate_modes_vidfast_desc`: "Faster generation, supports multiple references"; `aiCreate_modes_vidhigherquality_desc`: "Higher quality and detailed, supports multiple references"
- **Scene & recall tracking** — `aicreation_scene_name`, `recall_way`, `prepage_name`, `referpage_name`

### 2.9 E-Commerce / TikTok Shop

- **Product Detail Page (PDP)** — `SeaPdpMainState`, `SkuEntranceState`; full/non-full-screen modes, bottom sheet slide offset, scroll offset tracking
- **Multi-SKU selection** — `multisku_selection_page`, `showcase_selection_page`; `getSelectImage()` for SKU thumbnail
- **Checkout hint** — `checkout_hint` navigation parameter
- **Point of Interest (POI)** — `poi/detail`, `poi/map` routes; `point_of_interest` parameter
- **Product atmosphere list** — `product_atmosphere_list`
- **Commerce settings** — `/aweme/v1/commerce/settings`
- **Shop search** — `/aweme/v2/shop/search/vertical/`
- **Donation creation** — `https://inapp.tiktokv.com/tpp/inapp/pns_product_poseidon/donation-creation.html`
- **In-app purchases (Google Play)** — purchase validation via `viap` APIs; subscription validation via `ars` APIs; Google Play order history / subscription management links
- **In-app events** — `https://api.tiktokv.com/tiktok/event/list/v1`
- **SMB (Small/Medium Business) Onboarding** — `smb_optin_process_ended`, `ttsmb_universal_popup_submit`, `ttsmb_universal_popup_show`, `smb_tag`, `smb_target`, `industry_tag`, `region_support_kyb`, `existing_verification`, `service_term_page`
- **Wallet / Currency exchange** — `WalletExchange` class (`com.bytedance.android.live.wallet`)

### 2.10 Direct Messaging (DM)

- **Fortune Cookie messages** — 31+ seasonal fortune messages (`dm_fortuneCookie_001` through `dm_fortuneCookie_031`+): e.g., "May your year be sweeter than dessert!", "Dream big and laugh hard!", "Make this year legendary!"
- **Suggested questions** — `dm_suggested_question`
- **Welcome messages** — `dm_welcome_message`
- **IM sticker list** — `/aweme/v1/im/resources/sticker/list/`
- **IM cloud token** — `/aweme/v1/im/cloud/token/`
- **Unread items** — `/aweme/v1/im/unreaditems`
- **Local DB** — `im_local_db` navigation parameter
- **Now Invite** — `now_invite` parameter

### 2.11 Duet & Stitch

- **Duet** — `DuetAndStitchRouterConfig` with `type`, `awemeId`, `enterFrom`, `enterMethod`, `anchors`, `isEcommerce` fields
- **Stitch** — `StitchDownloadServiceImpl` fetches source aweme, validates privacy/deletion status, then routes to creation flow; `use_stitch` type detection
- **Mission Duet** — `MissionDuetRouterConfig` for commerce-linked duets
- **Ecommerce-linked duet/stitch** — `isEcommerce` flag in router config
- **JSB bridge** — `duet_and_stitch_jsb` enter method

### 2.12 Social Interaction

- **Like** — UI: **"Like"** (`g60`); `/aweme/v1/commit/item/digg/`
- **Comment** — UI: **"Comment"** (`f0a`); error: **"Couldn't add comment"** (`f3w`)
- **Follow/Unfollow** — `/aweme/v1/commit/follow/user/`
- **Block** — UI: **"Block"** (`dyw`)
- **Report** — `click_report`, `choose_report_reason`, `submit_report`
- **Add to Favorites / Remove** — UI: **"Add to Favorites"** (`ccl`), **"Added to Favorites"** (`ccu`), **"Removed from Favorites"** (`eho`)
- **Find Friends** — UI: **"Find friends"** (`cc8`); contacts upload `/aweme/v1/upload/contacts/`
- **Mention** — search: **"Search for an account to mention"** (`dby`)
- **Translate** — UI: **"Translating..."** (`dh9`)
- **Share** — platform share settings `/aweme/v2/platform/share/settings/`; link copy: **"Link copied"** (`fd_`), **"Copied"** (`fd8`)
- **View count** — UI: **"%1$s views"** (`ekj`)
- **Check-in** — `/aweme/v1/check/in/`
- **Aweme favorites** — `/aweme/v1/aweme/favorite/`

### 2.13 User Profile & Account

- **User info** — `/aweme/v1/user/`, `/2/user/info/`
- **User settings** — `/aweme/v1/user/settings/`
- **Delete account** — `delete_account` event
- **Add phone number** — UI: **"Add phone number"** (`dt9`)
- **Language selection** — `select_language`; supported languages: Afrikaans, Bahasa Indonesia, Bahasa Malaysia, Basa Jawa, Cebuano, Čeština, Deutsch, English, Español, Filipino, Français, IsiZulu, Italiano, Magyar, Nederlands, Polski, Português (Brasil), Română, Sesotho sa Leboa, Svenska, Tiếng Việt, Türkçe, Ελληνικά, Русский, Українська, Arabic, and 15+ Indian/Asian languages
- **Logout** — `log_out` event; settings key: `logout`
- **Content translation languages** — Simplified Chinese, Traditional Chinese, English, Japanese, Korean, Russian, Indonesian, Malay, Portuguese, Thai, Vietnamese, Hindi

### 2.14 Parental Controls / Kids Mode (Family Pairing)

Full Kids Mode state machine:

- **Screen Time Setup** — math challenge (`kids_show_screentime_setup_math`), passcode setup (`kids_show_screentime_setup_code`), confirm code, enter code
- **Screen Time Breaks** — `screen_time_break_info_show`, `screen_time_breaks_duration_limit`, `screen_time_breaks_popup`, `screen_time_breaks_ok_snooze`, `screen_time_breaks_popup_edit`
- **Kid login/logout state machine** — `kid_log_in`, `kid_log_out`, `state_machine_kid_log_in`, `state_machine_kid_log_out`, `app_relaunch_for_kids`
- **Kid DID change** — `kid_change_did`
- **KM (Kids Monitor) email notifications** — `km_show_notify_email`, `km_click_notify_email`, `km_enter_notify_email`, `km_report_notify_email_load`
- **Kids datafile load** — `kids_df_load`

---

## 3. User-Facing Capabilities (What Users Can DO)

| Action | UI Label / Evidence |
|---|---|
| Watch an infinite personalized video feed | For You Page, FYP |
| Record a short video with effects | **"Record video"** (`g0g`), **"Start recording"** (`fdh`) |
| Upload video from gallery | **"Select from Gallery"** (`bwh`) |
| Add music to a video | **"Added sound"** (`diy`), Online sound library |
| Apply beauty filters | **"Beauty"** (`drn`) |
| Apply AR effects | Effect platform with downloadable effects |
| Apply color filter presets | Normal, Vintage, Retrolux, Saturated, Chrome, etc. |
| Use AI to generate video | AI Theater, Seedance 2, Fast/High-quality modes |
| Trim and edit video clips | Video trim, rotate, adjust clip |
| Select custom cover | **"Select cover"** event |
| Duet or Stitch another video | `IDuetDownloadService` |
| Go live and stream | Live SDK, PCS Onboarding |
| Send virtual gifts during live | Gift list system |
| Play live games | Game drawer with guessing/drops |
| Shop products in-feed and in-live | TikTok Shop, PDP, SKU selection |
| Like, comment, share, follow | Social interaction APIs |
| Block or report users | Block, report flow |
| Save to Favorites | Add/Remove from Favorites |
| Send DMs with stickers and fortune cookies | DM system |
| Search for content and creators | General search, live search |
| Translate video content | Translate API |
| Set up parental screen time controls | Kids Mode, Family Pairing |
| Enable Restricted Mode | **"Restricted Mode"** (`g64`) |
| Control data saving | **"Data-saving first"** / **"High-resolution first"** |
| Clear cache | `clear_cache` settings entry |
| Manage privacy and safety | Account & Safety, Safety Center, Privacy Policy |

---

## 4. Settings & Configuration

### Settings Menu Sections (array `j` / `ah`)

| Key | Description |
|---|---|
| `account_and_safety` | Account & Safety settings |
| `common_protocol` | Common protocols / terms |
| `digital_wellbeing` | Digital Wellbeing (screen time, breaks) |
| `feedback_and_help` | Feedback & Help |
| `helper_center` | Help Center |
| `safety_center` | Safety Center |
| `terms_of_use` | Terms of Use |
| `community_guidelines` | **"Community Guidelines"** (`f_e`) → `https://www.tiktok.com/community-guidelines` |
| `privacy_policy` | Privacy Policy |
| `copyright_policy` | Copyright Policy |
| `open_debug_test` | Open debug test (internal/debug only) |
| `clear_cache` | Clear cache |
| `logout` | Logout |
| `data_saver` | Data Saver |
| `security_center` | Security Center |

### Video Quality

- **Data-saving first** (default behavior when on limited data)
- **High-resolution first** (prioritize quality)

### Audience / Visibility

- **Everyone** (`d4h`) — public posts
- **Friends only** — limited audience (array `aj`)

### SharedPreferences Notable Keys

| Key | Purpose |
|---|---|
| `uid` | User ID |
| `channel` | App distribution channel |
| `IS_UPDATE` | Whether this is an update install |
| `IABTCF_gdprApplies` | GDPR applies flag (IAB TCF) |
| `IABTCF_TCString` | IAB Transparency & Consent string |
| `IABTCF_CmpSdkID/Version/PolicyVersion` | CMP metadata |
| `enableTCFDataCollection` | TCF data collection toggle |
| `deviceTrackingDisabled` | Opt-out of device tracking |
| `collectAndroidIdForceByUser` | User-forced Android ID collection |
| `collectIMEIForceByUser` | User-forced IMEI collection |
| `disableCollectNetworkData` | Disable network data collection |
| `collectFacebookAttrId` | Facebook attribution ID collection |
| `currencyCode` | In-app currency code |
| `http_cache` | HTTP cache toggle |
| `scene_type` | Camera scene type |
| `intensity` / `sharpness` / `duration` | Effect/beauty parameters |
| `M2_STORAGE_DOWNLOAD_COUNT` | Download count tracking |
| `M2_DRAFT_CLEAN_COUNT` / `M2_DRAFT_CLEAN_LAST_TIME` | Draft cleanup management |
| `promo_code` | Promotional code |
| `target_url` | Deeplink target URL |
| `AF_REFERRER` / `referrer` | AppsFlyer referrer |
| `KSAppsFlyerId` | AppsFlyer device ID |
| `afUninstallToken` | AppsFlyer uninstall tracking token |
| `disableProxy` | Disable network proxy |
| `remote_debug_static_data` | Remote debug data |

---

## 5. Background Services & What They Do

| Service / Component | Function |
|---|---|
| `com.bytedance.crash.Npth` | Native crash monitor (ANR, Java crash, native crash); `openANRMonitor()`, `openJavaCrashMonitor()`, `openNativeCrashMonitor()`; MTK buffer optimization, Scudo VMA leak fixer |
| `com.bytedance.apm.agent` | Application Performance Monitoring — page load tracing (`AutoPageTraceHelper`), page show/hide events (`PageShowCallback`), launch time tracking (`AutoLaunchTraceHelper`) |
| `com.bytedance.common.jato.JatoXL` | System performance optimizer — CPU set management, JIT block optimization, thread priority protection, GLES init boost, HWUI boost, Young GC optimization, DEX cache expansion, logcat cutting |
| `com.bytedance.covode` | Code coverage collection for Java and native code; bitmap-based class index tracking |
| `com.bytedance.sysoptimizer.EnterTransitionCrashOptimizer` | Fixes activity transition crashes on certain Android versions |
| `com.bytedance.android.livesdk` | Live streaming SDK — layout preloading, multi-guest session management, link-mic coordination |
| `com.bytedance.im` | In-app instant messaging service |
| `com.bytedance.speech` | Speech engine integration (`SpeechEngineDefines`) |
| `com.bytedance.hybrid` | Hybrid web view / JS bridge infrastructure |
| `com.bytedance.apm` | Performance monitoring and APM reporting |
| `com.bytedance.pitaya` | Internal data pipeline / analytics |
| `com.bytedance.pipo` | Internal pipeline / data processing |
| `com.bytedance.keva` | Key-value store for app data |
| `com.bytedance.bpea` | Certificate/auth transmit layer (`CertAuthEntry`, `CertProviderManagerKt`) |
| `com.bytedance.lighten` | Lightweight rendering / UI optimization |
| `com.bytedance.realx` | Real-time rendering/extension layer |
| `com.bytedance.pumbaa` | Method ID management for hotpatching / performance (`MethodIDManager`) |
| `com.bytedance.assem` | Dynamic assembly/module loading (`has_load_assem`) |
| `com.bytedance.router` | In-app navigation routing (`SmartIntent`, `RouterPageMonitor`) |
| `com.bytedance.scene` | Scene-based navigation framework |
| `com.ss.bytertc` | ByteDance RTC — real-time audio/video communication for live multi-guest |
| `com.ss.lyrax` | Lyrics/music synchronization |
| `com.bytedance.touchpoint` | Touch interaction analytics |
| `ttp.orbu.sdk` | Internal SDK (likely ad/revenue related) |
| `com.tts.oecverify` | OEC verification (commerce) |
| Push / Cloud Push | `/cloudpush/update_sender/`, `/cloudpush/callback/android_red_badge/`, `/cloudpush/local_push/v1/report_launch/` — push notification delivery and badge management |
| App log collector | `/service/2/app_log/`, `/log/collect` — behavioral telemetry upload |
| Settings CDN | `https://%scdn-%ssettings.%s/android/v1/%s/settings` — remote configuration fetching |
| Gecko package server | `/gecko/server/package` — OTA resource/patch delivery |
| Domain resolution | `/get_domains/v4/` — dynamic domain resolution |
| Location (lite) | `/location/sulite/` — lightweight location reporting |

---

## 6. Third-Party Tool & SDK Integrations

### FFmpeg
- Referenced in `com.ss.android.vesdk.VEUtils` via external process call
- Used for video encoding/decoding operations in the video editing pipeline
- Invoked as a native subprocess via JNA (`com.sun.jna.NativeLibrary`)

### AppsFlyer SDK
- Full attribution SDK integration (`KSAppsFlyerId`, `AF_REFERRER`, `afUninstallToken`)
- OneLink deep linking (`oneLinkSlug`, `onelinkDomain`, `onelinkScheme`, `oneLinkVersion`)
- Endpoints: `https://aps-webhandler.appsflyer.com/api/trigger`, `https://%sattr.%s/api/v`, `https://%sregister.%s/api/v`
- IAP validation: `https://%sviap.%s/api/v1/android/validate_purchase_v2`
- Subscription validation: `https://%sars.%s/api/v2/android/validate_subscription_v2`
- Ad revenue tracking: `https://%sadrevenue.%s/api/v2/generic/v6.14.0/android`
- Conversion/launch/in-app event tracking

### ByteDance Effect SDK (`com.bef.effectsdk`)
- `EffectSDKBuildConfig`, `EffectSensorCallback`
- Powers all AR effects, face stickers, beauty filters, makeup AR
- Native effect engine (`TEEffectUtils`, `com.ss.android.ttve.nativePort`)
- Downloadable model support (`DownloadableModelConfig`, `DownloadableModelSupport`, `FetchModelType`)
- Effect cleanup on use (`EnableEffectCleanupOnUsing`)

### Google Play Billing
- Purchase/subscription validation APIs
- Links to: `https://play.google.com/store/account/orderhistory`, `https://play.google.com/store/account/subscriptions`, `https://play.google.com/store/paymentmethods`
- Google Play Services availability checks (UI strings `f7c`–`f7q`)

### Google Sign-In
- `default_web_client_id = "340331662088-6ubo66ljal3ianb35dr9clu3p0ea7v64.apps.googleusercontent.com"`

### Facebook
- `com.facebook.platform.APPLINK_NATIVE_URL` SharedPreference key
- `collectFacebookAttrId` — Facebook attribution ID collection

### Lynx (ByteDance cross-platform UI)
- `com.lynx.tasm`, `com.lynx.react` — cross-platform rendering framework for hybrid UI components

### EventBus (GreenRobot)
- `org.greenrobot.eventbus` — inter-component event communication used extensively in `FTCVideoRecordNewActivity`

### Wire (Square)
- `com.squareup.wire` — Protocol Buffers serialization for API communication

### OkHttp / Okio
- HTTP client and I/O layer for all network requests

### JNA (Java Native Access)
- `com.sun.jna.NativeLibrary` — used for native library invocation including FFmpeg subprocess reading

### TikTok Studio (Desktop)
- Linked from: `https://www.tiktok.com/studio/download`

### CapCut
- Deep integration: **"CapCut AutoCut"**, **"CapCut edit"**, **"More templates in CapCut"**, **"Explore"** buttons in creation flow (`ccug_ttGallery_*` strings)

---

## 7. Key Workflows / User Journeys

### 7.1 Cold Start & Feed Load
1. App launches → Splash ad check (`ISplashAdService.checkSplashAdsForColdStart`) with TopView ad preloading
2. Force-skip TopView controlled by `enable_force_skip_topview` remote setting
3. `MainActivity` initializes `HomeTabAbility`, `BottomTabAbility`, `FeedFragment`
4. For You feed fetched from `/aweme/v1/feed/`; videos preloaded with CDN URLs
5. Ad scene initialized (`IMainAdScene.onCreate()`); splash ads rendered if configured

### 7.2 Short Video Recording & Publishing
1. User taps record → `VideoRecordPermissionActivity` checks permissions → launches `FTCVideoRecordNewActivity`
2. Camera initialized via Effect SDK with beauty/filter pipeline
3. User records clips (multi-clip support), selects speed, timer, effects, stickers
4. Optional: add music from online library or personal sounds
5. Trim / adjust clips, rotate, set volume levels
6. Select cover, add description, hashtags, @mentions
7. Set audience (**"Everyone"** / **"Friends only"**) → publish to `/aweme/v1/aweme/post`
8. Draft auto-saved to local storage; draft cleanup tracked via `M2_DRAFT_CLEAN_*`

### 7.3 Duet / Stitch Flow
1. User selects Duet or Stitch on an existing video
2. `StitchDownloadServiceImpl.LIZ()` validates: aweme ID exists, internet available, not dual-mode display
3. Source aweme fetched asynchronously; privacy and deletion status checked
4. If private → error shown; if deleted → error shown
5. Router config (`DuetAndStitchRouterConfig`) passed to creation activity with anchor data and enter method
6. Creation flow launches with source video alongside recording view

### 7.4 Going Live
1. PCS Onboarding shown (`tiktok_live_pcs_onboarding_2`) for new streamers
2. Live layout preloaded on background thread (`LiveLayoutPreloadThreadPriority`)
3. WebRTC connection established via ByteRTC (`com.ss.bytertc`)
4. Live drawer loads with tabs: feed, search, games, following
5. Gifts available; multi-guest invite list with fold threshold (default 10,000 invites)
6. Game drawer opens for guessing/drops games
7. SMB product showcase optionally enabled during live

### 7.5 Watching a Live Stream
1. Live room entry tracked (`livesdk_live_entrance_click`, `entrance_room_id`, `anchor_id`)
2. Live cover loading sequence: `live_cover_show_start` → render → `live_cover_show_finish` with `draw_duration`
3. Viewer can follow anchor, send gifts, participate in games, view products
4. Multi-guest showdown: winner/loser rank images displayed from CDN
5. Room exit triggers room ID cleanup

### 7.6 E-Commerce Purchase Journey
1. Product card shown in feed or live → taps to PDP (`SeaPdpMainState`)
2. PDP loads in bottom sheet; user can expand to full-screen
3. SKU selection via `multisku_selection_page` or `showcase_selection_page`
4. Checkout hint shown → Google Play billing or in-app purchase flow
5. Purchase validated against `viap` endpoint; subscription via `ars` endpoint
6. Order history accessible via Google Play account links

### 7.7 Kids Mode Setup
1. Parent initiates Family Pairing; math challenge presented
2. Passcode set and confirmed; `kids_show_screentime_setup_confirm_code`
3. Screen time limits configured with break intervals
4. Kid logs in on device; separate DID assigned (`kid_change_did`)
5. KM monitor online events fired on app launch and video play
6. Parent notified via email (`km_show_notify_email`) for reports
7. Screen time breaks enforced with snooze/edit options

### 7.8 Search Flow
1. User opens search; history shown from `search_history` list
2. Suggestions fetched with `sug_type`, `recall_reason`, `sug_list`, `impr_id`
3. Live search filtered by `live_search_container`, `tag_live_search_intermediate`
4. Results returned with highlight positions, word records
5. General search: `/aweme/v1/general/search/`; item search: `/aweme/v1/search/item/`; shop search: `/aweme/v2/shop/search/vertical/`