yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] seth.i.simmons:
It just says that I need at least 2.5mb, but doesn't tell me how much I have. And when I run "df -h" it tells me no such file or directory :/ not sure what's up, as everything else runs perfect on my NC, and botbrew was working fine! Odd...

Edit: I was able to go around the GUI and use wget to install opkg, and now the GUI works fine. Still not sure why it was throwing that error!
[Nook Color Android Development] xandr115:
thanks but it looks like the updated package didn't fix the problem. My nook still wouldn't boot into the cm7 boot logo after 10 minutes
[Nook Color Android Development] inportb:
That'd work. I'm not sure, either, but perhaps Dropbox took a while to update that file. At any rate, you might just find out, the next time you install the apk :)

I just installed the latest MiRaGe and bootstrapped BotBrew, but was not able to reproduce the problem upon reboot; so I guess I'll have to ask you to try this some more. I just removed most of the functionality from that package. Is it still a problem? If so, would you then try the wget method? Thanks.
[Nook Color Android Development] slickie88:
I upgraded to the 3/17 CM9 openGL build today and was going to redo the services.jar/Supercharge script using Botbrew like I have for the past 3 or 4 flashes and it's now giving me an error on startup.

Bootstrap
Please wait...
Preparing to bootstrap
ERROR: Unable to download.
... something went wrong :(
Retry?

Retry keeps giving the same error. Tried rebooting the Nook and that didn't help. Re-flashing 3/17 and trying Botbrew and it's still borked. Any ideas?
[Nook Color Android Development] inportb:
Are you using the 3/16 build of BotBrew? The name of one of the bootstrap files has changed, breaking support for the 3/10 build.
[Nook Color Android Development] slickie88:
Woops... didn't realize there was a new version available. Thanks, inportb!
[Nook Color Android Development] inportb:
I should get a notification system going, so this kind of stuff doesn't happen again. Sorry!
[Nook Color Android Development] slickie88:
Actually, I should pay attention to the date you so kindly change whenever there's a new version posted. Completely my bad.
[Nook Color Android Development] mateorod:
Ha! I've been trying to recreate these problems all afternoon! Didn't see the problem had already been pinpointed!
[Nook Color Android Development] inportb:
A service manager is in the pipeline. What's that supposed to mean?

Well, often-times, people install things such as Linux chroots, Optware, and (of course) BotBrew to gain access to useful background services that are available in normal *nix distros. Some of these services include

SSH for securely accessing your Android device over the network using a command line interface

HTTP for serving Web pages off your Android device

cron for automatically running scripts at predetermined times (i.e. to make regular backups)

... and so on

On most systems, these services are completely hidden from view... which is totally fine when you have enough computational resources to let them idle in the background. This is a problem on our small devices, which are constrained in terms of CPU, RAM, and battery power. This is why I've hesitated to implement any way to automatically start services during boot.

I am currently working on a service manager of sorts: a graphical interface for keeping tabs on your background services, turning them on and off, and sending them various signals. There is also a supervisor service powered by runit (one process to rule them all) that keeps your other services running when you enable them. It puts an item in your notification bar so you know there's something consuming your resources, and tapping the item opens the manager interface. The practical upshot of all this is that you could easily see what's running, make sure your services are up or down, and take full control of these background processes.

This is not quite complete at the moment, but I hope to have a new build with this feature soon, so we could test it :cool:

/edit:

Just to clarify, you can already view/manage services using the command line. It's just not as easy to do so on a mobile device.
[Nook Color Android Development] starkruzr:
So I installed BotBrew on my Galaxy Note N7000 running an almost-stock ROM. It bootstrapped the installation of opkg, and AFAICT opkg works fine, but now BotBrew FCs at launch with no other details, so I can't browse the repos for things to install. I tried nmap, apparently it's not in there yet. Do you guys want a logcat or are things too much in flux right now to bother?

Incidentally, this project is really exciting to me. The one thing I really missed from iOS was Jay Freeman's Telesphoreo project that ported most of GNU and other Linux utilities to Mach-O. Having a real *NIX command line was great, and it looks like it might be on its way to Android too :)
[Nook Color Android Development] mateorod:
I am just chiming in until Inportb comes back around, but there is a major sea change in the way Botbrew installs packages being implemented as we speak.

Botbrew has been installing packages to system but is now making the transition to data. Along with the service manager and some other projects in the pipeline, I have been installing a new version of the app itself several times a week.

The first thing to check is to make sure you have the most current apk available, which I believe is the 3/16. If so, just give it some time as the new packages settle. I am sure Inportb can pinpoint exactly where you are at, but if you could keep a log at hand in case he needs it, they have proven useful in the past.

Now if you want to see what Botbrew has package-wise, you can always go around the GUI and go through the command line while you wait for Inportb. The first post has the directions if you need them, but if you have opkg working through the command line, a list of available packages can be seen and installed from there.
[Nook Color Android Development] inportb:
If you have logs, I'd love to have a look and see what needs fixing. While there's a lot going on, I think there's still much to be gleaned from old versions. Also, I haven't tested this very much for devices other than Nook Color (which is why this thread is in a device-specific forum), but I'm working on compatibility. It would be awesome to add yours to the list!

You wanted nmap? Hm... that should be in the stable repo; not sure why it's not showing up. Would you please try refreshing the package list first? There's a button for that in the title bar.

Thanks for trying!
[Nook Color Android Development] AdamOutler:
I'm getting an error with cannot find /data/vtemp/opkg. Lock: no such file or directory... this should be easily resolvable by something like this on startup

test ! -e && touch /data/vtemp/opkg/lock&&rm /data/vtemp/opkg/lock

I'm mobile now so if I made an error, you get the idea.
[Nook Color Android Development] AdamOutler:
For some reason it is trying to get access to /tmp instead of /data/vtmp...

# opkg update
Collected errors:
* opkg_conf_load: Could not create lock file /data/vtmp/opkg/lock: No such file or directory.
# mkdir /data/vtmp/opkg
mkdir failed for /data/vtmp/opkg, No such file or directory
# mkdir /data/vtmp
# mkdir /data/vtmp/opkg
# opkg update
Collected errors:
* opkg_conf_load: Creating temp dir /tmp/opkg-p11652 failed: Read-only file system.
#
[Nook Color Android Development] inportb:
Something's definitely broken there. What device are you using?

I'll publish the pre-release BotBrew soon, which should fix this problem.
[Nook Color Android Development] AdamOutler:
Samsung Infuse 4G... its basically a GalaxyS 1
[Nook Color Android Development] snakefreak:
Runing fine on i9100 samsung galaxy s2!

Will test all packages later.

Great project!!!

A dream come true;-)
[Nook Color Android Development] inportb:
I'd like to explain how the upcoming BotBrew release works. All this is covered in the manual as well.

Firstly, it installs packages to a directory named /data/botbrew. It also sets up a bind mount to /botbrew. This means that it is no longer possible to directly call the programs that you install. Two mechanisms are in place to remedy that:

a helper script /system/bin/botbrew to point PATH to /botbrew/bin

a helper script /system/bin/ldimport to link libraries from /botbrew/lib to /system/lib

So if you're connected via adb or using any of various terminal apps, there are two ways to run your programs:

prefix your commands with botbrew; for example, botbrew nmap -v -A scanme.nmap.org

run botbrew (or as a shorthand, bbsh) before issuing commands

If you've installed dropbear and are connected using SSH, the new PATH setting is in effect, so you do not need to prefix your commands.

In most cases, you don't need to use ldimport, since the BotBrew GUI runs it for you. If you installed packages using the command line, you'd need to run it manually as root, with a writable /system.

Secondly, it comes with a new service supervisor powered by runit. Mobile devices are resource-constrained, so it's not always a good idea to run background services all the time. The supervisor shows you a list of services you have installed, and lets you turn each one on and off by tapping the button to the left. If you turn off the supervisor, you stop all the services too.

I hope this helps.
[Nook Color Android Development] shvelo:
Awesome!

I'm gonna try fluxbox :D
[Nook Color Android Development] starkruzr:
Since I can't actually launch the BotBrew app, how do I completely remove BotBrew (regular APK uninstall, presumably) and opkg & its assorted files? I want to try a fresh install of the BotBrew.debug.apk package.
[Nook Color Android Development] mateorod:
If you just uninstall the apk itself, when you install the debug version the packages will still be there, no bootstrap will occur. When the upstream packages change, you will see those packages in the upgradable section. If you put on the auto-upate service, when the upstream Botbrew packages change your packages will automatically reflect that.

EDIT: For a useful solution , see inportb's answer.
[Nook Color Android Development] inportb:
Right, you would remove /system/include, /system/share, /system/etc/service, /system/bin/opkg*, /system/bin/update-alternatives, /system/etc/opkg, /system/bin/busybox, /system/lib/libmusl.so

Make sure you have /system/xbin/busybox before you remove /system/bin/busybox and /system/lib/libmusl.so

Then, look inside /data for more stuff to remove:

/data/vtmp, /data/cache, /data/lib, /data/log, /data/mail, /data/spool, /data/tmp, /data/run, /data/root, /data/home

... see why it was a good idea to move to a unified directory? ;)

Now, if you installed BotBrew.debug.apk and want to remove that, it's simple. Get a root shell and do:

/botbrew/fini.sh
rm -r /data/botbrew

If you tried to remove /data/botbrew before unmounting everything with the first command, you'd need to clean up like so:

busybox umount /botbrew/run
busybox umount /botbrew
rm -r /data/botbrew

Cheers~
[Nook Color Android Development] starkruzr:
OK, removed everything, installed BotBrew debug. Everything seemed to go well. There was an error at the end that I couldn't read, because it went to the package list and immediately crashed.

Restarted the BotBrew application and now I can see the three-item swipeable "Packages, Installed, Upgradeable" menu. Nothing is in any of those. Hit reload in the upper right corner and it asks for (and receives) root permissions, but appears to do nothing other than that.

If I click "Repositories," nothing appears to be listed. Same if I hit Reload App.

Now to the command line. opkg does not appear to be in my path, for the record. But if I do opkg update, I get this (which I think is wrong):

# ./opkg update
Package android-framework-services-v6 version 0.0.4-0 has no valid architecture, ignoring.
Package v6-supercharger version 8.7.0-1 has no valid architecture, ignoring.
Downloading http://repo.botbrew.com/anise/main/Packages.gz.
Inflating http://repo.botbrew.com/anise/main/Packages.gz.
Updated list of available packages in /botbrew/var/lib/opkg/lists/botbrew.
#

Ooh, but ./opkg install nmap in the botbrew directory works!

However:

# ./nmap
link_image[1963]: 32544 could not load needed library 'libpcre.so.1' for './nmap' (load_library[1105]: Library 'libpcre.so.1' not found)CANNOT LINK EXECUTABLE

Thoughts?
[Nook Color Android Development] inportb:
Looks like opkg is working as expected, but the BotBrew GUI is failing. It would be awesome if you could snag a log, so I could have a look at what's misbehaving. There's a "restart app" function in the menu, which forces the app to restart and might generate some better logs.

The GUI does a couple of things behind the scenes, but you could work without it:

remount /system read-write: busybox mount /system -o remount,rw

prefix your commands: botbrew opkg install nmap; botbrew nmap

symlink libraries to /system/lib after installing them: ldimport

If you get a error like /system/bin/sh: botbrew: not found, you might need to run /data/botbrew/restore.sh (with a writable /system) to make that file. Instead of prefixing all your commands, you could just run botbrew first, then use the shell normally.

It's a hassle, so I'd very much like to fix the GUI. Thanks for your patience.
[Nook Color Android Development] AdamOutler:
The newest debug version installed, and downloaded packages, but failed to execute

./nmap
reloc_library[1312]: 7008 cannot locate '_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev'...
CANNOT LINK EXECUTABLE
# pwd
/data/botbrew/bin
#
#
[Nook Color Android Development] mai77:
works on SGY

http://xdaforums.com/tags.php?tag=botbrew

the debug version works, the non-debug I had a problem with.

great piece of soft !

before long the phone space was exhausted though from all those downloads.

gotta put the downloads on SD-card rather

# botbrew hello

botbrew hello

Hello, world!

# bbsh hello

bbsh hello

/system/bin/sh: Can't open hello

#

--->

adb shell

su

bbsh

hello // works instead
[Nook Color Android Development] evilbob01:
Works on Droid Eris!

Just installed the debug version on my droid Eris.

Running the CyanogenMod 7-.1.0-Eris

Android version 2.3.7

Installed Rsync from the repos and like magic it works.

Thanks a bunch this is a great Idea!
[Nook Color Android Development] inportb:
Thanks! We now have a couple more devices to add to the "working" list.

@mai77: Good idea... though the FAT partition is not so Linux-friendly and would not work so well. But it might be possible to use a loop-mounted ext2/3/4 image or another partition on the SD card. I'll be researching that after getting the debug version stable :) Also, bbsh is a shortcut to sh, so it works differently from botbrew: bbsh -c hello

@evilbob01: Good to see that rsync is working for you! If you want, you could use it with dropbear for remote syncing over SSH.

Looks like I broke nmap, my bad. I rebuilt it, and it should be upgradable to a working version now. Incidentally, you could prefix your commands with botbrew, or simply run botbrew first, if you want to have the right PATH.
[Nook Color Android Development] AdamOutler:
that worked. Any chance of potting debian package 'mtr'? It's a good tool.
[Nook Color Android Development] mateorod:
Ha! That sounds like me! "Awesome work getting the package working in system! Can we move it to /data?"

A good idea's work is never done. Oh, and I had some more success using the build system this afternoon, but weechat is still spitting up an error (I tried to build it a second time, before you ask:p ) If I can't get it built I'll stop by the IRC forum tonight or tomorrow.
[Nook Color Android Development] inportb:
Oh, but it's easier this time. I think that if we bootstrapped into /data/botbrew, moved /data/botbrew onto some other ext2/3/4 partition, and created a symlink... BotBrew would be none the wiser and everything would still be run out of /botbrew. This has yet to be tested, though.

Lovely little program! I didn't know about it until you brought it up. It's in the repo now.
[Nook Color Android Development] mai77:
shells

I successfully ran 3 methods to obtain Linux shells on a SGY Android phone :

TerminalIDE : bash

botBrew : bbsh

Linux installer : chroot to debian or Ubuntu ARM distro

use on PC: winSCP, PuTTY

on android: SSHDroid, botbrew, terminalIDE

only debDroid left to go !
[Nook Color Android Development] AdamOutler:
Hi. Could you bring in packages:

Fluxbox

Xclock

Xcalc

Xeyes

Gtk

Please?

http://code.google.com/p/android-xserver/downloads/detail?name=XServer-1.08.apk&can=2&q=
[Nook Color Android Development] inportb:
At one point, I did have fluxbox+xvfb+x11vnc working, but X11 is a mess and I'd like to focus on fixing bugs in the BotBrew GUI at this stage. I do plan to bring X11 support back, though!

Incidentally, that build of fluxbox did work, kinda-sorta, with the X server you linked. Screenshot of that: http://i42.tinypic.com/2utgca1.png
[Nook Color Android Development] AdamOutler:
Looks like something was missing? Dbus or ptty? Either way... I'd like to do some stuff for a future video. Maybe I'll SSH into my device then SSH -x out to my desktop and run apps on: 0
[Nook Color Android Development] mai77:
android xserver

android-xserver

An X server for Android

C O O L
[Nook Color Android Development] |shaneo|:
Thank You

Wow good job this is a much needed app cant wait to see what great things will come from this.
[Nook Color Android Development] inportb:
Thanks! BotBrew "anise" (which used to be the development version) is now stable. Please see the OP for relevant information, and then have a look on Google Play.
[Nook Color Android Development] starkruzr:
Is anyone else having a lot of trouble with getting BotBrew and opkg to install/work correctly on a Galaxy Note? Mine is an N7000 but I think the filesystem etc. is the same on the I717.
[Nook Color Android Development] Pwnna:
Hey for anyone who wants to not take up internal phone spaces and use their /sd-ext partition, here's how you do it (I have a HTC Desire so I pretty much have to do this, though note for reduced speed).

Make sure you have botbrew installed (bootstrapped) and open up some sort of terminal:

su # needed if your terminal started as non-root
cp -a /data/botbrew /sd-ext/botbrew
sh /data/botbrew/fini.sh
rm -rf /data/botbrew
ln -s /sd-ext/botbrew /data/botbrew

Restart botbrew and it should work just fine now.

Gonna try to work with inportb to bring this to the settings in BotBrew UI.

To reverse this (not tested), this should be the sequence of commands:

su # needed if your terminal started as non-root
sh /sd-ext/botbrew/fini.sh
rm /sd-ext/botbrew
cp -a /sd-ext/botbrew /data/botbrew
rm -rf /sd-ext/botbrew

It should work, but I'm not gonna bother testing it as I don't have enough space to move botbrew back to data.
[Nook Color Android Development] inportb:
Thanks for dropping by the IRC channel. For the benefit of everyone else: it seems that the GNote requires the GET_TASKS permission while sending intents using startActivity. We're not the only ones with this issue. I think requesting GET_TASKS would be the easy way out, but it seems that the Plume developers have found a workaround.

Nice. This feature is in the current debug release, which will hit Google Play soon if there are no major issues. Thanks for testing and confirming that it works.
[Nook Color Android Development] Pwnna:
You need to do a size check before moving.
[Nook Color Android Development] HacDan:
Loving the new UI! Keep up the good work!

EDIT: Just crashed on me :(

EDIT2: Just kidding, still running great =)
[Nook Color Android Development] inportb:
Good to know :)

Due to popular demand, I'm looking into using dpkg and apt instead of opkg in BotBrew+1. This would give us a more featureful/secure package manager for our specific purpose of distributing community-driven software, while allowing us to install packages from Debian. On the flip side, it requires more storage space:

opkg+busybox bootstraps in 4MB, but dpkg+apt+busybox needs 8MB

+21MB (=29MB) recommended to start installing Debian packages

+29MB (=58MB) necessary for a minimal Debian setup

For example, a basic setup with Python uses 58MB total, compared to 50MB when installed using opkg.

As you can see, there is a bit of storage overhead, though it's manageable as long as we're not installing the standard Debian. In exchange, we get access to ~2k reduced-size packages from Emdebian Grip and ~20k regular packages from Debian proper, with little additional work. This does not impair our ability to serve the Android homebrew community, and we'll continue maintaining the cross-building toolchain for software native to Android.

In the long run, as Android devices become more powerful, I think dpkg+apt is the way to go. Presently, the additional storage requirement is mitigated by the possibility of installing anywhere, including an external ext2/3/4 partition (which many ROM's provide for storage-constrained devices such as my G1). What do you think?
[Nook Color Android Development] AdamOutler:
I don't know where to file an error report for Galaxy Nexus..

Logcat

I/BotBrew (27726): Saving: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.inportb.botbrew cmp=com.inportb.botbrew/.BotBrew }
E/ (27726): statfs /botbrew failed, errno: 2
V/OpkgService(27726): create()
V/OpkgService(27726): service.bootstrap(false): true
D/NfcService( 458): NFC-C polling ON
I/ActivityManager( 198): START {cmp=com.inportb.botbrew/.OpkgServiceActivity} from pid 27726
I/WindowManager( 198): createSurface Window{41d6ca08 com.inportb.botbrew/com.inportb.botbrew.BotBrew paused=true}: DRAW NOW PENDING
V/OpkgService(27726): destroy()
W/InputManagerService( 198): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@41d9ef88 (uid=10089 pid=27726)
D/OpenGLRenderer(27726): Flushing caches (mode 0)
I/WindowManager( 198): createSurface Window{41dcc5b0 com.inportb.botbrew/com.inportb.botbrew.OpkgServiceActivity paused=false}: DRAW NOW PENDING
D/OpenGLRenderer(27726): Flushing caches (mode 0)
I/ActivityManager( 198): Displayed com.inportb.botbrew/.OpkgServiceActivity: +339ms (total +487ms)
V/OpkgService(27726): create()
E/ (27726): statfs /botbrew failed, errno: 2
I/ActivityManager( 198): START {cmp=com.inportb.botbrew/.OpkgServiceActivity} from pid 27726
I/WindowManager( 198): createSurface Window{41d6ca08 com.inportb.botbrew/com.inportb.botbrew.BotBrew paused=true}: DRAW NOW PENDING
D/dalvikvm(27726): GC_CONCURRENT freed 491K, 4% free 16316K/16967K, paused 5ms+30ms
W/InputManagerService( 198): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@41d9ef88 (uid=10089 pid=27726)
I/WindowManager( 198): createSurface Window{41fd4198 com.inportb.botbrew/com.inportb.botbrew.OpkgServiceActivity paused=false}: DRAW NOW PENDING
I/ActivityManager( 198): Displayed com.inportb.botbrew/.BotBrew: +9s629ms (total +248ms)
D/OpenGLRenderer(27726): Flushing caches (mode 0)
D/OpenGLRenderer(27726): Flushing caches (mode 0)
I/ActivityManager( 198): Displayed com.inportb.botbrew/.OpkgServiceActivity: +465ms
D/dalvikvm(27726): GC_CONCURRENT freed 556K, 4% free 16416K/17095K, paused 7ms+5ms
V/OpkgService(27726): service.bootstrap(true): false
V/OpkgService(27726): destroy()
W/BackupManagerService( 198): dataChanged but no participant pkg='com.android.providers.settings' uid=10060

Screen shot
[Nook Color Android Development] AdamOutler:
Possibility after reading the changelog ... there is no sd-ext on Galaxy Nexus. Also, any change you can increase the logging level on the app?
[Nook Color Android Development] mateorod:
It still installs to data by default, although I guess that may not be absolutely clear with the move to data button right next to it. I believe the bootstrapping process would have to complete before a move could be attempted.

Edit: ah. Ext-sd. I should read more carefully.