yashsingh1/xdaforums huggingface dataset:
[Nook Touch General] liptonthe:
I have been able to unpack the boot image with the mkbootimg tool

C:\Users\Hlod Wig\Downloads\platform-tools_r33.0.1-windows\platform-tools\mkbootimg>C:\Python27\python.exe unpack_bootimg.py --boot_img img --out boot-image
boot_magic: ANDROID!
kernel_size: 3910228
kernel load address: 0x80808000
ramdisk size: 506901
ramdisk load address: 0x81800000
second bootloader size: 0
second bootloader load address: 0x81700000
kernel tags load address: 0x80800100
page size: 2048
boot image header version: 0
os version and patch level: 0
product name:
command line args: console=ttymxc0,115200 init=/init androidboot.console=ttymxc0 video=mxcepdcfb:E060SCM,bpp=16 video=mxc_elcdif_fb:off no_console_suspend

So now i guess i have to repack it but with the cmd line edited replaced by this one :

init=/init video=mxcepdcfb:E060SCM,bpp=16 video=mxc_elcdif_fb:off no_console_suspend

I used this command line to repack the boot img :

C:\Python27\python.exe mkbootimg.py --kernel boot-image/kernel --ramdisk boot-image/ramdisk --cmdline "init=/init video=mxcepdcfb:E060SCM,bpp=16 video=mxc_elcdif_fb:off no_console_suspend" --kernel_offset 0x70808000 --ramdisk_offset 0x71800000 --second_offset 0x71700000 --tags_offset 0x70800100 -o rebuild_img

I got inspired by the documentation exposed in this link to repack the boot-img. Unfortunally i haven't well undestanded the things with the xxx_offset parameters so i just recopied it ..

After that i have repushed the img with the dd method.

My Nook is booting properly, i will now try to reconect the GPS module to see if i'm able to read data :)

For the moment i got no GNSS data but also no empty payload like before, so the modifications have worked.
[Nook Touch General] Renate:
I'm always partial to my own imgutil.exe (but then again, I would, wouldn't I?)

You don't have to take everything to pieces and put it back together again.

imgutil.exe img /c"init=/init video=mxcepdcfb:E060SCM,bpp=16 video=mxc_elcdif_fb:off no_console_suspend"
[Nook Touch General] liptonthe:
I just rebooted with an img edited with the imgutil.exe method. Also work well !

I share your opinion about do not spread the img boot before rebuild it..

Thank's for your input :)

But i'm still not able to get GNSS sentences on /dev/ttymxc0 ...

When the GPS module is connected the Nook doesn't want to startup. Maybe the UART VCC power is not enought. I'm gonna try to power it up externally. Not better.

Probably other configs are needed.
[Nook Touch General] Renate:
The problem is, your module is spitting out stuff before the Glow boots and it's going to u-boot, "Hit any key to stop auto boot..."

Try booting, then connecting.
[Nook Touch General] liptonthe:
Okay, actually yes, i let the nook boot then i connect the module after.

But still get nothing, i have used the same module with the NST before.

I sould maybe try to generate payload with arduino on the UART line to verify if i'm able to read input from /dev/ttymxc0 but it's look like nothing will come from this.
[Nook Touch General] Renate:
What can I say? The NMEA-0183 is there.
[Nook Touch General] liptonthe:
Hum yes, but the gif is the example of what i get on my NST. On the BRV510 Glow 2 i got nothing at all. I shouldn't have put the gif, it was a bit confusing.

I also tried to read /dev/ttymxc0 from ABB of the TWRP recovery .. just because why not, i don't know. Still nothing.

The file ueventd.rc seem to concentrate the dev devices configurations, do you think i should add the UART seriel port here in ?

it's also maybe possible configurations in directory :

> /sys/devices/platform/imx-uart.0/tty/ttymxc0/power
[Nook Touch General] Renate:
# stty -F /dev/ttymxc0
[Nook Touch General] liptonthe:
Edit :

this line enabled the serial :

busybox stty -F /dev/ttymxc0 9600

$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30

$GPGSV,2,1,05,02,,,25,11,,,33,19,,,24,20,,,37*72

$GPGSV,2,2,05,22,,,28*76F

$GPGLL,,,,,222642.00,V,N*48

etc..

Again, thank's you very much @Renate :)

The next step for me is to overcome the NST mock-location trick and find a way to integrate the GPS location provider properly. It should be more easy to do it on KitKat 4.4.2 i hope.
[Nook Touch General] Renate:
Are you sure that the GPS is configure for 57.6? It may have reset.

Connect TX and RX together, In one adb shell window "cat /dev/ttymxc0" and in another "echo Hello there > /dev/ttymxc0".
[Nook Touch General] liptonthe:
I just edited my last message, the correct stty command make the things happen :)

But i didn't understood well why the Nook won't boot when the GPS module is connected. You talked about U-boot ?
[Nook Touch General] liptonthe:
How did you get the fs /system in rw and adb push/pull work on the glow2 ?

The dd method work well because the boot img is small but /system is >300Mo

Edit : By mounting /system throught TWRP recovery i'm now able to write on.

I have implement the gps-glonass-driver by pushing the gps.default.so lib in /system/lib/hw then edited the build.prop then it work natively, that's very satisfying :)

I need to figure now why i can't boot with the GPS connected ..
[Nook Touch General] Renate:
That's very nice that you got it working with normal Location infrastructure.

You have disconnected UART1 from being the console for Android, but it's still the console for u-boot. Even with the GPS connected you can look at what the Glow is putting out when you boot if you have a USB/UART (like an FTDI 232) to monitor the output. u-boot spits out a bunch of stuff including "hit any key to stop auto boot" and your GPS module spits out something and stops the boot. After that u-boot says "Unknown command", then the GPS spits out another line, etc.

The solutions including using that other UART4 or modifying u-boot to not use or to ignore the console.

Are you using a GP-735 module?
[Nook Touch General] liptonthe:
Yes, i'm happy that the gps driver work without complications :)

Ok your answer is more clear for me, thank's. I guess alter u-boot to ignore the console would be the clever way by looking what's modifications have already been done. But i also say that because i'm not aware to how i could enable the UART4. Anyway i have no idea to how i could edit U-boot for the moment, if you have a track, i take it.

About tracking the u-boot at startup i think i could be able to read the uart with my arduino board.

The other solution affordable for my knowledge would be to delay the power of few second by an small electronic circuit. by fully charging a capacitor before let the 3.3v pass to the gps module..

That should let the time for the nook to init the boot then get the module connected just after.

I still have many points to check before closing the project. I will now setup the sdcard mod you explained for glow2 & 3. I have find better kind of gauge cable than the one i used before by canibalising an old IDE hard disk cable.

The last time i stopped the work on that subject because i was encountering very strange comportment of the external sdcard filesystem (FAT32). But my soldering work was very sketchy.. that definitely not helped.

In fine, i need to be able to acces to the external sdcard from a computer by usb throught the nook.

Yes ! I believe i will be able to make it fit inside the nook
[Nook Touch General] Renate:
Huh? It must be auto baud and some sort of download. You should be looking at what you're sending, not what the Glow is sending.

In any case, it's all a mish-mash of 1/2 at 9600 and 1/2 at 115200.
[Nook Touch General] liptonthe:
I'm dumb haha .. effectively set to 115200 the u-boot console talk is now readable.

I must confess that i was curious to see the boot console content :)

I can effectively see the autoboot keycatch line :

Hit any key to stop autoboot: 1 0

The payload sended by the GPS module is like expected, init then NMEA :

$GPTXT,01,01,02,u-blox ag - www.u-blox.com*50
$GPTXT,01,01,02,HW UBX-G70xx 00070000 *77
$GPTXT,01,01,02,ROM CORE 1.00 (59842) Jun 27 2012 17:43:52*59
$GPTXT,01,01,02,PROTVER 14.00*1E
$GPTXT,01,01,02,ANTSUPERV=AC SD PDoS SR*20
$GPTXT,01,01,02,ANTSTATUS=DONTKNOW*33
$GPTXT,01,01,02,LLC FFFFFFFF-FFFFFFED-FFFFFFFF-FFFFFFFF-FFFFFFFD*2D
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGLL,,,,,,V,N*64
$GPTXT,01,01,02,ANTSTATUS=INIT*25
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30

So it's exactly like you said. U-boot is stopped by the module talks.

Do you think it's possible to edit the U-boot to ignore it, or should i delay the gps power by electronic instead ?
[Nook Touch General] Renate:
I dunno:

C:\>findtext /l4 ub2 02020000
00014518 02020000
00014540 02020000
00014570 02020000
0001458C 02020000
00014614 02020000

Do you have this or something else?
[Nook Touch General] liptonthe:
Sorry, didn't get what to do with that.

I have read the serial data from the Arduino console so i'm not able to interact with the devices from my OS if it's what you would me to do with this command.

i'm also on linux i could grep something if needed.

I guess ub2 refer to U-boot ?
[Nook Touch General] Renate:
# dd if=/dev/block/mmcblk0 of=/sdcard/ub2 skip=2 count=1021

Then look with your favorite hex editor at those addresses.
[Nook Touch General] liptonthe:
Thank's i will take a look !

I was on the soldering of the sdcard connecting points.. not easy without a lense.

But it's look like it work fine :

root@ntx_6sl:/storage/extsd # ls
Gattaca (1997) [1080p]
System Volume Information
aca\ \(1997\)\ \[1080p]/ <
root@ntx_6sl:/storage/extsd/Gattaca (1997) [1080p] # ls
Gattaca-French.srt
Gattaca.1997.1080p.BrRip.x264.bitloks.YIFY.mp4
Gattaca.1997.1080p.MULTI.BluRay.x264-1080.French.srt
root@ntx_6sl:/storage/extsd/Gattaca (1997) [1080p] #

I will test it more to be sure all is ok. i used smaller and shorter gauge cable this time.
[Nook Touch General] liptonthe:
With the the command you gived me i exported the file of what i think is the U-boot image.

Then i oppened it with an usual hex editor but i didn't know what to do more with that.

I gonna read somes documentations about U-boot and search a little bit.

The extSDcard mod seem work well now, i guess the gauges cables i used before was too long.

I'm using FAT32 for the filesystem because i would like to be able to use the storage when the Glow is connected to a Windows computer. I remember you was setuped ext2 instead on your glow3. Do the access it easily with your os Linux ?
[Nook Touch General] Renate:
Huh? Just look at the addresses that I posted and see if the same data is there. I'm not sure what version u-boot you or I have.

I only access it through Android. I don't use UMS with ext2. Certainly Windows would not understand it.
[Nook Touch General] liptonthe:
I could reconnect my arduino to reading the console at boot, i remember that the U-boot version was mentionned in first lines. Edit: U-Boot 2009.08-00731-gdd15e7e (Oct 31 2017 - 23:41:52)

It seem i couldn't find the same adress you posted. To be sure i have attached my file here if you want to check.

Ok, so you don't really upload data from your computer on it, or maybe with adb push ?

I will search to make the UMS work, i will let it know here if i find a solution.
[Nook Touch General] Renate:
So, here's the modified u-boot. It's using UART4 instead of UART1. First unzip it. Be careful putting it back, don't forget the seek!

# dd if=/sdcard/ub2mod of=/dev/block/mmcblk0 seek=2
[Nook Touch General] liptonthe:
Something goes wrong, my nook doesn't boot now..

The backlight of the screen goes up but nothing on the screen, no device detected on computer.. look bricked.

What i have done :

C:\Users\Hlod Wig\Downloads\platform-tools_r33.0.1-windows\platform-tools>adb push ub2mod /sdcard
ub2mod: 1 file pushed, 0 skipped. 289.0 MB/s (522752 bytes in 0.002s)

C:\Users\Hlod Wig\Downloads\platform-tools_r33.0.1-windows\platform-tools>adb shell
~ # dd if=/sdcard/ub2mod of=/dev/block/mmcblk0 seek=2
1021+0 records in
1021+0 records out
522752 bytes (510.5KB) copied, 0.049697 seconds, 10.0MB/s
~ # adb reboot system
/sbin/sh: adb: not found
~ # exit

C:\Users\Hlod Wig\Downloads\platform-tools_r33.0.1-windows\platform-tools>adb reboot system
[Nook Touch General] Renate:
I dunno what "system" is. Why not just "adb reboot"? Try a full reset. Download imxlink.exe, but don't try anything fancy. Just see if you are in bootloader.

C:\>imxlink.exe

Edit: I'll go and check out this stuff on my Glow2 tomorrow.
[Nook Touch General] liptonthe:
I use adb reboot system often, also adb reboot recovery or fastboot for exemple.

The command just reboot the device on android or TWRP and fastboot.

Yesterday before going sleep i tried imxlink.exe yes, but got nothing detected.

No bootloader, adb or fastboot unfortunally.

Thank's :) I'm gonna try to connect the Glow to my Arduino today to see if i get something.

Edit : I got nothing on console for the UART1 & 4
[Nook Touch General] Renate:
Ok, I just never heard of "reboot system" because it's the same as "reboot".

So, it's my fault. I had presumed that u-boot just used programmed serial and you could just swap the addresses.

So, it's not bad, but probably deeper than you've ever been. I just bricked my Glow2. It's one of those bricks where it's bad enough to not work, but not bad enough that it realizes that it won't work. I hope that your device is mostly open because that stuff with the tape and opening is the biggest pain.

Do you have any resistors? I like using resistors because it's safer. You could do it with a straight short, but I like being gentle when possible. I just used a 220 ohm, but anything between 100 and 1000 is good. You need to disable the flash so that the bootloader says, "I can't find ANYTHING" and it goes to (ROM) bootloader mode.

You need to do a reset while grounding TP23 through a resistor. Windows will probably complain and go off and ask Bill Gates permission, but it is a USB HID device so it does not need a Windows device loader (besides the stock HID). 15a2/0063 is the VID/PID

So now you just need to:

imxlink.exe ub2 boot.img

And then go write a good ub2 using dd (and not forgetting seek=2).

Oh, and your u-boot is ANCIENT. I should have checked. It's 47.2.102

The latest update is http://su.barnesandnoble.com/nook/piper/5.3/piper/0.115/update.zip I had the wrong link here!
[Nook Touch General] liptonthe:
Hi Renate !

That's ok you try to help me, then i know what i risk when i flash the equivalent of a UEFI/BIOS for the Nook.

I'm happy to learn how to get out of trouble so no worries.

Hopefully yes, because i spend half my time with my soldering iron inside the Glow !

I should have 1K resistor in my arduino kit i will go with it.

Let me few minutes i will make the things happen then reboot on Windows ! i keep you tuned :)
[Nook Touch General] liptonthe:
My setup is ok, i have soldered a two wire gauge cable to the TP23 pin and GND with my 1K resistor between. The Glow2 is now started and connected to my Windows10 PC but it seem i got nothing more.

i have also tried the manipulation .. Power button 3 sec then 10 sec 5 five times.
[Nook Touch General] Renate:
1k is possibly problematic. Also, with long wires you might get enough ringing for it to work anyway. Do you have anything lower? If not, you can short it, but only do it during reset. You need to remove it to run imxlink in any case.

The main reason I use a resistor is because I don't solder it, I just touch it to a test point. If I got the wrong point it could be a power supply that might object.

Edit: Is that really 1k? It looks like brown/black/yellow = 100k.
[Nook Touch General] liptonthe:
Ok perfect with direct shortcut it worked well.

Now with the imxlink tool boot.img should be my .. /boot image containing kernel that i modified early ? :

imxlink.exe ub2 boot.img

Edit: yes it was the boot image :)

Thank's you i get my Glow2 back !

C:\Users\Hlod Wig\Downloads\platform-tools_r33.0.1-windows\platform-tools>imxlink.exe ub2 img
Waiting for bootloader or Fastboot or ADB...
Found iMX6SL
Load addr 87800400, DCD offset 002c, DCD size 0220
67 DCD ops processed
Write, addr 87800400, size 0007fa00
*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
Jumping to 87800400
Device disconnected correctly
Waiting for disconnect...
Waiting for Fastboot or ADB...
ADB version: 01000000, payload: 4096, type: recovery::ro.product.name=Nook NTX;ro.product.model=Nook eBook;ro.product.device=ntx_6sl;
uid=0(root) gid=0(root) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)
[Nook Touch General] Renate:
Yes to boot image.

Did you see my edit above asking if you truly had a 1k and not 100k?
[Nook Touch General] liptonthe:
Yes, but i was too lazy for using my multimetter the first time .. it was a 10k

By the way thank's again it's fixed now .. what a roller coaster !

Yes my U-boot and my whole OS is in a late version i guess, because i have downgrade the system during the root and the gain of adb access because i was stuck with the last firmware.

Maybe should i update ? but i could loose TWRP and root access maybe ?
[Nook Touch General] Renate:
You can always get NeoNoogie for the Glow2 off my site and put it in recovery.

You can simply copy the adbd in there to /system/bin (is that where adbd is on this, I forget) or /sbin.
[Nook Touch General] liptonthe:
I've already used NeoNooogie whith the NST, it worked well !

I'll gonna take a closer look to that to update my glow2 :)

All the work and programs you've done for the Nooks ecosystem is awesome.

Also i'm seriously considering dev a small app to act as a gui filetransfer tool using adb underneath to work around with the extraSD. Then let the program in the main UMS storage of the glow to be able to use it on any computer.

I've tried to work around with the UMS Universal apk but it not worked very well.
[Nook Touch General] Renate:
I just sync everything from directories on the desktop with adbsync.

I put it all in a makefile.

On a Poke3 with USB 3.0 it takes a second to check on and update the changed ones on a total of ~8000 files.
[Nook Touch General] liptonthe:
Nice solution, didn't know this tool exist before ! Also a nice tool in python : https://github.com/Aldeshov/ADBFileExplorer
[Nook Touch General] Renate:
I just remembered that I've patched u-boot for the Glow3 to go automatically to fastboot and another time to make it stop at the command line and not go auto. If I get a chance I'll look at it for the Glow2.
[Nook Touch General] liptonthe:
This would be awesome ! I've tried an electronic RC delay without succes to power-up the module. I was thinkink about using a NE555 chip but of course it would be more clean without.

Beggined to try to fit all the elements inside the Glow frame, re-soldering the SDcard without the adatater will be needed. Also i will try cutting inside the right bottom side corner to make fit the GP-735 in.

I also must take same time to update the system then maybe find a way to have permanent navigation button on the touchscreen.
[Nook Touch General] Renate:
My current connectivity is the pits. Could you download http://su.barnesandnoble.com/nook/piper/5.3/piper/0.115/update.zip please, extract the u-boot and post it? (You could use the update anyway.)
[Nook Touch General] liptonthe:
Yeah sure ! I have download the update jar file who pretends to be a zip. how should i extract the u-boot from this ?

Effectively i could also update my system then extract it with the method i already know.

I was in a fablab today to make the GP-735 fit in the Glow Case. long short story .. it not happened as expected. I have been obligate to use gentle methods like milling machine and hammering to make it fit...

The next time i will take the GP-735 but without the integrated antenna.
[Nook Touch General] Renate:
How about unzip or 7zip or Windows File Explorer or ...

Nice photos.
[Nook Touch General] liptonthe:
Yeah .. 7zip on Windows make it perfectly .. idk why the MacOS archive utility didn't ..
[Nook Touch General] Renate:
It's unstoppable!

# dd if=/sdcard/ub2mod of=/dev/block/mmcblk0 seek=2
[Nook Touch General] liptonthe:
I just come back from my night walk with the atlas glow2, it's better with genuine topographics maps :)

It's works as expected. I need more try to be fully aware of the performances but get a fix from cold start take me few minutes then i need to be in a open area.

The battery drain very fast, but it's a second hand glow buy on Ebay last year. i think the battery is on the end.

Maybe i should also down the gps refresh rate to 10s instead of 1s to be more econom.

Thank's, i'm gonna try your mod ! do you think i can flash it on my "old" system ?
[Nook Touch General] Renate:
Yes, of course. That's the whole point.
[Nook Touch General] liptonthe:
Awesome ! this time It's boot with the module connected :)

You've made a good work, what have you changed ? U-boot is now listen on another UART ?

This version would work on any version of glow2 i guess, as long u-boot is independant of android ?
[Nook Touch General] Renate:
I just have it ignore keypress during startup.

C:\>modfile /l ub2mod 229bc e3a00000
[000229bc] ebfff3d7 => e3a00000
[Nook Touch General] liptonthe:
Nice, that's perfect, again thank's that help a lot !

I'm so curious, how do you spot the right hex string to edit, and how do you figure what to put in place ? Does U-boot is enought documented to let you do that "easily" ?

Because i've seen thread like this or that but all was worked from non compiled u-boot..

According to some documentations CONFIG_BOOTDELAY=-2 disable the boot key interuption.
[Nook Touch General] Renate:
You disassemble the binary. The iMX6 manual gives you the symbols for hardware registers. The strings are easy to find. You use the source code (and you have to look through the versions) to match up with the disassembly. Still, it's a bit like filling in a crossword puzzle.

87822da8:	e59f00f0	ldr	r0, [pc, #240] ; "Hit any key to stop autoboot: %2d "
87822dac:	e1a01004	mov	r1, r4
87822db0:	ebfff3fe	bl	0x8781fdb0 ; printf()
87822db4:	e3a05000	mov	r5, #0
87822db8:	ea000010	b	0x87822e00
87822dbc:	ebfff3d7	bl	0x8781fd20 ; tstc()
87822dc0:	e3500000	cmp	r0, #0
87822dc4:	0a000003	beq	0x87822dd8
87822dc8:	ebfff3c8	bl	0x8781fcf0 ; getc()
[Nook Touch General] liptonthe:
That's awesome, i really need to learn this kind of skills. So usefull !

I will try to redoing it by myself by following your path for the exercise.

i've done more autonomy test today. from 9am with full battery to around 1pm where the glow shut down itself. no backlight but full time unlocked with Oruxmap GPS tracking active.

To get the first fix i must be at open sky then it sometime take a while from cold start.. after it work well.

I've read in the GP-735 Datasheet that they recommand to soldering the base to large size mass object to improve the reception. i'll gonna try to perform an aluminium solder between the Glow case then the GPS module to see if it's help.

Edit:

I almost forget to ask you, i've read you used the default android launcher, but adapted for glows.

I would like to ask you if you think it's possible to get permanent navigation touch bar on kitkat ?

From my researchs i just founded bunch of apps who provide navigation touchbuttons moovable anywhere on the screen but no way to cut in the bottom the android display frame to reserve it to navbar.