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 05-12-2022, 05:34 PM   #1
katadelos
rm -rf /
katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.
 
Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
Possible new downgrade method

I was poking around recovery-util a while back and might have discovered a novel method of downgrading the firmware version used by a (jailbroken) device. recovery-util mounts the rootfs early in the boot process and when a update is found and processed by this program, the build number seems to be checked against the build number in the file /etc/version.txt.

This file looks something like this:
Code:
System Software Version: 060-juno_1402_malbec_bellatrix-380729
Tue Feb  1 08:37:30 UTC 2022
com.lab126.eink.malbec.os
As previously established by NiLuJe and others, the important parts here are the first and last parts of the first line - 380729 is the major component of the version number and 060 is the minor component. In this case, the build number corresponds to that of 5.14.2 on PW5 (3807290060).

It appears to be possible to trick the updater in recovery-util into applying an unmodified update binary by changing the build number used in the file above to the build number of the update before the update you wish to install (the build numbers can be found as part of the filename of the source tarballs found here).

Note that I've only tested this a couple of times and on devices where you can actually access the serial port; you may or may not run the risk of bricking your device if you attempt to downgrade using this method.
katadelos is offline   Reply With Quote
Old 05-12-2022, 05:47 PM   #2
aguy
Junior Member
aguy began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2022
Device: pw
Mmmhhh, this thread is interesting...
aguy is offline   Reply With Quote
Old 05-13-2022, 01:39 AM   #3
joh77
Member
joh77 began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Apr 2022
Device: KO3
Nice find katadelos!

But this might be useful only for jailbroken devices?
joh77 is offline   Reply With Quote
Old 05-13-2022, 07:49 AM   #4
riothamus
Connoisseur
riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!riothamus rocks like Gibraltar!
 
Posts: 83
Karma: 100000
Join Date: Nov 2010
Device: None
Quote:
Originally Posted by katadelos View Post
Note that I've only tested this a couple of times and on devices where you can actually access the serial port; you may or may not run the risk of bricking your device if you attempt to downgrade using this method.
Does this mean you need the serial port to perform this downgrade or that you might need the serial port if you accidently brick the device?
riothamus is offline   Reply With Quote
Old 05-13-2022, 11:37 AM   #5
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by joh77 View Post

But this might be useful only for jailbroken devices?
/etc/version.txt can only be accessed after jailbreak.

Quote:
Originally Posted by riothamus View Post
Does this mean you need the serial port to perform this downgrade or that you might need the serial port if you accidently brick the device?
Serial port allows you to recover from bricking.
j.p.s is offline   Reply With Quote
Old 05-13-2022, 12:30 PM   #6
darkassassinua
Kindle priest
darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!darkassassinua is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
darkassassinua's Avatar
 
Posts: 35
Karma: 50027
Join Date: Oct 2019
Location: Kharkiv,Ukraine
Device: Kindle Paperwhite 5
Paperwhite 5 SE with 5.14.3 - changed value to 3807290060 - got "UPDATE ERROR: 12"
also "380729","3783100001" doesnt work too.
but "378310" is worked.
downgraded from 5.14.3 to 5.14.2

1)Mount filesystem as writable "mntroot rw"
2)Open /etc/version.txt - replace 383089(if you on 5.14.3) to 378310
3)copy update file from 5.14.2 to mnt/us
4)Reboot

After reboot ur Kindle "updated" to 5.14 2

Last edited by darkassassinua; 05-13-2022 at 12:58 PM.
darkassassinua is offline   Reply With Quote
Old 05-13-2022, 12:36 PM   #7
joh77
Member
joh77 began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Apr 2022
Device: KO3
Quote:
Originally Posted by j.p.s View Post
/etc/version.txt can only be accessed after jailbreak.
So there is no chance for me
joh77 is offline   Reply With Quote
Old 05-13-2022, 02:37 PM   #8
dedeca
Enthusiast
dedeca is on a distinguished road
 
Posts: 38
Karma: 50
Join Date: May 2022
Location: Brazil
Device: PW3 and PW5
sorry i'm noob.
How do I do step 1: 1)Mount filesystem as writable "mntroot rw" ?


I used the KOreader text editor but I can't modify the version.txt file
dedeca is offline   Reply With Quote
Old 05-13-2022, 03:40 PM   #9
dedeca
Enthusiast
dedeca is on a distinguished road
 
Posts: 38
Karma: 50
Join Date: May 2022
Location: Brazil
Device: PW3 and PW5
1)Mount filesystem as writable "mntroot rw"

sorry, but how do i do that?
dedeca is offline   Reply With Quote
Old 05-13-2022, 03:50 PM   #10
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by dedeca View Post
1)Mount filesystem as writable "mntroot rw"

sorry, but how do i do that?
How much linux or other unix experience do you have?

Do you know how to use the editor vi or nano?

The instructions are there every time you ssh to the kindle:
Code:
ssh root@pw3
#################################################
#  N O T I C E  *  N O T I C E  *  N O T I C E  # 
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]#
If that is not enough, you might not be ready yet to try this.

And, of course, it needs to be set back to ro when you are finished.
j.p.s is offline   Reply With Quote
Old 05-13-2022, 05:04 PM   #11
fonix232
Enthusiast
fonix232 doesn't litterfonix232 doesn't litter
 
Posts: 35
Karma: 102
Join Date: Jul 2016
Device: KOA4
Okay, I'm excited about this, but for a completely different reason...

I believe by modifying the build values here, one could essentially block firmware updates completely (at least until Amazon catches up with the version number supplied), essentially making sure that your jailbreak doesn't get wiped out because Amazon forced an update even though you turned off auto updates.
fonix232 is offline   Reply With Quote
Old 05-13-2022, 06:24 PM   #12
dedeca
Enthusiast
dedeca is on a distinguished road
 
Posts: 38
Karma: 50
Join Date: May 2022
Location: Brazil
Device: PW3 and PW5
Quote:
Originally Posted by j.p.s View Post
If that is not enough, you might not be ready yet to try this.
I did a forum search on SSH on Kindle and found that I know absolutely nothing about it. If I tried, I would probably lock my device. Anyway, I'll keep researching, who knows, one day...
dedeca is offline   Reply With Quote
Old 05-13-2022, 07:19 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Wiping (at least) some of the more database-y stuff from /var/local might be a good idea before attempting a significant (or maybe even a not so significant one) downgrade, because nothing in the process is intended to support database downgrades .

IIRC, back in the olden days, at worst it just broke stuff at runtime, but there is a non-zero chance it could break the boot, which would be bad .
NiLuJe is offline   Reply With Quote
Old 05-13-2022, 09:41 PM   #14
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by dedeca View Post
I did a forum search on SSH on Kindle and found that I know absolutely nothing about it. If I tried, I would probably lock my device. Anyway, I'll keep researching, who knows, one day...
Presumably, someday, there will be step by step easy instructions, maybe even a KUAL extension. The latter might be tricky, because not all model, build number, and firmware version combinations would be compatible. But eventually, this should be among the simplest and easiest significant hacks.
j.p.s is offline   Reply With Quote
Old 05-13-2022, 09:50 PM   #15
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by fonix232 View Post
Okay, I'm excited about this, but for a completely different reason...

I believe by modifying the build values here, one could essentially block firmware updates completely (at least until Amazon catches up with the version number supplied), essentially making sure that your jailbreak doesn't get wiped out because Amazon forced an update even though you turned off auto updates.
Good idea. I hope someone looks into this. It might be a bit more complicated than just putting in a large number.

Quote:
Originally Posted by NiLuJe View Post
Wiping (at least) some of the more database-y stuff from /var/local might be a good idea before attempting a significant (or maybe even a not so significant one) downgrade, because nothing in the process is intended to support database downgrades .

IIRC, back in the olden days, at worst it just broke stuff at runtime, but there is a non-zero chance it could break the boot, which would be bad .
Good point. It would be good to know which dbs can be simply deleted
j.p.s is offline   Reply With Quote
Reply

Tags
firmware, firmware downgrade


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternative method to downgrade KT2? DanielSt Kindle Developer's Corner 12 02-26-2022 04:03 PM
Firmware Update Is there any method to downgrade kindle paperwhite from 5.4.4 to 5.3.5? mycityofsky Amazon Kindle 84 07-29-2015 04:45 AM
How to downgrade fv. from 3.1 to 3.0.3 apofview Kindle Developer's Corner 3 02-12-2011 09:56 AM
downgrade to 1.0.0? prsnOOb Sony Reader 1 10-08-2008 04:34 AM


All times are GMT -4. The time now is 08:47 PM.


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