yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] torwag:
Automatise stuff?

Hey,

I just came across Jenkins.

http://jenkins-ci.org/

maybe this help you to keep track of all your builds and make sure they are working whenever you change something underlying.

There is also the openembedded folks which use "receipts" to describe how to build a package for a certain device.

http://www.openembedded.org/wiki/Main_Page

Furthermore, I love the arch-linux package system. It might be exact the flexibility you need to make automatic package-building possible.

https://wiki.archlinux.org/index.php/Creating_Packages_(Türkçe)

As for emacs, did you compile it including the the X-window version?

You can compile a console version only, which should remove a lot of stuff from the binary.

As for me its not about using emacs as a primary editor on a smartphone. But you can execute elisp code and hence you could easily use all emacs goodies in wrapped in simple GUI-front-ends.

As for my purpose I am waiting to get git and emacs + the included org-mode mode. This would allow me to share my notes seamlessly between my phone and my desktop.

Futhermore, yesterday I found by chance another goodie. Let me bring your attention to QT for android. Many Linux cli tools might get an very quick and easy GUI interface on Android by using QT.

http://labs.qt.nokia.com/2011/02/28/necessitas/

Looking forward to see the new packages.

---------- Post added at 03:39 PM ---------- Previous post was at 02:48 PM ----------

Hi again,

I tried to build the toolchain according to the how-to you wrote.

Thats the output after roughly 30 min of data crunching.

[ALL ] /home/torsten/x-tools/arm-msm-linux-gnueabi/arm-msm-linux-gnueabi/sysroot/usr/include/linux/if_pppox.h:24: included file 'linux/if_pppolac.h' is not exported

[ALL ] /home/torsten/x-tools/arm-msm-linux-gnueabi/arm-msm-linux-gnueabi/sysroot/usr/include/linux/if_pppox.h:25: included file 'linux/if_pppopns.h' is not exported

[ALL ] /home/torsten/x-tools/arm-msm-linux-gnueabi/arm-msm-linux-gnueabi/sysroot/usr/include/linux/virtio_9p.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>

[ERROR] make[4]: *** [/home/torsten/x-tools/arm-msm-linux-gnueabi/arm-msm-linux-gnueabi/sysroot/usr/include/linux/.check] Error 123

[ERROR] make[3]: *** [linux] Error 2

[ERROR] make[2]: *** [headers_check] Error 2

[ERROR] make[1]: *** [sub-make] Error 2

[ALL ] make[1]: Leaving directory `/home/torsten/crosstoolchain/htc-kernel-msm7x30'

[ERROR]

[ERROR] >>

[ERROR] >> Error happened in: main[scripts/crosstool-NG.sh]

[ERROR] >>

[ERROR] >> For more info on this error, look at the file: 'build.log'

[ERROR] >> There is a list of known issues, some with workarounds, in:

[ERROR] >> '/usr/share/doc/ct-ng-hg+default-258160822e35/B - Known issues.txt'

[ERROR]

[ERROR] Build failed in step 'Extracting and patching toolchain components'

[ERROR]

[ERROR] (elapsed: 33:00.52)

Any idea?
[Desire Android Development] theGanymedes:
I assume you're using the "new" crosstool-ng .. It has problem like this - linux kernel installer doesn't install unnecessary headers; whilst crosstool-ng checks for all.

In order to fix this, run "ct-ng menuconfig" utility and under "Operating System"

setting, uncheck "Check installed headers" option. Don't worry, everything is still fine - I made one toolchain like this already and using without problems ;)

Also, everytime you restart build process, you might need to erase "linux_custom" symlink (or something named like this, sorry I didn't log this somewhere - my bad) found in <crostool>/bin/.build/ folder somewhere. Check inside a little bit and you shall see it

And thank you very much for those resources, I'll check them. Alas, I have to compile most applications with custom configuration, and installation, so most of the guidelines given about other devices address LFS (linux from scratch) systems - not Android, thus makes it just a hint...

Jenkins looks promising though.. Might save me a great amount of time. Let me see that.

About arch-linux package.. Well, I already configured APT (creating a repo as we speak), but maybe in the future I'll take a look at it as well.

I compiled Emacs without X now. I have to compile Xorg and make it run without problems under Android first. In order to do that, I need to learn enough Android programming to make Android "not use screen while Xorg is running" - which is something I don't know yet. Once X is ready, all I have to do is remove --without-x from the compilation configuration, and it'll be ready.

Too bad that I couldn't find anyone knows Android programming enough to do what I described above. It's why it's going to take a little time.
[Desire Android Development] theGanymedes:
All links are rejuvenated and new packages added (including emacs, dpkg and apt!) - dig in!

After tonight, you can install every package that's mentioned on this post using apt-get command!

I'm uploading the packages tonight!

Also, learned a few stuff about external-calling application and OpenGL to make X run - I think.. Will start working on that now.

Happy apt-get'ting guys :)
[Desire Android Development] theGanymedes:
Found some bugs at the initial releases. Fixing them, so links will be offline again..

Sorry guys.
[Desire Android Development] ggolemg:
Potential

Amazing piece of work you have done. Thank you. The ramifications of this are staggering.

Now all we need are simple sh scripts on both ends, computer with compiler and android that would facilitate all of this in the easiest way possible.

The scope of this project could have very far reaching implications for the future of linux in general, where all software would be ported and usable on both phones but probably more often tablets.

I'm sure you know and have though of all of this.

Just wanted to say thanks from myself, and if it does take off, the entire linux ecosystem.
[Desire Android Development] theGanymedes:
Well, finally fixed them all. Still couldn't test if they work well, but at least they make your phone boot now :)

BTW: Curl causes system to reboot; I don't know the exact reason (libcurl works well though) but I think it's because the threads. I'll try to compile it without a thread library soon.

EDIT: Curl binary causes Kernel to panic with a page fault. SNQ's kernel can simply say "Segmentation Fault" and stop application; whilst GingerCakes' kernel (compiled with those sources) cause system reboot. Trying to solve it.
[Desire Android Development] theGanymedes:
CURL PROBLEM IS NO MORE! It was caused by OpenSSL and Zlib configured wrong during build (I'm on 64 bit machine and configure script thought I was making a native build, didn't heed to a parameter..)... Wow, it was hell of a job to find it though :)

Now I'm at University, I have a decent connection, so all might be ready tonight..

EDIT: All of them uploaded. Just wait for apt tomorrow; I'm going to upload configuration files with the package - so that you don't have to deal with them ;)

EDIT2: Scratch that, I already uploaded :)
[Desire Android Development] theGanymedes:
APT repo is offline - stupid fileZilla uploaded files half baked.. Will be fixed tonight.
[Desire Android Development] theGanymedes:
Apropos, recompiling X from scratch - with DRI and GLX support this time (thanks to "binfmt_misc" support of Linux ;) ). Learned a tad about OpenGL programming to "fill the screen" - to fool Android that we're using it - and enough to call a native application (I think we can "suspend it" too with the same technique (necessary when Android is suspending our application) - and since Xorg doesn't handle our hardware back button, process is simple (it seems, I mean :) ).

See you soon guys.. I think it'll be quite fun afterwards.. :)

(PS: I'm thinking to abandon recovery script distribution soon. It requires a lot of editing and two separate archives every time (for install and uninstall); and it's quite pain to debug as well. APT way also handles dependencies too, so... Just letting you know ;) )

EDIT: Well, apparently our Adreno doesn't support DRI (at least, yet?) so we have to cancel that :)

EDIT2: DRI with SWRAST was possible, and I used it! Compilation was successful finally today. Also, I used Gallium rather than plain Xlib - everyone said it's better in performance ;)
[Desire Android Development] theGanymedes:
Xorg is compiled, Emacs with X is compiled.. Recompiling Perl with thread support (necessary for Vim with X)..

Repo is going to be updated soon.

Note: Didn't test the Apt-get repo myself yet, so you might want to avoid for the time being ;)
[Desire Android Development] theGanymedes:
Repo is moving! X10Hosting was problematic and byethost doesn't allow files bitter than 4MB.. Looking for another place...

Sorry..
[Desire Android Development] Droidzone:
Try sourceforge. No limits.
[Desire Android Development] gabx:
cross compil with Java langauage

Hello,

I used your how to to build the toolchain for a samsung galaxy s2.

It built fine.

Now I want to build a second one with java language. Shall I use same folder (/home/username/compil/crosstool/bin) and just change the config file, or shall I build from another folder?

Will the X-tool folder be the same when using Java? Or shall I have another one for java?

TY
[Desire Android Development] theGanymedes:
Well, Crosstool-ng automatically erases the old folder. You can, of course, try to make a new one with Java (you must hava java support in your own GCC first, of course) but I'd recommend you to "rename" the old one (at /home/<user>/x-tools/) to something else first - so if something doesn't turn out well, you can still rename the old one back and use it.

With or Without Java, if you don't change the config (like, vendor name) it'll be at the same folder name - erasing old one first. If you change the vendor name at crosstool-ng config, it'll make a new one with new name.
[Desire Android Development] theGanymedes:
BTW, I realized that DPKG doesn't work with busybox tar if the file is too big, so I needed to compile tar as well, it'll be uploaded soon.

Keep up ;)
[Desire Android Development] gabx:
TY 4 your answer.

I will then save my X-tool folder in let's say "X-tool_C", then build again with java. I guess I must have Java, not JRE, right? Or is it exactly same?

---------- Post added at 04:04 PM ---------- Previous post was at 03:42 PM ----------

In fact, i find all your work very interesting.

I am quite a n00b, but I am not against learning and testing. I will try to adapt some of your work to my device. samsung galaxy s2.

Why use Android? Why not build a whole Linux running on your device, with a X server, and maybe Enleightenment window manager? Maybe can we use some owrk from bodhilinux, as it is already running on touchscreen device (http://www.innovationsts.com/blog/?p=2959) ?

I do think it is possible to build the Kernel, initramfs, X server, window manager, then apps. No? Then, write a nice How to, and pack everything in a distro.:)
[Desire Android Development] theGanymedes:
You need Java support in your native GCC , not JRE ... JRE might be necessary too, maybe, I don't know; but GCC-Java package is definitely needed.

Actually, I already did run Debian on my device - it was good but I'm not trying complete distro because it requires a lot of work and I don't want to go under it myself. Instead, I'm carrying stuff from linux to Android as I see need. The reason is, simply put, "I don't think it's a good thing to reinvent wheel".

Anyhow, I already do have X window system compiled now and will examine Enlightenment - if it's as simple as I desire, I'll recompile it too.

All the elements you count - I already have them actually :)
[Desire Android Development] gabx:
Couldn't find X server on this thread. Where can I find info on How to compil it for my phone?
[Desire Android Development] theGanymedes:
Because it's still not tested, so didn't upload. I'll put it into the APT repo when it's ready (won't make a recovery script for it); so you'll be able to install it with apt-get install xorg :D

Wow, android stuff is so problem! Now have to compile Coreutils (which renders busybox nearly unnecessary) because busybox versions of stuff is usually so crippled! Tar was one of them, now getty...

DPKG was giving errors sometimes and was working well other times: problem, it turns out, was getty..

By the end of this year, I think, I'll replace everything underneath :D
[Desire Android Development] theGanymedes:
WARNING: DON'T INSTALL DPKG YET!

I found out a major bug in dpkg version I compiled. New version will ready in a few hours (1.16.1 is the new one). Please remove the old one and/or re-install the new one.

EDIT: DPKG is updated. Please install the updated version now.
[Desire Android Development] Chaosz-X:
Amazing man, really great job! And thanks a lot for your hard work!

Ellerine saglik be, super oldu bu! :D

Oh by the way: does the ZIP reflash a kernel? And if so, can I simply replace the zImage in the ZIP with my own one, or is the used zImage special?
[Desire Android Development] cdesai:
I think he modified init.rc to include /data/lib in LD_LIBRARY_PATH

From my fingers to your eyez
[Desire Android Development] theGanymedes:
Yeah, exactly. I don't flash ANY kernel - I just change the ramdisk. After installing my GlibC, you can use any kernel you like - as long as it's not very old (2.6 is needed) :)

And thank you for your tribute (in Turkish) :)

BTW: Putting a kernel to zip will be useless, unless you change the code to flash a kernel too - as I said, I don't flash a new kernel - flash the old one back after changing the ramdisk.
[Desire Android Development] Chaosz-X:
When I install this with Sibere's Data2SD already installed, do I have to set EXT or MTD as defaultinstall? Logically, I would say EXT, but the device thinks the EXT = /data on MTD, so I'm a bit confused about this :p
[Desire Android Development] theGanymedes:
Well, yeah that's been kinda confusing too for me when I started this too :)

If you say EXT, the programs will be installed to SD-CARD partition, no matter where it's mounted on boot ; and if you say MTD it shall be installed to internal memory.

Even if applications are installed in MTD but SD-card is mounted as /data on boot; every application you installed to MTD still works - because I make symbolic links to sd-ext from MTD for everything installed ;)

Don't worry about what device thinks: I wrote those scripts so I took care of that stuff ;)
[Desire Android Development] Chaosz-X:
Okay, thanks!

And I tried to flash this on top of a CM7.1 with Darktremors A2SD, but the terminal emulator said 'apt-get' was an unknown command. Did it went wrong there because of the A2SD? If so, I'll have to try Data2SD this afternoon :p
[Desire Android Development] theGanymedes:
Forgive me if I'm asking a stupid question, but : did you install Apt and DPKG zip's ? (They were at 3rd or 4th post)
[Desire Android Development] Chaosz-X:
Forgive me for the stupid answer, I forgot that ;p Thanks for mentioning!

Oh by the way: would you mind if I made an application for this project? As in, on your phone, you start an Android app, which allows you to pick your libraries, and it automatically installs them and that kinda stuff. I think it would be a great addition to this awesome project :)
[Desire Android Development] theGanymedes:
Well, it would be lovely! Thanks!

And as to help you: you can use this application as a front-end for apt. I already compiled apt - which downloads and installs all the stuff I compiled and configures them. Now all you gotta do is writing a GUI for it (I was planning to do it myself once all those packages are ready, but any help is very, very much appreciated)

All the available packages lists will be at /data/var/lib/apt/lists/*_Packages (* changes with server name) files, in those formats:

Package : <somename>
Version : <Major.minor.build-release>
Depends (and/or Pre-depends, Enhances, Replaces, Conflicts etc): <something>, <something 2>
Size : <size in KB>
Description: <short descr.>
<long description>

(Note that this is exactly DEBIAN control file format)

APT automagically installs all depended stuff and such. All you have to do is redirect the apt's output to your application. I found some code pieces online which allows you to do that (you can search with "run native executable in android" in google, and you'll find them)

You can also get the installed packages and their status'es in file /data/lib/dpkg/status file, by parsing it as necessary. it's format is exactly same, except it also has a field named "Status:" which shows package status (if installed, or removed successfully and such).

I can send you a few example files if you need.

Thanks a million
[Desire Android Development] Chaosz-X:
Yes please, that would be very nice!
[Desire Android Development] theGanymedes:
There you go. These are just example ones I could obtain from my device; "Debian package guide" pages may contain more info. ..
[Desire Android Development] Chaosz-X:
Thanks!

Oh, and do you still need a host? Me and a friend have unlimited bandwidth/storage on a host, so if you could use that: tell me, and I'll ask my friend if that's ok ;)

Oh, and could you send a ZIP of a folder which contains an apt-repo (just like your packages file says you have one on a local server), so I can work on the app ;)
[Desire Android Development] theGanymedes:
I found a host from a freehosting.org, so I don't need one (at least for now) - thank you.

Too sad that I cannot send you a zip of repo - it's 108 Mb file and my connection is quite crappy; but soon (I presume within this week) I'll open my repo so you can use it.

What causes delay is xorg - for some reason it doesn't start... Once I solve it, I'll upload them all.

(PS: I found the solution for APT thinking system is empty - now it knows that some packages are installed - alas I could only add essential packages (which requires apt to work :) ), for others might or might not be installed. Writing something adaptive would take a lot of time)

EDIT : Scratch that Chaosz-X - I've made a package of it and uploading now. :) You need to set up a web server to your pc and edit your /etc/apt/sources.list file accordingly.

Here you go mate: http://www.multiupload.com/OR23CSCP0H
[Desire Android Development] Chaosz-X:
Thanks! I'll look up the workflow of Apt tomorrow, and then I'll make a basic concept for the application, to start development this weekend.
[Desire Android Development] theGanymedes:
Apt repo is ready!

In one hour, you'll be able to download and install everything that I compiled so far from my APT repository. All you've gotta do is download and install Apt (and its dependencies' recovery zips and install them) and forget about recovery from now on! :)

If you installed apt's newest version; all you've to do is run a terminal emulator (or adb shell) and then type apt-get install <packagename> and all is going to be downloaded and installed - no need for you to track dependencies, apt handles them all! Another good point is: apt detects the packages installed automatically because of dependencies, and can easily remove them with apt-get autoremove when they are not needed anymore!

So, now open a terminal emulator and run "apt-get update". Now you have the latest package info. IF you are using the bash I compiled, you can even write "apt-get install" and press tab key twice to see all available packages - then pick one to install ;)!

To install packages, you're going to write " apt-get install <package>

To remove packages, you're going to write " apt-get remove <package>"

To update package info, run " apt-get update"

and to update your packages automatically when newer versions are released, after updating package info, run " apt-get upgrade"

Easy, ain't it? :D

Enjoy guys!

PS: Xorg compilation has seen a major problem - XKB cannot compile the keyboard keymap for some reason, and apparently there is no way to run Xorg without a proper keymap. Problem seems to be some sort of configuration based thing, but I cannot find it yet -- the reason might be / (root point) being ramdisk in Android, but unsure now.
[Desire Android Development] Chaosz-X:
Any progress on Xorg? Can't wait for it :D

Project Funk, aka apt front-end for Desire is having some issues with the superuser permissions, hope to get them fixed by today.
[Desire Android Development] theGanymedes:
It should use super user anyway - because apt needs it anyway... You can set the suid (and guid) bit with permissions of apt-get binary and then try but I'm not sure if this would work.

Xorg? Well, needs a lot of work there.. Trying different stuff but no juice so far. Most probable cause is desire having not a keyboard and Xorg needs one..

Will work on it tho ;)
[Desire Android Development] rikmer:
Just wanted to let you know that I still follow your project with amazement. Keep up the awesome work.

Had no time to test it further on AOSP.
[Desire Android Development] theGanymedes:
That's OK. Thank you very much.

BTW: Recall that I said Xorg is causing problems and won't be ready soon? F*ck me! A little hint in some deep linux forum led me to solution: Xorg wasn't starting because it was looking for shell command at /bin/sh; whilst it's at /system/bin/sh!

Edited the source code, and voila! I tested Vim and saw the output on phone screen (for only a few seconds, though; Android screen manager refreshed the screen back afterwards :) )

I have a few projects I must deliver (for uni.) but after that, I'll work on this Android-X clash.

Since Chaosz-X will write Funk for us (out installer) we'll be full fledged ready :)

Watch out guys, we're going to rock Android :P
[Desire Android Development] Chaosz-X:
By tomorrow evening, Funk should be able to download the essential packages, and I gathered most of the required information to add the other functionality :)
[Desire Android Development] theGanymedes:
Awesome man! Thanks for all your efforts, I really appreciate this..

May you, after you finish of course, put your source code somewhere (like SourceForge or Github) so I can examine it? I wanna study with it, so I can at least make basic coding for Android :)
[Desire Android Development] theGanymedes:
Any news on Funk ?
[Desire Android Development] Chaosz-X:
I need one ZIP which contains all files to get it working until apt, that means, my list is atm:

apt

crypto

curl

glibc

libreadline

pth

tar

utillinux

zlib

This didn't make it work though, I think I forgot gpg? Because it mentioned something was wrong with a key... And I need 1 ZIP which contains all the files (individual checks about install location should still be done though). I can download all the ZIPs through Funk, but it is a bit unhandy if we have to install them all one by one. One ZIP which contains all the base packages to get it working until apt is what I need atm.
[Desire Android Development] theGanymedes:
Sorry guys, can't keep the thread updated: I have projects for uni. and the final era is approaching, so...

Another sidenote: might need to update every package in repo - formatted the pc and now GPG key changed, has to re-sign everything .. :/
[Desire Android Development] theGanymedes:
And we're back...

I have good news: Xorg is running! Working on some "container" Android app now - not perfect yet; but looks quite promising. Soon I'll start compilation of Enlightment Window manager (thinking them obsolete but now I see, not much actually :) )

Touchscreen library also needs some tweaking first, though ..

Soon I'll update repo completely. All you have to do is just apt-get update & apt-get upgrade. Please note that upgrade process seems like failing; but I'll soon upload a patch to fix this.. The problem is caused by old scripts remounting root filesystem as read-only prematurely - which disallows dpkg to remove a temp file; thus reverting the old files.

So, happy new year you guys ;)