[Q] Development in VM? - Nexus 7 Q&A, Help & Troubleshooting

So, I just had to wipe my laptop. Clean install of Windows 7 Home Premium. Was wondering, now that I'm running with a clean slate, should I run a Linux VM for my Nexus 7 development? Would that be conducive to a better, more comprehensive development environment? Would I be better off just using ADB and Eclipse in Windows? If a Linux VM is preferable, is there a particular distro that is preferable? I've heard most of the dev tools are made with Ubuntu in mind, but I want to make absolutely sure of this before I make the jump to dev in Linux. Another solution which is less preferable, all things considered due to the repartitioning involved, but probably better in the way of integration with hardware, would be to set up a dual boot with Win7/Linux...what do you all think?
tl/dr; wiped my hard drive, I want to know what works best for development.

ikoniq said:
So, I just had to wipe my laptop. Clean install of Windows 7 Home Premium. Was wondering, now that I'm running with a clean slate, should I run a Linux VM for my Nexus 7 development? Would that be conducive to a better, more comprehensive development environment? Would I be better off just using ADB and Eclipse in Windows? If a Linux VM is preferable, is there a particular distro that is preferable? I've heard most of the dev tools are made with Ubuntu in mind, but I want to make absolutely sure of this before I make the jump to dev in Linux. Another solution which is less preferable, all things considered due to the repartitioning involved, but probably better in the way of integration with hardware, would be to set up a dual boot with Win7/Linux...what do you all think?
tl/dr; wiped my hard drive, I want to know what works best for development.
Click to expand...
Click to collapse
If you're serious about development, I really recommend dual booting. If you just want to try it out then use a VM and then if you don't like it just delete the VM.
For the Linux distro I recommend Ubuntu or Linux Mint. They're both very easy to use.
Sent from my Nexus 7

veeman said:
If you're serious about development, I really recommend dual booting. If you just want to try it out then use a VM and then if you don't like it just delete the VM.
For the Linux distro I recommend Ubuntu or Linux Mint. They're both very easy to use.
Sent from my Nexus 7
Click to expand...
Click to collapse
Thanks. I just like...I've wanted to get into dev for a while, and I just couldn't stand the workarounds and **** required for Android development in Windows. I know to build Android you have to be running Linux, and many of the guides are written taking a standard install of Ubuntu into consideration. I'll probably just start out with apps since most of my experience is in Java, maybe once I sharpen my skills with C I'll start into working on ROM mods and stuff. All I have to say is thank FSM for the AOSP.

I run VMware on Vista 64 (well I like vista) and I have a variety of Linux systems defined. Android, Rails, Reprap, etc. All Ubuntu 12.04 LTS.
This works well for me. Android on native Windows was unusable.
And I really like Eclipse for an IDE.
Works well with the Android SDK and NDK.
Sent from my Nexus 7 using xda app-developers app

Related

Ubuntu or Windows 7

Which one do your prefer & why?
Sent from my SGH-T959 using XDA Premium App
Mac OSX. Why? Because i have a Macbook Pro and it comes with Mac... ;D
Windows.
it runs OSX, and UBUNTU lololo
xriderx66 said:
Windows.
it runs OSX, and UBUNTU lololo
Click to expand...
Click to collapse
What are you talking about?
OS X. Why? Because even if it wasn't "ment" to run on my pc, it still does. Plus windows just sucks.
All nonsense and misspelled words courtesy of my unsupported samsung device.
I believe he ment he had a non apple pc and he probably hackintoshed it.
All nonsense and misspelled words courtesy of my unsupported samsung device.
why not both, i used to run win 7 and kubuntu (ubuntu with kde) for a while, ive since reverted back to win 7 after i effed up the linux partition. If you are a gamer like me you must have win7, other wise if you just want something simple ubuntu.
I have a laptop running the latest unbuntu because windows became so corrupted that it wouldn't install and the cd drive does not work. I know i can dual boot unbuntu with windows installed can I do the same if unbuntu is the primary OS? If so how? I would be installing from usb.
I love Arch Linux, but Ubuntu between your choices.
It's smooth, customizable, fast, and I love linux
Both suck. I used to use Ubuntu before 11.04 came along and introduced that blasted Unity shell. Now I'm using Fedora 15 and I love it. I still have Windows 7 on dual boot, but I rarely ever use it unless I have to.
audifanatic518 said:
Both suck. I used to use Ubuntu before 11.04 came along and introduced that blasted Unity shell. Now I'm using Fedora 15 and I love it. I still have Windows 7 on dual boot, but I rarely ever use it unless I have to.
Click to expand...
Click to collapse
You can use gnome as default, just log out and pick gnome as your session. Unity isn't required.
r6kid said:
OS X. Why? Because even if it wasn't "ment" to run on my pc, it still does. Plus windows just sucks.
All nonsense and misspelled words courtesy of my unsupported samsung device.
Click to expand...
Click to collapse
That would be spelled "meant" it must be the phone....
I'll take a shot at personal taste though, I actually like both, I dual boot Ubuntu and Windows 7 custom (my own set up of Windows 7) because if your into anything that involves development on anything you want the best with the most support. Ubuntu's community is unmatched and if your going to help others you need to be able to be flexible and know what your talking about when it comes time too.
If your going to be involved you need both no matter how you cut it, have the best of both and work with it as others will expect nothing less.
i dual boot win7 and ubuntu at home and use fedora and win7 at work.
i tend to prefer linux because i like the virtual desktops to minimize distractions, and writing code is much better in linux. but i need win7 for games, netflix, visual studio, etc. what i dislike about linux is the amount of maintenance it requires. every time i update the kernel on my home machine it kills my ati drivers and is generally a pita. sometimes when i go to work on something in linux i find myself spending half an hour or more on os maintenance. and unity is crap, gnome3 for ubuntu is crap, so i'm still booting to 'classic' in 11.04.
windows 7 is great i havent used ubuntu or linux in a while and i think im going to start to maybe today
Both.
Though I am forced to use Windows since my graphic tablet does not work that well on Ubuntu.
I hate windows, though.
And Macs are far too expensive just to do the same blasted crap as a normal PC... WITHOUT AS MANY GAMES.

What Linux Distro prefered for Linux Developers Edition?

I have considered building another Linux Developers Edition but possibly using Ubuntu for the base distro. What would you like for the base distro? How about apps for making your development more productive? Just remember, afa apps, the iso will increase with added apps so it needs to be something you absolutely can't live with out. Also, I began to make my own dev distro after having to re-install all my stuff for compiling or customizing roms after changing pcs a couple of times and now think it would benefit most.
Treken said:
I have considered building another Linux Developers Edition but possibly using Ubuntu for the base distro. What would you like for the base distro? How about apps for making your development more productive? Just remember, afa apps, the iso will increase with added apps so it needs to be something you absolutely can't live with out. Also, I began to make my own dev distro after having to re-install all my stuff for compiling or customizing roms after changing pcs a couple of times and now think it would benefit most.
Click to expand...
Click to collapse
Debian base, xfce desktop environment(lightweight), include java6 jdk, eclipse, android SDK, and all prerequisites from aosp site. Gimp for theming.
Sent from my ADR6300 using XDA App
I'll consider it. Currently I have Linux Mint gnome desktop with everything you mentioned to include and it works nicely.
tcberg2010 said:
Debian base, xfce desktop environment(lightweight), include java6 jdk, eclipse, android SDK, and all prerequisites from aosp site. Gimp for theming.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
I like the above suggestions
Sent from my ADR6300 using Tapatalk
I'm looking at linux mint xfce which is debian based and of course xfce ui.
I would recommend tossing this into /lib/udev/rules.d/.
Its the android rules file for the dinc.
tcberg2010 said:
I would recommend tossing this into /lib/udev/rules.d/.
Its the android rules file for the dinc.
Click to expand...
Click to collapse
I think I can manage that
currently running Debian gnome is xfce really that much better???
mr.marcus said:
currently running Debian gnome is xfce really that much better???
Click to expand...
Click to collapse
It's a lot less resource hungry. It uses far less ram which lends to more ram for your apps to run on. I'm trying to get linux mint xfce to work. So far I managed to install everything needed to compile and dev, but remastersys isn't fulling installing. I use remastersys to create a live cd image but since it won't install I may be trying another rout.
Ok, almost done with the new dev kit. It's Debian base with XFCE as the desktop. It was a real tuffy trying to get all the tools installed, but I did. Debian Squeeze and XFCE4 combo was a challenge. I built it, for the most part, from scratch. Just finishing up on customization.
CAN'T WAIT!!! (said like Bart Scott) lol
Sent from my ADR6300 using XDA App
tcberg2010 said:
I would recommend tossing this into /lib/udev/rules.d/.
Its the android rules file for the dinc.
Click to expand...
Click to collapse
This is for adb, right?
Yea, it allows adb to recognize your phone. it's only for the Droid Incredible though. I think you could find a rules file for all phones on rootzwiki. Permissions need to be set chmod a+x.
Sent from my ADR6300 using XDA App
I have something better. It recognizes all phones. It works great.
Have some good news and bad news. Good news is that I finished the iso. Bad news is that it's actually larger in file size than the gnome dev kit. Hmmm...scratching my head on this one. I need to make it small enough to fit on a cd/pen drive. Don't give up just yet. Possibly considering lxde ontop of Debian.
Treken said:
Have some good news and bad news. Good news is that I finished the iso. Bad news is that it's actually larger in file size than the gnome dev kit. Hmmm...scratching my head on this one. I need to make it small enough to fit on a cd/pen drive. Don't give up just yet. Possibly considering lxde ontop of Debian.
Click to expand...
Click to collapse
I have a buddy who just tackled a similar project. He didn't do a devkit but just wanted his desktop and software pre-installed. He decided instead of rolling his own distro he would use the Debian installer and rebuild the iso. You can get his script and info here....
"http:"//schlutech.com/2011/07/the-debian-install-process
I have under 8 posts so in order to get the url above I added some quotes around the http:.
See if any of his stuff can help you with your project.
Hope this helps you.
z
Thanks! I think I finally got it. It's under 1 gig now but I neg to trim off some more fat to get it small enough to fit on a cd/pen drive
Hrmm...
You're looking for out of box specifically? You could try modifying Gentoo's CDs to fit your bill. I'm still working on getting Gentoo into a successful install though.
Wanted to use dsl but no 64 bit distro
I created a debian-based xfce-desktop distro with dev tools (devkit v1.3) from scratch. I will make a formal tread when I can. Here is the un-official link:
====> http://dev-host.org/r5ziempnn0nq/grpdevkit_1.3.iso <===
Enjoy!

Is it possible to natively run Linux rather than on top of Android for Nexus One?

I've bought a new phone however I do not want to waste my Nexus One. The idea came to my mind firstly was to make it a small 'server' running at home.
Technically I bet it's possible however I don't have a clear path to do that... I've googled for a while and I saw a lot tutorials about how to run Ubuntu on top of Android. However what I want is to get rid of Android and run Linux directly on the hardware.
I think that should have been done by some guys... any help thanks in advance!
zhangxiao83 said:
I've bought a new phone however I do not want to waste my Nexus One. The idea came to my mind firstly was to make it a small 'server' running at home.
Technically I bet it's possible however I don't have a clear path to do that... I've googled for a while and I saw a lot tutorials about how to run Ubuntu on top of Android. However what I want is to get rid of Android and run Linux directly on the hardware.
I think that should have been done by some guys... any help thanks in advance!
Click to expand...
Click to collapse
IIRC, Android is Linux.
If you mean the computer OS, I have no idea.
Theshawty said:
IIRC, Android is Linux.
If you mean the computer OS, I have no idea.
Click to expand...
Click to collapse
Yes I understand that - However I meant Linux such as Ubuntu or Arch distribution...
zhangxiao83 said:
Yes I understand that - However I meant Linux such as Ubuntu or Arch distribution...
Click to expand...
Click to collapse
Running Ubuntu has been deemed possible.
Yes, but why and who will make a port (isn't this simple)? And not all drivers are open source and available to public.
BTW, android is linux and you can even port some applications (a time ago sometime is talking about porting glibc to android, don't remember if this get done, but I think is useless somehow).
It will happen
Word on the street is that Android drivers are being merged back into the development branch of the Linux 3.3 kernel. It's not too surprising considering Android developers were working with the Linux kernel developers until the 2.6.33 Linux kernel.
I bet we will see Debian or Ubuntu running on our N1s eventually. The N1 has a great developer backing since it was pitched as a developer phone, so I bet one of the many talented developers out there will eventually cook up a native Linux ROM. Besides, there are native ports for other devices out there so they can't be too far off.
You can currently install Ubuntu on your N1 but honestly it's pointless. Yes There are great apps to use but compatibility isn't 100% on the phone AND the apps run too slow to actually be useful.
You'd have better chances developing an app for android to do what you want lol.
If this helped hit THANKS
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-android/ Check this link for a how-to.

Linux distro on the Nexus 7

Hi everyone,
I consider buying a this nice little tablet I just wonder if anyone managed to install a complete Linux distribution on it like ArchLinux ARM natively (not emulation/virtualization not even chroot) with everything working. I guess that even if it's not done up to now it will be quite easy to do as everything is open source.
Thanks
So as a few months passed since the Nexus 7 is available and I just bought one yesterday, I thought that I could do a little up...
Hope mods won't think it is offensive to make alive an old thread with some kind of what I think is a good reason.
If no one can help me, I will probably work on a native ArchLinux ARM on my nice new tablet in the next days. But first I have to make sure I can get it back fully stock from a fully rooted/unlocked/repartitioned state. If I have no choice I will dd my entire N7's internal memory to a slightly bigger USB stick to recreate exactly the partition table. But I am not sure I can have a complete access to the internal flash memory (all of the partitions with the boot loader, recovery etc). If someone can confirm if I have only one memory drive or more to backup or if there is no chance that I cannot recrate then entire Android stock system from a corrupted partition table for example... I would appreciate it right!
Thanks in advance!
Sorry if this is already answered I have to confess that I didn't search for the last part, I don't have time this morning.
Sent from my Nexus 7
Yeah installing Linux on the N7 has been done. I think the Ubuntu Distro is the one that was used for the successful install.
I did a little searching and found it for you:
http://forum.xda-developers.com/showthread.php?t=1585009
Hope that helps
Wilks3y said:
Yeah installing Linux on the N7 has been done. I think the Ubuntu Distro is the one that was used for the successful install.
I did a little searching and found it for you:
http://forum.xda-developers.com/showthread.php?t=1585009
Hope that helps
Click to expand...
Click to collapse
Thanks for your answer but I was looking for a native installation, not a chroot if possible that I can use hardware
acceleration (maybe that I still could with virtualGL though).
It is already a good point that it has been done in chroot, wich I am not surprised.
Sent from my Nexus 7
johnride said:
Thanks for your answer but I was looking for a native installation, not a chroot if possible that I can use hardware
acceleration (maybe that I still could with virtualGL though).
It is already a good point that it has been done in chroot, wich I am not surprised.
Sent from my Nexus 7
Click to expand...
Click to collapse
To be honest mate, I'm not into it all that deep, couldn't even tell ya the difference between chroot and a native client, perhaps you could explain for me?
the chrooted version is the android kernel with the ubuntu "programs" running. you can access the ubuntu desktop only via a vnc client, as there is no "real" x server running. think of it as ubuntu running as a service in the background which you then access via local network from your android.
would be interested in a native version as well.
kendong2 said:
the chrooted version is the android kernel with the ubuntu "programs" running. you can access the ubuntu desktop only via a vnc client, as there is no "real" x server running. think of it as ubuntu running as a service in the background which you then access via local network from your android.
would be interested in a native version as well.
Click to expand...
Click to collapse
That explains it, so basically on chroot the Ubuntu is a virtual machine in essence?
johnride said:
Hi everyone,
I consider buying a this nice little tablet I just wonder if anyone managed to install a complete Linux distribution on it like ArchLinux ARM natively (not emulation/virtualization not even chroot) with everything working. I guess that even if it's not done up to now it will be quite easy to do as everything is open source.
Thanks
Click to expand...
Click to collapse
Has not been released yet, but definitely check out this: http://www.ubuntu.com/devices/android
Nooo there is a big difference between chroot and virtualization. On a chroot you still use the same kernel which allows to have the same speed or almost as a native client for what does not require hardware acceleration. the point in getting and Native Client working is that we could get advantage of the GPU after some more or less hard work. I bought this tablet to replace my sold laptop the best I could so that's why I'm interested in this.
When you do virtualization, CPU instructions are converted from a type to another and this is very heavy on the CPU and this way you cannot have good performances.
Think of a road: in chroot you only have to make the instructions take a turn without slowing down while in virtualization you have to stop the "convertible" instructions "remove the roof" and then you can continue. That's why virtualization is much slower than chroot.
Edit:
Chroot says what it does: it changes the root. This means that programs that run in the chroot environment will think that the / is another folder than what it is really. For example if you do chroot /sdcard/ and you have a file named derp.txt on your sdcard than type rm /derp.txt it will work since your / is now /sdcard/. The most come in case of uses of EC truth is when you have a Linux machine not booting anymore so you have to repair the boot loader, you will boot on a Live CD of the same distro (Ubuntu for example), mount the drive with the broken installation, chroot to this installation regular root and perform the same reparation as if this install would be booted, still using the kernel and binaries from your live CD (unless you specify that you want to use those from the chrooted environment).
Hope this is clear.
Sent from my Nexus 7
Stevenator21 said:
Has not been released yet, but definitely check out this: http://www.ubuntu.com/devices/android
Click to expand...
Click to collapse
Yeah that's a very nice project but I want the desktop on my tablet, no docks and all. This is also in chroot I believe. Probably that I will install ArchLinux in chroot and try to make VirtualGL work but it's not really what I want.
Sent from my Nexus 7
johnride said:
When you do virtualization, CPU instructions are converted from a type to another and this is very heavy on the CPU and this way you cannot have good performances.
Click to expand...
Click to collapse
Small clarification. You're describing emulation here. Emulation is one processor pretending to be another. The Android SDK provides an android emulator that pretends to be an ARM device while running on your x86 PC.
Virtualization is a special feature of some processor architectures that allows multiple, virtual memory spaces to be created that are isolated from each other at a very low-level. I seriously doubt (but don't know for sure) that the ARM architecture has much support for virtualization. VMWare and its ilk use virtualization.
Anyway, virtualization runs at full processor speed. However, access to everything but main RAM and the CPU may be emulated in most implementations. Particularly, it's very tricky to get proper access to the GPU via virtualization, so it is often emulated.
Trivia-time: The presence of a primitive form of virtualization in the 386 is what allowed Linux to be written back in the day. The 286 didn't support switching between normal and escalated privilege modes (aka kernel vs user process space) on the fly. Oh crap. Now I'm starting to show my age. Um, get off my lawn!?!
The more you know...
Thanks for the clarification old chap!
I knew about material virtualization with some CPU's but did not realize that there was no emulation for the biggest part of the instructions. Will sleep less dumb.
Sent from my Nexus 7
kendong2 said:
would be interested in a native version as well.
Click to expand...
Click to collapse
Mhmmm as we are probably not alone to be interested in this, I think I will open a topic in original development section to see how many would be interested and what direction I should take. If anyone supports that idea I will create the thread. I think it would be easier to put together all the good ideas in the dev section.
Ah you beat me to it!
Well we (the linuxonandroid team) have been running a device fund which has just finished.
One of the devices i will be getting from this is a nexus 7 which is being bought for two goals.
A) fixing tegra chip bugs with our chroot builds (after all chroot for many is a good way forward as it leaves android intact)
B) building native linux distro installs. Starting with ubuntu but expanding to as many distros that support ARM as possible (debian, backtrack, archlinux, fedora etc etc).
So prehaps you would like to PM me and maybe we can team up for this
Sent from my GT-N7000 using xda premium
zacthespack said:
Ah you beat me to it!
Well we (the linuxonandroid team) have been running a device fund which has just finished.
One of the devices i will be getting from this is a nexus 7 which is being bought for two goals.
A) fixing tegra chip bugs with our chroot builds (after all chroot for many is a good way forward as it leaves android intact)
B) building native linux distro installs. Starting with ubuntu but expanding to as many distros that support ARM as possible (debian, backtrack, archlinux, fedora etc etc).
So prehaps you would like to PM me and maybe we can team up for this
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
I am currently working on developing on booting ubuntu on the nexus 7. Check this thread out - > http://forum.xda-developers.com/showthread.php?t=1842915

Question for coders and developers about build environment

I have wanted to build for and wanted info on building environment. Like what do you use to build with a full Linux box or in virtual box on windows. Also what distro do you run. I heard years ago Ubuntu could give you errors that arch wouldn't.
Thank you in advance!
Sounds like you're new this, so I'd recommend Ubuntu.
Personally, I don't like Ubuntu's desktop environment (Unity) so I opted for Kubuntu instead (Ubuntu with KDE)
KDE often gets a bad reputation for being unstable, and while there's some truth to that, I like it. It's easy to customize and get used to. If you choose Kubuntu, I'd go with the 16.04 release though, it's more stable than 16.10.
I can't think of anything that being on Ubuntu has limited me for. For me, Unity feels kind of restricting in terms of UI, but Ubuntu has full Linux functionality.
Ubuntu is probably the most mainstream Linux distro, and therefore the most noob-friendly. You're more likely to find tutorials for Ubuntu; if you go with Arch you'll have to figure a lot of things out yourself.
Sent from my Axon 7

Categories

Resources