My PocketBook 840 e-book reader recently started some weird behaviour: While it was running everything behaved normal but when turned off and on again, it did not remember the file that was opened nor the page I was viewing last. In fact, it did not remember any settings that I changed and even when I deleted files they were back again after a restart.

A quick research on the internet showed that this seems to be a quite frequent issue of PocketBooks. As others figured out this is caused by the internal memory of the device being broken and now being in a read-only mode. This means the reader still works normally but any change made will be lost after a restart.

Fortunately, the PocketBook 840 (and a number of other PocketBooks) uses a regular microSD card as internal memory so you can easily replace it yourself. There is just one caveat: The device checks the CID (serial number) of the card so it needs a bit of hacking to make it work with an other card. The good news is that we live in the age of internet and there are people who already figured out how to do this. Please note that all the credit for this solution goes to the people in this forum! I am merely providing a concise description of the final procedure so there is no need to read through several pages of forum discussion.

Note that I am referring here to my PocketBook 840 but the same steps should also work for some other models (e.g. the forum discussion is based on the 626).

The basic steps are as follows:

  1. Extract some information from the e-reader which is needed later.
  2. Open the device and remove the SD card.
  3. Copy the image to a new card.
  4. Patch the image on the new card to fool the CID check.

What you need before starting:

  • A new microSD card with at least 4 GB space (or whatever size the internal memory of your e-reader has).
  • A computer running Linux.
  • A microSD card reader.
  • Some basic Linux knowledge (you should be comfortable using dd, mounting partitions and modifying files in a hex editor).

Preparations Before Opening the Device

As mentioned above, the software of the e-reader checks the CID of the internal microSD card and will not start if it does not match the expected value (it will just show a rotating hourglass forever). The hack to make it work with a new card consists in extracting the CID of the original card, storing it in a file and patch the software to read it from that file instead of the actual card.

To simplify this, nhedgehog provides a little script in the mobileread forum which easily extracts both the CID of the card and the application that needs to be patched from the running device.

For this, perform the following steps:

  1. Download the SD_prepare.zip from here.
  2. Extract it on the new microSD card.
  3. Insert the card into the e-reader (using the external card slot).
  4. Start the device and execute the SD_prepare application (should be shown in the list of applications). This will create two files .sd_original_serial and monitor.app on the card.
  5. Remove the card and safe the two files. They will be needed later.

Open the Device and Remove the Internal Memory Card

With a bit of carefulness the back cover of the device can be removed without damaging it. There are now screws, it is just clipped with a lot of clips, so it can be removed by using finger nails or some thin piece of plastic. See also this article on how to open it.

Once opened, the internal memory card can easily be removed by removing the tape, pushing the card a bit towards the smaller side and then release. The wider end should come up so that you can pull the card out. Simply invert the steps to put the card back in later.

Internal microSD card on the PocketBook 840
mainboard

Copy and Patch the Image on a New Card

  1. The first step is to safe the image of the original microSD card on your computer. In the following, I will always use /dev/sdx to address the device. Obviously, this needs to be replaced with the name it gets assigned on your computer.

    dd if=/dev/sdx of=pocketbook_original_image.dd bs=512 conv=noerror,sync
    

    From how on, we don’t need the original card anymore. However, better keep it as a backup in case anything goes wrong!

  2. Insert the new microSD card to your computer and write the image to it:

    dd if=pocketbook_original_image.dd of=/dev/sdx bs=512 conv=sync,notrunc
    
  3. Simply inserting the new card in the e-reader now will not work, as the CID of the new card does not match with the value the software expects. The application checking this is the monitor.app that we extracted in the beginning. Open that file in a hex editor. Search for the following string:

    /sys/block/mmcblk%c/device/serial
    

    and replace it with

    /mnt/secure/.sd_original_serial
    

    Important: The new string is a bit shorter than the original one, so you need to pad it with zero-bytes to match the length!

    Save the modified file with the name monitor_patched.app. Keep a backup of the original file!

  4. Now we place the patched file and the file with the original CID on the proper partitions of the new card. If the image was copied correctly, the card should contain ten partitions.

    1. Mount /dev/sdx9 and copy the file .sd_original_serial to it.
    2. Mount /dev/sdx8 and copy the file monitor_patched.app to it.
    3. In the directory in which you mounted /dev/sdx8 execute the following commands:

      chmod a+x monitor_patched.app
      mv pocketbook pocketbook_ORIG
      ln -s monitor_patched.app pocketbook
      
  5. Optional: When using a card that is bigger then the original, you can increase the size of the data partition so you can make use of the increased size. Note that I did not test this as I was happy enough to make it boot from the new card. If you want to give it a try, see here and here.

  6. The new card is now ready. However, before putting it into the e-reader, you may want to make a backup of the patched image, so you don’t need to repeat all the steps in case you need to replace the new card as well at some point in the future.

  7. Put the new microSD card with the prepared image into the e-reader and start it. If everything was done correctly, it should boot normally and the memory issue should be resolved :). Close the e-reader by simply pushing the plastic cover back in place.

Acknowledgements

As already mentioned above, all the credit for finding this solution goes to the people of mobileread forum, mainly to the users nhedgehog and m4mmon. Thanks a lot to them for spending all the time on finding the solution, improving it to make it more easily applicable and sharing everything with the rest of the world!

Further thanks to PocketBook to make a device that can be opened and the memory be replaced without destroying it (but a non-thanks for actually preventing the user to do this on the software side…).