Android 7.1/8.0/8.1谷歌默认启动器数据及图标链接存储位置咨询
Hey there, let's dive into the storage specifics for Google's default launchers on Android 7.1, 8.0, and 8.1, plus the migration pain point you're facing where 7.1 launcher links don't translate directly to 8.1.
Android 7.1.x (e.g., Nexus 6 7.1.1)
The default launcher here is the Google Now Launcher (package name: com.google.android.launcher). All its core data and icons are stored in these locations:
- Private app data:
/data/data/com.google.android.launcher/- The
launcher.dbSQLite database is the key file here—it holds all desktop layouts, shortcut links, folder structures, and widget configurations. Thefavoritestable specifically stores shortcut details, including theintentblob that defines the link's destination andicon-related fields for resource IDs or local paths.
- The
- Icon cache:
/data/data/com.google.android.launcher/cache/- This folder stores cached versions of app icons and shortcut icons to speed up loading. System-wide icon caches also exist in
/data/system/package_cache/, but the launcher relies primarily on its own private cache.
- This folder stores cached versions of app icons and shortcut icons to speed up loading. System-wide icon caches also exist in
Android 8.0/8.1 (e.g., Pixel 2 Factory Default Launcher)
Starting with 8.0, Google switched to the Pixel Launcher (package name: com.google.android.apps.nexuslauncher for 8.0, com.google.android.apps.launcher3 for 8.1). Its storage structure is similar but with critical differences:
- Private app data:
- 8.0:
/data/data/com.google.android.apps.nexuslauncher/ - 8.1:
/data/data/com.google.android.apps.launcher3/ - The
launcher.dbdatabase still handles layout and shortcut data, but its schema has been updated to support new features like dynamic app shortcuts. Thefavoritestable retains intent data but uses modified field names and formats compared to 7.1's launcher.
- 8.0:
- Icon cache:
- Corresponding cache folder under the launcher's private data directory (e.g.,
/data/data/com.google.android.apps.launcher3/cache/). Pixel Launcher also leans more on the system'sPackageManagerto fetch icons dynamically, reducing reliance on local cached files.
- Corresponding cache folder under the launcher's private data directory (e.g.,
Why 7.1 Launcher Link Data Can't Be Directly Replicated in 8.1
The core issue boils down to changes in Android's framework and launcher architecture between these versions:
- Database Schema Incompatibility: The
launcher.dbschema for Google Now Launcher (7.1) doesn't match Pixel Launcher (8.0/8.1). Fields likeicon_packageoricon_resourcefrom 7.1'sfavoritestable either don't exist or are formatted differently in 8.1's database. Directly copying the old database will result in unreadable shortcut data. - Intent Security & Format Restrictions: Android 8.0 (API 26) introduced stricter rules for implicit Intents and shortcut validation. Many 7.1-era shortcuts used unbound implicit Intents (without a specified
ComponentName) which are blocked in 8.0+ for security reasons. The launcher can't resolve these old Intents, making the links useless. - Dynamic vs. Static Shortcuts: 7.1 relied almost entirely on static shortcuts declared in app manifests. 8.0+ added support for dynamic shortcuts (generated via the App Shortcuts API). If an app has updated to use dynamic shortcuts on 8.1, the old static shortcut data from 7.1 won't align with the app's current shortcut structure, so the launcher can't display them.
- Icon Resource Handling: 7.1's launcher often stored direct file paths to cached icons. Pixel Launcher on 8.1 uses a more dynamic approach, fetching icons via
PackageManagerinstead of relying on local paths. Old icon path data from 7.1 won't map to valid resources in 8.1, resulting in placeholder icons or missing shortcuts entirely.
Quick Workarounds
If you need to replicate your 7.1 launcher setup on 8.1:
- Use the launcher's built-in backup/restore feature (if available): Google Now Launcher could back up to Google Drive, and Pixel Launcher can restore these backups (when signed into the same Google account).
- Manually recreate critical shortcuts: For custom or app-specific shortcuts, rebuild them directly on 8.1 to ensure they use valid, 8.0+ compliant Intents.
- Update apps to their latest 8.1-compatible versions: This ensures apps use modern shortcut APIs that work with Pixel Launcher.
内容的提问来源于stack exchange,提问作者MartyMacGyver

