yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] SifJar:
That got it working, thanks.

Now I have another problem though. Decided to play about a bit with writing a few simple C programs, created a .c file with the following:

#include <stdio.h>

int main(){
printf("hello world");
return 0;
}

Compiled with gcc ("su -c botbrew gcc test.c"), made the resultant file executable ("su -c chmod 0755 a.out") and then tried to run it ("./a.out") only to get a "no such file or directory" error. So I tried renaming the file "test" with no extension ("mv a.out test"). ./test still gave the "no such file or directory" error. Typing just "test" gave no error, but also no output (i.e. the expected "hello world"). Any ideas what I'm doing wrong?
[Nook Color Android Development] hwong96:
Rename file to test.c or test.bin. Type test to execute.
[Nook Color Android Development] polymath257:
Be careful of naming a program 'test'. It turns out that there is a built-in program for linux called 'test' that is used in shells to test the existence of files, etc (it is often abreviated as '['). Usally the path is set up so that this executable is run before anything you write.

Did you look at the ownership of the executable that resulted from the compile? It looks like you made it to be owned by root. If you are not root while running it, you will get errors.
[Nook Color Android Development] Ray_jai:
Hi, I'm trying to install packages, but when I hit refresh, it says update failed?

Can someone help me out. thanks.
[Nook Color Android Development] inportb:
BotBrew Coriander

Hey friends, it's been too long. While BotBrew slept, Android has moved on. The world has moved on. I was unable to keep up, so I kept you waiting. I know it's been frustrating for you; believe me, it has also been painful for me to watch my own project suffocate slowly. With your support, I'd like to change that.

If we wanted to build BotBrew today, what would it be? BotBrew has always been a tool for Android/Linux hobbyists like us to tinker with our mobile devices. In the beginning, Anise was a proof-of-concept that showed it was possible to install Linux tools directly on Android with a familiar package manager. Basil took the concept further by installing a minimal Debian system. There are other great tools for that now, such as LilDebi.

[IMG="BotBrew Coriander"]http://i.imgur.com/vG64tSU.png[/IMG]​

Pwnna and I have been busy. Here's what BotBrew Coriander supports today:

Multiple "containers"

Debian template for ARM

Possibility of user-generated custom templates/appliances

Basic disk image support baked-in

Improved bus factor

Here's what we're working on now:

Autostart specified containers during boot

Integrated task/process/service manager

Template distribution

Package manager integration

Here's what we envision for the future:

Better management tools, like Heroku or AWS for your mobile device

Optional root, so you could distribute your appliances to *anyone*

But what's important to you? How do/did you use BotBrew, and where should we focus the development effort? Thank you for your continued support.

(This is not a beta release, but that's coming soon. Source code is also coming soon. Because this is no longer limited to the Nook Color, a new thread is also on the horizon.)
[Nook Color Android Development] dirtyreturn:
@cf................

#finally

thanks for coming back! :)
[Nook Color Android Development] Daniel Smedegaard Buus:
Ditto here. I tried installing the "regular" anise version on my Tab S, and it wouldn't install the bootstrap files. Just said it "failed" without further explanation. At that point I was already assuming it had to do with root privileges as I had received no permission dialog from SuperSU, and an action like this should surely need root privileges. I installed the "experimental" basil version instead, and was asked at one point by SuperSU to grant su privileges to Botbrew, which I did. Nonetheless, this is the message I get.

I can use the botbrew command from an ADB shell, though... But it's odd that this isn't working.
[Nook Color Android Development] Snoop05:
Have you considered basing it on pacman from ArchLinuxARM?
[Nook Color Android Development] Yunfengdong:
Can not download the BotBrew Basil's img. zip and pkg. zip
[Nook Color Android Development] inportb:
Thanks for trying this, mateorod. I'll try to figure out what's going on with the hello package. The hello executable is actually just a shell script -- just have a look inside /system/bin/hello (cat /system/bin/hello). I wasn't intending to make anything special with it... just an example of how an Opkg package might be constructed. I appreciate the time you've put into this!

Oh, and if you're using the GUI: it automatically remounts /system for you, and it should raise a root request when that happens. it should also request root when it actually installs something (including itself, during the bootstrap phase). And, after it's done what it wanted to do, it makes /system read-only again (but only if it had to remount rw in the first place).

Updates from my end:

python now works with hashlib

made lots of development packages, which is good for building stuff directly on the device (but i haven't actually tested them yet)

packaged runit, a service watchdog that keeps your stuff running

packaged dropbear, a small ssh client and server (with support for runit)

packaged dtach, which provides the gnu screen functionality for sharing shells

packaged weechat, an irc client

nb: runit is currently not able to start itself; but you could start it using `nohup runsvdir-start &`. this should also bring up dropbear, if you have that installed too. runit might also consume more electricity by monitoring processes; but that's going to happen anyway with dropbear running... I'll have to test battery usage.

I have a couple of screenshots demonstrating runit, dropbear, dtach, and weechat. I have dropbear running on my [CM9] nookcolor, monitored by runit. I have weechat running on the nookcolor, under dtach. On my netbook, I am ssh'd into the nookcolor and sharing the weechat screen. The reason that the netbook view is slightly funky is that I'm letting the nookcolor control the terminal size/shape; I could just as easily make it netbook-friendly (but then it would look strange on the nookcolor).

​
[Nook Color Android Development] Fritos2:
You´re a f**k** genius

I just run a django server on my optimus black finally. :):)

Thanks.
[Nook Color Android Development] mateorod:
Thanks so much for walking me through all that! Obviously I am totally new to this. Until I rooted this nook a couple months ago, the last computer I owned was killed by the Love Bug. For real.

Anyway, point is, if this is not part of the project, or simply not doable, just point that out to me, I don't even have a good handle on the possibilities, let alone the limitations.

I was thinking about attempting to compile a text editor . Are these tools something i could build Vim with? If you know the package i should use, you could just point me in that direction, I wont make you hold my hand like you had to for the first build. Thanks for the time.

Edit: OK, a second look yielded a how-to featuring python and gcc(it looks like? Maybe some dependencies?) I am going to try and see if i can't figure it out. Stop me if you think I am gonna hurt myself...
[Nook Color Android Development] inportb:
Oh, wow. Excellent work!

So, there are two ways of building stuff for the nookcolor. If you look at my git repo, you'd find "recipes" for building vim (and other stuff) on a regular Linux computer. In fact, the vim in my repository was built this way. The other way is to do it directly on the nookcolor, using gcc and development headers+libraries. I just tested this on CM7/SD and it works (I had some trouble with CM9); here's how:

(... and the third way is to not build it at all, and just use the vim that comes with CyanogenMod.)

1. install the prerequisites (using either command line or gui)

you need: gcc-4.6 make libncurses-dev

1b. free up some space

at this point, you want to make sure you have at least 80mb free in /cache, because that's where we'll be doing the work. a good way is to clear out the opkg archives: rm /cache/opkg/archives/*

2. prepare the workspace and grab the source code

mkdir /cache/vim
cd /cache/vim
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
tar jxvf vim-7.3.tar.bz2
rm vim-7.3.tar.bz2

3. change /bin/sh to /system/bin/sh everywhere

for file in `find vim73 -type f`; do sed -i 's/\/bin\/sh/\/system\/bin\/sh/g' $file; done

4. configure and build

./configure --with-tlib=ncurses --disable-gtktest --prefix=/system
make

5. install

make install DESTDIR=/cache/vim/out

(alternatively, you could just install to the root by omitting the DESTDIR stuff, but then it might make a mess. better play it safe for now.)

6. enjoy! (test)

cd /cache/vim/out/system/bin
./vim

if you don't see any pretty colors, you might want to install ncurses-common
[Nook Color Android Development] mateorod:
GUI bug

I removed opkg to clear some.space in /cache as detailed above, but I intended to use the UI to get libcurses among other packages. Botbrew prompted me to install opkg again, as it is needed for operation. After the install, the prompt reappears. You have the option of simply pressing the back button and accessing the UI, but a user could have some confusion as to whether they were done. After every installation of opkg, the prompt reappears upon first run of the app.

Botbrew-2

I don't see make in the ui either, although you could just be waiting to include that in the next update. Thanks for the work!

Edit: Ok, that's not it. It loops continuosly from saying I am "good to go" then goes immediatly back to the welcome prompt. I have adjusted my r/w mounts, and will go through a terminal and see if that makes a difference. The only bug could be telling noobs like me that I'm good to go when in fact I am probably just a moron : )

Edit 2: Yep, just dumb! Had applications running as root still blocked through my firewall. The Botbrew app's only problem is not differentiating between successful/unsuccessful installations and reporting every attempt as "good to go". No installation script is shown like with a successful install, however.
[Nook Color Android Development] inportb:
You'd clear the opkg archives, but not remove opkg itself... there is currently no way to do this using the GUI, but you could use the command line.

Regarding the bootstrap bug: I partially implemented Opkg in Java (lol), so the app now has better control over the process. I believe it is fixed, and a new BotBrew.apk has been released.
[Nook Color Android Development] liam.lah:
Dude, this is freakin superb. a package manager really shortens the gap between android and any other linux distro.

At any stage of development would you be open to taking requests for stuff to be added to the repos?
[Nook Color Android Development] inportb:
Sure. What open source command line software would you like to see in the repo? I can't guarantee success (i.e. GNU Screen has been a sticky one), but I'll try.
[Nook Color Android Development] racks11479:
Apktool? :)

-Racks
[Nook Color Android Development] inportb:
Ooh, this one depends on Java. I'll see if I could get Java packaged; or maybe get apktool to run on dalvik :)
[Nook Color Android Development] racks11479:
Yes I know, I've been trying to get it to run on android and it goes back to the java requirement. This is why what you're doing would be awesome. Especially for progress on a script I've been working on.

I'll be lurking on irc as well as this thread to keep track on BotBrew! :D

Thanks again,

Racks
[Nook Color Android Development] liam.lah:
To be honest, i can't think of anything that really needs to be in there, though today i used imagemagick to convert some pictures of documents i took into .pdfs

Im not sure how much effort it is for you to add each individual package, but little tools like this could be cool.
[Nook Color Android Development] inportb:
Alright, I'll take a stab at ImageMagick too.

apktool is difficult for two reasons: aapt is part of the Android platform tools, and Android is a monolithic chunk that doesn't like to be taken apart; it also depends on Java, but I think we could get around that by compiling the Java to Dalvik. I think it would be nice to have some self-hosted Android tools though, so I'll poke around.

I'm also in the middle of restructuring the build system. As the list of ported software grew, I felt the need to make improvements.

/edit:

So I got ImageMagick; but before I push it to the repo, I need to add more image formats to make it worthwhile.
[Nook Color Android Development] inportb:
ImageMagick is now working, and these formats are supported :)

You might see some notable omissions, such as png... but we'll figure this out some day! I was also unable to make Ghostscript, so those functions are missing as well. But we could now make pdf's out of jpegs, and so on.

Meanwhile, I've been busy restructuring the build system. There have been no commits to the git repo because I'd like this to be an atomic update. I'm also working on making a native LLVM+Clang, which would replace GCC if it works.

Thanks for playing along, and feel free to suggest more software. If you'd like to learn how to make your own packages and host your own repositories (you could even use Dropbox), just let me know. I might also start accepting package submissions and hosting them in a secondary repo.
[Nook Color Android Development] mateorod:
Converted a jpg to pdf last night. Sweet.

Thanks.
[Nook Color Android Development] inportb:
Awesome. Soon, you will be able to read/make png files (I hope).

Today, I'd like to talk about standardizing a filesystem hierarchy that's friendly to both Android and *nix. As you know, Android's filesystem hierarchy is slightly different from *nix's, and part of the porting process involves tweaking the places where the programs expect to find things. I am currently maintaining some 61 bits of software, and it takes a few days to make drastic changes such as these; rather than waiting, I'd like to propose the following standard now:

/system instead of /usr for things that don't change regularly (programs, libraries, etc)

/data instead of /var for things that change often (databases, etc)

/system/bin for user and system executables (programs)

/system/libexec for program executables (accessory programs)

/system/lib for object code libraries

/system/etc for read-only single-machine data (configuration files)

/system/include for C header files (useful for building software onboard)

/system/share for read-only device-independent data (documentation, miscellaneous scripts)

/data for modifiable data (data produced by running programs)

Subdirectories of /data include /data/lib, /data/local, /data/log, and /data/spool.

Furthermore, Opkg provides a mechanism to install to alternate destinations, because mobile devices are often resource-constrained. I'd like to enable destinations such as /data and /cache to be used for package installation. In this case, I'd simply prefix everything such that /system becomes /data/system, and so on. At the moment, installing to sdcard is not possible because its filesystem is largely incompatible.

*nix users would also be familiar with the concept of a home directory where user data (documents, photos, music, ...) are stored. We already use the SD card for that, and because Android is a single-user system, I think it would be reasonable to make /mnt/sdcard the global "home directory."

What do you think?

p.s.: You might have noticed that I left out sbin -- this directory usually contains small, statically-linked programs used to boot the system; we don't need to worry about boot-up because Android already handles that for us, so I figured I'd lump that with /system/bin.
[Nook Color Android Development] mateorod:
Okay, I was gonna leave you alone, I swear. I went to try spartscusrex on his terminal ide post, but there you were, commenting on the very issue I was about to ask about! Kismet, I told myself.

I am trying to run the smali decompiler/editor/recomplier from within Terminal IDE, to edit the services.jar file needed to supercharge ICS, as well as decompile a dicey classes.dex file from a suspect app. When I run the command line on the IDE, namely:

java -jar baksmali.jar -x services.jar -o classout

I get a Java I/o exception error, something I normally associate with (forgive me) some kind of connection error. I don't think that is the problem in this case.

I am not asking you to diagnose my issues within the IDE, but from what you said in that post is dropbear something that could execute that command line?

More specifically to your project, if I even understand it correctly after all this time, if I did get the editor working, is Botbrew a method for hosting/distributing the edited services.jar for the nook in specific, through my dropbox, say?

Thanks for all your patience, my friend.
[Nook Color Android Development] inportb:
Aha. This resembles what racks11479 and I are trying to do, from a different direction.

The IOException might result from an unsuccessful attempt to read to or write to the filesystem. Are you trying to work with files on a read-only /system partition? Also beware of file permissions. And note that if your program uses temporary files, those may trigger the exception as well.

Dropbear is a remote access service (using SSH, to be exact). In general, you could do with dropbear what you could do using adb shell or terminal, but it has some more tricks.

Yes, you could make a package for it and host it on Dropbox (or send it to me and I'll drop it in my repo). I'd suggest that you also host a copy by itself, for people who prefer not to use package management tools.
[Nook Color Android Development] liam.lah:
This does work on other devices too, right? I haven't seen you post this anywhere else. I bet something this cool could become pretty popular if it is given a bit more exposure.
[Nook Color Android Development] inportb:
I've only tested on a Nook Color, but it should work on other armv7-a devices (and perhaps even armv6l and armv5l). But that's the problem; I have no way of testing this with other devices xD

I just updated Opkg. Before you go ahead and upgrade it, note that I've started to implement the filesystem standard outlined above. Have a look at your package list and remember which packages you have installed, because Opkg might lose track of them during the upgrade! If that happens, you'll have to reinstall these packages.

There is a new repository for testing new packages (enable it by installing repository-botbrew-testing and refreshing the list), and it's now filled with software rebuilt for the new filesystem standard. If you were able to test some packages, please let me know so I could move them to stable or work on them some more. Make sure you have the latest BotBrew.apk, or it might be confused with multiple versions of the same programs.

New stuff in stable:

gcc-4.6 is much smaller (only 50MB!)

opkg (see above)

New stuff in testing:

nmap (network security scanner)

tcpdump (command-line packet analyzer)

wireshark (more tools for network traffic analysis, i.e. tshark)

rsync (synchronizes files between folders, or remotely through ssh)

imagemagick (image manipulation tool, should support png now)

llvm+clang (new development tools... not quite ready yet!)
[Nook Color Android Development] inportb:
Y'all might have noticed the unstable repository. Please stay away from it, because its packages are usually half-baked or otherwise incomplete. It exists so that I could debug software in a real repo and see how it behaves in the wild. Fun things are in the testing repo:

​

In case you were wondering: no, Firefox (and other programs in the menu) does not work, and would not work until it is ported...

The X11 stuff is currently quite rough. I'm running x11vnc in the shell and connecting using an Android-based VNC client (PocketCloud). After installing x11vnc and fluxbox, do:

Xvfb :0 -cc 4 -screen 0 600x650x24 &
x11vnc -display :0 -listen localhost -forever &
fluxbox -display :0 &

Then connect your VNC client to localhost:5900. There's currently not much you could do with this. I plan to spend some time on other issues (and improve BotBrew.apk) before continuing.
[Nook Color Android Development] Fritos2:
Congratulations you had made great progress.:):)

I tried to compile some modules of python (Django, Pyramid, gdata, setuptools) and everything OK.

In other modules (PIL, Reportlab, Cython) requires agcc.bash.

With

export CC=gcc

get this error:

cc1: error: argument to '-0' should be a non-negative integer

Exist a way to fix that?
[Nook Color Android Development] inportb:
Are you doing this natively or are you cross-compiling? Even though GCC has been ported, native work is currently unsupported. To cross-compile using agcc.bash and the NDK, you'd want to set environment variables AGCC_NDK=/path/to/ndk and CC=agcc.bash.

You might also need libpython2.7.so and the Python 2.7 development headers, which you could get by manually unpacking python2.7-minimal and python2.7-dev on your build machine; you could also clone my GitHub repo and make a recipe, declaring python2.7 as a dependency. I don't know how to cross-compile using Cython; building Cython modules natively requires gcc-4.6 and python2.7-dev on the Android device.
[Nook Color Android Development] Fritos2:
You're right, i was trying natively.

I'll try cross-compiling.

Thanks.
[Nook Color Android Development] inportb:
We have a new domain name now. When DNS changes have propagated, you should be able to find the new face of BotBrew at BotBrew.com; good thing the squatters didn't get to it before I did. Of course, botbrew.inportb.com will continue redirecting for a while.

Also! zeppelinrox's V6 Supercharger and mateorod's services.jar are now available in the stable repo. Installing the v6-supercharger package should automatically pull in the modified services.jar necessary for best results. Check out mateorod's thread for more information about this mod.

Now, I've only really built BotBrew for CyanogenMod 7/9 (and derivatives). It would be nice to use it with other distros too, so I'm going to do something about compatibility. And when that's done, we'd be ready for Android Market (or Google Play, whatever it's called now) ;)
[Nook Color Android Development] joeyvanhummel:
You did a good job fixing those issues; this really is great stuff!
[Nook Color Android Development] xandr115:
Not sure why but I'm running Mirage's 3/4 build and after installing botbrew (not even the v6 script), my nook no longer boots even to the CM7 logo. It just gets passed the Uboot and stops at a black screen. I've wiped and clean installed which fixes it, but only until I install the new 3/16 and 3/10 botbrew...
[Nook Color Android Development] inportb:
BotBrew after 3/10 depends on a new package (botbrew-foundation), which is presumably interacting poorly with your setup. Thanks for the bug report; I'm investigating this now.

Incidentally: it seems to be working alright with CM7.1 and CM9. Meanwhile, I've uploaded an update to the offending package.
[Nook Color Android Development] seth.i.simmons:
Hmmmm.... had been running botbrew great, then I flashed the 0316 OpenGL nightly, and now botbrew throws me an error that there isn't enough space in /data. So now I can't install anything since the initial opkg install fails. Any ideas?? I've got almost 4gb free in /data :/
[Nook Color Android Development] inportb:
Ah yes, let's try to make sense of that. I've uploaded a new apk that has a soft requirement on free space so it should just warn you but still let you proceed. How much space does it think you have, and does it agree with what you see when you run `df -h` on the command line?