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

adb version
Shows version number if successful:
Android Debug Bridge version 1.0.41

Connect Phone

adb devices
Phone will show authorization prompt → Tap “Allow”
Output example:
List of devices attached
ABCDEF12345    device
Shows device means connection successful

2️⃣ Find IndexedDB Data

Enter adb shell

adb shell

Switch to App User

run-as com.liaobots.app
This command only works for debug version APK. Release APK requires root access.
cd app_webview/Default/IndexedDB
ls
You’ll see output like:
https_liaobots.work_0.indexeddb.leveldb
https_liaobots1.work_0.indexeddb.leveldb
https_liaobots2.work_0.indexeddb.leveldb
adb shell operation
These .indexeddb.leveldb folders contain your data

Exit adb shell

exit
exit

3️⃣ Export Data to Computer

Run in computer terminal (not adb shell):
adb exec-out run-as com.liaobots.app tar cf - app_webview/Default/IndexedDB > IndexedDB_backup.tar
Export Command
This creates IndexedDB_backup.tar in current directory.

Extract File

tar -xf IndexedDB_backup.tar
Extracted directory structure:
app_webview/
└── Default/
    └── IndexedDB/
        ├── https_liaobots.work_0.indexeddb.leveldb/
        ├── https_liaobots1.work_0.indexeddb.leveldb/
        └── ...

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