Where do Javascript UWP apps store IndexedDb? - javascript

I make Windows Store apps with HTML + Javascript, WinJS type apps.
I normally use localStorage to store most information, and I know how to navigate to where that localStorage is in the file system:
C:\Users\user\AppData\Local\Packages\-package-string- is the base folder for all the info, and I drill down to \AC\Microsoft\Internet Explorer\DOMStore and the localStorage xml file is in there in one of the
Knowing this makes it easy for me to take localStorage from one persons app, download it and put it into my debugging app and investigate any problems they might have related to their localStorage.
I need the same info for IndexedDb. I use Dexie.js which uses IndexedDb and I want to be able to move the file from one persons computer onto my own to debug it if necessary.

On Windows 10 (v1803) is IndexedDB located in:
C:\Users\user\AppData\Local\Packages\--package-string--\AppData\Indexed DB

Related

Where does Chromium store Javascript temp data

Chromium runs a web Javascript application from a site.
The JS code is obfuscated and is a lot of code.
The app loads some data to display.
I do not see the data stored on the file system (I run a 'find' to see if any files have been modifed right after loading the app and no files are modified).
The data IS stored somewhere locally because when internet is unplugged whatever loaded data is still showing.
Where is the data stored?? How do I find it and extract it? Is it in memory only? How would I go about scraping the data?
EDIT: Where is Blob binary data stored? answers my question partially - the data is in RAM. The question that remains is how to narrow down where in RAM. Is it possible to scan recently changed RAM for some features that we know of the data?
For Chrome on Windows 11
On Windows, Chrome stores under your user profile folder e.g. C:\Users\*******\AppData\Local\Google\Chrome\User Data\Profile 1.
The AppData folder is usually hidden and not visible in Windows Explorer by default.
I can see there is a file called Cookies which appears to be a SQLite database.
There are other folders for Local Storage, Session Storage and IndexedDB.
EDIT: Just noticed that you've asked specifically about Chromium - not sure if any of this is relevant.

where is saved localStorage of an app's webview on the phone fileSystem?

I published a phonegap/webview application on the Play Store.
Now, that the app has some problems,
I need to access localStorage data to recover them, but I can't.
I can't because it's no more "debuggable", it's signed.
Wondering if I can access to those data through filesystem, mounting it via usb cable.
I guess under
/data/data/package_name (on a rooted phone)
I can find it.
Please share your experience if any.
You can use cordova file plugin to delete and read files and directories. Complete docs is available : https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/
In Android you can get the data from any file manager app: InternalStorage/data//files/

Cordova saving image downloads to www folder

I'm writing an app which house over 1000 small images in the www/images folder in my cordova app (am using Intel XDK for the build). The app needs to check for updates and download images that the user doesn't have, along with other content. I want the new images to be saved to the same folder as the existing images (www/images) and can't find anywhere how to do this. All I find is articles about Cordova saving camera images to gallery/camera roll etc.
The content will be run through and "injected" script which will save it to localStorage. I'm just struggling with the images.
As far as I know, you can't do this. The www folder is part of the app bundle, and is sandboxed to protect it from, well, writing. That's the same answer someone else got here: Cordova Write To WWW Directory (iOS).
You have to use the File API to write to one of the writable file areas available to the app. You can find some examples of how to do that here: https://github.com/johnwargo/apache-cordova-api-cookbook-code/tree/master/chapter10-file.
Some details from the book:
The Cordova File API provides an application with the methods it needs
to interact with the device’s local directory structure. The API
exposes methods an application can use to browse the file system,
read, write, copy, move and remove files. An application cannot access
just any part of the file system, only the temporary and persistent
file storage locations (described below) on a mobile device.
Cordova’s implementation of the File API is based in part on the W3C
File API: Directories and System specification
(www.w3.org/TR/file-system-api). Not all of the capabilities of the
W3C specification have been implemented, but the API provides the
essential capabilities most mobile developers will need.
An application would use this API to read and write files on the
device file system. An application might use one of the many available
storage options for web application to store application data, but
developers can also use the file system to persist application
settings or application data using the file system, writing text files
(in XML or JSON format for example) as needed while the application
runs. Additionally, remember that the Camera (Chapter 3) and Capture
(Chapter 4) APIs write their files to the file system, applications
use the File API to manipulate those files as needed.
Most smartphone provide applications with two different types of file
storage space. To store temporary files, the device exposes a
temporary storage location. For content and data that is integral to
the application’s operation and must remain available after the
application is closed and restarted the application should use
persistent storage.
In general, an application might use temporary storage for transient
data, data that’s written to the file system as part of a memory
management strategy or as swap space when analyzing or manipulating a
large amount of data. With temporary storage, the application can read
from and write to the storage area with impunity, creating and
deleting files as needed within the available storage limitations of
the device. The device OS may automatically empty temporary storage
when the application closes or the device reboots – freeing up storage
space for other applications.
Persistent storage on the other hand is more stable; the device OS
protects it during reboots and when the application closes. An
application’s persistent storage will be emptied by the OS only when
the application is uninstalled from the device.
In the sample application, the application’s UI exposes buttons that
are used to interact with the different file system types as shown in
Figure 10.1. As you can see from the figure, I used jQuery Mobile for
the application’s UI in order to simplify the code and let jQuery
Mobile deal with rendering file lists, transitioning between pages and
so on.

Offline data storage in HTML

Just wanted to know is there any way where we can store offline data/imagee(20MB+) in HTML which is supported IE 10 metro browser. I haver gone through below links
Building Offline storage
Appreciate you can give me a running sample which stores the data/images locally and retrieves later on. Note this should be supported on IE10 of Windows 8 metro(tablet PC).
There are several means of doing this:
Using the appCache, you can store offline data using manifests, but are you are strictly limited in how much data you can store
Using the indexedDB, you can store much more data, but it's up to you to read and write the data programatically.
using a combination of the two, you can use the appCache to store your HTML/JavaScript offline, and then, while offline, pull the 20+MB of image data out of the indexedDB.

Download HTML to iOS persistent storage and load/navigate to it

I've just started using Phonegap with iOS and I'm wondering if there's a way to update the look of the application remotely (forgetting about App Store updates in this case).
I know that I can store data in a local database on the device and in files, but I'd like to navigate to that downloaded file. My app would start and check for updated HTML and JS files on my server. If there were none, it would continue to use the HTML already saved on the device. I don't want to navigate straight to a page on my server as Apple native APIs wouldn't work and I want the app to work offline too. I found this existing Stackoverflow question asking for something similar and persistent storage was mentioned by a commenter. I want to find out if it's possible to navigate to something in persistent storage.
Is it possible to download a HTML with Phonegap/Apache Cordova and then navigate to it?
The answer is YES.
You'll need a FileTransfer,
then store the file to the filesystem
You have to store the absolute path in the local-storage and navigate to it
I'am pretty sure, that this app will be removed from the apple-app store, because loading code from a server is prohibited.
Apple will remove this app from the store.

Categories