FIXME this page should probably be split into multiple pages ===== Partition layout ===== remarkable: ~/ fdisk -l Disk /dev/mmcblk1: 7818 MB, 7818182656 bytes 4 heads, 16 sectors/track, 238592 cylinders Units = cylinders of 64 * 512 = 32768 bytes Device Boot Start End Blocks Id System /dev/mmcblk1p1 * 1 611 19544 83 Linux /dev/mmcblk1p2 612 8241 244160 83 Linux /dev/mmcblk1p3 8242 15871 244160 83 Linux /dev/mmcblk1p4 15872 238592 7127072 5 Extended /dev/mmcblk1p5 15872 16482 19544 83 Linux /dev/mmcblk1p6 16483 17093 19544 83 Linux /dev/mmcblk1p7 17094 238592 7087960 83 Linux Disk /dev/mmcblk1boot1: 2 MB, 2097152 bytes 4 heads, 16 sectors/track, 64 cylinders Units = cylinders of 64 * 512 = 32768 bytes Disk /dev/mmcblk1boot1 doesn't contain a valid partition table Disk /dev/mmcblk1boot0: 2 MB, 2097152 bytes 4 heads, 16 sectors/track, 64 cylinders Units = cylinders of 64 * 512 = 32768 bytes Disk /dev/mmcblk1boot0 doesn't contain a valid partition table The mmcblk1 device is the internal flash storage. As partitions 3, 5 and 6 are not mounted during normal use, I would expect these to be a backup root partition (mmcblk1p3) and areas used for other configuration that needs to be kept by the device or used during firmware update. ===== Mounted partitions ===== remarkable: ~/ mount /dev/mmcblk1p2 on / type ext4 (rw,relatime,data=ordered) devtmpfs on /dev type devtmpfs (rw,relatime,size=91340k,nr_inodes=22835,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) tmpfs on /tmp type tmpfs (rw) configfs on /sys/kernel/config type configfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) tmpfs on /var/volatile type tmpfs (rw,relatime) /dev/mmcblk1p1 on /var/lib/uboot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/mmcblk1p7 on /home type ext4 (rw,relatime,data=ordered) remarkable: ~/ df -h Filesystem Size Used Available Use% Mounted on /dev/root 226.9M 147.8M 63.1M 70% / devtmpfs 89.2M 0 89.2M 0% /dev tmpfs 249.3M 0 249.3M 0% /dev/shm tmpfs 249.3M 3.5M 245.8M 1% /run tmpfs 249.3M 0 249.3M 0% /sys/fs/cgroup tmpfs 249.3M 0 249.3M 0% /tmp tmpfs 249.3M 4.0K 249.3M 0% /var/volatile /dev/mmcblk1p1 19.0M 4.2M 14.8M 22% /var/lib/uboot /dev/mmcblk1p7 6.5G 783.1M 5.4G 12% /home ==== / = root filesystem ==== This is a ~200M partition used as the Linux operating system root directory (think C: drive in the old Windows world). Although we haven't seen any new firmware released yet, I would expect this partition to possibly be wiped and replaced when upgrading. ==== /home = user data ==== This is a ~6.5G partition used for all the user data. Again, as we haven't seen any new firmware updates released yet, we don't know for sure, but I would expect this partition to be left untouched during a firmware update (although they may need to reprocess the files if they change their file format). ===== User data directory structure ===== In the below listing, you can see all the documents are stored in a .local/share/remarkable/xochitl subdirectory of the root user's home directory (/home/root). You will also notice that there are no human readable filenames and that each "document" has a number of associated files with it, depending on the document type. Human readable information is stored within the .metadata files (described further below). It is also a very flat directory structure. All .metadata files are stored at the same level, no matter where they are in the hierarchy presented on the reMarkable interface. There are sub-folders for thumbnails, cache and highlights images. The folder hierarchy seen in the reMarkable interface is built using the parent attributes in the .metadata files, with the top level documents and folders having a parent of "". Below are examples of: * Quick sheets - daf42439-c073-4006-b836-8b0f49609337 * A Folder (just .content and .metadata files) - 00de970e-5a17-4e52-b19e-a8fda3347f9f * A Notebook (no .pdf file, but has .lines) - a02cdfbb-a75c-4b20-b813-33dd977c4bf8 * A PDF document that has been drawn on (has a .lines file) - f21a3d3d-efb2-4292-aff2-55142b7221e5 * A PDF document that has not been drawn on (no .lines file) - fd2c4b2c-3849-46c3-bf2d-9c80994cc985 I don't have any eBooks on my reMarkable and I have cut out most of the rest of the documents from the listing. remarkable: ~/ find /home/ /home/ /home/lost+found /home/root /home/root/log.txt.old /home/root/.local /home/root/.local/share /home/root/.local/share/remarkable /home/root/.local/share/remarkable/xochitl /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.cache /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.cache/0.png /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.content /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.highlights /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.lines /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.lines.backup /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.metadata /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.pagedata /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.thumbnails /home/root/.local/share/remarkable/xochitl/daf42439-c073-4006-b836-8b0f49609337.thumbnails/0.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.cache /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.content /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.highlights /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.metadata /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.pagedata /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.pdf /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/19.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/4.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/2.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/17.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/18.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/15.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/11.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/5.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/7.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/10.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/6.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/8.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/12.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/1.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/0.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/3.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/16.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/13.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/9.jpg /home/root/.local/share/remarkable/xochitl/fd2c4b2c-3849-46c3-bf2d-9c80994cc985.thumbnails/14.jpg /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.cache /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.cache/0.png /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.content /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.highlights /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.lines /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.lines.backup /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.metadata /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.pagedata /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.thumbnails /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.thumbnails/0.jpg /home/root/.local/share/remarkable/xochitl/00de970e-5a17-4e52-b19e-a8fda3347f9f.content /home/root/.local/share/remarkable/xochitl/00de970e-5a17-4e52-b19e-a8fda3347f9f.metadata /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.cache /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.content /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.highlights /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.lines /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.lines.backup /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.metadata /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.pagedata /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.pdf /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.thumbnails /home/root/.local/share/remarkable/xochitl/f21a3d3d-efb2-4292-aff2-55142b7221e5.thumbnails/0.jpg /home/root/log.txt /home/root/.bash_history /home/root/.bashrc /home/root/.vimrc /home/root/.ssh /home/root/.ssh/authorized_keys /home/root/.vimrc~ /home/root/.config /home/root/.config/reMarkable /home/root/.config/reMarkable/remarkable-test-app.conf /home/root/.config/remarkable /home/root/.config/remarkable/xochitl.conf ==== Metadata file format ==== === A notebook === remarkable: ~/ cat /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.metadata { "deleted": false, "lastModified": "1510442047333", "metadatamodified": false, "modified": true, "parent": "00de970e-5a17-4e52-b19e-a8fda3347f9f", "pinned": false, "synced": false, "type": "DocumentType", "version": 0, "visibleName": "Notebook" } === A folder === remarkable: ~/ cat /home/root/.local/share/remarkable/xochitl/00de970e-5a17-4e52-b19e-a8fda3347f9f.metadata { "deleted": false, "lastModified": "1499259452366", "metadatamodified": true, "modified": true, "parent": "", "pinned": false, "synced": false, "type": "CollectionType", "version": 0, "visibleName": "Personal" } ==== Content file format ==== remarkable: ~/ cat /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.content { "extraMetadata": { "LastColor": "Black", "LastTool": "Ballpoint", "ThicknessScale": "1" }, "fileType": "", "fontName": "", "lastOpenedPage": 0, "lineHeight": -1, "margins": 100, "pageCount": 1, "textScale": 1, "transform": { "m11": 1, "m12": 1, "m13": 1, "m21": 1, "m22": 1, "m23": 1, "m31": 1, "m32": 1, "m33": 1 } } Note: the ''transform'' entry stores the transformations to the viewport subsequent to a ''crop'' action while reading the document. ''m11'' stores the scaling factor of the height / vertical axis, and ''m22'' stores the scaling factor of the width / horizontal axis. All the other values are unused. Values smaller than 1 lead to a zoom out, with white space around the image. Negative values are not accepted / lead to no display whatsoever. ==== Pagedata file format ==== remarkable: ~/ cat /home/root/.local/share/remarkable/xochitl/a02cdfbb-a75c-4b20-b813-33dd977c4bf8.pagedata P Lines small This file contains one line per document page, listing for each page the template selected. ==== Lines file format ==== copied from stucule's [[https://www.reddit.com/r/RemarkableTablet/comments/7c5fh0/work_in_progress_format_of_the_lines_files/|reddit post]] with permission The drawings are stored in a proprietary format (.lines file) with the following properties (deduced through extensive experimenting): * All integer values are stored over 4 little-endian bytes. * The file starts with plain text. Depending on the version it differs. For earlier versions: reMarkable lines with selections and layers For later versions: reMarkable .lines file, version=3 reMarkable .lines file, version=5 * //[only before version 3 (or even earlier?)] // Offset 0x2c-0x2f: The number of pages in the notebook (little endian) * [Repeated for each page * 4 bytes: The number of layers in the page (1 to 5). The last 3 bytes are 00. * [Repeated for each layer in the page * 4 bytes: Number of strokes in the layer * [Repeated for each stroke in the layer * 4 bytes: Pen used (0: Brush; 1: Pencil-Tilt; 2: Pen; 3:Marker; 4: Fineliner; 5: Highlighter; 6: Eraser; 7: Pencil-Sharp; 8: Erase area; ...) * 4 Bytes: stroke colour (0: Black; 1: Grey; 2: White) * <4 unknown bytes> 0000 0000 (The value is different for strokes coming from the "Move, scale, rotate & copy" tool) * 4 bytes: Pen width used (1.875:small; 2:medium; 2.125:large) Other values can occur after scaling. * //[version=5 only]// <4 unknown bytes> * 4 bytes: Number of segments in the stroke * [Repeated for each segment of the stroke * 4 bytes: Position on the horizontal axis, Floating point, 0-1404 * 4 bytes: Position on the vertical axis, Floating point, 0-1872 * 4 bytes: Pressure of the pen, Floating point, 0-1 * 4 bytes: Tilt of the pen, Floating point, 0.4 (vertical) to 1 (Horizontal), see notes below for a different interpretation * 4 bytes: Possibly speed of the stroke on this segment. Often close to 0.f, see notes below for a different interpretation * ] %%//%% end segment * ] %%//%% end stroke * ] %%//%% end layer * %%//%% end page Notes: * A stroke is from the moment you put the stylus on the device, to the moment you remove the stylus from the device. It forms a line. A segment is a fraction of that stroke. Note that the tiniest dot you can draw on the device already has several segments. * The parser knows how many pages/layers/strokes/segments it expects, so it just stops reading after that point. There is no byte used to signal that a stroke/layer/page is over before starting to parse the next. * According to Axel Hübl the last 8 bytes of the stroke have a different meaning: 4 bytes: pen rotation to X axis, 4 bytes: pen rotation to Y axis. See his blog post: [[https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format.html| reMarkable .lines File Format]] Libraries/code parsing the format: * https://github.com/ax3l/lines-are-beautiful (C++; version 3 only) * https://github.com/ax3l/lines-are-rusty (Rust; version 3 and 5) * https://github.com/bordaigorl/remy/blob/master/remy/remarkable/lines.py (Python; version 3 and 5) * https://gist.github.com/felixr/3b766811f5b4c6692aa15561bc25db1c (https://kaitai.io ; version 3 and 5) * https://gist.github.com/owulveryck/ae2e071bd5740c96bdc92c7f8f8f7172 (Go; version 5) ===== Notable folders ===== ==== /usr/share/remarkable ==== This folder contains: * The images used for different states of the ReMarkable: * batteryempty.png * poweroff.png * rebooting.png * restart-crashed.png * sleeping.png (light sleep, introduced with codex version 1.2.0.344) * splash.bmp * starting.png * suspended.png (full sleep) * The templates that you can apply in Quick Sheets: * Blank.png * Isometric.png * LS Checklist double.png * LS Checklist.png * LS Dayplanner.png * LS Dots bottom.png * LS Dots top.png * LS Four storyboards.png * LS Grid bottom.png * LS Grid margin large.png * LS Grid margin med.png * LS Grid top.png * LS Lines bottom.png * LS Lines medium.png * LS Lines small.png * LS Lines top.png * LS Margin medium.png * LS Margin small.png * LS One storyboard 2.png * LS One storyboard.png * LS Two storyboards.png * LS Week US.png * LS Week.png * Notes.png * P Black dots.png * P Black grid.png * P Black lines.png * P Black.png * P Checklist.png * P Cornell.png * P Day.png * P Dots S bottom.png * P Dots S top.png * P Dots S.png * P Dots large.png * P Four storyboards.png * P Grid bottom.png * P Grid large.png * P Grid margin large.png * P Grid margin med.png * P Grid medium.png * P Grid small.png * P Grid top.png * P Lined bottom.png * P Lined heading.png * P Lined top.png * P Lines large.png * P Lines medium.png * P Lines small.png * P Margin large.png * P Margin medium.png * P Margin small.png * P One storyboard.png * P Two storyboards.png * P US College.png * P US Legal.png * P Week 2.png * P Week US.png * P Week.png * Perspective1.png * Perspective2.png