02-06-2012, 04:01 PM | #1 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
|
[Kindle Touch] Don't understand Java class structure
Hi,
I copied my /dev/mmcblk0p1 content to my PC and tried to understand the Java class structure. But I think I miss a jigsaw piece... In the Javascript files there are a lot of calls to the kindle.appmgr.start, e.g. like follows (from networkManager.js): Code:
kindle.appmgr.start('com.lab126.booklet.settings?viewRequest=VIEW_REQUEST_ID_REGISTRATION'); The only jar file which I found which contains "com.lab126" classes is "/opt/amazon/ebook/lib/portability-impl.jar" But only the subclasses "linux", "sound" and "util". But in which jar is the booklet subclass? What do I miss? |
02-06-2012, 06:32 PM | #2 |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
I think you miss the thing that "com.lab126.booklet.settings" isn't a Java class at all. It's a handler being called that was installed by some Java class.
Try poking around /opt/amazon/ebook/lib with your favorite Java decompiler. |
02-07-2012, 08:53 AM | #3 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
|
@JustAMan: you're right - that was the part I missed - thanks!
I already decompiled the jars with JAD and currently also try JD-GUI to get a better class overview. BUT: both decompiler seem to have a problem with method parameters Both tools name _all_ parameters of a method and also local instances "a" - how can I distinguish them? e.g. Code:
public boolean registerUser(String a, char[] a) Code:
VersionInfo a = (VersionInfo)a.getService(...); HashMap a; a = new HashMap()).put("deviceType", a.getFamilyMember()); Am I doing something wrong with that tools? And how can I get (re-)compilable code or derive from a built-in class? I currently don't get it: How am I able to write own code which uses amazon's existing functionality and how do I compile it, that it works on the device?. |
02-07-2012, 06:18 PM | #4 | |
Groupie
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
|
Quote:
JAD and JD-GUI are both too stupid for such (slightly obfuscated) java classes as they rename all the variables without looking if there are any name clashes. You'd need a decompiler that has the option of not trying to restore the "original" variable names. |
|
02-08-2012, 03:36 AM | #5 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
|
|
02-08-2012, 06:02 AM | #6 |
Zealot
Posts: 138
Karma: 12324
Join Date: Dec 2011
Location: CZ
Device: Kindle 4 non-touch
|
|
02-10-2012, 03:44 AM | #7 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
|
Quote:
AFAIK this one is not able to create own variable names. It has the "all variables of a method are named 'a'" problem... Or is there an option I didn't find? |
|
02-10-2012, 05:09 AM | #8 | |
Zealot
Posts: 138
Karma: 12324
Join Date: Dec 2011
Location: CZ
Device: Kindle 4 non-touch
|
Quote:
But I think it is dissassembled without any change of variable names, the "a" name is obfuscated name of original variable names which is in *.class file. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 SD Card Importance? SDHC, SDHC Class 4, Class 10 etc is it important | Renji | Sony Reader | 11 | 12-03-2011 12:30 PM |
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch | jbcohen | Which one should I buy? | 4 | 06-18-2011 07:58 PM |
[old thread] filename and library structure /author and titel structure | tscamera | Library Management | 4 | 05-31-2011 05:44 PM |
Kindle case and Amazon class action? | Kevin R | Amazon Kindle | 0 | 08-08-2010 11:53 PM |
[Apple]Java Embedding Plugin 0.9.2: Force java to run in browsers other than Safari | Zire | Lounge | 4 | 05-24-2005 09:12 PM |