Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-12-2013, 04:09 PM   #1
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
Tell which kindle model from a filepath?

Can a shell script determine which kindle model among K2/K3/K4/K4DX/K5/PW by looking if a well-know filepath exists? Essentially I'm looking for a filepath which is guaranteed to exist and is unique to each model. Even an incomplete answer would help me.

And is there some other simple way for a shell script to determine which kindle model?
stepk is offline   Reply With Quote
Old 05-12-2013, 04:38 PM   #2
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
What about just looking up the version info ?
Does not give the model number, but does give the firmware version and build.
Which, except for bastardized DXs, relates to the model of the device.
knc1 is offline   Reply With Quote
Old 05-12-2013, 06:20 PM   #3
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
Thanks. What actual sh command returns the firmware version and build? Is it the same command on all models? Do you have a mapping of fw version/build to device model?

I was also hoping that the filepath approach could lead somewhere, because I have already implemented the necessary plumbing in KUAL.
stepk is offline   Reply With Quote
Old 05-12-2013, 06:27 PM   #4
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
cat /etc/version
cat /etc/pretty-version

something like that anyway

https://www.mobileread.com/forums/sho...d.php?t=206188
knc1 is offline   Reply With Quote
Old 05-12-2013, 11:42 PM   #5
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
cat /etc/version.txt
cat /etc/pretty-version.txt
aditya3098 is offline   Reply With Quote
Old 05-14-2013, 01:10 PM   #6
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
So far my Kindle Touch detection command looks like
Code:
[root@kindle root]# grep "\\s5\\.[13]\\." /etc/prettyversion.txt
Kindle 5.3.2.1 (~~otaVersion~~)
It matches firmware versions 5.1.* and 5.3.* What other versions should it match for a Kindle Touch? Any opinions?
What about matching other Kindles? Any suggestions for suitable patterns?
If no other ideas than prettyversion.txt will come up, this will become the Kindle model detection mechanism in KUAL (the launcher).
I'm a little concerned that it isn't future-proof, so a new firmware release might break the pattern and require rolling a new KUAL. Mumble, mumble...
stepk is offline   Reply With Quote
Old 05-14-2013, 01:53 PM   #7
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 stepk View Post
So far my Kindle Touch detection command looks like
Code:
[root@kindle root]# grep "\\s5\\.[13]\\." /etc/prettyversion.txt
Kindle 5.3.2.1 (~~otaVersion~~)
It matches firmware versions 5.1.* and 5.3.* What other versions should it match for a Kindle Touch? Any opinions?
What about matching other Kindles? Any suggestions for suitable patterns?
If no other ideas than prettyversion.txt will come up, this will become the Kindle model detection mechanism in KUAL (the launcher).
I'm a little concerned that it isn't future-proof, so a new firmware release might break the pattern and require rolling a new KUAL. Mumble, mumble...
It also matches the 5.3.* for the Kindle Paperwhite.
knc1 is offline   Reply With Quote
Old 05-14-2013, 06:14 PM   #8
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
Where I can find a table of firmware version numbers for each kindle model?
stepk is offline   Reply With Quote
Old 05-14-2013, 07:42 PM   #9
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I think a bit of "outside the box" is required here... uname -a might be the answer.

PW: Linux kindle 2.6.31-rt11-lab126 #1 Mon Apr 1 22:09:02 PDT 2013 armv7l GNU/Linux

Touch: Linux kindle 2.6.31-rt11-lab126 #1 Wed Dec 12 19:58:30 PST 2012 armv7l GNU/Linux

K4: I can get this

K3: Linux kindle 2.6.26-rt-lab126 #5 Wed Sep 15 19:25:13 PDT 2010 armv6l unknown

K2: (niluje posted this somewhere... damned if I can find it)

DX: and this

Working on filling in the blanks now... tomorrow


(The date/time is unique on them all as a hint. I would go with that)

EDIT: Plus it doesn't change AFAIK.

Last edited by twobob; 05-14-2013 at 09:43 PM.
twobob is offline   Reply With Quote
Old 05-15-2013, 01:14 AM   #10
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,669
Karma: 2300001
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by twobob View Post
Touch: Linux kindle 2.6.31-rt11-lab126 #1 Wed Dec 12 19:58:30 PST 2012 armv7l GNU/Linux
The date/time is unique on them all as a hint. I would go with that)

EDIT: Plus it doesn't change AFAIK.
mine is different: Fri Feb 22 01:37:00 PST 2013
thomass is offline   Reply With Quote
Old 05-15-2013, 02:19 AM   #11
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
Date/time info tends to be finicky, I'd rather avoid it.
Processor info is definitive. It only helps to set ARM6 and AMR7 models apart.
/etc/prettyversion.txt info seems more consistent. So far I have figured the following patterns:
Code:
KT 5.[013].[02]
PW 5.[13].[13]
K4NT 4.*
K4DX
K3 3.*
I could use peer reviewing and more thinking outside the box to complement and amend all of the above. Thanks in advance
stepk is offline   Reply With Quote
Old 05-15-2013, 03:21 AM   #12
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 stepk View Post
Date/time info tends to be finicky, I'd rather avoid it.
Processor info is definitive. It only helps to set ARM6 and AMR7 models apart.
/etc/prettyversion.txt info seems more consistent. So far I have figured the following patterns:
Code:
KT 5.[013].[02]
PW 5.[13].[13]
K4NT 4.*
K4DX
K3 3.*
I could use peer reviewing and more thinking outside the box to complement and amend all of the above. Thanks in advance
NitPick: The DX (of whatever variation) is a large screen K2, not a large screen K4.
knc1 is offline   Reply With Quote
Old 05-15-2013, 07:31 AM   #13
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
KT has about of 4GB of storage, while PW has only about of 2GB. This will print storage size to help you distnguish one from another reliably:
Code:
awk '$4 == "mmcblk0" {print $3}' /proc/partitions
eureka is offline   Reply With Quote
Old 05-15-2013, 07:50 AM   #14
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
Quote:
Originally Posted by eureka View Post
KT has about of 4GB of storage, while PW has only about of 2GB. This will print storage size to help you distnguish one from another reliably:
Code:
awk '$4 == "mmcblk0" {print $3}' /proc/partitions
stepk is offline   Reply With Quote
Old 05-15-2013, 07:57 AM   #15
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Furtehrmore, here is how KOreader determines device model (frontend/ui/device.lua, Device:getModel()).
eureka is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what model kindle fire do I have? hayles79 Kindle Fire 4 03-20-2013 12:03 PM
What Kindle model have I? zzroger Amazon Kindle 21 01-06-2012 02:50 PM
which model Kindle do I have? StickMaker Amazon Kindle 14 03-01-2011 10:53 AM
New Kindle Model????? ssophon Amazon Kindle 33 10-30-2009 01:30 AM


All times are GMT -4. The time now is 07:26 PM.


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