[2015/03/07] BotBrew: *nix tools for Android

438 posts
Thanks Meter: 196
By inportb, Retired Recognized Developer on 15th January 2012, 05:55 AM
Post Reply Email Thread

The remainder of this post contains historical information. Please read the update. Thank you.

BotBrew is
  • a repository of *nix software (such as bzip2, curl, openssl, python, and ruby) for ARM-based Android
  • a package manager powered by Opkg, a lightweight program that feels like dpkg+apt
  • a service manager powered by runit
  • a build system for anyone looking to build and package his/her own scripts and programs
Thanks: mateorod and xela92 for testing the heck out of this thing; racks11479 for delicious artwork; you for using this project, reporting bugs, and making it better
If I missed anyone, let me know!

Warning: BotBrew has been used successfully on a variety of rooted ARM devices, and is developed using a Nook Color, but you should still make backups before trying, just in case.


Install BotBrew
[ Google Play | BotBrew.apk | BotBrew.debug.apk ]

Read the Quick-Start Guide & Manual
[ ]

Alternative (Command Line) Installation
If the BotBrew app fails to bootstrap, you might be able to bootstrap using the command line:
wget -O- | su
Such a setup should be compatible with the app, though it may not work perfectly. The manual has more tips for command line usage.



Install BotBrew+1
The next release of BotBrew, named basil, will be powered by Debian's Dpkg and Apt. This is a non-trivial update, so the app is being rewritten from scratch. I've posted some usage instructions, in case you are adventurous enough to try. Thanks! This app may be used in parallel with the current-stable BotBrew release, without conflict.
[ Google Play | GitHub ]

5/20: the next release of BotBrew is in development!
4/20: improve support for long package names; fix list of repairable packages
4/16: new UI for devices with wide-enough screens; experimental support for moving to /sd-ext
4/9: Google Play release of BotBrew "anise"; previous release is now BotBrew.oldstable.apk; lots of updates since oldstable
3/16: lots of installer and filesystem changes for cross-device compatibility, work started on multiuser support
3/10: installers now depend on botbrew-core, which will (in the future) pull in basic packages that everyone should have
3/4: swipe left and right to see all/installed/upgradable packages
3/3: added ability to start installation of *.opk files from file managers
3/2: added ability to start installation from browser after clicking *.opk link
3/1: fixed some BotBrew.apk bugs; updated command line installer
2/27: reworked BotBrew.apk; new packages in stable repo
2/18: testing repository now open; new opkg -- please read before upgrading
2/16: make BotBrew.apk display latest versions in the package list
2/2: bugfix release of BotBrew.apk
The Following 28 Users Say Thank You to inportb For This Useful Post: [ View ] Gift inportb Ad-Free
17th January 2012, 06:48 AM |#2  
Inactive Recognized Developer
New Orleans
Thanks Meter: 3,520
Donate to Me
Well, I now have python, ncurses, openssl and a couple other packages running on my nook. I have indeed printed 42, and even wrote my own (proprietary) code to advance the project some that printed 43. Advanced scripting.

But seriously, this is sweet. I am all over anything that opens up this device. I don't think I have ever bought a piece of hardware that has so outstripped my expectations.

Thanks for the program. I will report back after I play with it some.
The Following User Says Thank You to mateorod For This Useful Post: [ View ] Gift mateorod Ad-Free
18th January 2012, 01:18 AM |#3  
poltak11's Avatar
Flag Melbourne
Thanks Meter: 25
Wow, what a great idea! Looks like my Nook will be used for a bit more than entertaining my family with casual games; nice to have some productivity back I was thinking about installing Ubuntu on my Nook for this sort of thing, but there's no need anymore.

It would be great to get this a bit more recognition, and getting more useful things such as gcc or even the GNU toolchain installable with this package manager. Might put a link in my signature, if you don't mind.

Now to look for an affordable lightweight bluetooth keyboard...
The Following User Says Thank You to poltak11 For This Useful Post: [ View ] Gift poltak11 Ad-Free
18th January 2012, 03:10 AM |#4  
OP Retired Recognized Developer
Thanks Meter: 196
You read my mind I got binutils, gmp, mpfr, and mpc working earlier today... and gcc is in the pipeline. My main reason for wanting a native gcc is that some software (such as python) do not like to be cross-compiled at all. I'm having a bit of trouble with gcc, but I'll keep hacking away at it.

Please, go right ahead and share this thread; this is a young project but I think it could be more useful. On the one hand, there's a whole lot of free software (such as the GNU stuff) just asking to be built and packaged; on the other hand, many people who hang out around here have a few scripts/programs of our own to distribute.

In case you're interested, here's where all the packages live. There are actually two more ways to install (remote and local) stuff using Opkg:
opkg install http://host/path/to/package.opk
opkg install path/to/package.opk
The Following 2 Users Say Thank You to inportb For This Useful Post: [ View ] Gift inportb Ad-Free
20th January 2012, 10:18 AM |#5  
Junior Member
Thanks Meter: 2
Thumbs up
Very nice project !!!

I have python 2.7 standalone on android.
One problem, in python commandline i can't import hashlib, i can fix this?

The Following User Says Thank You to Fritos2 For This Useful Post: [ View ] Gift Fritos2 Ad-Free
21st January 2012, 02:36 AM |#6  
OP Retired Recognized Developer
Thanks Meter: 196
So, I just got a working build of GCC+binutils and pushed the packages to the stable repo. Please keep in mind that for now, stable means I tested it a couple of times and it works, so be careful and use at your own risk.

To install gcc and binutils, make sure you have about 160mb of storage free in /system and run:

opkg update
opkg install gcc-4.6
That's about 70mb's worth of downloads, and my server's underpowered, so please wait patiently and retry if it fails (failure when receiving data from the peer). When that's done, you might want to compile something:

cd /cache
gcc -o hello hello.c
And if that completed successfully, you should have a new executable, which you could run for a classic greeting. I was not able to get the C++ libraries compiled, but C code should compile alright.

@Fritos2: I've been trying to fix this issue, but I'm not confident that I could do it without help. Python (and Perl) are very resistant to cross-compilation, and even after I hammered it into submission, some modules do not work. Another module that I'd really like is readline, which gives you enhanced editing capabilities in the interactive interpreter. I'm a Pythonista, but I've got to say: Ruby does cross-building right. Even sqlite3 supports readline. I suspect that Python might have to be compiled natively, and this is where native gcc comes in.

I'd appreciate any help, of course
The Following 2 Users Say Thank You to inportb For This Useful Post: [ View ] Gift inportb Ad-Free
24th January 2012, 05:50 PM |#7  
Junior Member
Thanks Meter: 2
I'll follow this project with great interesting.
26th January 2012, 04:33 AM |#8  
OP Retired Recognized Developer
Thanks Meter: 196
Hey guys, there have been a few updates:
  • opkg's lock file has been moved to /cache/opkg/lock so there's no need for a read-write /system just to query packages
  • gnupg has been packaged, for those who like to sign their stuff
  • python... well, I'm still working on it >.<

Anyway, I thought I'd do something to make this project more accessible. I don't have any apk's for you yet, but I've attached a screenshot of the work-in-progress
Attached Thumbnails
Click image for larger version

Name:	screenshot.jpg
Views:	1831
Size:	23.5 KB
ID:	872930  
The Following 2 Users Say Thank You to inportb For This Useful Post: [ View ] Gift inportb Ad-Free
26th January 2012, 06:10 AM |#9  
Inactive Recognized Developer
New Orleans
Thanks Meter: 3,520
Donate to Me
I am very impressed with the progress. I am a super-noob but have enjoyed toying with the packages from your opening post. I haven't had time to do much but explore, but this sure does open up a whole new world for the nook, from an accessability stand point alone. I wouldn't be suorised to see an uptick in interest as some if the more experienced coders are able to turn their attention from cm9.

I will probably install those latest packages sometime this weekend. Just real strong stuff.

Edit. Ok, o I just went ahead and did it now. Obviously, I couldn't get it to work. Have downloaded the FCC and got the hello file fro the dropbox. I ran the gcc -o hello hello.c and was returned a hashtag only. If I ran gcc hello, it outputted the hello program code. I tried several things basically willynilly until I got tired of getting a fatal error and having the build canceled.

If this is too basic and will clog the thread, I would happily accept a pm with a good tutorial. Thanks a bunch.
26th January 2012, 12:45 PM |#10  
Junior Member
Thanks Meter: 2
The problem with python maybe relationed with python-devel package?

Sorry is the question is stupid, i'm so noob.
26th January 2012, 03:25 PM |#11  
OP Retired Recognized Developer
Thanks Meter: 196
The Python build process has two steps: first, you get the main Python executable, and then you get the modules. The executable built in the first step is used to test the modules in the second step. So, naively cross-compiling Python would result in most modules not passing the test (because you cannot actually run the Python you just built), and these modules would be removed. As it turns out, you could patch the build scripts to run the tests using a host-native Python, but even then, there are a few modules with particular requirements that still don't pass. This is where we are now, but I think we could do better.
Post Reply Subscribe to Thread

botbrew, essential app

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes