Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,429 Members 54,753 Now Online
XDA Developers Android and Mobile Development Forum

DebiAndroid [WIP] - Debian native/chroot for datamedia Android installations

Tip us?
 
CalcProgrammer1
Old
(Last edited by CalcProgrammer1; 24th May 2014 at 04:14 AM.)
#1  
Senior Member - OP
Thanks Meter 544
Posts: 577
Join Date: Oct 2007
Location: Illinois
Prompt DebiAndroid [WIP] - Debian native/chroot for datamedia Android installations

So I got an idea that I'm working on. I have been using Debian in a chroot on my Note 3 and it's really convenient to have both Debian and Android running side-by-side, but there are some things (mainly hardware/GPU hacking) that work better with a native install of Debian/Ubuntu/etc. On my Note 3 (which uses a datamedia partitioning scheme) I decided to forgo using a loopback mounted img file for my chroot and instead dump the Debian rootfs straight into my /data partition in the /data/debian directory. Why? With this configuration, Android, Debian, and Internal SD all share the same storage partition and can grow or shrink as space allows rather than deal with micromanaging partitions and having to resize. Want to install a desktop environment and delete it later? Go ahead, space allows.

So I decided to reformat my TouchPad with TP Toolbox last night and get CM11 running on it so my Ubuntu partition got wiped. That got me thinking...if I install my datamedia Debian installation, could I then write an init script to boot directly into it from a kernel? If so, the same Debian installation (residing in cm-data LVM in the debian directory) could be used both as a native install as well as a chroot from Android. Awesome!

So that's what this project is, create a Debian rootfs that doesn't require repartitioning, works as a chroot, and works natively as well. I'm calling the project DebiAndroid because it merges Debian and Android. Got some time to work on it over the weekend so hopefully I get something up, but for those who want to do it yourself it's basically just that:

1. Use debootstrap to generate a Debian armhf rootfs

2. Use qemu-user-static and chroot on your PC to install all the packages you want on your rootfs

3. Compress rootfs, put it on TouchPad, decompress in /data/debian

4. Write script to bind system FS entries to /data/debian and chroot in

5. Write init script to boot directly into /data/debian for native use

So far I've been successful at all of these, having a working chroot (with MATE desktop through XServer XSDL app) as well as booting into the chroot (terminal only right now, and USB OTG was broken so I couldn't log in). Hopefully I can get some 3.4 kernel action going as well. I'll update this post once something happens.

EDIT 1: I'm in! I forgot to set a password for root and I don't have any other accounts at the moment, so I rebooted into CM11 and chrooted in, set a password. Also had to disable the ALSA service because there's a missing firmware file that crashes it. Now to get networking up and running, I think I'll just build a kernel locally and modules_install rather than deal with cross compiling.
Samsung Galaxy Note 3 SM-900T 32GB
Samsung Galaxy Note SGH-i717 16GB
HP TouchPad 32GB
Archos 43 Internet Tablet - 16GB + 32GB mSD
Dell Axim X50v - 128MB + 16GB CF
 
CalcProgrammer1
Old
#2  
Senior Member - OP
Thanks Meter 544
Posts: 577
Join Date: Oct 2007
Location: Illinois
Post reserved...
Samsung Galaxy Note 3 SM-900T 32GB
Samsung Galaxy Note SGH-i717 16GB
HP TouchPad 32GB
Archos 43 Internet Tablet - 16GB + 32GB mSD
Dell Axim X50v - 128MB + 16GB CF
 
Atari-San
Old
#3  
Atari-San's Avatar
Junior Member
Thanks Meter 2
Posts: 29
Join Date: Jun 2013
Thumbs up O_O

Man, that sound really great ! I would like to try it and install it as a zip file on another partition. How much space do you need for the root partition with your mate install ? Did you got some problem with the touchscreen sensibility or with bluetooth, wifi, camera, micro or sound not working ? I guess i could try one with Gnome 3 on my side. Thank in advance for your reply.
 
CalcProgrammer1
Old
#4  
Senior Member - OP
Thanks Meter 544
Posts: 577
Join Date: Oct 2007
Location: Illinois
Right now it's only working in chroot, so Android is providing the X-server and touchscreen and everything else. I'm trying to get the kernel 3.4 to boot it outside of Android.
Samsung Galaxy Note 3 SM-900T 32GB
Samsung Galaxy Note SGH-i717 16GB
HP TouchPad 32GB
Archos 43 Internet Tablet - 16GB + 32GB mSD
Dell Axim X50v - 128MB + 16GB CF
 
Atari-San
Old
#5  
Atari-San's Avatar
Junior Member
Thanks Meter 2
Posts: 29
Join Date: Jun 2013
I hope you can do it. ^_^ Maybe I will try to find a way to make it work with Arch Linux with your kernel if you succeed to this project.
 
Atari-San
Old
#6  
Atari-San's Avatar
Junior Member
Thanks Meter 2
Posts: 29
Join Date: Jun 2013
So finally, one month later, did you succeed into making Debian work for the Tenderloin ?
Device i own :
-HP Touchpad (aka Tenderloin) : 4.4.2 Kitkat JCSullin build
-Samsung Galaxy SII LTE Skyrocket (aka Skyrocket) : [Reported Stolen/Lost : At the Police as Evidence for Fraud again the Seller, RIP]
Tags
android, chroot, datamedia, debian, linux
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Easily Combine Text and Manage Your Android Clipboard with StuffMerge

Android clipboard management has always been impractical without the … more

Pale Moon Browser Ported to Android

Having a wide choice of third party applications is one of the most beautiful things that Android has to … more

Partial Android Wear Source Uploaded to AOSP

2014 is certainly shaping up to be theyear of the wearables. And thanks to its innovative … more