View Single Post
Old 09-27-2019, 03:13 PM   #81
TheProto
Junior Member
TheProto began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2019
Device: Pocketbook
As i had some trouble getting things to work i will try to summarize the steps i followed.
Note: I completed the following steps on my linux machine because i found it much easier as i don't have much experience with windows.
1.Create a copy of the sd card image using dd.
Command: sudo dd if=<sd_card_devide_location> of=<path_to_output_file>
Example: sudo dd if=/dev/mmcblk0 of=~/Desktop/pb_sd_image.img
2.Find the cramfs.img
As described above the cramfs.img is located in the ebrmain partition.
Since I was searching for it under linux the disk was mounted at /dev/media under the name "Volumn".
3.Unpack the cramfs.img (this could be done with cramfsck)
Command: cramfsck <image_name> -x <path_to_output_folder>
Example: cramfsck cramfs.img -x out
4.Modify the monitor.app
Note: monitor.app is located at: <path_to_unpacked_cramfs_image>/bin/monitor.app
I used ghex to modify the app by substituting the string "/sys/block/mmcblk%c/device/serial" with "/mnt/secure/.sd_original_serial".
5.Substitute the patched app 5.1: Copy the application to the mounted disk that contains the "pocketbook -> bin/monitor.app" symlink. 5.2: Rename the old symlink: Command: mv pocketbook pocketbook.ORG 5.3: Create the new link Command: sudo ln -s <name_of_patched_app> <name_of_symlink> Example: sudo ln -s patched-monitor.app pocketbook
6.Create the .sd_original_serial file:
Note: The .sd_original_serial should contain the CID of the original sd card;
To create the .sd_original_serial file i used the following command:
Command:cat /sys/block/mmcblk0/device/cid > ~/Desktop/.sd_original_serial
7.Copy the newly created .sd_original_serial to the "secure" sd card partion.
For me its name was a combination of 16bit code devided by "-".
8.Make sure both monitor.app and .sd_original_serial have the correct permissions.
Just to be safe i used: chmod 777 <name_of_file>
For both of the files when i copied them to their proper location.
I hope this helps you fix your device. Good luck
TheProto is offline   Reply With Quote