{"id":18879478,"url":"https://github.com/mchubby/pb740-inkpad-notes","last_synced_at":"2025-09-04T06:31:12.340Z","repository":{"id":145396322,"uuid":"227690074","full_name":"mchubby/pb740-inkpad-notes","owner":"mchubby","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-14T14:59:26.000Z","size":87,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-08T06:43:09.673Z","etag":null,"topics":["documentation","pocketbook","sunxi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mchubby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-12T20:24:57.000Z","updated_at":"2024-07-20T06:35:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"b79c773e-052c-4a74-bef5-bbd5811200ed","html_url":"https://github.com/mchubby/pb740-inkpad-notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchubby%2Fpb740-inkpad-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchubby%2Fpb740-inkpad-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchubby%2Fpb740-inkpad-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchubby%2Fpb740-inkpad-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mchubby","download_url":"https://codeload.github.com/mchubby/pb740-inkpad-notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231936574,"owners_count":18448609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","pocketbook","sunxi"],"created_at":"2024-11-08T06:36:44.837Z","updated_at":"2024-12-31T02:44:39.131Z","avatar_url":"https://github.com/mchubby.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Imaging the PocketBook InkPad 3 (740) and misc notes\n\n## Step 1: Root device\nSee https://www.mobileread.com/forums/showthread.php?t=325185 and its associated code repository https://github.com/ezdiy/pbjb\n\n## Step 2: Dump device to external SD\nRequired space is around 1.5GB once compressed, more if the internal storage was modified (added books, dictionaries, TTS voices, etc.).\n\nOnce inserted, the external SD is automatically mounted at `/mnt/ext2/`\n\n```shell\n# dd bs=1M if=/dev/mmcblk0 | gzip -c | split -b 4095m - /mnt/ext2/mmcblk0--dd.gz. \u0026\n# watch -n5 'kill -USR1 $(pgrep ^dd)'\n```\n\nSince the InkPad 3 uses a FAT32 filesystem for the SD, size is limited to 4GB per file. You may opt to dump the device with no compression (because the embedded SoC, Allwinner B288, is a very slow dual-core ARM CPU) but retain the split part: remove the ` | gzip -c` part.\n\nHit `Ctrl+C` when the dd program ends and there is no process to monitor.\n\n## Misc.\n\n### Device-specific data\n- /sys/block/mmcblk0/device/cid\n- /sys/block/mmcblk0/device/csd\n\nHistorically on devices booting on the hidden internal SD (PocketBook 626), they would bootloop when swapping the original SD for a cloned larger one, because of a check in **monitor.app**. See https://www.mobileread.com/forums/showthread.php?t=278728\n\n### Mounts / partitioning\n\n`$ mount`\n\n|device |  mountpoint | type |\n|--|--|-- |\n|rootfs| on / |(rootfs)\n|dev/root| on / |(ext2)\n|/dev/mmcblk0p2| on /boot |(ext2)\n|/dev/ebrmain| on /ebrmain |(ext2)\n|/dev/secure| on /secure |(ext2)\n|/dev/loop0| on /ebrmain/cramfs |(cramfs)\n|/dev/user_int| on /mnt/ext1 |(vfat)\n|/dev/user_extp1| on /mnt/ext2 |(vfat)\n\n`$ cat /etc/fstab`\n\n|device |  mountpoint | type | opts etc.|\n|--|--|--|-- |\n|none                    |/proc             |proc|    defaults  0 0\n|none                    |/dev/pts          |devpts|  mode=0622 0 0\n|tmpfs                   |/dev/shm          |tmpfs|   defaults  0 0\n|/dev/ebrmain          |/ebrmain          |auto|    ro        0 0\n|/dev/secure          |/mnt/secure       |auto|    defaults  0 0\n|/ebrmain/cramfs.img     |/ebrmain/cramfs   |auto|    defaults,loop 0 0\n|/dev/mmcblk0p2          |/boot           |auto|    ro 0 0\n\n---------------------------------------------------\n\n**fstab from swupdate**  (Extracted from `SWUPDATE.BIN` with the \"SynkActiv\" script):\n```\nnone\t\t\t/proc\t\tproc\t  defaults  0 0\nnone\t\t\t/dev/pts\tdevpts  mode=0622 0 0\ntmpfs\t\t\t/dev/shm\ttmpfs\t  defaults  0 0\n/dev/ebrmain\t\t/ebrmain\tauto    ro        0 0\n/dev/secure\t\t/mnt/secure\tauto    defaults  0 0\n/ebrmain/cramfs.img\t/ebrmain/cramfs\tauto\tdefaults,loop 0 0\n/dev/bootfs\t\t/boot\t\tauto\tro \t0 0\n```\n\nfdisk -l: blank response\n\n### Filled with 00-bytes: mmcblk0boot0 and mmcblk0boot1\n```\n# dd if=/dev/mmcblk0boot0 of=/mnt/ext2/mmcblk0boot0.dd\n# dd if=/dev/mmcblk0boot1 of=/mnt/ext2/mmcblk0boot1.dd\n```\n\n### Exploring the partitioning with root\n`cat /proc/partitions`\n\n|major | minor | #blocks | name |\n|--|--|--|-- |\n|7 | 0 | 120004 | loop0 |\n|179 | 0 | 7634944 | mmcblk0 |\n|179 | 1 | 6793216 | mmcblk0p1 |\n|179 | 2 | 32768 | mmcblk0p2 |\n|179 | 3 | 1 | mmcblk0p3 |\n|179 | 5 | 16384 | mmcblk0p5 |\n|179 | 6 | 34816 | mmcblk0p6 |\n|179 | 7 | 65536 | mmcblk0p7 |\n|179 | 8 | 524288 | mmcblk0p8 |\n|179 | 9 | 131072 | mmcblk0p9 |\n|179 | 224 | 4096 | mmcblk0boot1 |\n|179 | 208 | 4096 | mmcblk0boot0 |\n|179 | 16 | 61897728 | mmcblk1 |\n|179 | 17 | 61896704 | mmcblk1p1 |\n\nNotice how the block count seems off for mmcblk0p3\n\n`# fdisk -l`\nDisk /dev/mmcblk0: 7456 MB, 7818182656 bytes, 15269888 sectors\n954368 cylinders, 1 heads, 16 sectors/track\nUnits: cylinders of 16 * 512 = 8192 bytes\n\n|Device |Boot |StartCHS |EndCHS |StartLBA |EndLBA |Sectors |Size |Id |Type|\n|-|-|-|-|-|-|-|-|-|-|\n|/dev/mmcblk0p1 |* |0,0,0 |0,0,0 |1683456 |15368191 |13684736 |6682M |b |Win95 |FAT32|\n|Partition 1 does not end on cylinder boundary|\n|/dev/mmcblk0p2 | |0,0,0 |0,0,0 |73728 |139263 |65536 |32.0M |6 |FAT16|\nPartition 2 does not end on cylinder boundary|\n|/dev/mmcblk0p3 | |0,0,0 |0,0,0 |1 |1544192 |1544192 |754M |5 |Extended|\nPartition 3 does not end on cylinder boundary|\n|/dev/mmcblk0p5 | |0,0,0 |0,0,0 |139264 |172031 |32768 |16.0M |83 |Linux|\n|/dev/mmcblk0p6 | |0,0,0 |0,0,0 |172032 |241663 |69632 |34.0M |83 |Linux|\n|/dev/mmcblk0p7 | |0,0,0 |0,0,0 |241664 |372735 |131072 |64.0M |83 |Linux|\n|/dev/mmcblk0p8 | |0,0,0 |0,0,0 |372736 |1421311 |1048576 |512M |83 |Linux|\n|/dev/mmcblk0p9 | |0,0,0 |0,0,0 |1421312 |1683455 |262144 |128M |83 |Linux|\n\n```\nPartition table entries are not in disk order\nDisk /dev/mmcblk0boot1: 4 MB, 4194304 bytes, 8192 sectors\n128 cylinders, 4 heads, 16 sectors/track\nUnits: cylinders of 64 * 512 = 32768 bytes\n\nDisk /dev/mmcblk0boot1 doesn't contain a valid partition table\nDisk /dev/mmcblk0boot0: 4 MB, 4194304 bytes, 8192 sectors\n128 cylinders, 4 heads, 16 sectors/track\nUnits: cylinders of 64 * 512 = 32768 bytes\n\nDisk /dev/mmcblk0boot0 doesn't contain a valid partition table\n```\n\n### Detecting supported file systems\n```bash\n# blkid /dev/mmcblk0p*\n/dev/mmcblk0p1: LABEL=\"Vivlio\" UUID=\"4B3D-7544\"\n/dev/mmcblk0p2: LABEL=\"Volumn\"\n/dev/mmcblk0p7: UUID=\"da0bb0fb-8c84-477c-b781-1f8c7b6c5016\"\n/dev/mmcblk0p8: UUID=\"04ce3511-5916-48d5-99be-c57f0bc955f1\"\n/dev/mmcblk0p9: UUID=\"e3f04df8-c1d9-4de3-8640-b40d3a2ee37e\"\n```\n\n`# df -h`\n\n| Filesystem | Size | Used | Available | Use% | Mounted | on |\n| - | - | - | - | - | - | - |\n| /dev/root | 63.6M | 19.8M | 40.6M | 33% | / |\n| none | 128.0M | 504.0K | 127.5M | 0% | /var |\n| /dev/mmcblk0p2 | 63.9M | 12.8M | 51.0M | 20% | /boot |\n| tmpfs | 498.1M | 4.0K | 498.1M | 0% | /var/dev/shm |\n| /dev/ebrmain | 507.7M | 301.0M | 181.1M | 62% | /ebrmain |\n| /dev/secure | 124.0M | 41.6M | 76.0M | 35% | /mnt/secure |\n| /dev/loop0 | 220.6M | 220.6M | 0 | 100% | /ebrmain/cramfs |\n| /dev/user_int | 6.5G | 1.1G | 5.4G | 17% | /mnt/ext1 |\n| /dev/user_extp1 | 59.0G | 1.2G | 57.8G | 2% | /mnt/ext2 |\n| /dev/secure | 124.0M | 41.6M | 76.0M | 35% | /ebrmain/cramfs/bin/netagent |\n| /dev/secure | 124.0M | 41.6M | 76.0M | 35% | /lib/modules/ins_usb_mod.sh |\n| /dev/secure | 124.0M | 41.6M | 76.0M | 35% | /lib/modules/rm_usb_mod.sh |\n| /dev/secure | 124.0M | 41.6M | 76.0M | 35% | /lib/modules/ins_usbnet.sh |\n| /dev/secure | 124.0M | 41.6M | 76.0M | 35% | /lib/modules/rm_usbnet.sh |\n\nNote the dev/secure mounts are added by the jailbreak kit.\n\n```bash\n# find /var/dev -type l -exec ls -al {} ';'\nlrwxrwxrwx    1 root     root             6 Dec  1 23:19 /var/dev/input/keyboard0 -\u003e event0\nlrwxrwxrwx    1 root     100              9 Dec  1 23:19 /var/dev/secure -\u003e mmcblk0p9\nlrwxrwxrwx    1 root     100              3 Dec  1 23:19 /var/dev/fb -\u003e fb0\nlrwxrwxrwx    1 root     100              4 Dec  1 23:19 /var/dev/pvi_io -\u003e zero\nlrwxrwxrwx    1 root     100              4 Dec  1 23:19 /var/dev/rtc -\u003e rtc0\nlrwxrwxrwx    1 root     100              9 Dec  1 23:19 /var/dev/rootfs -\u003e mmcblk0p7\nlrwxrwxrwx    1 root     root             7 Dec  1 23:19 /var/dev/misc/rtc -\u003e ../rtc0\nlrwxrwxrwx    1 root     100              9 Dec  1 23:19 /var/dev/ebrmain -\u003e mmcblk0p8\nlrwxrwxrwx    1 root     100              9 Dec  1 23:19 /var/dev/user_int -\u003e mmcblk0p1\nlrwxrwxrwx    1 root     100              4 Dec  1 23:19 /var/dev/pvi_ioc -\u003e zero\nlrwxrwxrwx    1 root     100              7 Dec  1 23:19 /var/dev/user_ext -\u003e mmcblk1\nlrwxrwxrwx    1 root     100              3 Dec  1 23:19 /var/dev/einkdrv -\u003e fb0\nlrwxrwxrwx    1 root     100              7 Dec  1 23:19 /var/dev/mxc_mem -\u003e mxc_iim\nlrwxrwxrwx    1 root     100              9 Dec  1 23:19 /var/dev/user_extp1 -\u003e mmcblk1p1\nlrwxrwxrwx    1 root     100              9 Dec  1 23:19 /var/dev/root -\u003e mmcblk0p7\n\n```\n\nSee https://linux-sunxi.org/PocketBook_Touch_Lux_2_(626)#Device_specific_topic for a similar layout\nHere we have A20-style NAND layout at 0x01400000\nSee https://github.com/linux-sunxi/sunxi-tools/blob/master/nand-part-a20.h\n\n(all offsets below need to add 0x01400000 = 20 MB)\n\n### Parsing the sunxi partition table at offset 20 MB\n```bash\nnandmbr-parse$ ./a.out SUNXIMBR.bin\nSUNXIMBR.bin\ncheck partition table\nmbr: version 0x00000200, magic softw411\n7 partitions\npartition  1: class =         DISK, name =       bootfs, partition start =    32768, partition size =    65536 user_type=32768\npartition  2: class =         DISK, name =          env, partition start =    98304, partition size =    32768 user_type=32768\npartition  3: class =         DISK, name =        pbenv, partition start =   131072, partition size =    69632 user_type=32768\npartition  4: class =         DISK, name =       rootfs, partition start =   200704, partition size =   131072 user_type=32768\npartition  5: class =         DISK, name =      ebrmain, partition start =   331776, partition size =  1048576 user_type=32768\npartition  6: class =         DISK, name =       secure, partition start =  1380352, partition size =   262144 user_type=32768\npartition  7: class =         DISK, name =        UDISK, partition start =  1642496, partition size =        0 user_type=33024\n```\n```bash\nnandmbr-parse$ ./a.out SUNXIMBR2.bin\nSUNXIMBR2.bin\ncheck partition table\nmbr: version 0x00000200, magic softw411\n7 partitions\npartition  1: class =         DISK, name =       bootfs, partition start =    32768, partition size =    65536 user_type=32768\npartition  2: class =         DISK, name =          env, partition start =    98304, partition size =    32768 user_type=32768\npartition  3: class =         DISK, name =        pbenv, partition start =   131072, partition size =    69632 user_type=32768\npartition  4: class =         DISK, name =       rootfs, partition start =   200704, partition size =   131072 user_type=32768\npartition  5: class =         DISK, name =      ebrmain, partition start =   331776, partition size =  1048576 user_type=32768\npartition  6: class =         DISK, name =       secure, partition start =  1380352, partition size =   262144 user_type=32768\npartition  7: class =         DISK, name =        UDISK, partition start =  1642496, partition size =        0 user_type=33024\n```\n\n```bash\nnandmbr-parse$ ./a.out SUNXIMBR3.bin\nSUNXIMBR3.bin\ncheck partition table\nmbr: version 0x00000200, magic softw411\n7 partitions\npartition  1: class =         DISK, name =       bootfs, partition start =    32768, partition size =    65536 user_type=32768\npartition  2: class =         DISK, name =          env, partition start =    98304, partition size =    32768 user_type=32768\npartition  3: class =         DISK, name =        pbenv, partition start =   131072, partition size =    69632 user_type=32768\npartition  4: class =         DISK, name =       rootfs, partition start =   200704, partition size =   131072 user_type=32768\npartition  5: class =         DISK, name =      ebrmain, partition start =   331776, partition size =  1048576 user_type=32768\npartition  6: class =         DISK, name =       secure, partition start =  1380352, partition size =   262144 user_type=32768\npartition  7: class =         DISK, name =        UDISK, partition start =  1642496, partition size =        0 user_type=33024\n```\n\n```bash\nnandmbr-parse$ ./a.out SUNXIMBR4.bin\nSUNXIMBR4.bin\ncheck partition table\nmbr: version 0x00000200, magic softw411\n7 partitions\npartition  1: class =         DISK, name =       bootfs, partition start =    32768, partition size =    65536 user_type=32768\npartition  2: class =         DISK, name =          env, partition start =    98304, partition size =    32768 user_type=32768\npartition  3: class =         DISK, name =        pbenv, partition start =   131072, partition size =    69632 user_type=32768\npartition  4: class =         DISK, name =       rootfs, partition start =   200704, partition size =   131072 user_type=32768\npartition  5: class =         DISK, name =      ebrmain, partition start =   331776, partition size =  1048576 user_type=32768\npartition  6: class =         DISK, name =       secure, partition start =  1380352, partition size =   262144 user_type=32768\npartition  7: class =         DISK, name =        UDISK, partition start =  1642496, partition size =        0 user_type=33024\n```\n\n# Mermaid graph\n![partition-layout.png](partition-layout.png)\n\n[View](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggTFJcblxuJSVkZWZpbmUgY2xhc3Nlc1xuY2xhc3NEZWYgY2xhc3NPayBmaWxsOmdyZWVuLGNvbG9yOiMwMEZGMDAsc3Ryb2tlLXdpZHRoOjJweCxzdHJva2U6ZGFya0dyZWVuO1xuY2xhc3NEZWYgY2xhc3NXYXJuIGZpbGw6b3JhbmdlLGNvbG9yOiNGRkYsc3Ryb2tlLXdpZHRoOjJweCxzdHJva2U6ZGFya09yYW5nZTtcbmNsYXNzRGVmIGNsYXNzRGlzIGZpbGw6I2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lU3R5bGUgc3ViZ3JhcGgvbm9kZXNcbnN0eWxlIHVubWFwcGVkIGZpbGw6I2VlZixjb2xvcjojMzNGLHN0cm9rZS13aWR0aDoycHgsc3Ryb2tlOmRhcmtCbHVlXG5jbGFzcyBlZ29uMC0xLGVnb24wLTIsdWJvb3R0b2MtYmFja3VwLHVib290dG9jLW1haW4scGFydHRhYmxlIGNsYXNzRGlzXG5jbGFzcyBtbWNibGswcDEgY2xhc3NPa1xuY2xhc3MgbW1jYmxrMHAyIGNsYXNzV2FybiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19)\n\n\n```mermaid\ngraph LR\n\n%%define classes\nclassDef classOk fill:green,color:#00FF00,stroke-width:2px,stroke:darkGreen;\nclassDef classWarn fill:orange,color:#FFF,stroke-width:2px,stroke:darkOrange;\nclassDef classDis fill:#eee,color:#000,stroke-width:0;\n%%classDef node stroke:#0000ff,stroke-width:4px;\n\nsubgraph unmapped[\"fa:fa-microchip 36 MB unmapped data fa:fa-question-circle at SD card start\"]\negon0-1(\"BOOT0_EMMC3\u003cbr/\u003efa:fa-hdd upto 32 KB\u003cbr/\u003efa:fa-map-marker-alt @192 KB (384*512)\u003cbr/\u003eeGON.BT0 (4.0 boot0)\u003cbr/\u003e'the Embedded GO-ON Bootloader System'\")\n---\n\negon0-2(\"BOOT0_EMMC3 backup\u003cbr/\u003efa:fa-hdd upto 32 KB\u003cbr/\u003efa:fa-map-marker-alt @256 KB (512*512)\u003cbr/\u003eeGON.BT0 (4.0 boot0)\")\n---\n\nuboottoc-backup(\"UBOOT-backup pkg\u003cbr/\u003efa:fa-hdd upto 4? MB\u003cbr/\u003efa:fa-map-marker-alt @12MB (24576*512)\u003cbr/\u003eboot1 sunxi-package\")\n---\n\nuboottoc-main(\"UBOOT pkg\u003cbr/\u003efa:fa-hdd upto 4? MB\u003cbr/\u003efa:fa-map-marker-alt @~16MB (32800*512)\u003cbr/\u003eboot1 sunxi-package\")\n---\n\nparttable(\"partitions\u003cbr/\u003efa:fa-hdd 64 KB\u003cbr/\u003efa:fa-map-marker-alt @20MB\u003cbr/\u003e4x 16KB sunxi PT\")\nend\nparttable --- mmcblk0p2\n\nsubgraph \"mmcblk0p2: primary\u003cbr/\u003e\"\nmmcblk0p2((\"mmcblk0p2 (/dev/boot)\u003cbr/\u003efa:fa-hdd 32 MB [df says 64MB?]\u003cbr/\u003efa:fa-map-marker-alt @36MB\u003cbr/\u003eFAT16 /boot\"))\nend\nmmcblk0p2 --- mmcblk0p5\n\nsubgraph \"mmcblk0p3: extended [protective?] fa:fa-hdd 754 MB (wrong fa:fa-map-marker-alt @.5MB in MBR)\"\nmmcblk0p5(\"mmcblk0p5\u003cbr/\u003efa:fa-hdd 16 MB\u003cbr/\u003efa:fa-map-marker-alt @68MB\u003cbr/\u003eenv\")\n---\n\nmmcblk0p6(\"mmcblk0p6\u003cbr/\u003efa:fa-hdd 34 MB\u003cbr/\u003epbenv\")\n---\n\nmmcblk0p7(\"mmcblk0p7 (/dev/root)\u003cbr/\u003efa:fa-hdd 64 MB\u003cbr/\u003eEXT2 /\")\n---\n\nmmcblk0p8(\"mmcblk0p8 (/dev/ebrmain)\u003cbr/\u003efa:fa-hdd 512 MB\u003cbr/\u003eEXT2 /ebrmain\")\n---\n\nmmcblk0p9(\"mmcblk0p9 (/dev/secure)\u003cbr/\u003efa:fa-hdd 128 MB\u003cbr/\u003e /mnt/secure\")\nend\nmmcblk0p9 --- mmcblk0p1\n\nsubgraph \"mmcblk0p1: primary\"\nmmcblk0p1(\"mmcblk0p1 (/dev/user_int)\u003cbr/\u003efa:fa-hdd 6.5 GB\u003cbr/\u003efa:fa-map-marker-alt @822MB\u003cbr/\u003eFAT32 /mnt/ext1\")\nend\n\n%%Style subgraph/nodes\nstyle unmapped fill:#eef,color:#33F,stroke-width:2px,stroke:darkBlue\nclass egon0-1,egon0-2,uboottoc-backup,uboottoc-main,parttable classDis\nclass mmcblk0p1 classOk\nclass mmcblk0p2 classWarn\n```\n\n\n\n\n### Misc: References to device SN in memory dump\n- BOOT: 2 refs, only /boot/hwdevice found\n- MNTsecure: 12 refs = fwinfo.txt + 11 dictionary *.lic\n- User FAT32: 16 in raw, 9 refs = 8*device.xml(7 deleted?) + 8* cookies\n\n\n# splitter script\n\n#### (Optional) Regenerate the python handler code from the ksy descriptive file.\n```batch\nC:\\EXTRACT\\kaitai-struct-compiler-0.8\\bin\\kaitai-struct-compiler.bat -t all pocketbook-pb740-dd-dump.ksy\n```\n\n#### Install pip dependencies\n ```bash\n$ sudo pip install kaitaistruct\n(--user if you want, or create a venv)\n```\n\n#### Run the splitter script on dd image\n ```bash\n$ python pocketbook-pb740-dd-dump-to-files.py mmcblk0--dd\n```\n\nYou may then use 7-zip GUI to extract or browse the partitions' contents.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmchubby%2Fpb740-inkpad-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmchubby%2Fpb740-inkpad-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmchubby%2Fpb740-inkpad-notes/lists"}