[Android Q&A, Help & Troubleshooting] musschrott:
Looking to setup a new phone I encountered the issue that there is no way from LINE itself to transfer chat, except the very tedious mechanism to ex- and import every single contact chat manually. What's worse, this doesn't work with group chats. The other documented alternative is using Titanium Backup, but this requires root. After some further investigation I finally discovered that the Android Debug Bridge (adb) - which is part of the official Android SDK - offers everything that is needed to backup and transfer LINE to second smartphone. That means it works root-free and without any paid tools. You can use this process either to transfer the data to a new device or to restore it to the same device, for this description I assume you're going to copy it to a new phone.

The short version is, you can use adb to:

Read out android_id

Install an old LINE version that allows adb backups (in LINE < 5.3 android:allowBackup is not set, thus by default true)

Backup LINE app data & LINE sdcard data

Set android_id (on new device), which LINE is checking to validate it's data

Restore LINE app data & LINE sdcard data (to new device)

The long version

Prerequisites

Enable the Email verification for your LINE account. If something goes wrong , you will at least have access to all of your contacts and messages of the last weeks.

You must have ADB working. I'm not going to explain how to install it in detail, you should be able to find Android Developer guides who cover that (e.g. http://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/) The rough outline is:

- install Android SDK

- install USB phone drivers from you phone manufacture

- enable (hidden) Developer Mode/USB debug mode on your phones

Furthermore you must have an old line APK, I used LINE 5.1 You should have no issue to find it online in one of the APK archives. As mentioned earlier, the current versions of LINE does not allow ADB backups, like old versions do. Luckily you can install an old version, while keeping the data. Ideally the old LINE versions never runs, so that it has no chance to corrupt your chat-data. However even accidentally running it, didn't have any visible impact on my data, the app closed itself after starting.

For the next steps I assume you have a folder called c:\backup\line to store the backup inside and already containing a file called 'line-old.apk' which - as the name suggests - is your copy of an old line apk.​

Backup old phone

) Close/Kill LINE app if it's running, disconnect from WLAN and put into flight mode (to ensure that nothing wants to interact with the LINE app) and connect your old phone via USB cable

------

) Start ADB service:

adb start-server

Accept access/fingerprint from ADB on your old phone, if you haven't done so already

------

) Create a file called android_id.txt that contains your android_id:

adb shell settings get secure android_id > c:\backup\line\android_id.txt

You can also use "adb shell settings get secure android_id" to simply show the current android_id value.

------

) Install old LINE Version:

adb install -r -d c:\backup\line\line-old.apk

-r = reinstall, keep data; -d = allow to install older version

------

) Backup LINE app data (chats) to your PC:

adb backup -f c:\backup\line\line.ab jp.naver.line.android

You need to click 'allow backup' on your old phone

------

) Backup LINE sdcard data (images, sticker) to your PC:

adb pull /sdcard/Android/data/jp.naver.line.android c:\backup\line\sdcard

------

) (optional) restore current LINE APK, either by using an APK like in step 4.) or via updating through Google Play store

------

) End ADB service

adb kill-server

------

) Finished, disconnect your old phone from your PC

Restore to (new) phone:

) Connect your new phone via USB cable

------

) Start ADB service:

adb start-server

Accept access/fingerprint from ADB on your new phone, if you haven't done so already

------

) Change your new phone android_id to that of your old phone. Replace XXXXXXXX with the value inside c:\backup\line\android_id.txt

adb shell settings put secure android_id XXXXXXXX

You can use "adb shell settings get secure android_id" to show the current android_id value.

------

) Install old LINE Version:

adb install -r -d c:\backup\line\line-old.apk

-r = reinstall, keep data; -d = allow to install older version

------

) Upload LINE app data (chats) to your new phone:

adb restore c:\backup\line\line.ab

Click on your phone to "restore my data"

------

) Upload LINE sdcard data (images, sticker) to your new phone:

adb push c:\backup\line\sdcard /sdcard/Android/data/jp.naver.line.android

------

) Install current LINE APK, either by using an APK like in step 4.) or via updating through Google Play store

------

) End ADB service

adb kill-server

------

) Finished, disconnect your new phone from your PC

Final notes

Alternatively to changing the the android_id it used to be - and maybe still is? - possible to erase the settings. I haven't tried this and I can't see any real downsides to reusing the android_id. Considering how easy it is to change, I wouldn't consider it a specially protected property.