• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Linux chroot in Android - Kernel/ROM supporting swap

tovida

Newbie
Hey, guys! First I want to thank all of the wonderful devs in the forum who have helped me to fully use my phone in any way I would like. This is my first tread in the forum. Up to now, I tried to find what I need in the existing treads and that worked well for me. However, I am nearly certain, that there is no tread on the question I am concerned about.

About the ROM

I am currently running BobZhome CM7, release from 02/02/2012, kernel 2.6.32.9-v10, overclocked on about 787Mhz. I recently updated from one of his older releases from last year and I am having some problems with the new release. However, they are not what I am most concern about because as I am going to tell you, I am doing some pretty sick tings with it. Thus, I am not entirely sure how many of the bugs come from BobZhome's new release of CM7 and how many of them are actually caused by what I making my phone do. One of the questions that are going to arise in your mind is probably, why in the world would I want to do such a things. Well, my answer may not be quite satisfactory - just because I can.

ROMs, Bricking, Unbricking and Linux chroot

So here we go. One of the main reason that I rooted my phone in a first place is that once I learned that Android is Linunx based system, I was tempted by the idea to run a fully functional Linux OS on the phone. I downgraded, rooted my phone, switched ROMs few times, bricked my phone. fixed it...with few words I had a lot of fun and my girlfriend nearly kicked me a lot of our apartment for ignoring her and everything around me :D! After I settled down with a new ROM and unbricked phone I tried to use this tutorial first:
How to Install Ubuntu on Android! | Android+Linux=AndroLinux.
It was successful but in the end after reflashing my phone few times I settled down on using the Linux Installer from Android Market just because it makes the process somehow easier. Well everything was good up to there. After I successfully ran debian with lxde on the phone I forgot about it with the pleasure of well done job.

Some more control and options for the Linux environment


Recently my passion came back again and I started playing with the phone again after the new update from BobZhome. I reinstalled the Linux again few times, changed some options, learned all kind of new things about Android, Linux and GUI and in the end installed Debian in a 4GB chroot on my phone without any additional extras from the Linux Installer package. I installed any additional application trough the terminal including few windows managers and GNOME for desktop environment. Playing around with the startup files of VNC viewer I can currently start the linux just in the terminal and then open a windows manager or a desktop environment of my choice. I also installed VNC viewer and Xming+Putty (for Windows 7) so I can have another way to control the Linux environment from my computer except adb. I also just found some apps from the Android Market which should do the work of X server; I am still not sure how well do they work.

The Question

And now to come back to my actual question. The main reason for me to want to run Linux on my phone was to be able to run some C++ and fortran codes directly on my phone. That was before I found the C4Droid application from the Android Market which does the same job without actually installing Linux OS but instead compiles inside the android itself. However, I was already to much involved with the Linux chroot method and to be honest it may sound stupid to someone else, but it is really cool to have a fully functional computer OS on your phone. So I kept digging. I currently have both gcc and gfortran installed in my Debian. They seemed to work fine on simple codes that I have. However, when I tried to run some heavier codes on the c++ compiler I got out of memory error. Btw, the same code runs well on C4Droid, so I guess it takes a little bit more resources to run it from the linux chroot; and even though, I can simply run the code on C4Droid, I would still like to be able to compile it in the Linux chroot after all of the efforts I put in actually creating the chroot and customize the Debian OS. So I read some forums and I think that the only think I can do is to install some swap on my phone (I obviously can't increase the actual RAM of the phone). I tried to do that in the linux chroot by creating a swap file but I got a message that my system does not support such an option. I also tried the swapper application from android market but it did not work. I have a swap partition together with my Ext3 partition for A2SD (I have a 16GB SD card). However, I am not sure how the system uses it. Is there any developed Kernel or ROM (with the appropriate Kernel) that would have a swap support and will that make my phone run more fluently and hopefully allow me to run my c++ codes in the linux environment? Or will I have to switch to a new phone with a better hardware.

Concluding comments

I am, or at least was a newbie both in android and linux when I started playing around with my phone, so I would understand if some of my methods and questions sound stupid to people who actually understand what they are doing. I just think that I have a peace of hardware and if I learn more about what how my phone, Android and Linux works, I should be able to do anything with it. I would appreciate any advice and I am ready to write some tutorials on the things I did if someone is interested; in the best of my knowledge there are no threads about running Linux on LG Optimus M.
 
well there is my guide in my signature that has most of the files needed for wifi, bluetooth, radio, gps, and for it to actually boot on the M.....it may or may not work with what you are trying to do...it's mainly to port Optimus ROMS...but try it and see if you get it booting :D

EDIT: I wasn't sure what you were trying to do after the first time I read it, I read it a second time and now I see this is unrelated to what you want...
 
Back
Top Bottom