Full CAS (Computer Algebra System) on android? - Android Q&A, Help & Troubleshooting

We have many callculator applications on android, but they are so simple and without full mathematical functionality. So i tried port yacas to android platform, but it is a console application - so we need graphics ui.
After small searching i found this like ui on iPhone platform!
If anyone want to make this for android - i attached sources of original yacas program and of iphone-ui.
Also add some links:
http://gitorious.org/android/yacas - ported yacas application
http://yacas.sf.net - original yacas site
http://www.mathdrake.com/yacas/index.html - yacas ui for iPhone
And how you can build yacas from original tree:
Download yacas source, unpack this and cd to yacas/src,
copy XVilka-yacas.Makefile to Makefile and run:
($_XXFLAGS - optimisation flags for your device)
Code:
make CC=\"arm-android-linux-uclibcgnueabi-gcc\" CROSS_COMPILE=\"arm-android-linux-uclibcgnueabi-\" \\
CFLAGS=\" -static -fPIC $_XXFLAGS\" CXXFLAGS=\" -static -fPIC $_XXFLAGS\" \\
LDFLAGS=\" -static -fPIC -s -L$HOME/build/cross/sys-root/usr/lib -lm -lc -lgcc -lstdc++\" \\
AR=\"arm-android-linux-uclibcgnueabi-ar\" AS=\"arm-android-linux-uclibcgnueabi-as\" \\
LD=\"arm-android-linux-uclibcgnueabi-g++\" RANLIB=\"arm-android-linux-uclibcgnueabi-ranlib\" \\
OBJDUMP=\"arm-android-linux-uclibcgnueabi-objdump\" STRIP=\"arm-android-linux-uclibcgnueabi-strip\" \\
NM=\"arm-android-linux-uclibcgnueabi-nm\" CXX=\"arm-android-linux-uclibcgnueabi-g++\"
Done! we have yacas binary without any dependency.
Copy this and scripts (for example in /system/usr/local/etc/yacas)
Code:
cp /sdcard/test-build/yacas /system/usr/bin
chown root /system/bin/yacas
chmod 755 /system/bin/yacas
cp -r /sdcard/test-build/scripts/* /system/usr/local/etc/yacas
and for the first run we need to:
Code:
yacas --rootdir /system/usr/local/etc/yacas
then we can simply run yacas by the "yacas".

Hi;
This seems really excellent, I've been using calculator emulators on android to do this.
Unfortunatelly after trying the steps above, I only get "Illegal instruction" in my HTC Magic CM

Sounds cool. I might have to try this. Do you have any screenshots?
Cheers

Now we only have console version, but in future - get gui

I may not be the best programmer in the world, but if this is the best lead we have on getting a CAS on android I'd be willing to give it a go making a GUI for this.

Ok, I've managed to get yacas installed and working on my Samsung Captivate. here are the steps I used:
downloaded the my.tar.zip (it has everything already pre-compiled, thanks XVilka!)
Unzip it and copy the bin folder to an SD card.
for my Captivate, the filepath to get to my sd card may be different from yours, so be sure to check! Anyways, I used the Android SDK adb shell to get terminal access to my phone, but a terminal app on the phone itself works as well (I used adb because my laptop keyboard is quicker)
Code:
cp /sdcard/sd/bin/omap3430/yacas /system/usr/bin
chown root /system/bin/yacas
chmod 755 /system/bin/yacas
cp -r /sdcard/sd/bin/omap3430/scripts/* /system/usr/local/etc/yacas
yacas --rootdir /system/usr/local/etc/yacas
And then it should be installed properly.
So now that I have it installed and working, I need to get a feel for the syntax it uses to parse commands, get a list of commands, and start sketching out a UI for it.

Thanks for posting how to get it running on the Galaxy S.
But what about using X over SSH to run software remotely with a GUI such as Matlab? I use Matlab all the time, and loved being able to do this on the Nokia N900.

Chalup said:
Thanks for posting how to get it running on the Galaxy S.
But what about using X over SSH to run software remotely with a GUI such as Matlab? I use Matlab all the time, and loved being able to do this on the Nokia N900.
Click to expand...
Click to collapse
I don't see why you couldn't do that, however I'm a bit old fashioned and like having an offline program rather than a remote application. Plus, if I understand you correctly, running a remote version of Matlab or other similar software would not work well with the resolution available on even the enormous 4.3 inch screen of an Evo. But I'm not an expert with linux, so please correct me if I am wrong.

Is somebody still working on this?
I would really appreciate it to see a CAS App for android! Still cant understand why the devs of Space Time (iPhone) do not port their software to android...
An other cool App would be an UI that can connect to a Mathematica remote kernel...

Matlab is not a computer algebra system!
try doing d/dx(x^2) = 2x in matlab
Chalup said:
Thanks for posting how to get it running on the Galaxy S.
But what about using X over SSH to run software remotely with a GUI such as Matlab? I use Matlab all the time, and loved being able to do this on the Nokia N900.
Click to expand...
Click to collapse

I can code C-backend, but there no ppl, who want write GUI to it.
EDIT: hm found this project http://sourceforge.net/projects/yacasandroid/

This looks like it could be great. I know how to make gui's but my android development skills are raw. Yacas seems to be something you would use NDK for since you don't want to require root access. And a java implementation would not be ideal if you want speed.

Another App
Try this:
At
code . google.com/p/symja/
Look for symjadroid

You have here the link to the Android application:
http://code.google.com/p/symja/wiki/Android
Thanks.

Maxima on Android
Yes we can !! :good::good:
With graphic output.
Sorry still not links for me:
sites.google.com/site/maximaonandroid

Related

Optware for Android released by Novaports

Optware was originally developed as a distribution mechanism for software for the Open Source Linux project for the Linksys NSLU2 (a small low cost network storage device). That consumer storage device ran on Linux, and the community opened it up, but they needed a lightweight distribution mechanism for their lightweight devices.
Since 2004 Optware has been adopted by a variety of Linux communities and device developers including the webOS community working on the Palm Pre and Pixi, and developers for devices as diverse as Asus WL-500g,WL-HDD, WL-500gx, WL-500gP routers, the Synology DS-101 and DS-101g+ NAS devices.
At its core, Optware is a package manager to allow you to easly install and uninstall cross-compiled linux applications on your device over the internet. At this time, optware supports the automatic download and installation of over 1500 programs. (See the list at the end of the wiki article.)
Why should I use Optware?
Like the original slug, android devices lack a distribution mechanism to install Linux/command line tools programs and utilities. Many in the Android community who want or need to do command line processing on their device use a chroot of some sort (Debian seems popular) to get their distribution and package management tools. With Optware, it becomes possible to simply run whatever utility or program you want on the native underlying Linux.
Additionally, Optware For Android installs openSSH making it possible to access your Nook from any PC with SSH capability, and sets up an unprivileged username/password login system for the device at the command line. All in all then, since it can be installed with a single script, since it's lightweight, and since it's designed for small and embedded devices, Optware is a perfect fit for the Android community.
Optware for Nook is the first Optware for Android release by the Novaports team and is their gift to the Android community members who have helped them so much with information on Android devices.
What does it do?
The Optware bootstrap installed the IPKG package manager. It installs the optware Busybox. It installs openSSH and makes the ssh demon persistent. It creates an unprivileged user with a username and password you choose.
See Installation instructions and details at the Optware for Android page at Nookdevs.com
For completeness of licensing compliance, the source code for all optware package can be found at the following locations:
1) build scripts at svn.nslu2-linux.org in the /svnroot/optware/ area
2) tarballs at sources.nslu2-linux.org in the /sources area (this is a *large* directory)
To contribute code to Optware, see www . nslu2-linux . org in the /wiki/Optware/AddAPackageToOptware area
-- Rod Whitby
-- Original NSLU2-Linux Project Lead and Optware Architect
This works beautifully! Thank you!
Gonna try this and see if i can get samba to work.. a SMB mount over wifi would be awsome...
Many thanks!
I don't suppose there's a quick and easy way to completely remove optware?... not looking forward to culling through scripts and manually un-doing it all.....
adduser: not found
When it gets to the part in the install script to add the username of the unprivileged user, I enter a name, then it says: adduser: not found.
If it helps, I am using Rooted Stock 1.1.
Anyone get Optware to install on CM7 (newer nightly)
I am running CM7 #103 and would love to have optware installed.
But I get Fail if I try to use the method from Nookdevs
Tonight when I have more time I will look at the errors and see if I can tell what is up.
It looked like partially due to missing dir's for one (/tmp)
madrascafe said:
Gonna try this and see if i can get samba to work.. a SMB mount over wifi would be awsome...
Click to expand...
Click to collapse
The market has your answer and it's free:
https://market.android.com/details?id=com.funkyfresh.samba&feature=search_result
Am I the only one that wants Optware on CM7?
It goes fine on a manualnootered 1.2.0 NC But I prefer CM7 (And use the nightlies)
I would love to get this going on my NC as well. Running CM7 N121 w/ 6/30/2011 OC kernel. Was able to manually work past the tmp directory problem you mentioned, but I can't seem to execute the ipkg binary or installed. I've verified it indeed exists in the path I'm trying to execute it from, it has +x perms for user/ group/ other, but it always gives the error below:
/data/opt/bin/ipkg: not found
I've tried messing with bin directory and ipkg binary ownership, but no dice. If anything it should at least find it even if permissions aren't correct.
Looks like the contents of the binary reference ELF libraries which sounds like an issue attempting to execute in an Android environment. Going to see if I can chroot an environment that will work for it.
Sent from my NookColor using Tapatalk
This is happening because it's looking for /lib/ld-linux.so.3, and not finding it. I worked around by
ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3
I also had to make these links:
ln -s /data/opt /opt
ln -s /data/tmp /tmp
And then set this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lib
export PATH=$PATH:/opt/bin/:/opt/sbin
in my bash profile to get things to start working.
One problem is my symlinks seem to get erased every reboot. I worked around by re-creating them in my bash profile, but I wish I knew how to make them permanent. This may be a ROM specific thing - this was written for a rooted stock nook, and I'm on an Epic running SFR.
I do not have a ld-linux.so.3 file on my NC w/ CM7 125
I have many other errors that show up:
Downloading the latest ipkg-opt package from the Optware package feed:
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
wget: can't open 'ipkg-opt_0.99.163-10_arm.ipk': File exists
(NOTE the above file 'ipkg-opt_0.99.163-10_arm.ipk' does not exist
(on my NC - from a find / -name ipkg-opt_0.99.163-10_arm.ipk)
Updating the Optware package database:
ERROR: Failed to update the local Optware package database
Updating the Optware package database:
/data/optware-bootstrap-0.0.1.shar: ipkg-opt: not found
ERROR: Failed to update the local Optware package database
Any ideas?
The actual file it needs is /data/opt/lib/ld-linux.so.3 - you need to create a symlink in /lib in order to see it. But I think that file comes from the optware installer - if the installer is failing, you won't have it there either. It sounds like you may have bits of a previous install that failed, and it's preventing the install from running properly. Try looking at the log in /data/tmp for more info. After that, try rm -rf /data/tmp/* to clean up the old install and trying again.
Thank You for any pointers.
I deleted everything in /data/tmp first last attempt - like you suggested.
Same result
I have it down to only this error now when I run it (optware-bootstrap-0.0.1.shar):
Updating the Optware package database:
optware-bootstrap-0.0.1.shar: ipkg-opt: not found
ERROR: Failed to update the local Optware package database
ipkg-opt should be in /data/opt/bin. Check to see if it's there... if not, something went wrong in one of the previous steps - probably somewhere around "Downloading the latest ipkg-opt package from the Optware package feed". See if wget is actually downloading anything, where it's putting it, and what it's doing with it afterwards.
If it is there, try running it manually. If you see /data/opt/bin/ipkg or /data/opt/bin/ipkg-opt but it claims it's not there when you run it, it may be a library linking error. Mine was looking for /lib/ld-linux.so.3 but it was actually installed at /data/opt/lib/ld-linux.so.3. mount -o remount,rw followed by ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3 fixed that. I also had to run
ln -s /data/opt /opt
ln -s /data/tmp /tmp
before things started working.
By the way:
ntfsprogs - NTFS filesystem libraries and utilities
Could that be of any use? At the moment, it's not possible to mount NTFS storage on the NC
i would love to know how you guys get to this point even. When i try to install the very fist line of the script is an error and then nothing at all happens .... something about not finding busybox or something of that nature.
So you guys are getting WAY farther than I've been able to.
Tkx Tonygoes.
It is there in /data/opt/bin but it reports /data/opt/bin/ipkg: not found
I cannot find a ld-linux.so.3 on my NC at all.
I did the other links et al fro your comments also
obsid:
Try post 12 above:
and I had some other suggestions from someone:
might try thses FIRST the script seems to do it but may not actually get it done.
mount -o remount,rw / /
mount -o remount,rw /dev/block/mmcblk0p5 /system
you should also if tried before do this: rm -rf /data/tmp/
then do the items in post #12 above
NOTE for me the ln -s to ld-linux.so.3 does not work as I do not have that file on my system

Create your Linux environment to build YOUR Android

Hello all,
if you are like me, you love to do things by yourself and see how it works. In this thread I'll show you how to create your Linux environment in order to create and compile your own roms - any version (1.5, 2.3, etc etc). I had soooooo many problems to make it work, so here is THE thread
BE CAREFUL : this thread is ONLY to set up the OS. The Android you will compile will not be compatible with your x10 as it needs to be "edited" for our phones. It basically shows you how to get ready
Note : parts 1 and 2 explain how to set up Ubuntu into a virtual machine in Virtualbox. If you don't virtualize Linux, if your Ubuntu is already installed, etc etc you can directly go to 3. It's just here to explain how to install Ubuntu.
This tutorial works of course for any "hard installation" of Ubuntu (I mean not in a Virtual machine) and in any virtualizing software (Virtualbox, VMWare, etc etc). I've dropped the Virtualbox tutorial because the software is free
1. Requirements
2. Set up Ubuntu 64 bit (Virtualbox)
3. Set up Android Source dependencies
4. Set up Android Source
5. Regular use
1. Requirements
A working computer, capable of virtualization (if you don't want to wipe your Windows or your MacOS X !) and with Internet connection
Few Gb on your hard drive (10Gb minimum ! Recomended : 15-30Gb)
As much RAM as possible (Minimum 1024Mb), and as powerful CPU as possible (Core2Solo, Core2Duo, ...)
A bit a time
2. Set up Ubuntu 64 bit
Download and install the latest Oracle VM Virtualbox for Windows
Download latest 64-bit Ubuntu Linux (as .iso package) - you can store the file wherever you want.
(Optional) Download the VirtualBox v4 extension, this will allow you to support improvements like USB2.0... Install : once VirtualBox will be installed, File>Preferences>Extensions>Add... If you get an error (Error 1), try to put the file in a "very simple" location (like C:\) and reinstall.
Once you've set up Virtualbox, run it. Click on "New", then follow the wizard.
Make sure you set the following :
Operating System : Linux
Version : Ubuntu (64 bit)
RAM : 512Mb (you can adjust more, but avoid use lower than 512Mb - I use 2Gb)
Create a new hard drive : set it variable size or fixed sized, but you'll need at last 15Gb to get all the files. To feel confortable, I use 30Gb (variable)
The computer is created, now run it. It will say there's no OS. Click on Devices > CD/DVD > More CD/DVD... Here is you virtual player. Click on Add, and select the Ubuntu .ISO file you downloaded. Then, choose it in the list, and click Choose. Now, you can restart the virtual machine by clicking Machine > Restart.
The computer should restart from the virtual CD, so install it to your virtual hard drive - regular install, same as if you were installing it on a physical HDD.
Once it's installed, do not forget to kick the .iso file from the virtual player for you not to start always on the CD
3. Set up Android Source dependencies
In Ubuntu, do right-click on the upper bar (where are Applications, Shortcuts...), and click Edit Menus. Then, go to System > Administration and tick Software Sources. We need to do this because Sun is highly restrictive on access to Java setup files...
Close that, then click on System > Administration > Software Sources.
Enable all sources, then on the second tab, tick the two Canonical sources (the most important ones, as these sources allow to install Java !)
Close the window and allow to refresh the sources (if you don't, next steps won't work).
Go and read the official Android Source page. That's what we're going to do.
Run a terminal, and copy/paste this : (this is a corrected setup, it should work like a charm -- please tell if it's not)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
After setup complete, make sure Java works, by typing
Code:
java
and
Code:
javac
This should return help on both commands. If one of these doesn't work (ie. "command not found"), your environment is not configured properly.
4. Set up Android Source
Create a dir called "bin" in your user dir.
Code:
cd ~
mkdir bin
echo $PATH
Then, type this :
Code:
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
Next step is to create a folder where we'll store Android sources we work on. You can place it and name it as you wish, let's call it "android" and place it on the user folder.
Code:
mkdir android
cd android
Then, run this command :
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git
If it returns "command not found", restart Ubuntu !
Enter username and email, although I'm not sure it's useful for our use -custom roms-.
Now, let's get the files ! Type
Code:
repo sync
and wait... Wait... Wait... Lots of commands, of "Resolving deltas", "Receiving", etc etc. It can be very long (depends of your Internet speed), just wait...
Finally, let's register the public key and finalize setup process. Type
Code:
gpg --import
And the cursor will down a line and nothing will appear. Stuck ? Broken ? Woooops ? Not at all ! Program is waiting for you to type the key, which is sooooooo big. So, copy and paste all this :
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
Once pasted, hit CTRL+D, this will make the program to register the key, and will display the key has processed.
Everything is now done, you have all the sources and you are ready to create your own roms. You can edit files simply by double-click, or use any software you want.
If you want to compile, simply run a terminal, go to your folder (remember it is cd android (MS-DOS-like command), where android is the folder you defined above) then type
Code:
make
. After a long time (depends on how much RAM you assigned to the machine, 512Mbits is slow), you will generate IMG files.
5. Regular use
If you want to get the latest source files (ie you have 2.1 files and want 2.2.1 files), simply run a terminal, go to your working folder and type
Code:
repo sync
. This should do the trick (correct me if I'm wrong)
Compiling sources takes hours to process, and you may want to kill the compile or pause it. You can then abuse of these keyboard shortcuts (common to Ubuntu OS) :
Code:
CTRL+C
will kill the process. Use it carefully, as it instantly kills it with no prompt.
Code:
RIGHT CTRL+P
is a Virtualbox command. Il will pause the whole Ubuntu (and also your process), and makes the screen ugly/gray (it just stuck the screen on Virtualbox v4.x). This is helpful when you run a Virtual machine, as you can pause the OS and make your computer to sleep/hibernate (or save an image - do NOT turn off your computer, as it will turn off the Virtual machine also !). Out of sleep, you can type again RIGHT CTRL+P to make the process to continue.
** Please note it might be risky to flash your phone with the stock rom you compiled (I mean with no modification), as this is not intended to work on X10
** Please note this install is for AOSP and NOT for Android SDK (you can install it with ease).
What's the difference ?
Android Open Source Project (AOSP) allows you to get the source code of the Android Operating System, in order to improve/change it, and create your personalized Android operating system
Android SDK allow you only to create and edit apps for Android Operating System.
Please note that compiling takes hours to process ! (3 hours or more)
** For any question, deeper info : please FIRST read official documentation. Easy to use, you'll get all info ! **​
man...did you ever stop?!
THANKS FOR INFO. If you can explain how to make system images for our X10 then we can use the dual boot option to make gingerbread or froyo roms for dual boot using Zhidu chargemon file.
I am not clear on making and android system image for the x10. can we extract a system image from a running rom? that way I could make a system image of black freedom and we can all dualboot it instead of installing it.
rendeiro2005 said:
man...did you ever stop?!
Click to expand...
Click to collapse
Lol I can't stop
@SuperUserMovado : I'd love to know, unfortunately I am like you - I don't know how to do this. I'm gonna get several info there and there and try to do some stuff
Regarding Zd's Dual, please note it is not compatible with his xRecovery, which makes things a bit boring when you want to easily install a custom rom AND benefit of Dual Boot.
Dual boot by the way is an excellent idea, but it has limitations (of course), like no SD card mount and few other things because it run from SD card and not from NAND.
EDIT : here is a good start : http://source.android.com/porting/index.html
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
@superusermovado
I'm pretty sure you use unyaffs for the system.img and split_bootimg.ph for the boot.img.
That's how to decompile an update.zip.
From there you recompile as usual. I'm not going to post the instructions because they are all over the net.
Hint: Andy rubins tweet lol
gavriel18 said:
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
Click to expand...
Click to collapse
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Perceval from Hyrule said:
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Click to expand...
Click to collapse
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
LouNGeRR said:
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
Click to expand...
Click to collapse
A compiled rom is not a problem
I was asking what was the content within the rom, and as you said - i supposed too - it is the original + all SE garbage.
Very interesting to get some apps back on AOSP (some like the *Scape, i do like predictive input from SE, gains a lot of time)
To answer then, the SE kit should contain everything of what SE adds : RachaelUI, all their apps (the *Scape), modules (keyboard, apis...), etc etc and all files to link these components to the kernel. And make our phones as fast as a monster truck. Not as fast as AOSP (Formula 1 !!!!!)
Don't forget the most important part, the package contains the SE kernel.
Sent from my SNES using Mario Paint
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
XperiaX10iUser said:
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
Click to expand...
Click to collapse
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
But I definitely can't tell you if the kitchen method will work for XPERIA.
Perceval from Hyrule said:
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
Click to expand...
Click to collapse
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
Perceval from Hyrule said:
But I definitely can't tell you if the kitchen method will work for XPERIA.
Click to expand...
Click to collapse
I can, and it does.
XperiaX10iUser said:
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
I can, and it does.
Click to expand...
Click to collapse
Thanks for info then
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Perceval from Hyrule said:
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Click to expand...
Click to collapse
That's why I went the Cygwin route, much less hassle imo.
XperiaX10iUser said:
That's why I went the Cygwin route, much less hassle imo.
Click to expand...
Click to collapse
I would say it depends. Linux environment is much cooler to work with source files (no boring "NOOO Windows can't find how to open this weird non-Windows file. What to do ? 1.Delete 2.Crash Windows 3.Phone Ballmer to make a tender offer)
Is compiling long with Cyg ? From AOSP, it takes me up to 3 hours with my (well RAM-ed, well CPU-ed) Virtual Machine.

[TOOLS] [LINUX, MAC, WINDOWS] Knives & Forks - v. 12.02.04

Knives & Forks
WHAT IS IT?
Knives & Forks is a set of Android tools for everyone. Every operating system, every device.
This cross-platform Android toolkit, written in Python, that is designed to work in Linux, Mac OS X or Windows. I wanted to create something that was unique, and offered a consistent and feature-filled set of tools for Android devs no matter what operating system they use, and for as many Android devices as possible.
WHAT DOES IT DO?
I just started work on this project, so it doesn't do very much yet. Right now we are just focusing on getting drivers and adb installed for as many devices as we can on all three platforms. Once we have adb working for everyone, the real fun can begin as we start to add more device tools that will make use of adb, such as rooting. Eventually ROM customization tools will be added, but we are focusing on device tools and cross-platform compatibility at this time.
View the changelog to see a list of included drivers. The only device that I can confirm is compatible with this script in Linux, Mac OS X, and Windows is the Samsung Galaxy S II, Sprint Epic 4G Touch. This just so happens to be my personal phone, but as I gather feedback I will create an official list of supported devices.
WHERE DO I GET IT?
This project is now being hosted by the Android Creative Syndicate. An up to date link to the most current version of the script, installation instructions for Linux, Max OS , and Windows, and other information can be found HERE. Registration is not required at the ACS forum to download or view installation instructions. You are free to reply in the thread you are reading right now if you don't want to register for another forum.
I HAVE IT INSTALLED, NOW WHAT?
You should be able to open up your terminal application (or command prompt) and run some adb commands. In the future we will be automating adb commands for you, but for now you can try the following as a simple test:
Code:
adb reboot
If everything worked, your Android device should reboot. For further reading on what you can do with adb you can read THIS PAGE.
HOW TO SUPPORT THIS PROJECT
FEEDBACK
Download my script, test it, let me know what happens. Let me know what other features/tools I should add.
THANKS
Hit the thanks button if you like what I'm doing here.
DONATIONS - I don't currently have a link to send me money, but I could quickly set something up if somebody decides they want to help me feed my kid. I am recently unemployed, but I am not relying on my scripting skills to feed my family. Save your cash for a more worthy project, or tuck it away and wait until the project turns into something amazing.
INFORMATION
TELL ME ABOUT YOUR ANDROID DEVICES!
If my script isn't getting adb setup for your device, let me know where to download the correct Windows driver and/or what udev rules I need to add in Linux.
The next phase of this project will be automating the rooting process. If you know the process for rooting your device, please share the details.
HOW TO REPLY TO THIS THREAD
Please do not reply by saying something like "This looks awesome, I'm going to download it now!".
Just download it, test it out, and then tell me about it.
If my script works for you, please don't post something like "It worked for me, this is the best thing since sliced bread!".
At the moment all my script will do is install adb and drivers for your device. In order to test please uninstall any drivers you may have already installed, run my script, then reply with the following information:
Operating System (including version and 32-bit or 64-bit architecture)
Android Device
If you open up a terminal/command prompt window and enter the following command, does your device reboot? If not, do you receive any error messages (while running that command or at any phase of running the Kinves & Forks script)?
Code:
adb reboot
CHANGELOG
Code:
------------------------------------------------------------------------------------
Knives & Forks: Changelog
------------------------------------------------------------------------------------
The most current version is available for download from:
http://knivesandforks.info/releases/knives-and-forks-current.php
**** 12.02.04 ****
http://knivesandforks.info/releases/knives-and-forks-12.02.04.php
- LINUX CHANGES:
-- "python2" is now called by "Knives-and-Forks-Linux.sh" instead of "python" on Arch.
- This prevents starting the script with Python 3, which results in errors.
-- Changes to "scripts/linux/install-adb-linux.sh":
- "su" will be used if "sudo" is not installed, or user doesn't have permissions to use it.
- Added 32-bit libs for more 64-bit distros:
- Arch (new in this release)
- CentOS (new in this release)
- Debian
- Fedora (new in this release)
- Ubuntu, Kubuntu, Xubuntu
- Added Debian version of '/etc/udev/rules.d/99-android.rules'
- Added '/lib/udev/rules.d/92-permissions.rules' for Debian.
This should fix permissions, allowing adb to run without sudo or su.
- WINDOWS CHANGES:
-- Fixed a couple of missing quotes which were breaking things under Windows XP
- "%userprofile%" was coming back as "c:\documents" instead of "c:\documents and settings\username" in a couple of places
-- "c:\python27" is now the only directory where we look for python.exe
- It is faster to download and install Python to "c:\Python27" than it is to search for it elsewhere.
- This will also prevent issues where Python 3 was installed instead of Python 2, since the script currently gives errors under Python 3.
-- Updated amd64 and x86 versions of setx.exe for updating system PATH on XP/VISTA/7
-- PATH is updated with adb.exe location after Python is installed.
-- The computer will now reboot after updating the PATH, to make sure it will be updated before running the main program.
**** 12.01.27 ****
http://knivesandforks.info/releases/knives-and-forks-12.01.27.php
- GENERAL CHANGES:
-- After adb is installed, adb will reset the android device by running "adb reboot" instead of displaying a list of attached devices with "adb devices".
adb was occasionally reporting no devices were attached, when they infact were. When this happened "adb reboot" still worked, so it is a better test to see if adb is setup properly.
-- Friendlier messages during adb install and testing
-- Added a startup check to make sure the script is running from the correct directory
-- Removed empty Project directory, as it is not being used yet.
- LINUX CHANGES:
-- Added support for "lxterminal" and "urxvt" in "Knifes-and-Forks-Linux.sh"
-- Changed idVendors for Linux udev rules to lowercase instead of uppercase.
- WINDOWS CHANGES:
-- Startup script searches for python in "C:\Program Files (x86)" then "C:\Program Files" and "c:\" last.
-- Drivers should now install even if the language is not English
-- Added drivers for Casio C771 G'zOne Commando
-- Added LG drivers
-- Replaced setx.exe
**** 12.01.25 ****
http://knivesandforks.info/releases/knives-and-forks-12.01.25.php
- Replaced "Knives-and-Forks-Mac.sh" with "Knives-and-Forks-Mac.app".
Starting the script on a Mac should now be as simple as double-clicking the new .app file.
**** 12.01.24 ****
http://knivesandforks.info/releases/knives-and-forks-12.01.24.php
- Fixed a typo which caused the script to crash when viewing the credits screen.
- Smarter python fix for Windows users.
-- "C:\" and all sub-directories are searched for python.exe.
-- If python is not not found, it will be downloaded from python.org and installed to c:\python27.
-- If python is found (in "C:\python27", "c:\python", "c:\xyz123", "c:\program files\python27" or in any directory with any name anywhere on drive c:) the main menu script will launch.
- Added changelog.txt to the release .zip file.
**** 12.01.23 ****
http://knivesandforks.info/releases/knives-and-forks-12.01.23.php
- Minor update to fix Python installation for Windows users, which was causing the script not to launch.
**** 12.01.22 ****
(FIRST PUBLIC RELEASE)
http://knivesandforks.info/releases/knives-and-forks-12.01.22.php
- Added option to install adb & fastboot for Linux, Windows, Mac
- Added Linux drivers for:
-- ACER
-- ASUS
-- DELL
-- FOXCONN
-- GARMIN-ASUS
-- Google
-- Hisense
-- HTC
-- HUAWEI
-- K-TOUCH
-- KT Tech
-- KYOCERA
-- LENEVO
-- LG
-- MOTOROLA
-- NEC
-- NOOK
-- NVIDIA
-- OTGV
-- PANTECH
-- PEGATRON
-- PHILIPS
-- PMC-SIERRA
-- QUALCOMM
-- SK TELESYS
-- SAMSUNG
-- SHARP
-- SONY ERICSSON
-- TOSHIBA
-- ZTE
- Added Mac drivers for:
-- Nothing. According to Google, "It just works." Let me know if they are right.
- Added a custom Windows installer with drivers for:
-- GOOGLE
-- HTC
-- HUAWEI
-- SAMSUNG
WHERE DID THE OLD POSTS GO?
In an attempt to reduce unnecessary clutter in my original thread, I created supporting threads in each Android device forum. The whole reason behind posting so many times was to keep certain information in the Chef Central post, and certain information out of it in an effort to reduce clutter. Who wants to read through 50 pages of how this, that, and the other thing is or isn't working on devices that you don't own? That system appeared to work very well, but apparently I broke the rules by posting in every Android device forum.
Learn from my mistakes, don't post similarly worded posts all over the place!
ATTENTION PYTHON PROGRAMMERS:
Any idea on what I can do to make the Python files work in Python 2 and Python 3? I have only tested in Python 2.7.2, but I have received reports that Python 3 gives errors. I'm not really doing anything all that fancy, so I'm not sure if something is just a matter or new syntax or something else needs to be imported or what. Any help would be appreciated.
The next release will call "python2" for Arch Linux users since "python" will use python 3.
ATTENTION LINUX USERS:
I am currently testing my Knives & Forks script in some virtual machines using VirtualBox, as well as my local Xubuntu installation.
For distro specific things (installing 32-bit libs, udev changes, etc) in the next release I will be detecting the distro using the following code:
Code:
echo " -- DETECTING LINUX DISTRO --"
if [ "`cat /etc/issue | grep Arch | wc -l`" == "1" ]; then
DISTRO_NAME="Arch"
elif [ "`cat /etc/issue | grep Cent | wc -l`" == "1" ]; then
DISTRO_NAME="CentOS"
elif [ "`cat /etc/issue | grep Debian | wc -l`" == "1" ]; then
DISTRO_NAME="Debian"
elif [ "`cat /etc/issue | grep Fedora | wc -l`" == "1" ]; then
DISTRO_NAME="Fedora"
elif [ "`cat /etc/issue | grep Ubuntu | wc -l`" == "1" ]; then
# DETECTS UBUNTU, KUBUNTU, XUBUNTU, ETC
DISTRO_NAME="Ubuntu"
else
DISTRO_NAME="UNKNOWN"
fi
echo " - $DISTRO_NAME"
Please let me know what other distros your using and if you are able to find the name using the "/etc/issue" method I am using in the above if statements.
I wrote a bash function to check if sudo is installed, and then to see if the current user has permissions to use sudo. If sudo is not installed, or if the current user does not have permission to use it, su will be used instead. This will be included in my next update, but I wanted to post it here first:
Code:
echo " -- CHECKING TO SEE IF 'SUDO' IS INSTALLED --"
CURRENT_USER=$USER
USE_SUDO="NO"
if [ -f "/usr/bin/sudo" ]; then
echo " - 'sudo' is installed."
echo ""
echo " -- CHECKING FOR PERMISSION TO USE 'SUDO' --"
echo ""
echo " If prompted, enter the password for the user '$CURRENT_USER'."
echo ""
if [ "$(sudo whoami)" != "root" ]; then
echo ""
echo " - Sorry, '$CURRENT_USER' does not have permission to use 'sudo'."
echo " - 'su' will be uses instead of 'sudo'."
echo ""
else
echo " - '$CURRENT_USER' has permission to use 'sudo'."
USE_SUDO="YES"
echo ""
fi
else
echo " - 'sudo' is not installed."
echo " - 'su' will be used instead of 'sudo'."
echo ""
fi
DO_SU()
{
echo ""
if [ $USE_SUDO == "YES" ]; then
# echo " -- USING 'SUDO' TO RUN '$1' --"
echo ""
echo " If prompted, enter the password for the user '$CURRENT_USER'."
echo ""
sudo $1
else
# echo " -- USING 'SU' TO RUN '$1' --"
echo ""
echo " If prompted, enter the password for the user 'root'."
echo ""
su -c "$1"
fi
echo ""
}
# EXAMPLE USAGE OF THE DO_SU() FUNCTION:
# NOTE THAT THE COMMAND TO RUN WITH SU OR SUDO HAS TO BE IN QUOTES
DO_SU "whoami"
I also found out why debian users were being forced to use sudo or su in order to use adb. The next release will include this fix, but for those who might be interested in making this change manually:
Open "/lib/udev/rules.d/91-permissions.rules" as root (su or sudo) in your favorite text editor and find this line
Code:
usbfs-like devices SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ MODE=”0664″
Change MODE to "0666"
Code:
usbfs-like devices SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ [B]MODE=”0666“[/B]
Instead of replacing or modifying your "/lib/udev/rules.d/91-permissions.rules" file, the next version of my script will actually create a "/lib/udev/rules.d/92-permissions.rules" for Debian users that contains only the following:
Code:
# usbfs-like devices
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
MODE="0666"
This file will load right after the 91-permissions.rules and replace just the usbfs-like devices settings. I'm just doing this with my script so I don't accidently break anything on your system. If you are making the changes manually, editing the 91-permissions.rules file should be all you need to do.
Save your changes and then restart udev as root (using sudo or su)
Code:
/etc/init.d/udev restart
-- or --
Code:
service udev restart
This assumes of course that you already have a working udev rule for your android device, and that adb is working only with su or sudo currently. Once this change is made you should be able to use adb without being forced to use su or sudo.
First post updated with latest release, version 12.02.04.
Lots of changes for XP and various Linux distros. See changelog for more information, but things should work better in Arch, CentOS, Debian, Fedora, and Ubuntu (including Kubuntu, Xubuntu, etc).
Hi, I just downloaded the latest file (12.02.04) but it's only 4 KB.
Could you check please?
Thank you!
Trying to unzip the file in Ubuntu 11.10 and this what I get:
Archive: knives-and-forks-12.02.04.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of knives-and-forks-12.02.04.zip or
knives-and-forks-12.02.04.zip.zip, and cannot find knives-and-forks-12.02.04.zip.ZIP, period.
Any help?
I had a typo in the .zip filename, so if you tried to download the file yesterday you basically just downloaded an error message that the .php counter script gave when it couldn't find the file. I will have to take a look at that later because it is supposed to display the message not make you download it.
The problem is now fixed, sorry about that.
Thanks for update.
Downloaded and installed.
Now I can adb from linux.
Have one more question. I hope you can help me with that as well.
I don't see my device (E4GT) as external hard drive or USB drive when debuging is on to copy files to it.
When debuging is off it shows 2 Android devices but when I click on them I'm getting this message:
Error initializing camera: -60: Could not lock the device
Any ideas?
My guess is maybe they didn't get unmounted properly that last time you had it plugged in, but I have no idea why you would get an error message about the camera. I have not seen that one.
Try installing Dropbox and backing up anything important, then formatting the sdcard and try mounting again.
Maybe somebody else has had that error and has a better idea,
I'll try to format sd card tonight when I get home.
But what would be the problem with internal storage?
And what should or could I try to proper mount it?
agat63 said:
I'll try to format sd card tonight when I get home.
But what would be the problem with internal storage?
And what should or could I try to proper mount it?
Click to expand...
Click to collapse
First thing to check is that it isn't ROM related. Boot into recovery and try to mount as a usb drive and see if it works or not. If it does, I would say wipe and flash another ROM. If it doesn't work from recovery, then it could be a result of not unmounting before unplugging from your computer.
Sometimes if you have your phone mounted as a USB drive, or even just a regular flash drive, and it you unplug it before it is done unmounting (or if you don't use the safely remove hardward feature of Windows) the filesystem can get trashed. It hasn't happened alot with me, and I have seen the problem happen mostly when a flash drive is unplugged before the OS can finish writing to it.
After you get all of your important stuff backed up somewhere like dropbox, reboot into your recovery and repartition the sd card and/or your internal storage, whatever is giving you the problem. When you reboot into android you should be able to use it as normal, and dropbox should automatically copy everything back that you backed up.
This problem isn't really related to my script, so I if you can't get the issue resolved make a new post in Android QA or somewhere else. PM me if you post elsewhere and I can see if I can help you out there.
I didn't mean to say that the problem is related to your script.
Your script works just fine and I'm able to adb.
I'm kinda new to linux and still learning it.
I needed help and advise for how to connect phone to pc in linux.
It works in windows for me.
When I get on my PC I'm gnats give this awhirl. Ad for your mounting disk drives if ur on any ics rom it wont and I don't know how to enlighten me someone but if its gingerb then make sure u mount with the phones option when u plug in on ur handset ther should be some kind of way to switch between teather, disk and charge only? Wat fone u got?
Does this knife and forks compile? What does it do? Sorry to sound like a knob.
Sent from my GT-I9100 using XDA Premium App
This worked for my att gs2.
Sent from my GT-I9100 using Tapatalk
By using the Android Font you are violating their copyright rules. But you are free to modify the Android Robot, as long as you refer to them and say that you have permission.
Bad-Wolf said:
By using the Android Font you are violating their copyright rules. But you are free to modify the Android Robot, as long as you refer to them and say that you have permission.
Click to expand...
Click to collapse
The post where I found the font said it was an Android logo inspired font, and not the actual android logo font.
I have changed the font I'm using, and have updated my logo graphic to fight off any further concerns.
Colliebudz said:
Does this knife and forks compile? What does it do? Sorry to sound like a knob.
Click to expand...
Click to collapse
At the moment it simply automates getting adb setup on Linux, Mac, and Linux.
I have plans to add support for device rooting next, followed by some other adb commands, then rom customization tools as the last stage of development.
Pushing files to the phone, running shell commands, etc, requires that adb is setup properly, so that is where the focus is at right now. Getting the adb & driver installation scripts setup to run on all three platforms is also helping take care of some general troubleshooting, which is good to get out of the way before the main script gets tons of extra features.
All of this info should be in the first post, I'll try to clarify things when I make the next update.
Waddle said:
This worked for my att gs2.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Thanks for the feedback. What OS?

PengDroid: a healthy fusion of Debian and Android

Notice: Now that PengDroid has been rolled into BotBrew, this installation method is now deprecated. You'd get all this, and a package manager GUI, by installing BotBrew "basil".
Click to expand...
Click to collapse
I love Debian, and I think it's nice to have a chroot environment full of useful tools. However, there's always a barrier keeping Android and Linux from talking to each other. This is why BotBrew is designed to not rely on a chroot system.
PengDroid is an experimental chimera of Android and Linux that gives you access to a chrooted Linux userland while preserving access to the Android system.
If this sounds dangerous, let me explain why this is safe. Have a look at the root directory of a Linux system and the root directory of an Android system; notice how they don't overlap much. This means that we could safely map some of the most useful Android directories into the Linux namespace; there's no need to modify the Android side. Let's see the code.
I made a prebuilt archive to demonstrate this method. In exchange for trying, you get a nice Debian chroot. What's not to love?!
download pengdroid.tgz to your Android device
unpack it to /data (or /sd-ext): tar zxvf path/to/pengdroid.tgz -C /data
run it: /data/pengdroid/init
For a quick sanity check, run: getprop ro.product.model (whoa, Android inside Linux)
Then, for some more fun: apt-get
By default, no repositories are enabled.
Note: Before we start installing packages from Debian, we should actually install Debian. Wait, what? Right, PengDroid is so small because it packs just enough for us to use dpkg/apt; but many Debian packages assume that we have a complete setup. To bootstrap a minimal Debian installation, run /debian.sh (which makes the final installed size a whopping 58mb). If that's too much, keep reading.
Advanced Usage
Installing a minimal Debian gives us a fairly complete, but still small, *nix system. If we wanted to go even lighter, but still have a reasonably robust setup, we could run the alternative installer: /debian.sh apt -- which installs a complete dpkg/apt system.
It's a hassle to run /data/pengdroid/init all the time, but we could fix that by making a shortcut:
Code:
busybox mount -o remount,rw /system
echo '/data/pengdroid/init -- "[email protected]"' > /system/bin/pengdroid
chmod 0755 /system/bin/pengdroid
Now, we could just prefix everything with pengdroid, like so: pengdroid python
Or, if we just want a shell: pengdroid
Awesome! Although you can probably do better on the name assignment, this is another great step transforming Android into a real Unix Distribution
Yeah, the name's awkward. But I figured I'd roll this into BotBrew some day, when we slim it down enough. It's already pretty tiny for a Linux distro, but it could be even smaller if all we want is a package manager.
PengDroid is now on a diet. It installs to some 7.7mb, with a 3.5mb download size. This is good enough to support package management, and we're one command away from a minimally-functional Debian setup (instructions in OP).
/edit:
I just fixed a potential privilege escalation vulnerability in init.c, and added some new PATH-handling code. Instead of overriding the PATH, it now prepends to it. In addition, if PATH contains a double-colon ( :: ), it inserts its additions between the colons instead of prepending. To install the new init executable without reinstalling, do (outside of PengDroid):
Code:
wget http://dl.inportb.com/pengdroid.init
cp pengdroid.init /data/pengdroid/init
umount /data/pengdroid
rm pengdroid.init
/edit:
It seems that Debian Squeeze is a bit too old for our needs. Specifically, for reliable package management across many types of Android devices, we need multiarch support. So now, I'm tracking Debian Sid.
Excited to see the debian runit scripts and how they operate. I am too noob to know the difference between the Debian distros, but I have learned to trust you in such decisions.
How about adding the pengdroid symlinks to bbsh when it makes it to +1?
I'm sure it or something like it is already firmly in the testing phase. Sounds like SOP now that I write it. I just always forget and try to get a pengdroid shell between flashes.
Watch, he's gonna tell me an easier way I should know already...
Sweet, Finally, Debian & Android rolled up together in a neat little package. Il test this out later,
& do you hail from West or South London by any Chance, where i come from "Peng" is a slang term for "Sexy"
Oh snap, I lost track of this thread
You might have noticed a pengdroid.zip archive in my files. That's a self-extracting package for those who don't have a working tar utility. You could extract it using unzip, or just run the file like a program:
Code:
chmod 0755 pengdroid.zip
./pengdroid.zip
mateorod said:
Excited to see the debian runit scripts and how they operate. I am too noob to know the difference between the Debian distros, but I have learned to trust you in such decisions.
How about adding the pengdroid symlinks to bbsh when it makes it to +1?
I'm sure it or something like it is already firmly in the testing phase. Sounds like SOP now that I write it. I just always forget and try to get a pengdroid shell between flashes.
Watch, he's gonna tell me an easier way I should know already...
Click to expand...
Click to collapse
We'll essentially be killing the existing sysvinit system and offering additional packages containing runit scripts. sysvinit is pretty good, but not enough to keep track of services.
I'd like to have [almost] perfect compatibility with the current BotBrew. BotBrew works by attaching its own filesystem (which conveniently lives under /botbrew) to the existing Android tree. Pengdroid turns this relationship on its head: it attaches crucial parts of the Android filesystem to the Debian tree, and then chroots into Debian. Technically, the chroot/reversal is not required, but it simplifies cleanup.
In BotBrew+1, /botbrew lives within the Debian filesystem tree already. After chrooting into Debian, we have automatic access to /botbrew as before. But what about direct access without chrooting? That's easy... just selectively attach the debian/botbrew directory the same way we've always been doing. So we'll need a couple of changes:
bbsh needs to detect if it's called from within the chroot and handle that special case
the init program (for starting the chroot) should add /botbrew/bin to the PATH
Multiarch is another fun thing to play with. Debian recently (officially) gained the ability to install libraries for multiple architectures at the same time. For example, this lets you have both i386 and amd64 software installed on your 64-bit system. In BotBrew, we'll take advantage of this to install both Debian packages and Android-native packages.
Why are we still planning to distribute the old stuff (repacked from Opkg) if we could get all of that and more from Debian? Simply put, these Android-native packages tend to be more efficient in terms of execution speed and space usage. But during the testing phase, I'd like to use Debian software primarily because we get those for free
Der_Panzerfaust said:
Sweet, Finally, Debian & Android rolled up together in a neat little package. Il test this out later,
& do you hail from West or South London by any Chance, where i come from "Peng" is a slang term for "Sexy"
Click to expand...
Click to collapse
Just a coincidence, I assure you, since I'm on the other side of the great pond I thought this might be an appropriate name for a penguin cyborg, that's all.
Roger that
Sent from my E15 using xda premium

Help with Ruby.

Hello friends! I post this on the off to pic because I can't really find a fitting sub-forum. If you know a better place I can post this thread, please let me know.
I want ruby and Ruby gems to run on my android device (galaxy S4 GT-I9515, not that it matters). I know android is Linux based so there shouldn't be a problem doing this.
Basically, I don't want to use Ruby for development, I just need to use some of it's applications (gems).
I tried ruboto core and ruboto IRB, but couldn't install a gem.
In general, my android won't read "apt-get" command in terminal. I don't know why.
If anyone could help me to run some Ruby gems on my device, I would really appreciate it. Thanks for people who answer!
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
Code:
$ apt list | grep ruby
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ruby/stable 2.3.3 arm
ruby-dev/stable 2.3.3 arm
ruby-ri/stable 2.3.3 all
weechat-ruby-plugin/stable 1.6-1 arm
TheKindleMCPEGuy said:
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
Code:
$ apt list | grep ruby
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
ruby/stable 2.3.3 arm
ruby-dev/stable 2.3.3 arm
ruby-ri/stable 2.3.3 all
weechat-ruby-plugin/stable 1.6-1 arm
Click to expand...
Click to collapse
First of all thanks for the reply!
So, in order to use ruby on android all I have to do is use a more linux-like terminal, and use the command "$ apt list | grep ruby", am I right?
Will I have access to apt-get and commands like that with the new terminal?
FurySh0ck said:
Android is a Linux kernel, however it is not a full Linux like Debian or Ubuntu.
Android doesn't have a package manager by default (unless with Google Play or other app markets). It doesn't have apt-get.
However, I can say that there's a terminal called Termux in Google Play or F-Droid.
It does have apt and it doesn't require root.
I found Ruby in the apt repos of Termux though.
First of all thanks for the reply!
So, in order to use ruby on android all I have to do is use a more linux-like terminal, and use the command "$ apt list | grep ruby", am I right?
Will I have access to apt-get and commands like that with the new terminal?
Click to expand...
Click to collapse
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
Code:
apt install ruby
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
Code:
$ apt install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3587 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Get:1 [url]http://termux.net[/url] stable/main arm ruby arm 2.3.3 [3587 kB]
Fetched 3587 kB in 1s (2878 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 2137 files and directories currently installed.)
Preparing to unpack .../archives/ruby_2.3.3_arm.deb ...
Unpacking ruby (2.3.3) ...
Processing triggers for man (1.13.4-3) ...
Setting up ruby (2.3.3) ...
When I ran the
Code:
gem
command I got this:
Code:
$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
[url]http://localhost:8808/[/url]
with info about installed gems
Further information:
[url]http://guides.rubygems.org[/url]
Enjoy!
TheKindleMCPEGuy said:
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
Code:
apt install ruby
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
Code:
$ apt install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3587 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Get:1 [url]http://termux.net[/url] stable/main arm ruby arm 2.3.3 [3587 kB]
Fetched 3587 kB in 1s (2878 kB/s)
Selecting previously unselected package ruby.
(Reading database ... 2137 files and directories currently installed.)
Preparing to unpack .../archives/ruby_2.3.3_arm.deb ...
Unpacking ruby (2.3.3) ...
Processing triggers for man (1.13.4-3) ...
Setting up ruby (2.3.3) ...
When I ran the
Code:
gem
command I got this:
Code:
$ gem
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
[url]http://localhost:8808/[/url]
with info about installed gems
Further information:
[url]http://guides.rubygems.org[/url]
Enjoy!
Click to expand...
Click to collapse
Awesome! It worked well and neat. +1 For your Thanks-o'-meter.
Now I have some questions about termux, if you could answer:
1) Where does it save all the files? I used
Code:
apt update
and I am going to download packages from now on. I think I should know where it goes / how can I change that save directory.
2) When I tried using root permissions (you know, my device is rooted so I used
Code:
su
in order to gain access) I couldn't use apt commands anymore. I think some of my ruby gems will require root permissions, so I would like further explanation about it (only if you could of course )
FurySh0ck said:
Termux is not really more Linux like, it's still using the same kernel. It downloads a core (other applications, etc) to /data folder. That's how it works.
You will have access to apt in the new terminal. However, there is not much packages in the repo as your Android device is ARM and the packages have to be built into a package file. If you'd like the full experience, consider using a KVM or Xen VPS which run full on distributions (Debian, Ubuntu, etc). They also have more packages over there.
Now to install Ruby, you wouldn't apt list. What you would do in Termux:
would install Ruby and you would be able to use it and install gems.
I installed Ruby with that command and confirmed it works:
When I ran the command I got this:
Awesome! It worked well and neat. +1 For your Thanks-o'-meter.
Now I have some questions about termux, if you could answer:
1) Where does it save all the files? I used and I am going to download packages from now on. I think I should know where it goes / how can I change that save directory.
2) When I tried using root permissions (you know, my device is rooted so I used in order to gain access) I couldn't use apt commands anymore. I think some of my ruby gems will require root permissions, so I would like further explanation about it (only if you could of course )
Click to expand...
Click to collapse
1. It saves inside app data, specific folder is /data/data/com.termux/files/usr/var/cache/apt
2. I don't think su works in Termux really, however my root doesn't work right now so I can't really say a definite answer.
TheKindleMCPEGuy said:
1. It saves inside app data, specific folder is /data/data/com.termux/files/usr/var/cache/apt
2. I don't think su works in Termux really, however my root doesn't work right now so I can't really say a definite answer.
Click to expand...
Click to collapse
That's all I had to ask in this thread.
Thanks!

Categories

Resources