yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] rikmer:
Got it working somehow. Don't know exactly how but fixed permissions via recovery and afterwards mounted /sd-ext writeable via ES File Explorer. Doesn't really explain why it works now. But it did.

I know you are explaining that apt has to be installed before dpkg but DesireAPT always tried to install apt beforehand. Don't know again if this explains why every other installed failed too ... just wanted you to know.
[Desire Android Development] theGanymedes:
I might have made a mistake in a script - may you please remount your system partition as read/write and try again? I think I forgot to add that line to the developer script.

You can do it as follows:

mount -o remount,rw /system
[Desire Android Development] theGanymedes:
Good that it sorted. Note that, that order is only for recovery zips. DPKG handles all the packages correctly, so don't mind the order of packages when using apt-get. This is one of the reasons I choosed to distribute the packages in deb format ;)
[Desire Android Development] theGanymedes:
EDIT: Oh, so the problem wasn't the script.. Well, the apt is adding some small files to system partition to make bash completion work - the failing file was that one.

I'm going to copy the working links for DesirAPT and LinuxInAndroid to the front page.
[Desire Android Development] theGanymedes:
BTW: Freehosting bandwidth limit is approaching to its limit: it's at 96%. So, if you start to get errors related to it, wait till the next month :D

During this time, I started to make a webpage for all the stuff and the documents I prepared (with some more to add).

See you around!
[Desire Android Development] rikmer:
The LinuxRunner.apk somehow replaces DesireAPT.apk. So it is not possible to have both installed at the same time.
[Desire Android Development] Parastie:
Hey did you guys see this?

http://www.theverge.com/2012/2/21/2812424/ubuntu-for-android-hands-on
[Desire Android Development] theGanymedes:
Weird. Let me see that.

EDIT: Oh, stupid me: forget to rename the package name! Fixing it right now; redownload please in 10 mins.

Uploaded fixed version. Please uninstall and reinstall the DesirAPT (or otherwise LinuxInAndroid will replace DesirAPT).
[Desire Android Development] theGanymedes:
Guys, I'm sorry that I didn't publish those before but I was apparently forgot to document them, then forgot about those:

1- When installed E17 freshly, touch screen needs calibration; to do this, you need to invoke "ts_calibrate" command. I'll soon update the package so it'll be "pre-calibrated"; but you don't have to wait for me.

2- E17 might not run, because of fontconfig mistake I did - to solve this, either change the fontconfig file manually; or wait for the "2.8.0-3" version of the fontconfig package.

Manually editing is easy: all you have to do is to change line

<dir>/usr/share/fonts</dir>

with

<dir>/data/share/fonts</dir>

in /data/fonts/fonts.conf file
[Desire Android Development] animehq:
509 Bandwidth Limit Exceeded

Website bravo-apt.host.org has exceeded it's bandwidth limit. If you are the owner of bravo-apt.host.org, log in to members area and request upgrade.

:eek: :(
[Desire Android Development] theGanymedes:
Well, this means that free domain is reached to 1GB bandwidth limit, so it shall be offline till the end of the month :( Sorry...
[Desire Android Development] animehq:
Anyone to put the files in an other place please ?
[Desire Android Development] rikmer:
Hey TheGanymedes,

as my phone again is quite unstable using ownhere data2ext I wonder if there could be a solution where only your files are on an EXT-partition, leaving the rest alone. So that it also would work with only app2sd or dalvik2sd.

Perhaps my question is stupid again.

I also wonder if you really don't have any problems at all. If I remember correctly you are also using ownhere data2ext. (Do you have a swap partition?)
[Desire Android Development] theGanymedes:
Yeah, you're right: I'm also using Ownhere's algorithm myself, but without swap option - I have only 2 (including FAT32, 3) partitions on my sdcard - so my layout is FAT32-EXT4-EXT4. I personally don't see the necessity of swap partition at all - Android does manage RAM quite nicely already.

About using EXT only for my stuff: well, this would require a lot of editing in the scripts, becuase I'm using the algorithms themselves to identify them - how can I identify them if there were not to present themselves, right?

Weird is, I'm using this Data2SD solution for some time now, and except the times where phone "died out of very low battery", I had never lived any stability issues.
[Desire Android Development] theGanymedes:
The great finale?

Well, it's been 2 months since the last update at the project... Well, I can't lie about that: I don't develop much about this project lately, since it requires a lot of time..

So, are we going to abandon the ship? Well, I don't think so. Because of this, I'll do a massive give away from my website (bravo-projects.info) soon: I've started to compile all the CONFIG lines (the lines that are used to call ./configure while compiling the stuff) in files, and soon I'll give them to you!

What does this mean? This means that you'll be able to compile your stuff for your devices as well, and hopefully this will make this small project of mine extend to the other devices than HTC Desire too!

It'll take some time, but, soon; it'll be there :)

Thank you everyone for your great support.

(NOTE: I'm NOT planning to give you support for those files, let me tell you this from the start ;) )
[Desire Android Development] ggolemg:
Please don't think that people aren't still interested in this, we are.

Once you have made this available to other devices, I believe we can start making some android/your stuff hybrid roms.

I don't know what the most wanted linux packages are, aside from base packages, but maybe focus on those to get people interested.

It always seemed like you were almost hiding in this corner of xda. A project of this scope should be out in front, leading the pack. You have done some amazing things with this.

Keep up the great work.
[Desire Android Development] theGanymedes:
Thank you very much. I actually want this to reach beyond the scope of Desire but since it's the only device I have; I cannot make recovery scripts for other devices. Actually, once installers are set; there are not big differences about the other stuff (maybe Xorg drivers can be modified, but that's not a big deal I think).

All I need is some time and a helping hand about the other devices- I recieved many PMs from Samsung Galaxy users for instance. I hope once I give the configs away, more users will be able to create those stuff. We can gather them all together and distribute over APT - I recently learned that Jailbroken iPhone's use this idea in their market app, too! (cynthia or something)

The only problem now is the initial install. After this, APT can handle everything in a device-agnostic way anyway.

If I can get to find some time, I'm actually planning to make instructional videos about those stuff. After all, seeing is better than just reading :) - That have to wait though :)
[Desire Android Development] Nemesis1278:
This sounds interesting. From what I read this runs linux within android. Or linux apps within android. This does sound like it could be useful. I know ubuntu is working on a project where linux and android are running side by side. Perhaps this can be ported to be used on hd2 android.

sent from my HD2 with Dungphp Runnymede
[Desire Android Development] 白い熊:
Please, someone, can you upload the glibc zip anywhere, bravo-apt is not functional.

This is sorely needed...

Anyone?
[Desire Android Development] MetinKale38:
Where i can find packages to install? May just normal debian arm packages?
[Desire Android Development] svs57:
sorry
[Desire Android Development] whitedavidp:
Any "Fixes" For Android Differences?

Hello, I stumbled into this thread looking for an alternative to static linking glibc. Super interesting. The app I am trying to run (heyu) works at least partially that way. But I have since discovered, by looking at glibc sources, that glibc presumes several things about its running environment that are NOT true on Android. One example is the system() call. It seems to expect /bin/sh to exist. On Android it is located elsewhere. So calls to system() don't work as expected. Another fairly major difference that I have encountered in my limited poking-around is the handling of timezone information which glibc expects at a given location and in a given format. Under Android the timezone info is located elsewhere and in a totally different format. Has this project dealt (or even tried to deal) with issues like this? Thanks.
[Desire Android Development] Edge-Case:
Has anyone tried compiling Android itself against embedded glibc?

As in, get rid of bionic all together.

I'd imagine a lot of changes to Android's calls to C based code may need to be tweaked to fit glibc, but at least you don't have to reinveent the Linux wheel, and C++ exceptions would be naturally supported and all. The end result of what I am talking about woud be a ROM without bionic, running on embedded glibc instead.

Has that ever been done?

---------- Post added at 07:43 PM ---------- Previous post was at 07:24 PM ----------

What I do to compile and run Linux on my phone is this...(this could be turned into a script or edited into Androids build process, I do the later)

1) Get a Linux (though we will NOT be chrooting) chroot image of you favorit flavor, mine is a custom Kali Linux image made by me.

2) Create a list of directories in Androids Root, and a list of you Linux's root directory contents. Compare the two and note which ones exist in both. These will conflict in some way and need to be handle specially in step 5

3)Create empty directories of the ones that only existed in Linux "/" directory in Android's "/" directory, this is usually "/bin, /usr, /var, /lib ....")

4) mount the directories from where Linux is to Android, ie if you have the Linux on an image, where ever you mounted it to from there to "/${dir}"

5) Copy the contents from /sbin/* to ${LINUX}/sbin/, ie to the image, it will say something about files not existing, this is because of the links, everything is fine don't worry. then mount ${LINUX}/sbin to /sbin. Just make sure it containts adbd watchdog etc, etc..

6) /etc and /system/etc: "busybox cp -ai ${LINUX}/etc/* /system/etc/" copy the contents of your linux's /etc folder to /system/etc/, /system/etc is sym linked to /etc.

7) Handle any other directories that existed on both systems with care relative to the situation

8) Adjust your path to include /bin /usr/bin /usr/sbin and all that set up you enviroment experiment, try the Linux bash, try Android's bash, figure out what works. I always compile and apt-get with /system/bin and /system/xbin at the end of my path, but note that this breaks some android programs and vise versa,

Most things work using this method, the kinks can get worked out if anyone planes on using somethiing like this on a day to day bases.
[Desire Android Development] 白い熊:
I have been using GNU tools under Android 4.1 natively (without chroot) with glibc extensively.

Now, as of Android 4.3 and later, with Google's stupid SElinux implementation, they have thrown a huge stick in... Any device or dir can be mounted, but it's not accessible to any user outside a root, which is super dumb... But creating immense problems...

This even with a custom kernel, with SElinux set to permissive...

I'm scouring the forum for a solution on how to overcome this, without jumping through hoops with the debuggerd method...
[Desire Android Development] theGanymedes:
Today, I realized that I'm nearly compiling every major part of a linux system... Maybe, as a next step, I should find a way to write a modified boot image, which can dual boot a system. I already found such a project (linux loading linux) but I need to make manipulations that will allow user to select the image (ROM?) he/she wants to load. That shouldn't be hard, because new kernels support command-line parameters to partitions to be used.
[Desire Android Development] Droidzone:
Hey there...sorry about making you feel like dictating an autobiography! :D

Was a bit engrossed in my rom project-debugging java vm bugs is boring..

I'd like to ask advice regarding a project I was trying to compile earlier..It's probably simple for you. I'm not well versed with the make on linux/android, though I'm fast learning. Compiling kernels is ok, but I was kind of stuck at compiling dosfstools for Android..

Could you tell me the cmd line make options to make it statically and dynamically linked to libs so that it runs on Android..

I was trying the plain make, like

make ARCH=arm CROSS_COMPILE=/home/droidzone/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-

It compiles well of course, but fails to run (naturally :) )..
[Desire Android Development] theGanymedes:
You shouldn't give full path to the CROSS_COMPILE parameter, that might cause you problems. Instead, set your path variable to your toolchain directory and then just write the prefix (like "arm-linux-" if your toolchain starts with ARM-linux - note the hypen there, its not a typo) .

Also, you should use --host commandline in your configure line --host=arm-none-linux-gnueabi to make your box configure itself - then you can just write make; it'll handle everything itself

EDIT: I'm about to finish Xorg.. I can take a look at dos2linux tools for you then ;)

As a side note; God, how much I hate those VM languages.. How can someone even call a struct "language" when there is no "pointer" in it :P :)
[Desire Android Development] theGanymedes:
Also, don't use arm-eabi toolchain, for since it can only be used to build bare-metal binaries. Your utility most probably needs a shared library support or such, so use arm-linux-androideabi instead (also comes with ndk)... or better: make your own - I have the instructions at the first page ;)
[Desire Android Development] tajimura:
Following the thread for about a month or so, and what can I say - you really rock, man! Who knows, may be based on this, one day I will have on my phone all that mathematical apps, that are the last chains linking me to a computer ;-)

Sent from the Warp using whispers of Tzeentch.
[Desire Android Development] Droidzone:
lol... I know. Trying to take one step at a time.. :D Thanks a lot, going to try it.
[Desire Android Development] theGanymedes:
I compiled dosfstools today, it was quite simple actually :) All the code you need is :

[B]CC="arm-linux-cc" LD="arm-linux-ld"[/B] AR="arm-linux-ar" RANLIB="arm-linux-ranlib" [B]AS="arm-linux-as"[/B] PREFIX=/some/folder/you/want/binaries/put [B]make[/B]

PREFIX=/some/folder/you/want/binaries/put [B]make install[/B]

NOTE: Don't forget to change your path to your toolchain and use proper prefix..

However, I noticed that these binaries use LibC and LibGCC shared libraries dinamically, ergo if you didn't install these from my packages, they're not going to run. Also, they're not going to run if you need them in init level. So, I recommend you to do "static" compiling, if you intended to use them in init level.

Then code becomes this:

[B]CC="arm-linux-cc --static"[/B] [B]LD="arm-linux-ld"[/B] AR="arm-linux-ar" RANLIB="arm-linux-ranlib" [B]AS="arm-linux-as"[/B] PREFIX=/some/folder/you/want/binaries/put [B]make[/B]

PREFIX=/some/folder/you/want/binaries/put [B]make install[/B]

Note that, you can also use "arm-linux-strip" (or whatever your toolchain prefix is) to strip them from debug flags to make them even smaller.

If you're too lazy to do this (:)), look at the end of post ;) (Not that I didn't put share/man pages into zip - I'm 100% sure you're not gonna use them :P )

Thanx for your interest in my project.

NOTE: I made zip under Linux, so you might miss some linkages when zip extracted. If this is the case, you must simply link

ln -sf dosfsck fsck.msdos
ln -sf dosfsck fsck.vfat
ln -sf mkdosfs mkfs.msdos
ln -sf mkdosfs mkfs.vfat
[Desire Android Development] theGanymedes:
It wasn't clear what I meant by init level I think: if you need them before init.d scripts running (before linkage of /lib to /data/lib); they're not going to run. You're free to use them at your init scripts freely (for since the libraries become ready to use at /lib folder then - ramdisk makes the necessary linkage long before that).

Also, you can check the dependencies of your binaries with arm-linux-readelf (change prefix accordinly, of course) command by saying

arm-linux-readelf -V <some binary or library>

You can also check which platform it's built for with "arm-linux-readelf"

arm-linux-readelf -A <some binary or library>
[Desire Android Development] Droidzone:
You're amazing..I haven't had that clear response from any of the Rd :)

TouchPal-d from my Desire running Starburst Classic Rom - 450 apps and counting. .
[Desire Android Development] theGanymedes:
Thanks man. BTW: The zip file I put carries the binaries which are statically built - not dynamically - which makes you run them anywhere you want. The post above (init level stuff) only applies to dynamically compiled stuff.
[Desire Android Development] Droidzone:
Tried running them..and it works. Spent half a day googling stuff to get that done a month ago, and still couldn't.. Now i'm free to build my automatic file system recovery scripts I had in mind. :)

I'll be crediting you in my blog too.

TouchPal-d from my Desire running Starburst Classic Rom - 450 apps and counting. .
[Desire Android Development] theGanymedes:
I'm glad that it work'd.. Actually, I was thinking that, maybe you and I should sometime work on ROM's as well - I have crazy dreams about having a nice Linux/Android hybrid ROM (or dual boot one). You're a nice ROM developer (used your Starburst for sooo long :) ) and well, I'm a humble linux-C/C++ developer, so could be fun to do it ;)
[Desire Android Development] Droidzone:
You did? I'm honored. :)

It's a great idea..I do plan to turn to aosp soon after some scheduled exams due in Jan-Feb. But I'm a humble ROM developer. ;) I'm good at bash scripting, decompiling and fixing apks, and coding in vb..but a baby at c/c++... Aosp needs both, so it would be very productive. :)

TouchPal-d from my Desire running Starburst Classic Rom - 450 apps and counting. .
[Desire Android Development] theGanymedes:
You kiddin? I even donated to you :) ;)

Well, I hate VB, not good at Java but very well at C/C++ and C#... The thing is, I never checked Android system or tried to write an APK package myself - so I'm not good at Android system at all..

Take your time, man, I don't have a time in my mind as well - I need to learn more about a Linux system before I can make it run flawless I think.

The thing that drove me to this point is: I saw some scripts, program codes and such of people who wrote those and most of them were just really messy or very badly written - shows that most of the people who develop those weren't very "expert" programmers at all - so why shouldn't I keep myself away from what they do? Who knows, maybe I can do better? I'm already attending to Operating System Design courses at my college, for instance, and I'm sure I'll be very well prepared for it in time :)

Hope to hear from you again, let's keep in touch - I'm always at XDA these days :)
[Desire Android Development] Droidzone:
Sounds great! Will definitely keep in touch, and continue picking your brain ;)
[Desire Android Development] Droidzone:
Bugs

I still got some issues, even after almost copy pasting your simple instructions, lol

droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ CC="arm-linux-cc --static"
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ LD="arm-linux-ld"
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ AR="arm-linux-ar"
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ RANLIB="arm-linux-ranlib"
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ AS="arm-linux-as"
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ PREFIX=./
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ make
cc -g -O2 -static -c -o dosfsck.o src/dosfsck.c
cc -g -O2 -static -c -o boot.o src/boot.c
cc -g -O2 -static -c -o check.o src/check.c
src/check.c: In function ‘auto_rename’:
src/check.c:356:2: warning: format ‘%07d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
src/check.c: In function ‘check_file’:
src/check.c:576:4: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘long long unsigned int’
cc -g -O2 -static -c -o common.o src/common.c
cc -g -O2 -static -c -o fat.o src/fat.c
cc -g -O2 -static -c -o file.o src/file.c
cc -g -O2 -static -c -o io.o src/io.c
cc -g -O2 -static -c -o lfn.o src/lfn.c
cc dosfsck.o boot.o check.o common.o fat.o file.o io.o lfn.o -o dosfsck
cc -g -O2 -static -c -o dosfslabel.o src/dosfslabel.c
cc dosfslabel.o boot.o check.o common.o fat.o file.o io.o lfn.o -o dosfslabel
cc -g -O2 -static -c -o mkdosfs.o src/mkdosfs.c
src/mkdosfs.c: In function ‘get_list_blocks’:
src/mkdosfs.c:507:14: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
cc mkdosfs.o -o mkdosfs
droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$

droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ echo $PATH
/home/droidzone/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/droidzone/scripts:/home/droidzone/android/sdk:/home/droidzone/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/arm-eabi/bin/:/home/droidzone/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin:/home/droidzone/android/sdk/tools:/home/droidzone/android/sdk/platform-tools::/dzbin

droidzone@ubuntu:~/android/dosfsck/dosfstools-3.0.9$ file dosfsck
dosfsck: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped

I'm using the android NDK r4

The final file still gives the cryptic error message:

sh-3.2# /system/bin/dosfstools/dosfsck
/system/bin/dosfstools/dosfsck
sh: /system/bin/dosfstools/dosfsck: cannot execute binary file
[Desire Android Development] theGanymedes:
You should use your own prefix, ARM-linux is mine :) you should use "arm-eabi" or "arm-linux-androideabi"...

Your mistake shoes itself in "file" command, look at there: it says I386 which is an Intel CPU- it will write ARM there when you actually cross-compile..

I think make couldn't find ARM-linux stuff, so fell back to the gcc :) change that and post again, will you?
[Desire Android Development] eXDee:
It would be quite cool to be able to run a variety of Linux apps natively on android. As for booting up a whole separate OS, i believe people have got this kind of thing working already? Or did i miss something?
[Desire Android Development] theGanymedes:
I saw one project but the booted OS was quite crippled: no wifi, no sound, no trackball ... So it was basicly just phone..

I have higher dreams ;)

This is actually also for making a hybrid Android/linux actually - to see their differences to merge them into one ;)

BTW, apropos, Xorg already became ~190MB :S I can't exclude modules because some modules need one another and it's quite complicated job to analyze them all now :)
[Desire Android Development] Droidzone:
My prefix is arm-eabi- but is seems that even though I repeated the above steps with this as prefix, the compiled file is still built for Intel. Desperate, I finally deleted gcc from /usr/bin :) But then it seemed to fall back to cc and reported that cc couldnt be found. Crazy stuff..

Finally, put reinstalled gcc...

By the way, I dont have arm-eabi-cc