Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2015, 04:30 AM   #16
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by amirseni View Post
I did manage to flash the main kernel and diag kernel.
You **MUST** also flash corresponding images.
The Kernel image and the System image are **MATCHED SETS**
That is a total of **TWO** matched sets, one for the Main system and one for the Diags system.
Quote:
Originally Posted by amirseni View Post
on the vfat(kindle) it was always volatile.

Probably thats why fastboot flies when flashing mmcblk0p1.
**WRONG**
The image size of mmcblk0p1 is larger than what fastboot can handle.
Quote:
Originally Posted by amirseni View Post
How does one backup the serial numbers, etc.

Thinking of trying eraseall
**DO NOT** use the eraseall command, just don't.
At least not until after you get the PEBKAC out of what you are already trying to do.
knc1 is offline   Reply With Quote
Old 02-15-2015, 07:01 AM   #17
amirseni
Member
amirseni began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2015
Device: Kindle Paperwhite 1st Gen
Recap of steps

To Recap.

Got a PW1+3G, stuck on Boy reading under tree

Got a serial connection running

Errors in loading the Kernel Image

## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.31-rt11-lab126
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4608576 Bytes = 4.4 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... < Forgot what the actual error message was
Loading Kernel Image ...

Got the kernel, diags_kernel, system and diags files from:
http://ixtab.tk/kindle-touch-images/...pw520_wlan+3g/
extracted all of them.

Got fastboot for kindle and compiled it

Started the KPW, interrupted the boot from the serial terminal
uboot> bist
bist> fastboot
on pc side ran:
./fastboot flash kernel main_kernel.img
./fasbtoot flash diags_kernel diags_kernel.img
downloading 'diags'...
OKAY [ 2.371s]
writing 'diags'...
OKAY [ 2.028s]
finished. total time: 4.401s

Diags partition is flashed way too fast (65MB).
./fastboot flash diags mmcblk0p2.img

rebooted, restarted on Diag mode, no longer getting checksum errors, went straight to diags menu

Entered U to get to USB device mode.

The Kindle drive appears, both under windows and linux
copy over the mmcblk0p1 file to the root of the drive.
unmounted properly then enter the login prompt.

Entered root credentials
Browse over to /mnt/base-us

[root@kindle us]# dd if=./pw_3g_5.2.0-mmcblk0p1.img of=/dev/mmcblk0p1
716800+0 records in
716800+0 records out
367001600 bytes (350.0MB) copied, 139.472548 seconds, 2.5MB/s K

[root@kindle /mnt]# mount /dev/mmcblk0p1 ./mmc/
JBD: no valid journal superblock found
EXT3-fs: error loading journal.
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

rebooted.

try to disable diagmode and get the following
Could not mount/access customer partition!

rebooted, checked again the contents of the kindle drive and the mmcblk0p1 files are no longer there, whatever file i copy is no longer available after reboot.


So probably the flash memory is gone.

Any other ideas that i can attempt.

Thanks

Last edited by amirseni; 02-15-2015 at 07:18 AM.
amirseni is offline   Reply With Quote
Old 02-15-2015, 08:44 AM   #18
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by amirseni View Post
- - - -
Got the kernel, diags_kernel, system and diags files from:
http://ixtab.tk/kindle-touch-images/...pw520_wlan+3g/
extracted all of them.
Now check if they are correct (or at least reasonable).

Spoiler:

Code:
core2quad var1 $ mkdir pw1
core2quad var1 $ cd pw1

core2quad pw1 $ wget ...
- - - -
Length: 162988177 (155M) [application/x-gzip]
Saving to: `pw_3g_5.2.0-mmcblk0p1.img.gz'

core2quad pw1 $ wget ...
- - - -
Length: 9157726 (8.7M) [application/x-gzip]
Saving to: `pw_3g_5.2.0-mmcblk0p2.img.gz'

core2quad pw1 $ wget ...
- - - -
Length: 2190805 (2.1M) [application/x-gzip]
Saving to: `pw_3g_5.2.0-main_kernel.img.gz'

core2quad pw1 $ wget ...
- - - -
Length: 2189963 (2.1M) [application/x-gzip]
Saving to: `pw_3g_5.2.0-diags_kernel.img.gz'

core2quad pw1 $ file *
pw_3g_5.2.0-diags_kernel.img.gz: gzip compressed data, was "diags_kernel.img", from Unix, last modified: Fri Nov  2 14:49:54 2012
pw_3g_5.2.0-main_kernel.img.gz:  gzip compressed data, was "main_kernel.img", from Unix, last modified: Fri Nov  2 14:49:54 2012
pw_3g_5.2.0-mmcblk0p1.img.gz:    gzip compressed data, from Unix, last modified: Thu May 31 19:53:04 2012, max compression
pw_3g_5.2.0-mmcblk0p2.img.gz:    gzip compressed data, from Unix, last modified: Thu May 31 19:47:47 2012, max compression

core2quad pw1 $ gunzip *

core2quad pw1 $ file *
pw_3g_5.2.0-diags_kernel.img: u-boot legacy uImage, Linux-2.6.31-rt11-lab126, Linux/ARM, OS Kernel Image (Not compressed), 4608576 bytes, Fri Sep  7 17:17:52 2012, Load Address: 0x70008000, Entry Point: 0x70008000, Header CRC: 0xACD464AE, Data CRC: 0xB43B5711
pw_3g_5.2.0-main_kernel.img:  u-boot legacy uImage, Linux-2.6.31-rt11-lab126, Linux/ARM, OS Kernel Image (Not compressed), 4608576 bytes, Thu Sep  6 18:29:35 2012, Load Address: 0x70008000, Entry Point: 0x70008000, Header CRC: 0xD9351992, Data CRC: 0x748783C9
pw_3g_5.2.0-mmcblk0p1.img:    Linux rev 1.0 ext3 filesystem data, UUID=7f388cad-b5c0-478a-8100-daa4d8815398
pw_3g_5.2.0-mmcblk0p2.img:    Linux rev 1.0 ext3 filesystem data, UUID=a89d3694-7bfb-4b0a-85ab-d8d053da8230
Save an unmodified copy of the de-compressed image files:
Code:
core2quad pw1 $ mkdir bkup
core2quad pw1 $ cp -v * bkup
cp: omitting directory `bkup'
`pw_3g_5.2.0-diags_kernel.img' -> `bkup/pw_3g_5.2.0-diags_kernel.img'
`pw_3g_5.2.0-main_kernel.img' -> `bkup/pw_3g_5.2.0-main_kernel.img'
`pw_3g_5.2.0-mmcblk0p1.img' -> `bkup/pw_3g_5.2.0-mmcblk0p1.img'
`pw_3g_5.2.0-mmcblk0p2.img' -> `bkup/pw_3g_5.2.0-mmcblk0p2.img'
Convert image files into devices
Code:
core2quad pw1 $ sudo losetup -f
/dev/loop0

core2quad pw1 $ sudo losetup /dev/loop0 pw_3g_5.2.0-mmcblk0p1.img
core2quad pw1 $ sudo losetup /dev/loop1 pw_3g_5.2.0-mmcblk0p2.img
Get a verbose report of the file system on those devices - **without modifing** them:
Code:
core2quad pw1 $ sudo e2fsck -n -v /dev/loop0
e2fsck 1.41.14 (22-Dec-2010)
/dev/loop0: clean, 4624/11352 files, 236359/350000 blocks
core2quad pw1 $ sudo e2fsck -n -v -f /dev/loop0
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? no

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/loop0: ********** WARNING: Filesystem still has errors **********


    4624 inodes used (40.73%)
       7 non-contiguous files (0.2%)
      18 non-contiguous directories (0.4%)
         # of inodes with ind/dind/tind blocks: 713/87/0
  236359 blocks used (67.53%)
       0 bad blocks
       0 large files

    3510 regular files
     504 directories
       2 character device files
       0 block device files
       0 fifos
     314 links
     599 symbolic links (597 fast symbolic links)
       0 sockets
--------
    4929 files

core2quad pw1 $ sudo e2fsck -n -v -f /dev/loop1
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? no

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/loop1: ********** WARNING: Filesystem still has errors **********


    1582 inodes used (74.91%)
       0 non-contiguous files (0.0%)
       9 non-contiguous directories (0.6%)
         # of inodes with ind/dind/tind blocks: 125/13/0
   26286 blocks used (41.07%)
       0 bad blocks
       0 large files

    1194 regular files
     142 directories
       2 character device files
       0 block device files
       0 fifos
     306 links
     235 symbolic links (230 fast symbolic links)
       0 sockets
--------
    1879 files
The missing lost+found directories is expected (and "normal" for the Kindle images).
But is that the only file system error?

So this time, let e2fsck modify the images (since we have clean copies in bkup):
Code:
core2quad pw1 $ sudo e2fsck  -v -f /dev/loop0
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create<y>? yes

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/loop0: ***** FILE SYSTEM WAS MODIFIED *****

    4625 inodes used (40.74%)
       7 non-contiguous files (0.2%)
      18 non-contiguous directories (0.4%)
         # of inodes with ind/dind/tind blocks: 713/87/0
  236360 blocks used (67.53%)
       0 bad blocks
       0 large files

    3510 regular files
     504 directories
       2 character device files
       0 block device files
       0 fifos
     314 links
     599 symbolic links (597 fast symbolic links)
       0 sockets
--------
    4929 files

core2quad pw1 $ sudo e2fsck  -v -f /dev/loop1
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create<y>? yes

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/loop1: ***** FILE SYSTEM WAS MODIFIED *****

    1583 inodes used (74.95%)
       0 non-contiguous files (0.0%)
       9 non-contiguous directories (0.6%)
         # of inodes with ind/dind/tind blocks: 125/13/0
   26287 blocks used (41.07%)
       0 bad blocks
       0 large files

    1194 regular files
     142 directories
       2 character device files
       0 block device files
       0 fifos
     306 links
     235 symbolic links (230 fast symbolic links)
       0 sockets
--------
    1879 files
Yup - the missing lost+found directories where the only file system error.
The e2fsck installed on the Kindle will ignore the missing lost+found directories.
It is possible to use either the original images or these "fixed" images.
Since errors in the backing store (eMMC flash chip) is expected, using the "fixed" images might be a good choice.

Done with the loop devices:
Code:
core2quad pw1 $ sudo losetup -d /dev/loop0
core2quad pw1 $ sudo losetup -d /dev/loop1

Quote:
Originally Posted by amirseni View Post
Got fastboot for kindle and compiled it
One possible problem source, since the resulting binary is not known to work properly.
As advised by others in this thread, use one of the known working binaries if possible.
Quote:
Originally Posted by amirseni View Post
Started the KPW, interrupted the boot from the serial terminal
uboot> bist
bist> fastboot
on pc side ran:
./fastboot flash kernel main_kernel.img
Note the missing progress messages.
If not an editing typo - this is probably significant.
Quote:
Originally Posted by amirseni View Post
./fasbtoot flash diags_kernel diags_kernel.img
downloading 'diags'...
OKAY [ 2.371s]
writing 'diags'...
OKAY [ 2.028s]
finished. total time: 4.401s

Diags partition is flashed way too fast (65MB).
./fastboot flash diags mmcblk0p2.img

rebooted, restarted on Diag mode, no longer getting checksum errors, went straight to diags menu
Can't be said, you where getting the checksum errors above on the **Main** system (these are dual-boot devices).
Quote:
Originally Posted by amirseni View Post
Entered U to get to USB device mode.

The Kindle drive appears, both under windows and linux
copy over the mmcblk0p1 file to the root of the drive.
unmounted properly then enter the login prompt.

Entered root credentials
Browse over to /mnt/base-us

[root@kindle us]# dd if=./pw_3g_5.2.0-mmcblk0p1.img of=/dev/mmcblk0p1
716800+0 records in
716800+0 records out
367001600 bytes (350.0MB) copied, 139.472548 seconds, 2.5MB/s K

[root@kindle /mnt]# mount /dev/mmcblk0p1 ./mmc/
JBD: no valid journal superblock found
EXT3-fs: error loading journal.
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Bad news - find cause and fix this.
Just rebooting the device will not help at this point.
Quote:
Originally Posted by amirseni View Post
rebooted.

try to disable diagmode and get the following
Could not mount/access customer partition!
That message refers to /usr/local (/dev/mmcblk0p3)
Which according to this thread, was never touched.

**BUT**
The same /dev/mmcblk0p3 is used by both the main and the diags system **and** the diags system did not complain about it.
So this is probably a case of an error of the complainer, not of the complainee.
Quote:
Originally Posted by amirseni View Post
rebooted, checked again the contents of the kindle drive and the mmcblk0p1 files are no longer there, whatever file i copy is no longer available after reboot.


So probably the flash memory is gone.

Any other ideas that i can attempt.

Thanks
Post on e-bay as "for parts only".
knc1 is offline   Reply With Quote
Old 02-20-2015, 11:44 PM   #19
bappies7
Junior Member
bappies7 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2015
Device: KINDLE PAPERWHITE 2012
Quote:
Originally Posted by amirseni View Post
I was given an old Kindle paperwhite 1st gen with 3G, in which the screen was stuck to the boy reading under the tree.

Charged the battery for a very long period of time (24h) on the wall charger with the led on amber and tried powering it on with it connection to the pc running linux.

With constant monitoring of the logs it was obvious that no storage device was found.

I eventually dissasembled the device and soldered the pinouts for the usb and was able to get the boot message. with kernel checksum errors.

Got into uboot->bist
run fastboot on the kpw1

Got the system images from http://ixtab.tk/kindle-touch-images/...pw520_wlan+3g/ (Thanks by the way) and ran the fastboot commands from the pc.

extracted the files then ran

fastboot flash kernel main_kernel.img.gz

after rebooting i was able to get the diag menu.

Exporting USB storage now shows up the Kindle storage. I copy over the extracted pw_3g_5.2.0-mmcblk0p1.img.gz then drop to the login prompt.

I Cannot get root access...
Copied the serial number to the Amazon Kindle root password site https://www.sven.de/kindle/ (Also thanks for providing the service) but the resulting passwords do not work.

So, I can't dd the mmcblk0p1.img without root access.

Following the instruction here https://gist.github.com/TobiasWooldr...ca75190b9a473f which recomends

modifying the mmcblk0p2.img diags partition and editing a upstart script for automatically dd the file does not and the fastboot flashing the file to the diags partition does not work.

Would really appreciate some pointer....

Thanks.



How did you manage to get into the bootloader mode?
I have tired but i cant get into it, noting happen at the putty windows. ;(

Care to share with me?
I have a desktop with com 1 9 pins serial port.
What is your pin to pin configuration from the kindle to pc?

I kinda confused on the pin configuration. Which Com 1 configuration is correct?

Kindle: Com 1 Com 1

GND Pin 5 GND Pin 5 GND
RX Pin 2 RX Pin 3 TX
TX Pin 3 TX Pin 2 RX


Thanks..
bappies7 is offline   Reply With Quote
Old 02-21-2015, 08:11 AM   #20
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by bappies7 View Post
How did you manage to get into the bootloader mode?
I have tired but i cant get into it, noting happen at the putty windows. ;(

Care to share with me?
I have a desktop with com 1 9 pins serial port.
What is your pin to pin configuration from the kindle to pc?

I kinda confused on the pin configuration. Which Com 1 configuration is correct?

Kindle: Com 1 Com 1

GND Pin 5 GND Pin 5 GND
RX Pin 2 RX Pin 3 TX
TX Pin 3 TX Pin 2 RX


Thanks..
The voltage levels of a standard serial port on your PC is **far higher** (nearly 7 times) than that which the Kindle's SoC can tolerate.

You should use a 1.8 volt (not 12 volt) serial port.
OR
Use a USB-to-Serial adapter with the serial side set for 1.8 volt operation.
knc1 is offline   Reply With Quote
Old 02-22-2015, 12:41 PM   #21
amirseni
Member
amirseni began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2015
Device: Kindle Paperwhite 1st Gen
I used the cp210x usb to serial adapter. It worked reliably without using a 1.8V level shifter..

It's similar to this one on Ebay

Just plugged the TX, RX & GND pins, left the 3V & 5V pins disconnected
amirseni is offline   Reply With Quote
Old 02-22-2015, 02:53 PM   #22
amirseni
Member
amirseni began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2015
Device: Kindle Paperwhite 1st Gen
eMMC Vendor & Part Number

Does anyone have the reference for the eMMC chip for Kindle Paperwhite 1, regarding the Vendor & Part number?

Thanks
amirseni is offline   Reply With Quote
Old 02-22-2015, 07:10 PM   #23
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by amirseni View Post
Does anyone have the reference for the eMMC chip for Kindle Paperwhite 1, regarding the Vendor & Part number?

Thanks
Use our master index to find links to PW1 teardowns.
knc1 is offline   Reply With Quote
Reply

Tags
unbrick paperwhite


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using phone usb cable with kindle paperwhite 2 sunilp Amazon Kindle 3 07-29-2014 01:14 AM
newb bricked his kindle paperwhite - usb unresponsive kindlecrasher Kindle Developer's Corner 18 06-22-2014 11:15 PM
Kindle Paperwhite 2 can't enter USB Drive mode until reboot Outrager Amazon Kindle 40 12-18-2013 11:00 PM
Kindle Paperwhite - Load Via USB or Via Email Turt99 Amazon Kindle 6 05-31-2013 05:40 PM
Help me : Unbrick Kindle paperwhite fantomk Kindle Developer's Corner 1 03-30-2013 09:34 AM


All times are GMT -4. The time now is 01:50 AM.


MobileRead.com is a privately owned, operated and funded community.