New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
dr_diem
Old
(Last edited by dr_diem; 30th June 2012 at 07:02 PM.)
#21  
Member - OP
Thanks Meter 6
Posts: 66
Join Date: May 2012
Location: Montreal
Quote:
Originally Posted by peter64 View Post
Hey,

I just ordered a nook glow online and I'm gona have it mail forwarded to Japan in about 1 week. When it arrives I'll take a look, but no promises.
Cool

I've supplied a bunch of resources at the bottom of this post for some further reading on what's necessary.

Quote:
Originally Posted by peter64 View Post
My only question is if I break something is it always possible to factory reset the device?
Fortunately, yes it is. The device includes a 'factory.zip', the unzipping of which can be invoked by interrupting the boot process 8 times in a row.

Quote:
Originally Posted by peter64 View Post
Or is there a chance I might brick it? I'de also love to get multi-touch working, is that part of NTT as well?
No, it's not a part of NTT.

Quote:
Originally Posted by peter64 View Post
I took a look at the thread for multi-touch (http://forum.xda-developers.com/show....php?t=1563645) and recompiling the kernel and I don't have any environment so I guess I need to figure out how to set that up. I don't suppose you know any additional threads that explain how to build a modified kernel or how to replace these java files.
Glownooter includes ADB Wireless. If you install the Android SDK on your computer and set up ADB, you can then copy files to/from the Nook OS wirelessly so as to edit them in a dev environment and then put the edited versions back onto the Nook.

Quote:
Originally Posted by peter64 View Post
As I said before I don't have the device yet so I'm just trying to do some reading before it arrives. Also can you direct me to any threads that explain how to recompile the kernel with the modified zforce.c?

Peter
So far as I know, we don't have access to the source for the kernel, though this thread makes references to C sources - maybe you could ask the posters there where they got the NST source from? This post links to how to put together a build environment, and here is a link to the required toolchain. For those files where no source exists (e.g. the framework jars) we de/reassemble using the smali dis/reassembler, that is built conveniently into apktool, which can also unpack/repack the various jars that make up the system software. All the modifications are therefore made in the disassembled files.

So far as the kernel is concerned, the first thing you'd need to do is confirm whether the kernel was changed between the latest NST system software release (1.1.2) and the Glowworm release (1.1.5). If it is unchanged, then you can just install the file already supplied on that thread, via one of the methods described (using CWM - ClockWorkMod, or copying over using ADB as per a couple of comments on that thread).

Feel free to ask any further questions - I'll help in any way that I can.

Here are some useful resources:

Unbrick/factory restore methods
Complete backup/restore process. Additional instructions using dd (for Linux or Macintosh).
Noogie (required for the above backup/restore process):
Rooting with GlowNooter (I recommend this over TinyNoot - the other alternative for Glowworm rooting).
ClockWorkMod for installing packages designed for that method.
XorZone's original NookTouchTools thread
 
peter64
Old
#22  
Junior Member
Thanks Meter 1
Posts: 2
Join Date: Aug 2007
Thanks so much! Your instructions are extremely detailed. I'll let you know as soon as I get the nook and have the dev environment all figured out .
The Following User Says Thank You to peter64 For This Useful Post: [ Click to Expand ]
 
dr_diem
Old
#23  
Member - OP
Thanks Meter 6
Posts: 66
Join Date: May 2012
Location: Montreal
You're welcome Peter! I have copies of the various versions of the jars involved - let me know as and when and if you want them.
 
ctasich
Old
#24  
Member
Thanks Meter 1
Posts: 44
Join Date: Jan 2008
Any luck with this peter? I know there's at least a couple of us who would be grateful to have some features for our rooted glowworm. Let me know if there's anything we can do to help!
 
Zorkman
Old
#25  
Senior Member
Thanks Meter 69
Posts: 276
Join Date: Aug 2010
Quote:
Originally Posted by ctasich View Post
Any luck with this peter? I know there's at least a couple of us who would be grateful to have some features for our rooted glowworm. Let me know if there's anything we can do to help!
Indeed, I personally would also be very glad/thankful if you could get this to work.
I'm also willing to donate
 
LastSilmaril
Old
(Last edited by LastSilmaril; 9th October 2012 at 08:02 AM.) Reason: minor nonsense
#26  
Senior Member
Thanks Meter 36
Posts: 158
Join Date: Nov 2011
Location: Kings County, NY
Default Some progress, I hope

Hey all,

So I read through the thread and decided to take a crack at this - much thanks to Dr_Diem for defining the problem and getting the ball rolling. Here are my findings; all changes described are viewable in the attached zip. (I have NOT done any testing yet, at all.)

1) BNGossamerQuickNavBar
a) The init() method hasn't actually changed between 1.1.2 and 1.1.5 nearly as much as Dr_Diem suggested. There's a whole section at the beginning of the method dedicated to figuring out whether or not the Nook has a Glowlight and setting a bit (mHasGlowLight) to that effect, and that bit gets checked in the course of the rest of the init, but the actual 'algorithm' for 'setting up' the buttons has not changed. Turned out not to be difficult to patch. I also made a minor modification/optimization to the glowlight checking code (can it be removed altogether? I'm scared) but if this doesn't work it's easy to roll back.
b) The changes I made necessitate a change in XorUtils.smali to support the extra button, however I'm not quite sure how to do this properly. More on this later.
c) I replaced the long onClick() method with Xor's.
d) Did not touch the new glow-related methods yet.

2) StatusBarService was indeed a quick fix.

3) PhoneWindowManager took the longest to deal with because of extensive changes between 1.1.0 and 1.1.5 - lots of extra methods and glow-related stuff stuck in there. Took this slow but think I've put XorZone's changes to 1.1.0 in the right spots. Still, I was flying a bit blind in here, especially in (a).
a) The key method here is interceptKeyTi, which is now much longer. I'm not sure what the 'algorithms' in here do, but I'm confident that I figured out the 'context' properly and put XorZone's changes in the right spot. Still, I'd check it out...
b) The other major blocks are in rotationForOrientationLw and showRecentAppsDialog, which have changed slightly but more or less work the same way and aren't super-long unwieldy beasts, so it wasn't difficult to patch in Xor's additions. There are some minor changes scattered about earlier as well.
c) PhoneWindowManager$9 is completely original to Xor so it'll be dropped in.

4) RecentApplicationsDialog
a) This is almost identical between 1.1.0 and 1.1.5, with very minor exceptions, so I just dropped in Xor's file and applied the changes to it.
b) RecentApplicationsDialog$1 is *exactly* identical between 1.1.0 and 1.1.5, so I just dropped in Xor, period.
c) RecentApplicationsDialog$2 and $3 are exclusive to Xor's framework, so these were also dropped in.

5) XorUtils from services.jar (didn't look at the one in android.policy.jar at all) needs to be patched in order for glowlight to work. This needs to happen in at least two places, in launchButton() and in updateQNButtonIcon().
a) I think I figured out part of what needs to happen in updateQNButtonIcon - the relevant part is just a switch - but there's one 128-bit parameter whose value I have to provide for the glowlight (for a bitmap or something?). It's at line 1074, if you want to take a look.
b) In launchButton, which is basically one big switch, I just added one for the glow. I'm not sure if I did this properly, however. The pack_switch starts at 0x1020196, and the number for the wedged-in glowlight button, per the untouched init() from 1.1.5, is 0x102019b, which is not sequential (the settings button gets 0x102019a). So I put the glowlight button last in the switch on that basis (seems to be like that in the stock onClick() as well).
c) I really don't know what to do with launchActivity() to make sure it works with the light and am not even sure that anything is necessary at all. That said, I really don't know how launchActivity itself works...

A few notes:
-GlowNooter does not seem to have changed any of the above files at all, and nor have any of them changed between 1.1.0 and 1.1.2.

-I don't 'speak smali' or whatever - just relying on what I know about assembly code (16-bit x86 and some ARM) and java from back in school, plus these helpful resources:
http://androidcracking.blogspot.com/...mplesmali.html
http://pallergabor.uw.hu/androidblog...k_opcodes.html
http://www.netmite.com/android/mydro...-bytecode.html

-I'm not sure if the cond_ labels in gotos and compares need to make sense and fit, or if they can be totally arbitrary. If the former, then there's more work to be done, as I have not been too careful in this regard.

-Everything I've done so far is attached. Changes are marked with a "# XOR" and "# END" comment. (I may have used others though, and anyway you should just diff them to find out what's going on.) Files marked 'ls' are mine; the older ones are also included for diffing/convenience.
Attached Files
File Type: 7z ntt_glow_inprogress.7z - [Click for QR Code] (56.2 KB, 15 views)
Phones: VZW GS III (replaced) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted | HP TouchPad 32GB, WebOS/CM9
The Following 2 Users Say Thank You to LastSilmaril For This Useful Post: [ Click to Expand ]
 
Renate NST
Old
#27  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 481
Posts: 1,239
Join Date: Feb 2012
Location: Boston
All the goto labels are arbitrary.

The tricky part is registers.
If you add register usage you may push instruction codes out of the 4 bit address range.

The Following User Says Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
LastSilmaril
Old
(Last edited by LastSilmaril; 9th October 2012 at 06:38 PM.)
#28  
Senior Member
Thanks Meter 36
Posts: 158
Join Date: Nov 2011
Location: Kings County, NY
Quote:
Originally Posted by Renate NST View Post
All the goto labels are arbitrary.

The tricky part is registers.
If you add register usage you may push instruction codes out of the 4 bit address range.
Thanks Renate! I remember that labels were arbitrary back in the day but wasn't sure now. But now, I'm not quite sure how to avoid the instruction code trap.
IIRC, I have only added registers once, in BNGossamerQuickNavBar's init() method.

EDIT: Looks like I was sloppy in the init() method and specified use of an extra register at the beginning but failed to use it. But looking over it, I'm not sure why another register is even necessary except to match up with the addition of another register between 112 and Xor, so I changed it back to the amount of registers the 115 version had. The v7 register used for glowlight checking in the 115 version can just be reused, right? I attached the init methods from all 4 versions below...
Attached Files
File Type: 7z gos_init.7z - [Click for QR Code] (1.7 KB, 6 views)
Phones: VZW GS III (replaced) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted | HP TouchPad 32GB, WebOS/CM9
 
LastSilmaril
Old
#29  
Senior Member
Thanks Meter 36
Posts: 158
Join Date: Nov 2011
Location: Kings County, NY
Out of curiosity, I decided to just dump what I've done so far back into android.policy and services, re-dexing the files and drop them in on the nook. When I try to reboot, this causes it to get stuck booting forever. (Made a backup right before so no harm/foul.)
There is more work to be done!
-e
Phones: VZW GS III (replaced) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted | HP TouchPad 32GB, WebOS/CM9
 
LastSilmaril
Old
#30  
Senior Member
Thanks Meter 36
Posts: 158
Join Date: Nov 2011
Location: Kings County, NY
Quote:
Originally Posted by LastSilmaril View Post
Out of curiosity, I decided to just dump what I've done so far back into android.policy and services, re-dexing the files and drop them in on the nook. When I try to reboot, this causes it to get stuck booting forever. (Made a backup right before so no harm/foul.)
There is more work to be done!
-e
This was with using the post-root 1.1.5 jars as a base.
Phones: VZW GS III (replaced) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted | HP TouchPad 32GB, WebOS/CM9