Skip to main content

📱 Data Migration from Old Domain

When a website domain becomes unavailable, you can extract locally stored IndexedDB data from the Android APP and import it to a new site.

0️⃣ Prerequisites

Computer

ToolDescription
OSWindows / macOS / Linux
adbAndroid Debug Bridge
TerminalCommand Prompt / PowerShell / Terminal

Install adb

  1. Download SDK Platform Tools
  2. Extract to C:\platform-tools
  3. Add to system PATH (see detailed steps below)

Windows: Configure Environment Variables

1

Open Run Dialog

Press Win + R, type sysdm.cpl, click OK
Run Dialog
2

Open System Properties

Select the “Advanced” tab
System Properties
3

Click 'Environment Variables'

Environment Variables Button
4

Edit Path Variable

Find Path in “System variables”, click “Edit”
Edit Path
5

Add adb Path

Click “New”, enter C:\platform-tools, click OK
Add Path

Phone

RequirementDescription
Android PhoneWith target APP installed (e.g., com.liaobots.app)
USB DebuggingEnabled (see steps below)
USB CableConnect phone to computer

Enable Developer Options and USB Debugging

  1. Go to “Settings” → “About Phone”
  2. Tap “Build Number” 7 times → Become a developer
  3. Go back to “Settings” → “Developer Options” → Enable “USB Debugging”
  4. Connect phone to computer with USB cable

1️⃣ Check adb Connection

Verify adb Installation

Shows version number if successful:

Connect Phone

Phone will show authorization prompt → Tap “Allow”
Output example:
Shows device means connection successful

2️⃣ Find IndexedDB Data

Enter adb shell

Switch to App User

This command only works for debug version APK. Release APK requires root access.
You’ll see output like:
adb shell operation
These .indexeddb.leveldb folders contain your data

Exit adb shell


3️⃣ Export Data to Computer

Run in computer terminal (not adb shell):
Export Command
This creates IndexedDB_backup.tar in current directory.

Extract File

Extracted directory structure:

4️⃣ Restore Data to New Site

  1. Visit the data recovery page on new site (e.g., /downloadjson)
  2. Click “Select IndexedDB Folder”
  3. Select the extracted .indexeddb.leveldb folder
Select Folder
Make sure to select the .indexeddb.leveldb folder, NOT the .indexeddb.blob folder
  1. Wait for parsing to complete, download JSON file
  2. Import JSON file to new site to restore data

❓ FAQ

The APK is a release version, not debug. You need a debug APK or root access.
You didn’t tap “Allow” on phone. Check for authorization popup on phone screen.
Check if path is correct. Use adb shell to verify files exist on phone first.
Windows 10+ includes tar. If not available, use 7-Zip to extract.

📝 Command Cheatsheet

StepCommand
Check adb versionadb version
List devicesadb devices
Enter shelladb shell
Switch to app userrun-as com.liaobots.app
View IndexedDBls app_webview/Default/IndexedDB
Export dataadb exec-out run-as com.liaobots.app tar cf - app_webview/Default/IndexedDB > IndexedDB_backup.tar
Extracttar -xf IndexedDB_backup.tar