Developing apps, mac vs pc? - Android Software/Hacking General [Developers Only]

Just curious what most of the devs use? I'm looking into getting a new computer just for app development. Any input would be appreciated.

PC, I never liked building things on a mac

loudaccord said:
Just curious what most of the devs use? I'm looking into getting a new computer just for app development. Any input would be appreciated.
Click to expand...
Click to collapse
For general devolpment, I actually prefer Linux. However, windows is the most featured for dev compared to mac, which is only good if you develop for ios
Sent from my GT-I9100 using Tapatalk

I do all my development using Ubuntu. I develop using only the terminal and gedit primarily because I found Eclipse to be not flexible enough when developing.
I've tried to develop for Android on Windows using command line or Eclipse, but I much prefer Ubuntu. It's just a preference because I'm sure development is the same on all operating systems.

nraboy said:
I do all my development using Ubuntu. I develop using only the terminal and gedit primarily because I found Eclipse to be not flexible enough when developing.
I've tried to develop for Android on Windows using command line or Eclipse, but I much prefer Ubuntu. It's just a preference because I'm sure development is the same on all operating systems.
Click to expand...
Click to collapse
That's interesting, I'm using Windows/Eclipse and was just thinking of what other options would be. I'll start looking into Ubuntu now.

The only commands you'll ever need are:
ant debug
ant release
adb install -r apkfile
adb uninstall package
adb logcat
emulator -avd emulatorname
I usually have three terminals open.
- Compiling / Installing
- Emulator
- Log output (logcat)
I use the workspace feature of Ubuntu so that way I can sort my applications into groups and using the alt+ctrl+arrow shortcut I can quickly navigate around.
Ubuntu is free, heavily updated, heavily supported and easy enough to use.
Definitely worth checking out if you are still trying to find your place of zen.

I'm looking at getting new hardware also, laptop would be preferable but I know it might not have the muscle I'm looking for. What hw are you guys running to do app development?

I'm developing on a laptop as well.
The hardware is as follows:
2.4ghz Intel i3
4gb of ram
500gb hard drive
Ubuntu 11.10
1366 x 768 screen resolution
If I was going to do it over again, I'd get a better screen resolution. Many items are larger than the screen with this low resolution. The other specs on my laptop are overkill for developing Android applications.

Related

[Q] X11 Server in Android

Hello,
While I am a huge supporter of the oongoing work of porting Ubuntu to the ASUS Transformer, I am more interested in seeing a native X11 Implementation. I run Debian as my primary OS and would love to be able to access native applications without the need for VNC. I do love Honeycomb, which is why I wont go pure Ubuntu​
DISCLAIMER: I AM NOT A DEV
I'm pretty sure there's a very good reason that this isn't possible. If so, it would have been implemented from the G1/Dream onward. I think it has something to do with the fact that Android really only uses the Linux kernel and thus DisplayFlinger (the video output module) has absolutely zero interoperability with X11. Also, the Android system structure (for lack of the correct term) just plain doesn't allow for something like X11 to exist.
There's pseudo-workarounds which involve having a Debian shell on your phone/tablet and then accessing it via a VNC app... but it takes over the whole screen, so you may as well just be booting into a Ubuntu partition.
http://www.androidauthority.com/run-x-windows-x11-on-your-android-smartphone-2176/
(I never got it working on any phone I own/owned though)
Android and X11 do not work together for several reasons;
First is instances owning the fb, only one is allowed to own the framebuffer, this is why on your computer you can't have more than one VT running X. The framebuffer is owned by the DisplayFlinger, Androids own XWindowManager, the flinger and X11 are not interchangeable, it is one or the other and Android apps will not run on X.
The second is libc, Android does not implement libc, but instead its own mutated library called bionic this means compiling with bionic, statically compiling, or forgetting about it. Forgetting about it is the easiest to do here because statically compiling will end up with a 100+mb xserver, which we don't want, compiling with bionic has two issues one, stripped binaries will not run on bionic, so you might as well be just running Androids display manager, and the second issue is as above.
Couldn't someone emulate a framebuffer in an android app and have X take over that framebuffer and make the app's screen be the display on this emulated framebuffer?
EDIT: I guess what I am trying to describe is that you could set up X to write to a different framebuffer than android and make an app to display this framebuffer while still keeping the android UI.
A X server for android is available.
Search github for androix-xserver. The fork of webbbn has a branch containing a lot of recent developments. Only problem with the xserver for android is building the thing. It has a lot of dependencies. It should be beter documented.
There's really no reason one could not implement a full X server against standard Android SurfaceFlinger Surfaces. Though what might be more interesting would be a library-ized version to make it simpler to bundle app + ui into a self-contained "native" Android app package.
It's just a bunch of work -- not particularly glamorous or exciting, unless you're really into porting or writing X servers -- but especially with the NDK these days supporting native apps, access to surfaces, and access to openGL, all the necessary bits are out there to make it possible
Writing a X server program that works e.g. more or less like a vnc client is likely more fun than useful. You can get around the bionic issue in many cases, but for practicle value you're just not able to make it work without z lot of effort. Better off using the vnc/x thing, a debian chroot, and an android vnc client to local host.
Sent from my Transformer TF101 using Tapatalk
I'm gonna speculate and say that it just needs to display a window on the surface flinger and render the Xorg api stuff.. also poll for taps.. doesn't seem like it would be too complex... maybe more complex to have it functioning well on every device.
Vnc will never be better than native X even if it is currently more convienent. I find it frustrating when people say something is not likely because it is tedious or trivial.
Just the fact that someone is actually working on an implementation suggests that it will happen eventually. When it is finished and works.. guess who is gonna be the only ones with the software that can do it!
They're where the people who ask these questions will eventually find themselves.
TBH, the idea of running an xserver with a chroot'd distro on my tab makes me all tingly.
tiiiiingly, kthx!
Sent from my TI-89 silver edition
The rendering stuff is one thing, issues with auth, environment, etc are another. It's slightly more complicated than filling pixels. Something you might also want to consider, doing it with a real X rather tha n the x/vnc trick, is pretty much the same. At best versus writing your own vnc client, it would *maybe* have better performance, rather than just an easy way tobsetup a .xinit/.xsession file.
Sent from my Transformer TF101 using Tapatalk
no me gusta.
Another approach
Another approach might be this
Search for X11 server with VNC backend in the market place (not allowed to post URLs)
market.android.com/details?id=com.theqvd.android.x
It is an X server with VNC backend.
It's probably just a bundle of Xvnc compiled for Linux/ARMv5 and an Android VNC client that knows how to connect to it smoothly. Basically packing what people already do, in an app.
I would also worry if the C code was replaced with a 100% Java xvnc port.
Sent from my Transformer Prime TF201 using Tapatalk
vnc x server and android
While I would love to see a native x server on android, the only way it would work is if there was a port of an android exec environment. Then you can integrate the keyboard, market and etc. But until then the UI is just... Unacceptable. HOWEVER I have been effing with it a lot and realized the best way to run Linux applications for now is to skip the desktop environment... Run xinit via xvfb vnc (tightvncserver) and to make it capture by window at your phones native res. Set options economic translate. This will run any non multimedia application B E A utifully
And then their are freaks like me that get by fine with a terminal emulators UI lol
Sent from my Transformer Prime TF201 using Tapatalk
Hi, another approach here. I think it's a native x11 server (no chroot, no vnc) written in java... there are no binaries though, only sources. If there is any dev here willing to build an apk from sources for us it would be great...
x11
afaik we can run several x11 in pc with different vts, and since x11 is a server its completely possible to write something that listens to tcp and draw stuff grab events and send tcp stuff on a single android app despite that being rly similar to vnc or rdp except vnc works on image buffers,x11 its a bit more complex... i suppose .
i use every day a winxserver at work completely independent of os window manager concluding that would be possible on a android app, (probably lots of work)
android-x11-server looks good, I'm surprised how far along it is but I'm sure the developer has a reason for not putting a downloadable APK up yet.
Something like X11->VNC works like keeping a copy of the frame buffer and figuring out what to encode and send to the VNC client for rendering. X11 and RDP I believe are more command driven, but I'm not sure about RDP. Some kind of native X11 server would rock.
Sent from my Transformer Prime TF201 using Tapatalk
I've just released an open-source X server for Android, also available through the Android Market. Details at my20percent.wordpress.com/2012/02/27/android-x-server/
Note that it's still in beta, and doesn't come with a window manager, although in theory you can run a window manager remotely.
Regards,
mkwan
Anybody here who can download mkwan's android-x11-server from the market and attach it here?
Thanks

[Project] Linux on Android

Hello gents and ladies,
Since the announcement that Canonical made on making Ubuntu on Android a release for OEMs to put on their devices, there has been quite a stir and interest on when we are getting to get this on our phones. Sadly, while the distro of Ubuntu is open-sourced, the programs that were created to achieve this method are not available to the public due to Canonical outsourcing the work to a 3rd party company.
Some users here may already say that we have Ubuntu on our phones but the method that is most commonly used by the community is to load up a virtual environment or Chroot inside of Android then remote into the interface via a VNC connection app. While this does work, it is a pretty sloppy method that is resource intensive and does not benefit from any hardware acceleration for the Linux desktop environment that is used. Plus, there is no way to pipe audio thru a VNC connection so using any audio/video programs in VNC is pointless.
Lastly, Ubuntu on Android is actually nothing new to the world of Android, as its been around for about a year and a half. It came in the form called Webtop that Motorola had launched on their Atrix/Bionic/RAZR lineup of phones. Webtop is essentially a stripped down version of Ubuntu with a lot of Linux tools taken out along with a very limited desktop environment. Webtop does everything that Ubuntu on Android does but in a neutered manner but there are different groups on each phone that have accomplished bringing back many of the linux tools that were taken out. Check out the thread below to see what I mean.
http://forum.xda-developers.com/showthread.php?t=1397583
It is believed that the same methods and tools that are present in Webtop are the same ones being used by Ubuntu on Android and possibly made by the same company. This can be seen in the demo video of Ubuntu on Android where the demonstrator had replaced the Webtop distro with a full Ubuntu 12.04 distro on a Motorola Atrix 2. So to debunk the myth that Ubuntu on Android can be easily loaded up on a phone as shown on video, no cause it was initially was setup with the required framework and partition space to load Ubuntu on Android even before Canonical announced Ubuntu on Android.
With all that is said, Canonical is targeted OEMs and Carriers to launch their Ubuntu on Android on select model phones and probably will not release the necessary tools as open-source code so the development community can compile their own working Ubuntu on Android. Now, all hope is not lost because some of the work has already been done but needs to come together into a package that can be ported from one phone to another.
Here are different parts that are needed:
1) Ubuntu image
There are many working images out there that run in a chroot environment but there is one universal image that is being implemented that is made by zacthespack that works on a variety of different devices - See attached thread
http://forum.xda-developers.com/showthread.php?t=1467811
2) X Server Port
Instead of using a VNC client and server model which is very resource intensive and does not benefit from GPU acceleration/Framebuffer. Using a X Server windows management system like they do on home PCs and laptop will greatly increase speed and functionality of a Linux distro opposed to VNC. This is how Webtop on the Motorola phones work is by using a port of X Server which pipes the display out to the HDMI port to be used with the Laptop dock or home dock. There is a group at AndroiX.org that is working on a port of X Server for Android that is looking very promising so hopefully anybody that can contribute to project to speed it up as it is the most crucial part for Linux in Android.
3) Sound
The biggest drawback of VNC is the lack of any sound processing which can be very annoying when trying to watch any videos or listen to sound clips on the web. What they are using on Webtop and Ubuntu on Android is a custom compiled version of PulseAudio module to pipe audio thru Android's audio manager system. No projects have yet been started on this so if anybody knows of one, feel free to post a link.
4) Android in Window
As demo'ed in the video and on Webtop, you have the ability to see whats on your Android display but in a window within Ubuntu when Webtop/Ubuntu on Android is engaged. This is a cool feature that maybe a X client app within android that pipes the display to a window in Ubuntu or maybe VNC client/server scenario. This is not really necessary to Linux in Android but non the less a cool feature to have.
5) Contacts/Text messages/Call logs
This is more shown in Ubuntu on Android opposed to Webtop where in Ubuntu mode, you can look at your Contacts or call logs in a program as opposed a Android view in a window. They also demo'ed a special program in Ubuntu to where you can send/receive text messages in a interface designed for Unity. They accomplished this by using a server application in Android, more commonly known as Motorola Phone Portal, that can relay information from the phone to applets inside of Webtop/Ubuntu on Android using a web interface API on localhost:8080 or on a remote computer on the same network. Like I said before, not really necessary but another cool function to have.
All and all, this pretty much sums up all the different parts for a project like this to take place. I am in no way a seasoned developer, just a person throwing out concepts that I have learned and done myself on the Bionic Webtop phone which hopefully some skilled individuals can run with as I am no Linux expert by any means. Anywho, let me know what you guys think about this and what can be improved.
Ubuntu on arm.
I've been looking into the development of something like this and have found a few resources that may prove beneficial:
Linux 4 Tegra (nVidia)
System Requirements
Host PC running Ubuntu Linux version 9.04 or higher.
Tegra Linux Driver Package providing a kernel image, bootloader, NVIDIA drivers, and flashing utilities. For more information, see the Release Notes.
Sample filesystem (example provided derived from Ubuntu 12.04)
Click to expand...
Click to collapse
Please note that nVidia currently provides driver packages for each model of the Tegra (Tegra 2 and 3).
As well as:
Ubuntu on Smartphones
Now. I've been playing with both an Ubuntu and Debian chroot and have ran into the issues you speak about (in a chroot with only vnc support is very limited, no sound, no camera, etc.) and would like the ability to dual boot at least.
[Q&A] Ubuntu on the Transformer (eMMC install) (xda-developers)
Basically, the creator of this thread is working from another dev's work to get ubuntu running on an Asus eeePad.

Android Dev: Linux vs. Mac vs. Windows

Experts, Developers, Fellow Gentlemen (& perhaps, some Lassey?),
PURPOSE:
To request, collect, organize, and clearly present 3 types of information related to BOTH android application development (for sale on the market) and ROM cooking (using scripts, kitchens, etc.).
INFO REQUESTED:
(1) Compare the relative the PROs and CONs of Android Dev. using:
Windows with Cygwin and Eclipse
Windows with a Linux VM (Eclipse installed on the VM)
Mac with Eclipse
Mac with a Linux VM (Eclipse installed on the VM)
Linux on bare metal (using Eclipse, of course, or the NDK)
(2) If you have used two or more of the above for Android Dev., please describe your experiences and insights, the primary differences, similarities, tips and pitfalls, etc.
(3) Given a fairly large budget to buy your own laptop for use in Android application development and ROM cooking, please RANK the above 5 choices in order from your 1st (best and most desirable) choice to your 5th (last and least desirable) configuration.
Best Regards,
Paul
Honestly your best bet if you want to do android ROM development, and not developing apks, then your best bet is to dual boot your laptop with widows and ubuntu. I thouhgt that you were wanting to develop apks, since you mentioned the SDK and eclipse, that is really more for app development, rather than ROMS and android open source it self.
The reason for ubuntu is that all the of utilities all work with ubuntu, they can work with other distros, but ubuntu seems to be the one most flock to.
The reason not to use a VM is because it can have issues connecting to the USB connection with your phone attached.
Mac will work, if you really want to go down that path, but it is more cumbersome to get things to work "well" as BSD is the underlying kernel, but you have to install an Xwindows environment to use most of the Android utilities, and that can be a pain to get working for someone not really experienced with linux AND OS X.
Windows with cygwin is a possibility, but again, more of a pain that just dual booting ubuntu.
+1 for dualboot
I'm definitely not a developer but I do know PC's. Jim's right you won't get any odd b.s. if you partition and install Ubuntu.
For the small amount of rom tweaking/developing I have done I use windows with cygwin. With baksmali and smali for decompiling dex files.
Sent from my MB865 using xda premium
Me too. I get by with Windows7 and Cygwin...
I know that I will eventually have to at least set up dual-boot with Ubuntu if I want to get involved in "real" development (even that would freak out my wife though - having options at boot on our shared family computer... gonna need a separate dev machine I guess)
Sent from my mind using XDA
I have worked through both windows and linux (ubuntu mostly), and I can give you some info about macs too, but I don't have actual experience there.
Windows
Pros:
More software for things other than android development, so if you want just one OS it may be the way to go.
If you are familiar with it already, it will make your life easier as you won't have to learn about a new OS.
Not much more really.
Cons:
most developers use linux, so you will be a bit alone i the android dev world meaning possible less support.
Not as well supported officially or not.
Overall:
Windows will probably be just fine for app development, as the sdk and eclipse both run fine.
You will have trouble with rom development. Android is based on the linux kernel, so it does not play well with windows.
You can use Cygwin, but you will have mixed results. It is not perfect. Some things just won't work unless you have linux, and quite honestly it is probably easier to get ubuntu working right.
Ubuntu
Pros:
It's FREE!!!!!
most official support
It's what most devs use, so unofficial support is good
Most utilities are built for it.
Cons:
Can be tough to learn if you are used to windows
not as many apps for other things, but that is getting better.
Over all:
By far the best for development. you are just gonna be better off in general. your best bet is to dual boot, which is really easy, and you can always use windows when you want. A virtual machine is an option, but you will have issues with certain things, like usb support. A VM will also require more cpu power to do everything so it is not a good idea on low power machines.
Hardware
Linux is much lighter than windows, so a low power computer will be better off with it.
You should be fine with anything that is not total crap for app development. Basic rom development should be fine in the mid to low end. If you are getting into more serious stuff like building up android source you will want some serious power. I have 4GB or ram and an intel i3 processor (2.13 gHZ dual core 4 thread) and that barely cuts it. compiling cm7 takes a couple hours and it runs at 100% cpu usage the whole time and gets hotter than hell.
You will need a pretty big hard drive for some stuff. The AOSP source is huge. all my android stuff takes about 28GB.
Over all
your best bet is to dual boot windows and Ubuntu Linux on at least a decent PC. you will be happier with something with a slightly higher end CPU.
I use 64-bit Ubuntu, it's just so much better and everything just runs natively! I mean some of those kitchens and tools are only for windows, but it doesn't really bother me because I dont use them
If you want to learn to write code, get ubuntu and jump head first into it.

SDK Emulator or Android x86

I will be honest, I'm not an Android developer - at least not yet. That said, I'm looking for an environment to performance test apps. More or less, looking for a sandbox to test apps with. For this, it doesn't really make sense to use a real device. So I'm debating between the SDK emulator and using Android x86 in a virtual machine. Each seems to have strengths and weaknesses.
I think the main advantage of the SDK emulator over Android-x86 is that it can be used to test apps for different AVDs very easily. Plus, it natively supports NDK ARM code and can be used with x86 code with version 17 (right?). The downside, is that it is painfully slow.
On the otherhand, Android-x86 has much better performance itself, but currently (maybe not for too much longer) lacks support for ARM-specific code.
Another option is BlueStacks, but I haven't looked into it much yet and am not sure how well it will suit my goals.
I was hoping to get a little survey of opinions regarding the two from developers and folks more familiar with Android than myself.
CurlySpiral said:
I will be honest, I'm not an Android developer - at least not yet. That said, I'm looking for an environment to performance test apps. More or less, looking for a sandbox to test apps with. For this, it doesn't really make sense to use a real device. So I'm debating between the SDK emulator and using Android x86 in a virtual machine. Each seems to have strengths and weaknesses.
I think the main advantage of the SDK emulator over Android-x86 is that it can be used to test apps for different AVDs very easily. Plus, it natively supports NDK ARM code and can be used with x86 code with version 17 (right?). The downside, is that it is painfully slow.
On the otherhand, Android-x86 has much better performance itself, but currently (maybe not for too much longer) lacks support for ARM-specific code.
Another option is BlueStacks, but I haven't looked into it much yet and am not sure how well it will suit my goals.
I was hoping to get a little survey of opinions regarding the two from developers and folks more familiar with Android than myself.
Click to expand...
Click to collapse
I always use the sdk emulator OK its a little on the slow side but quickly let's you test apps on a range of set ups. Plus having it integrated with eclipse makes the process even quicker
Sent from my GT-N7000 using xda premium

Linux/Android help for a beginner

Hey all-
I'm very interested in learning Linux in order to not only do cool stuff at home with my own computer, but also to perhaps be of service in developing ROMs and give back to the devs who've helped breathe life into my ol' OG Evo for nigh-on two years now. If I ever got to the point of doing some 'grunt work' and helping out on a project, that'd be awesome for me.
Here's where I'm currently at with Linux: I've followed instructions to dual-boot Ubuntu on my Windows 7 laptop (yay!!!!), but other than installing Chrome and using all my Google services (Gmail/Docs/etc.) through that, I'm not really sure what else to do in order to become fluent with Linux. It's kind of like reading a book on how to build a car, but not knowing one end of a wrench from another.
Here's where I'm at with Android: I can follow instructions to root my phone, flash ROMs, install the Car-O-Dope tweaks on GB ROMs using System Tuner and ROM Toolbox, and most basic things that include using Smelkus' recovery (flashing, wiping, nandroid/restoring, etc). I'd say I know more than the average Android user, but certainly not as much as the experts here.
I've looked on a variety of forums both here and on Ubuntu's site, but I'm not really sure how people got their start using Linux and how they progressed from there in terms of fluency with Linux, applying that to Android developing, and also generally using it as a 'one-stop shop' for home use. I've read about people being able to build HTPCs on the cheap, using a computer as a file server/web site host (my wife's a graphic designer, but hates technology, natch)/media streamer/home security server, but as soon as the instructions get to "Ok, now open up your command line and follow these 28 steps......", I get a bit gun-shy.
If anyone's got any helpful tips on how they got started, any good beginner's guides (project-oriented would be great, just as reading a book on speaking a foreign language is no substitute for conversing with a native/fluent speaker), and how they grew in fluency or just any general advice, it'd be greatly appreciated. I'm putting this here and spreading it around in the hopes that some of the WAY talented XDA devs and members I've read so much from will toss a bone in my direction.
Thanks for reading and for any help!
Get very familiar with Terminal. For Android dev or otherwise, it is essential. Reading man-pages is also good to learn new commands better. In Terminal, just type "man man" minus quotations. That will get you going.
Sent from my PC36100 using xda premium
You should definitely make an effort to become comfortable with the Linux command line environment (also known as Shell, the most common Shell currently is BASH).
Try giving yourself some useful activities to do, such as: setting up a home file server with Samba, setting up a media streaming server (DLNA - Plex Media Server is a great program for this), just little things like that.
Before you know it you'll be a pro
markinaus said:
You should definitely make an effort to become comfortable with the Linux command line environment (also known as Shell, the most common Shell currently is BASH).
Try giving yourself some useful activities to do, such as: setting up a home file server with Samba, setting up a media streaming server (DLNA - Plex Media Server is a great program for this), just little things like that.
Before you know it you'll be a pro
Click to expand...
Click to collapse
So, is Bash something I download/install, or should it be already 'packaged' in with Ubuntu?
go to the development forum on ubuntuforums.org and find out how to upgrade to ubuntu 13.04. As that version is currently in development you should get a chance to learn a few things. That's how I learned modern linux distros. Also setting up and playing around with Ubuntu server edition might be helpful.
For app development Google some Java tutorials. Once you get the beginners stuff out of the way you should be ready to learn android development with your new Java skills.
Sent from my GT-I5500 using xda app-developers app
---------- Post added at 06:01 AM ---------- Previous post was at 05:47 AM ----------
just using Ubuntu for your day to day tasks should also help. When the other Guy was talking about bash he was talking about the terminal in Ubuntu. its a command line that lets you enter various commands. Google 'Ubuntu terminal' for more info
Sent from my GT-I5500 using xda app-developers app
Joshmccullough said:
So, is Bash something I download/install, or should it be already 'packaged' in with Ubuntu?
Click to expand...
Click to collapse
No Bash is something that is already packaged with Ubuntu, it is one of the most essential elements of Ubuntu (and Linux in general) because it gives you a means of interfacing with everything else. If you have a type of Linux with no graphical interface, then the shell is your only means of interfacing with the operating system at all.
So in short, yes Bash is packaged with Ubuntu and every other kind of Linux out there (if it's not, a different shell will be packed with it, but Bash is the most common one).
Maybe something for later but I have seen a number of different Dev threads about getting started with AndroidDev, I know that I have seen at least about 10, all from different perspectives/starting points. One that I could find easily was the following:
http://forum.xda-developers.com/showthread.php?t=1778984
Check it out. Basically, says ... Linux (fundamentals), CLI (command line interface or shell, fluent), Java (fundamental), XML (medium), SDK (medium) and Time - to start with at least. Hope that is useful.

Categories

Resources