[Android Software/Hacking General [Developers Only]] joshumax:
Android running on the TI nSpire CX Graphing Calculator

About:

The nSpire CX is a color-screen graphing calculator produced my Texas Instruments powered by an 150Mhz ARM-based SoC and 64MB of RAM. Unlike previous calculator models from TI, users, by default, are unable to create native homebrew applications for the device. Luckily, however, the TI community found a way to "jailbreak" the nSpire CX and CX CAS, allowing third-party developers to create apps for their calculators. One of the most notable community contributions, started by tangrs, was a port of Linux to the device, giving users and tinkerers full access to GNU userspace. This is my attempt to contribute back to the community, by porting Android userspace to the nSpire CX and CX CAS model calculators.

TL;DR

You can now run Android on a graphing calculator

Why?

Nowadays. there seems to be a misconception that Android can only run on fast smartphones. The latest Android release at the time of writing is Lollipop, a release Google claims can run on smartphones "with as little as 512MB of ram." Certainly a good start, But I was convinced *some* version of Android could run on *extremely* low end hardware. So, after a bit of searching, I found the best suitable Android release to run on the lowest-end Linux capable hardware I could think of: my calculator. That release is the obsolete, but venerable, Android Donut (1.6). After a bit of porting work, I managed to get a full Android stack up and running on my calculator and slowly began to iron out the major bugs. I've been playing with it for a while now and figured it was finally *decent* enough to release to the general public. However, it should be noted that a lot of functionality is still missing, partially due to bugs, and partially due to the age of Android 1.6. However, I do believe it has exceeded it's goal as a PoC port to help me learn more about what is involved porting Android to legacy hardware. As it turns out, it's even rather usable.

Status:

* Working:

Android Core

Most Android 1.6 Apps

Terminal Emulator

Keyboard

* Buggy:

Wifi (warning, extremely broken and may kill your cat. External dongle needed)

Bluetooth (Not actually sure whether this works or not as I don't have a BT dongle)

USB

* Not Working:

Touchpad (Using the touchpad dtb seems to break a lot of stuff like PMIC, so I disabled it _for now_)

Battery Status (Status is emulated using test_battery kernel driver)

FAQ:

* Q: Why are you using 1.6?! That's like, really old!

A: Android 1.6 was the only feasible version of Android version I could run with an 150Mhz ARM processor and less than 64MB of usable RAM

* Q: What do I need to run android on my nSpire CX (CAS)?

A: The bare minimum is (1) Calculator running OS 3.9 or less and (1) Mini-USB-OTG cable

* Q: What's the point of this?

A: I have no idea, but it sure makes me laugh when I think about it

* Q: Will this help students cheat by putting this on their calculator?

A: I very much doubt it

* Q: Can you run a calculator emulator on Android on the Calculator?!?!

A: Yes, yes you can

* How's performance?

A: Surprisingly, pretty decent, considering... I can even play some 2D games on it

* Can you port Android to *my* calculator? It's a (insert calculator using a z80 here)

A: No

* Will this. Run Crysis?

A: Good luck :)

* Where's the sources?

A: See the bottom of this post.

Installing nDroid on your calculator:

Prerequisites:

1) USB thumb drive, 1GB or greater

1) TI nSpire CX or CX CAS running OS 3.9 (Important! [It seems OS 3.6 breaks it, I'm using v3.9.1.38] (Thanks ViiperzRecon))

1) USB-OTG cable that fits the nSpire CX (mini-usb to host-usb)

Recommended) A powered USB hub (Without it your calculator might not have enough power to write to the USB drive and CRASH)

1) Computer running Linux or BSD

Step 1: Jailbreak your calculator

I won't explain how to do this are there are already an abundance of articles on how to do this. Take a look at http://ndless.me for details.

Step 2: Format the USB drive correctly

(It should already be known that doing this will destroy any and all data on the thumb drive)

Open up the partitioner of your choice (my favorite is gparted), and create the following partitions as described:

Partition 1: (System partition) ext4 (> 100MB recommended)

Partition 2: (Userdata partition) ext4 (> 500MB recommended)

Partition 3 (optional): (Cache partition) ext4 (> 50MB recommended)

Partition 4 (optional): (SD card partition) FAT (> 100MB recommended)

Example image:

Step 3: Download files

Boot.img.tns [LINK]

System.tar.gz [LINK]

nspire-cx.dtb.tns [LINK]

nDroidLoader.tns [LINK]

startndroid.ll2.tns [LINK]

Step 4: Install TiLP and create directories

You should have already installed this when jailbreaking your calculator in step 1, if not, install it now if you're using Linux, or use the TI software if you're using Windows now.

When you launch TiLP, connect your calculator and create a directory called "Android". Copy over nspire-cx.tns, Boot.img.tns, nDroidLoad.tns, and startndroid.ll2.tns. After that, download ndless.cfg.tns in ndless/, open it with a text editor, and add the following line:

ext.ll2=ndroidloader

Step 5: Extract system to USB drive

Now that the USB drive has been partitioned, mount the first partition somewhere on your computer and place System.tar.gz in the root directory of said partition. Open up a terminal in that location and type:

sudo tar -xpf System.tar.gz

rm System.tar.gz

After that, you should have some shiny new files and directories on your USB drive!

Step 6: Starting it up

After the files have synced to the USB drive, remove it and place it in the USB-OTG cable. When that's done, plug the small end of the cord into the top of the nSpire CX. Open "documents" on the device, click on the Android folder, and then click on startndroid.ll2.tns. A window should appear and shortly after you should see a framebuffer console. Congratulations, you should now be running Android on your nSpire!

Step 7: Boot up and finish

After about 10 minutes or so (boot ups are shorter on subsequent launches), you should be greeted with the stock 1.6 launcher. Feel free to hack away on your new Android-powered calculator. [NOTE: Until the touchpad is working, the "/" button is up, the "x^2" button is down, the "e^x" button is left, the "10^x button is right, "menu" is menu, "doc" is home, "esc" is back, and "save" is power].

Video:

Unofficial Reddit thread:

https://www.reddit.com/r/Android/comments/3awptt

XDA:DevDB Information

nDroid, ROM for all devices (see above for details)

Contributors

joshumax

Source Code: https://github.com/nDroidProject

ROM OS Version: 2.3.x Gingerbread

ROM Kernel: Linux 3.10.x

Based On: AOSP

Version Information

Status: Testing

Current Beta Version: nDroid-1.6

Created 2015-06-26

Last Updated 2015-12-02