Tuesday, October 1, 2013

Off Topic: Back From The Dead

Well, sorry I disappeared for a while.  I have not given up on the project.  My PC started rebooting at random.  Re-seating the graphics card did not fix it...  The Reader's Digest version is that after many hours of troubleshooting, I discovered a short in the CPU case which has now been replaced.  Onward and upward!

Tuesday, September 10, 2013

Getting Android 2.1 Souce Code...

Today, I got the bugs worked out of the VM.  Using the repo tool to download the source, I kept seeing errors about ... gnutls_handshake() failed A TLS packet with unexpected length ...

I found several posts online that made me think I was going to have to rebuild git to use a different ssl application.  Fortunately, simply repeating repo sync -f over and over eventually resolved the problem.

I just added the following to my manifest.xml file in my Android 2.1 working directory:

 <project path="kernel/omap" name="kernel/omap" />


Now I am repeating the repeated repo sync's to get the linux kernal that I suspect B&N used.  More to follow...

Monday, September 9, 2013

Updated VM Coming Soon

Once I got past the problem with the VPN, I discovered that the version of git in the VM is too old.  I updated that yesterday.  I will be posting an update to the copy of the VM on my google drive that also includes the change to the user's .bashrc file.

Sunday, September 8, 2013

Problem Initializing Android Repo Tool

Following directions  here , I am trying to get source code for the latest version of Android 2.1. According to  this page , that is android-2.1_r2.1p2. When I get to the step where I issue the command:

repo init -u https://android.googlesource.com/platform/manifest -b android-2.1_r2.1p2

I do not get a prompt asking me for my name and email. The system returns to the prompt with no error message and nothing is downloaded.

I have posts in Google Groups:   Android Building  and  Repo and Gerrit Discussion 

I also started a discussion thread on  Stack Overflow .

Update 09/09/2013:  The problem here was that I use a VPN and it was active.  A very helpful user on the #android-dev IRC channel told me that proxies are a problem when getting the code.

Friday, September 6, 2013

Debugging Virtual Machine

I discovered a problem with the configuration of bash in my VM.  I am debugging that at the moment.  I will update the one available online ASAP.

Update 09/08/2013:  I discovered that the solution was a simple one.  I had to add the user's bin file to the path in the .bashrc file.

Wednesday, September 4, 2013

Checking For Any Modifications To The Linux Kernel

I downloaded the source for the 2.6.29 kernel from  www.kernel.org .  I am running an ascii comparison of it with the one included in the Nook source downloaded from B&N.  I will report on the results today or tomorrow as time allows.

Update 9/5/2013:  The kernal has hundreds of differences.  I am guessing they started with one from the Android tool chain.  I will follow up on that.

Tuesday, September 3, 2013

Linux Kernel Same for Android 2.1 and 2.2

 According to Wikipedia , the Linux Kernel used all Android builds before 4.0 were built using the Linux 2.6 kernel.  From Android 4 (Ice Cream Sandwich) forward, they are built on Linux 3.x.

Since the config file must work with the specific version of Linux, it should be possible to tweak the one used in the original build of Nook 1.2.1 to build Android 2.2.  The kernel running in the Nook is:  2.6.29-omap1


The file used to make the config file is:  omap3621_gossamer_evt1c_defconfig.  This is located in the \distro\kernel\arch\arm\configs directory of the source files I downloaded from B&N.  I have created a new page on the blog where I will mark it up as I go along.


At the beginning of the file it says, "Automatically generated make config".  This has me wondering what software / tool they used to generate it.

As I initially read through the file, I thought it is interesting that I don't see specific references to most of the chips / hardware on the board.  There is no info that I immediately notice about the eInk screen, but there is for the zForce touch screen for example.

Need to revisit  From Zero to Boot:  Porting Android to Your Device 

Monday, September 2, 2013

Roadblock Exploring Installed Modules

As I understand it,  I need to poke around in /sys/module and /system/lib/modules  to figure out what drivers are doing what in my device.

There is no /system/lib/modules directory on my NST.  The /sys/module directory contains the following:
  • kernel
  • printk
  • wakelock
  • userwakelock
  • earlysuspend
  • spurious
  • omap3epfb
  • keyboard
  • vt
  • bridgedriver
  • scsi_mod
  • usbcore
  • musb_hdrc
  • omap_hdq
  • w1_bq27000
  • usbhid
  • binder
  • lowmemorykiller
  • snd
  • snd_timer
  • snd_pcm
  • snd_dummy
  • oprofile
  • tcp_cubic
  • rfkill
  • pvrsrvkm
  • omaplfb
  • bc_example
  • tiwlan_drv
None of those contains any .ko files.  Using Root Explorer to search for *.ko, finds only these:
/etc/wifi/tiwlan_drv.ko
/system/bin/sgx/omaplfb.ko
/system/bin/sgx/pvrsrvkm.ko

I am trying to figure out how to get modinfo information for these.   XDA Thread    Phandroid Thread 

Friday, August 30, 2013

Very Little Time...

This week I started a new schedule at work.  So, far I have had very little time to work on the project.  I hope to get in a few hours tomorrow and Sunday...

Monday, August 26, 2013

Virtual Machine Built and Ready to Go!

I have an Ubuntu Virtual Machine that runs on 32-bit Windows.  I cleaned it up and updated it with all the required software for building pre-Gingerbread Android.  Uncompressed, it is 12 GB!

It is now available on my  Google Drive .  I had 7Zip compress it and break it into 8 chunks.  That way, if you download it, you should only have to re-do one or two parts if something gets corrupted in transit.

You can read the  ReadMe  without having to download the entire VM.

If you use it and find it helpful, please leave me a comment and let me know!

Friday, August 23, 2013

Hardware Buttons

I added the hardware buttons to the Hardware page.

My best guess is that the TI TPS65921B Mulitpurpose IC is handling I/O from these.  If so, getting the short- and long-press behavior to work on the Power Button would rely on the driver for this chip -- yes?

Android 2.2 requires 3 hardware buttons:  Back, Home and Menu. A 4th Search Button is optional. Assigning 4 of the NST's buttons to these functions and leaving the 5th user configurable would be ideal.  A second best choice would be to disable the 5th button.

I seem to recall seeing some posts about the Nook Button causing power drain problems with some modified kernels.  I will revisit that tomorrow...

Thursday, August 22, 2013

Tuesday, August 20, 2013

Need Help Finishing Hardware List

Finished the Hardware page with the info I have as of  August 20, 2012.  Posted on  Phandroid  and  XDA Developers  looking for volunteers to clarify chip differences on the NST and NST w Glow.

Monday, August 19, 2013

Source Code Obtained

I downloaded the  B&N source code  this morning!  I am hoping I can find the drivers I will need in there as I peel open this onion...

1.2.1 is just an update to 1.2.0 so I got both files.

Sunday, August 18, 2013

What Hardware Do I Need?

I have seen comments in fora and on websites that suggest that you do not want to build Android unless you have a 64-bit Linux Übermachine. I am proceeding on the assumption that this is an overstatement. I am hoping that if you do not have this kind of machine, it will just take longer -- many hours and possibly even days -- rather than crashing the system, compiler, etc. I plan to do this on an Ubuntu VM on my PC. If these assumptions are wrong, I may need a new strategy.

Comments, thoughts and suggestions would be greatly appreciated!

Saturday, August 17, 2013

How I Got Here

Some time ago, a friend gave me a Kindle Touch.  I have been reading fiction for pleasure for the first time in a long time -- Thanks, Harvey!  I wanted to put a basic spreadsheet on it to use when I am at work and for managing shopping lists, but there was no App for that!

I did a little research, and saw that the Nook Simple Touch runs Android! I saw that it would have to be rooted to get apps from the Google Market.  No problem.

What I did not know was that the NST comes with a modified version of Android, and doesn't just work with just any App once it is rooted.

Kingsoft Office installed without any problem.  It has the spreadsheet I was looking for.  I have been completely distracted from that onto other issues, as I have become more informed, though.

This trip down the rabbit hole really got started when I tried to install Firefox for Android.  I am a Firefox fanatic for one reason:  NoScript.  If you don't know, NoScript is a plugin that creates a whitelist of whom you allow to run scripts in your browser.  Most browsers only let you turn scripts on and off completely, but with this add-on you get much more control over how that all works.  I also use FlashBlock, but other browsers offer the ability to get some control over Flash.

After much hacking around, I discovered that the latest release of Firefox for Android that will run on my rooted nook is 4.0.b2.  (There are a couple of nightly builds that will run on it after that, also.)  Through talking with people at Mozilla, I discovered that builds after that point require armeabi-v7.  Now I still don't really understand why they wont run; since, the NST has an ARM7 processor.  I assume it has something to do with the way the OS was built.

My first plan was to rebuild Firefox for Android for armeabi and see if I could find a build that would work with one of the alphas from NoScript Anwhere.  That is still my fallback plan.

I also discovered that although it installs and browses pages as expected, Firefox's sync feature did not work.  At first I thought it was just because it was a buggy old beta.  What I have since learned, though is that B&N modified the OS and how it interacts with Android's built in AccountAndSyncSettings. (Thank you straygecko -- developer of GSAppsAttack!)

That and the strong suggestion from the guys over at Mozilla that I should upgrade my OS to Android 2.2, have set me on this journey.