How to reach downloaded data (Lost in Native File plugin)


#1

I implemented my first app in ionic 3 (for Android at this time but will adapt to iOS as well).

The app checks a remote server for a zip file and downloads data updates from the server. I wrote a DbUpdater Provider for this purpose. where I use File, FileEntry, FileTransfer and Zip plugins. I test it on a real device as required by FileTransfer plugin (device is Samsung Tab S2 with Android 7.1.x).

I can check a timestamp file on the server, read its contents and decide for update (or not)

I then download a zip file (SQL statements for sqlite), it “seems to be successful” but unzip fails. I checked with checkFile and the zip file seems to be there… But it can be corrupt… So I need to access it from my PC…

I cannot check the files in the file system because of the Android device security. (I don’t want to root my device - or is it a must for development?). I tried to copy to external sdcard (from what I was reading this is the only viable option - just failed), tried adb shell, backup by Samsung etc. with no avail.

What is the correct way to test these problems without rooting the device?

cli packages: (C:\Users\***\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.3
    npm               : 5.5.1
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : D:\DEV\Android\sdk

Misc:

    backend : pro