Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[5/20] BotBrew: *nix tools and package manager for Android (BotBrew+1 for testing)

OP inportb

31st May 2012, 01:00 AM   |  #151  
I sent you a PM with my google talk. If you're interested, i can set up my device in the DMZ on my router, run wirelessADB and a VNC server. Then you will be able to connect up with ADB to debug and VNC into my device and then run my device remotely like a virtual machine.
1st June 2012, 02:10 AM   |  #152  
AH HAH!!!! I think I found the problem with botbrew failing to install.. It went through the entire setup and worked.

I noticed that there were no available loops, so here is a way to universally create a new loop file in bash... it even tests to make sure the next "free" loop does not exist before creating it
Code:
# ls /dev/loop?
/dev/loop0
# FreeLoop=`losetup -f`;FreeLoop=`losetup -f`;test ! -e "$FreeLoop" && mknod "$FreeLoop" b 7 "${FreeLoop#${FreeLoop%?}}"
# ls /dev/loop?
/dev/loop0
/dev/loop1
however, it will not install packages still..

Code:
adam@adam-Desktop:~$ adb shell
$ su
# botbrew
# apt-get
apt-get: not found
# exit
and the environmental variables are not there

Code:
# botbrew
# printenv
ANDROID_ROOT=/system
LD_LIBRARY_PATH=/vendor/lib:/system/lib
PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
LOOP_MOUNTPOINT=/mnt/obb
ASEC_MOUNTPOINT=/mnt/asec
EXTERNAL_STORAGE2=/mnt/sdcard/external_sd
BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
ANDROID_BOOTLOGO=1
ANDROID_ASSETS=/system/app
EXTERNAL_STORAGE=/mnt/sdcard
ANDROID_DATA=/data
USBHOST_STORAGE=/mnt/sdcard/usbStorage
ANDROID_PROPERTY_WORKSPACE=13,32768
#

So I tried setting environmental variables..

Code:
# find -name apt-get
./mnt/sdcard/botbrew-basil/usr/bin/apt-get
./data/botbrew-basil/usr/bin/apt-get
# PATH=$PATH:/data/botbrew-basil/usr/bin:/data/botbrew-basil/bin:/data/botbrew-basil/usr/local/bin
# apt-get
apt-get: not found
# /data/botbrew-basil/usr/bin/apt-get
and that did not work either. I'm having a problem running the applications from within the botbrew package.. however botbrew is able to run apt-get.

This is the kind of thing I am facing.. it bothers me..
Code:
# chmod 777 ./bash
# ls -l
-rwxr-xr-x root     root      1425732 2012-05-31 19:16 busybox
-rwxrwxrwx root     root           28 2012-05-31 19:16 bash
-rwxr-xr-x root     root        88336 2012-05-31 19:16 dash
-rwxr-xr-x root     root       264924 2012-05-31 19:16 tar
lrwxrwxrwx root     root              2012-05-31 19:16 sh -> /bin/dash
# ./bash
Why is botbrew able to use all of the apps, but the shell is not?
Last edited by AdamOutler; 1st June 2012 at 02:20 AM.
1st June 2012, 02:46 AM   |  #153  
OP Retired Recognized Developer
Thanks Meter: 181
 
433 posts
Join Date:Joined: Dec 2008
Thanks for offering to do a debugging session with me. I couldn't find the message, but I think we could work just fine asynchronously; after all, good ideas take time to percolate

Now, it seems strange that you don't have PATH set or access to apt... So I've a few questions, if you don't mind:
  • Where did you bootstrap?
    I get the idea that you installed to a disk image, since you speak of loopback mounting.
  • What's inside your /system/bin/botbrew?
    It should refer to your bootstrap directory.
  • While you're inside the botbrew shell, what do you see in the root directory?
    It should show a bit of extra stuff such as /usr and /var.
I'll let you know if I think of more things to ask. Thanks for your time!

Also, we've determined that something's wrong with wget (or busybox's wget), because apt-get is able to do domain name resolution just fine. There have been similar reports involving android+busybox+wget, and the workaround seems to be to bypass the domain name.
1st June 2012, 02:51 AM   |  #154  
I downloaded the source and have been attempting to locate required libraries.

Would you please move your libraries into your source, then link to them from there?

These are the classes I need in order to compile from source.. They are not included in your source.

com.actionbarsherlock.app.Actionbar
com.actionbarsherlock.app.SherlockFragmentActivity
com.actionbarsherlock.app.SherlockDialogFragment
com.actionbarsherlock.view.Menu
com.actionbarsherlock.view.MenuInflater
com.actionbarsherlock.view.MenuItem
jackpal.androidterm.emulatorview.ColorScheme
jackpal.androidterm.emulatorview.EmulatorView
jackpal.androidterm.emulatorview.TermSession
org.acra.ReportingInteractionMode
org.acra.annotation.ReportsCrashes


----These are not included with my version of the ADK.. maybe I used the wrong version?----
android.support.v4.app.Fragment
android.support.v4.app.FragmentManager
android.support.v4.app.FragmentPagerAdapter
android.support.v4.view.ViewPager
android.support.v4.app.LoaderManager
android.support.v4.content.CursorLoader
android.support.v4.content.Loader
android.support.v4.widget.CursorAdapter
android.support.v4.widget.SimpleCursorAdapter
android.support.v4.app.LoaderManager
android.support.v4.content.AsyncTaskLoader
android.support.v4.content.Loader


If you are using proprietary binaries, it is best to include them in the source, like I make a /libraries/ folder and include it in the revision control. eg https://code.google.com/p/android-ca...2FBSAFramework

This way anyone who wants to contribute can do so easily. Either way, the actionbarsherlock site is down.
1st June 2012, 02:59 AM   |  #155  
Quote:
Originally Posted by inportb

Thanks for offering to do a debugging session with me. I couldn't find the message, but I think we could work just fine asynchronously; after all, good ideas take time to percolate

Now, it seems strange that you don't have PATH set or access to apt... So I've a few questions, if you don't mind:

  • Where did you bootstrap?
    I get the idea that you installed to a disk image, since you speak of loopback mounting.
  • What's inside your /system/bin/botbrew?
    It should refer to your bootstrap directory.
  • While you're inside the botbrew shell, what do you see in the root directory?
    It should show a bit of extra stuff such as /usr and /var.
I'll let you know if I think of more things to ask. Thanks for your time!

Also, we've determined that something's wrong with wget (or busybox's wget), because apt-get is able to do domain name resolution just fine. There have been similar reports involving android+busybox+wget, and the workaround seems to be to bypass the domain name.

I found an img file and I noticed alot of functionality was missing, so I assumed that you were mounting an image... Must have been something else I did.

/system/bin/botbrew is an executable
Code:
$ su
# ls /system/bin/botbrew
/system/bin/botbrew
# ls /system/bin/botbrew/
/system/bin/botbrew/: Not a directory
# /system/bin/botbrew && echo $?
0
# rm /system/bin/botbrew
# ls /system/bin/botbrew
/system/bin/botbrew: No such file or directory
# ls /
efs
config
cache
dbdata
sdcard
acct
mnt
vendor
d
etc
data
proc
dev
sbin
ueventd.goldfish.rc
recovery.rc
ueventd.rc
fota.rc
tmp
res
recovery
lib
init.rc
lpm.rc
init.goldfish.rc
init
ueventd.herring.rc
sys
init.herring.rc
system
def
#

I removed botbrew and did a rebootstrap. Nothing changed. I've seriously been working on this for entirely too long and hitting a bunch of dead-ends.

I have a operational version of ARM busybox with working wget. let me know if you need it.
1st June 2012, 03:25 AM   |  #156  
It is failing on this when attempting to install botbrew-core

Code:
$ su
# exec /data/botbrew-basil/init -- -oapt::architectures='device-sgh-i897,cpu-abi2-armeabi,baord-sgh-i897,android,sgh-i897,armeabi-v7a,armeabi' -oapt::clean-installed='1' -oapt::get::download='1' -oapt::get::assume-yes='1' -oapt::get::show-upgrade='1' -oapt::get::purge='1' -oapt::get::allowunauthenticated='1'- odpkg::options::='--ignore-depends=libgcc1' install botbrew-core
whoops: cannot run `-oapt::architectures=device-sgh-i897,cpu-abi2-armeabi,baord-sgh-i897,android,sgh-i897,armeabi-v7a,armeabi -oapt::clean-installed=1 -oapt::get::download=1 -oapt::get::assume-yes=1 -oapt::get::show-upgrade=1 -oapt::get::purge=1 -oapt::get::allowunauthenticated=1- odpkg::options::=--ignore-depends=libgcc1 install botbrew-core'
1st June 2012, 11:08 AM   |  #157  
E:V:A's Avatar
Recognized Developer
Flag -∇ϕ
Thanks Meter: 1,863
 
1,377 posts
Join Date:Joined: Dec 2011
Quote:
Originally Posted by AdamOutler

...and the environmental variables are not there...

What env.vars. were you expecting?

Quote:

So I tried setting environmental variables..

Code:
# find -name apt-get

I think you're missing part of the complete path (depending on where you executed the above command. Try this instead:
Code:
# find / -iname "apt-get"
Then after you have set the path variable you actually have to enable it. By "sourcing" it. This is done by re-running the login script.
Code:
# source <path+name of login script>
(or just try it with "./<name>", but then you risk duplicating the envrionment variables.) The normal linux names are usually something like ".bashrc", ".bash_profile" or ".csh" etc etc. So I don't know what they would be in your case.

Quote:

Why is botbrew able to use all of the apps, but the shell is not?

Probably because a running script has its own set of env vars...depending on what shell its running under. (Ash, Csh, Bash etc)..
Last edited by E:V:A; 1st June 2012 at 11:11 AM.
2nd June 2012, 05:17 PM   |  #158  
well.. i installed a custom ICS based ROM on my Captivate (ICSSGS) and Botbrew worked. So, you can add Captivates running ICS. It may have to do with the MTD over BML.. i have no clue really. I do know that it is not launching the botbrew environment from stock.

I cannot compile your source. The source is missing dependencies which I cannot locate.

I have another spare captivate which i have no problem with toasting the firmware and dropping it into my DMZ with ADB and VNC enabled for your testing purposes if youd like to get it operational on the entire Galaxy S series.
Last edited by AdamOutler; 2nd June 2012 at 07:23 PM.
2nd June 2012, 05:43 PM   |  #159  
OP Retired Recognized Developer
Thanks Meter: 181
 
433 posts
Join Date:Joined: Dec 2008
Just checking in to say that I'm removing the busybox requirement for loop-mounted installations. I haven't tested extensively, but I'll poke around before generating another binary package.

Incidentally, most of the libraries that we use could be had from GitHub, which was operational the last time I checked. These are Android library projects that you should add to your Eclipse workspace and reference from BotBrew. The support package from Google provides the libraries that you're missing, such as android.support.v4.*; this one goes in the libs directory, along with acra. I'd like to keep binaries (other than graphics) out of the source tree, so feel free to drop 'em in -- they won't be versioned.
Last edited by inportb; 2nd June 2012 at 08:01 PM.
2nd June 2012, 11:28 PM   |  #160  
Hrm... i was able to install an additional repo then install apache2. When i run it, it does a user check... now the two filesystems are out of sync i think... my system toolbox knows how to properly handle Android names, but busybox does not?

id -u returns proper results.
whoami does not.

Busybox and toolbox should probly come from within your package in order to maintain standard linux compatibility... or some other crafty method...

Anyway.. mounted system rw then i added passwd, group, and shadow entries to no avail.

Post Reply Subscribe to Thread

Tags
botbrew, essential app
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes