July 25, 2014 By: Tomek Kondrat
When it comes to device testing, there are two types of people on XDA. The first group blindly believes that one additional benchmark point makes a particular ROM or kernel the best, and they install it immediately. The other group takes benchmark results with a grain of salt, and take them into consideration with other performance metrics. Antutu or Quadrant are two of the most popular benchmark applications available for Android. However, there are many, many more options available for those looking to test specific aspects of their devices.
Not every benchmark requires one to have a fancy application with a nice user interface. XDA Recognized Developer broodplank1337 proves this with a benchmark that consists of simply a BASH script that can be executed from a Linux terminal. Broodplank1337’s script measures the CPU integer via ADB using the bc binary ported to ARM. To run the test, your device needs to have the binary installed. To do so, ensure that it’s rooted. The script will then push required libs and perform a number of tests to determine your CPU integer performance. The main advantage of the script comparing to other benchmark methods is its speed. The lack of a UI makes using it blazing fast.
The script can only be executed from a Linux PC, so don’t yell at us while trying to run it on Windows. There is a pretty good guide of setting up Ubuntu on virtual machine, so you can use it as well. You need to install the binaries in order to perform the test, so don’t forget to execute the command ./score –install before going straight to testing.
You can find the script by visiting the benchmark thread. So, what’s your score? Share your results in the comments below.
April 21, 2014 By: Will Verduzco
It’s no secret that Android ROM and kernel development is easiest on Linux and other Unix-like OSes like MacOS X. Sure, you can find various tools to do certain other useful Android development tasks on Windows like decompiling/recompiling and Smali editing, but if you’re building Android from source and don’t want to use a virtual machine or Cygwin, you really should be on a *nix OS.
If you’ve looked into Linux for the sole purpose of getting started with Android ROM and kernel development, you have likely already heard of BBQLinux. Developed by XDA Senior Recognized Developer codeworkx, BBQLinux is an Arch-based Linux distribution that is geared specifically at Android developers. Baked into the ROM, you’ll find everything you need to build AOSP or AOSP-based ROMs like OmniROM, Paranoid Android, CyanogenMod, and more. And since it’s based on Arch, it’s compatible with all the same package repos.
Since BBQLinux was designed from the ground up to be an Android development distro, it makes the process both more streamlined and easier than it would be if starting from scratch on a more general purpose build. However, some (especially those new to the world of Linux) may still be intimidated when getting started with BBQ. Luckily, You may XDA Senior Member yuweng created a screenshot-laden guide that shows you how to use BBQLinux’s built in packages and features to build Android. Yuweng also shares code that he used when building for his own device. In addition, yuweng also covers hotkeys, shared folders with Windows, and how to get BBQLinux installed through virtualbox, using dual boot, or making it the computer’s native OS.
If you want to run Linux so that you can more easily build Android, BBQLinux should be on your short list of distributions to consider. And if you’re looking for an easy guide to help you set it up, yuweng’s guide thread is a great place to start. Head over to the guide thread to learn more.
March 20, 2014 By: Tomek Kondrat
The Linux kernel is an absolutely brilliant piece of development work. Every Linux-based operating system uses it as the central unit responsible for process execution, and it serves as the interface between the hardware abstraction layer and your running processes.
Android sits atop the Linux kernel, but the ARM version usually lags behind a release or two when compared to the version used in desktop operating systems like Ubuntu and Arch. It now appears as if this situation will change, as commits available in AOSP repository on Github suggest that Google engineers are working hard on bringing the 3.14 kernel to Android.
This is rather surprising, considering that 3.14 is still not yet officially released, and it is currently only available as a release candidate. It appears that the Android kernel will finally match the revision on kernel.org. This move will reduce the mismatch between releases, and when these newest features are added to the Android kernel. It’s more than likely that we will see the newest kernel in one of the upcoming Nexus devices, which could be released at this year’s Google I/O or even sooner.
There is still some time left until the next generation of Google Nexus devices see the light of day. In the meanwhile, you can study and review the code by visiting the Android kernel Github repository.
[Big thanks to XDA Recognized Developer and Contributor varun.chitre15 for the tip!]
February 4, 2014 By: egzthunder1
Many of you may recall that back in June of 2012, we talked about how NVIDIA was given a rather direct message courtesy of none other than Dr. Linus Torvalds himself. Basically, the article written by XDA Recognized Developer AdamOutler went on about the closed nature of both NVIDIA and Qualcomm as chipset manufacturers, and how it was shameful and really inexplicable how two companies with such closed minded ideals could possibly be the paramount chipset providers for a large number of Android device manufacturers. Adam went on to wrap up the article with a brief (but very powerful) video on what the father of the Linux kernel thought about their lack of support for the open source world. Needless to say, shocked and appalled NVIDIA released a statement not long after in an attempt to address some of the finer points of the rather graphical complaint. Without going into the nitty gritty of the response itself, Adam basically dismantled their apology/explanation piece by piece. Their words, not being backed up by their actions, meant little to nothing.
Fast forward a year-and-a-half later, and we see something coming out of the left field: a completely unexpected move by NVIDIA, which left a whole lot of people trying to think back to what Dr. Torvalds said in the past. In a nutshell, you may recall that earlier this year, NVIDIA announced at CES the arrival of a “192-core” processor, the Tegra K1. This monster of a computerized brain was believed to be, much like its predecessors, as closed source as feasibly possible. So, while it was exciting to see such next generation hardware on the verge of hitting the market, it was a mixed bag of emotions as no one could predict what kind of tricks the chip maker had under its sleeves to keep those pesky devs away from their trade secrets. Well, as per a post made by Alexandre Courbot, the Japanese division of NVIDIA was making progress in helping the Nouveau project come afloat. For the unaware, the Nouveau project is essentially a group trying to create open source code to work with NVIDIA graphics hardware, which is the ultimate roadblock for most open source operating systems utilizing the Linux kernel (Android, Linux distros for PC, etc).
It seems that NVIDIA finally saw the benefit of contributing to the Open Source community, as they decided to share some of their work with the rest of the world by beginning testing and coding open source drivers for the K1 chipset. The work is indeed endorsed by NVIDIA, so rest assured that it is not a leak to be taken down or redacted. As stated, it is in very early stages of development and very few tests have been run. These will then expand into user space testing—if successful, of course. The road is a lengthy one, but certainly not impossible. And now that Nvidia is helping out, it is a far more tangible reality. The post was very well received by entire Open Source community—so much so, that even Linus himself gave NVIDIA yet another piece of his mind, but this time using a different finger. As the saying goes, you can’t make an omelette without breaking some eggs, and Linus’s original message seems to have broken just enough eggs for this wonderful, currently being cooked, omelette to finally happen.
Who knows? Maybe one day in the not-so-distant future, when the manufacturers remove their heads out of their posteriors and realize that without open source they would not exist today, they will start sharing what they know so that they can do what they once (likely) embarked out to do when their companies opened doors for the first time: Make the world a better place through education and sharing of knowledge through technology and innovation.
You can find more information in the original Google Plus post by Dr. Linus Torvalds.
[Thanks to OEM Relations Manager jerdog for the tip!]
Every Android kernel is made of few parts, which (depending on the OEM) contains a zImage created during kernel compilation and a ramdisk where some device-specific settings are stored. Sometimes, the ramdisk contains a recovery, logo, and so on.
If you’ve ever tried to work on a precompiled kernel, you’ve noticed that it can’t be extracted with a simple archive manager. Rather, you need some tools capable of unpacking and repacking the kernel as an IMG file. These tools can be easily built on Linux. And thanks to XDA Senior Member A.S._id, you can download them easily and compile your 0wn.
The current set of tools includes such binaries as: mkbootfs, simg2simg, make_ext4fs, mkbootimg, ext2simg, img2simg, simg2img, sgs4ext4fs, and unpackbootimg. Some of them were created by XDA Senior Recognized Developer Chainfire and the CyanogenMod team.
The compilation process is presented in the thread. It’s really simple, and needs just two commands. If you have problems executing them, don’t forget to set the correct permissions by setting the files as executable. After compilation, you end up with binaries that can be used in the kernel modification process.
Naturally, this tool works only on Linux machines. Having configured Github account is also recommended. You can learn more about those binaries by visiting the original thread.
December 8, 2013 By: Tomek Kondrat
As many of you undoubtedly know, Android is built atop the Linux kernel. This means that most of the commands known from Linux can be used in terminal emulator or adb shell. It’s a limited list, however, as Linux offers a more extensive stock set of commands as well as easily addable external modules.
Unfortunately, Android doesn’t support so many commands, but this can be easily changed thanks to XDA Forum Member jaromil.rojo, who ported the ZSh to Android. ZSh is a shell designed for interactive use, although it is also a powerful scripting language. It gives an ability to use a lot of external commands on our device. As of now ZShaolin supports following projects:
And smaller tools like:
As you can see, it’s a powerful tool that allows you to do things such as push your repo to Github or even decode a movie on Android. Everything can be done on an unrooted device, which makes this app even cooler. Jaromil.rojo compiled the app by using his own toolchains, but the project is open source, so everyone can build it and add his or her own code contributions. Most of the features are available in free version, which lacks binaries for ImageMagick, FFmpeg, Vim fully featured, Emacs, RSync, and more ASCII games. If you want to use ZShaolin for those services, consider supporting the developer with the premium version.
ZShaolin is a small, but yet powerful application. So if you are looking for a tool to give you access to many services on your Android device, make your way to the application thread and get the newest APK.
If you’re new to the world of Android development or simply want to reformat and start from scratch, one of the first things you are going to want to do after installing your choice of *nix flavor is to setup a working build environment.
Setting up a working build environment manually isn’t a particularly hard task, requiring only the knowledge of which packages to install and a little bit of configuration. However, part of the fun of coding is making the mundane simpler and more enjoyable, and that’s exactly what XDA Senior Member nolinuxnoparty and his collaborators have done with the Build Environment Setup Automater Script.
So what do you get when you use the script? It installs Python, JDK, GNU Make, Git, the Android SDK ADT Bundle, and the required packages for the Android Build Environment. This works on any x86 Linux PC, and obviously requires a healthy Internet connection. Using the script is remarkably simple. Just go to the download directory, chmod 755 the script, and ./execute it.
So far the script has been tested on Ubuntu 13.04, but it should work on virtually any distro. Head over to the utility thread to get started.
May 30, 2013 By: Conan Troutman
For most of us, Google I/O is probably beginning to feel like a distant memory—perhaps less so for those lucky enough to be browsing on your shiny new Chromebook Pixels. We’re all aware by now of the big stories from this years conference, but among all that was something that was of great interest to us here on the Portal, which you might not have noticed.
One of the sessions put on by Google was titled Voiding Your Warranty: Hacking Glass, the purpose of which was to show those in the Glass Explorer program how to root the device and run their own applications. During the session, the capabilities of Glass were demoed by showing not only how to gain root access but how to run a full desktop operating system, in this case Ubuntu. One of the tools used to achieve this was an application called The Complete Linux Installer that we featured here on the Portal just under a year ago. Considering that the application was written by our very own Recognized Developer and Forum Moderator zacthespack, we decided to track him down and get his opinion on the use of his application to help hack Glass and a few other things as well.
Well Zac, why don’t you start by telling us a little bit about yourself?
“Hello, I’m Zachary Powell (zacthespack on XDA) and I am a second year BcS Computer Games student at the University of Essex (UK). I have been on XDA since 2009, becoming a Recognised Developer in 2012 and a Forum Moderator earlier this year. My passion for both Android and FOSS has encouraged me to work on multiple projects, including Slap OS on Android, my newest joint-venture: XML Games, and of course; LinuxonAndroid. My other interest include computer games and computer game design. Virtual Worlds are a particular interest of mine because I enjoy seeing what a community can create within them.”
It must have been a bit of a shock to see your app being used by Googlers at IO. What was your initial reaction?
“Yes, it was quite a shock. It had never crossed my mind that the employees of Google could be using my app, never mind it being featured at their biggest event. I see it as a serious milestone in the project’s life to be included amongst Google’s work.”
Do you think that running a full desktop OS on a device such as Glass will become commonplace, or will users prefer to stick with a lightweight and minimal interface?
“I think that both have their places. Clearly for day-to-day use a desktop operating system isn’t practical, but it does have it’s uses – particularly when you are talking about using a command line and command line tools. Clearly, with the limited size of the glass’ screen, the use of a desktop GUI is prevented; it’s certainly not going to be able to run a web browser. However, when resolutions improve, this could become more possible. As it is, the screen is large enough for a command line and I like the idea of being able to develop and compile code from a HUD on the move.
I do feel that in general it won’t become commonplace for the average user to run a full desktop OS on the glass because for most people, a desktop operating system is a word processor and an web browser. There is no general need for them to have access to developmental tools. The minimal, easy to use system is preferred by the average user.
However for advance users and developers who want to tinker with their glass and unlock the full power of the device, running a desktop OS on the glass would make a big difference.”
What are your thoughts on Glass in general?
“I believe that the Glass is a fantastic product, and is something that I am itching to get my hands on. Obviously the idea of a HUD is nothing new, but I think that Google have taken the idea in such a way that the result is second-to-none. There is no other device like this and although there is still a lot of room for improvement, by the time Google release to the general public I think it will be a well polished and usable device. The fact it runs Android is great because you are able to run a far better range of apps, including my own. This also makes the process of ensuring apps are Glass compatible much easier. I am looking forward to getting my own Glass and discovering it’s full potential.”
What originally motivated you to begin the Linux On Android Project and is the project still going?
“The project originated from a desire to get Linux running on my HTC Desire S. The idea and method used in the project is nothing new, but we seek to make it a universally accessible platform (as long as you are rooted). After developing the project and creating a tutorial in XDA, there was a clear demand for the project as people started asking me to help them get it running on their devices. It was at this point that we started creating the universal method, and from there the project really took off.
Yes, we are very much still going. We are working on new improvements constantly, including new Linux Distros and making the app more universally accessible in terms of the languages it has been translated in to and the number of devices it can now run on.”
Considering our recent focus on helping those new to app development, could you tell us a little bit about your methodology, process, and perhaps any tips you might have for aspiring developers?
“Trial and error is definitely the key here. There is a great range of Open Source apps available which you can study the source code for and learn from. This is something I strongly recommend anyone to do. Although the phrase is “don’t fix something that isn’t broken”, I can’t help myself but to continue improving the app and adding new features.
My biggest tip would be to never stop learning. Always look to better your knowledge. The Android platform is always changing, and you have to change with it.”
Tell us a little more about the new projects you mentioned earlier.
“SlapOS on Android is a branch of LinuxonAndroid using our Ubuntu install as a base to then install the SlapOS software, allowing your android device to integrate with your SlapOS cloud, with this every Android device can become a cloud node!
XML games is a new project A friend of mine and myself have just set up and launched on kickstarter. XML Games aims to allow the players themselves to easily and quickly create new game levels using a predefined set of XML tags. Coupled with an XML web platform, players can view and share each other’s levels online, unlocking the possibility of endless new and unique gameplay!
Using XML to design levels allows for us as the developers to make the levels and games completely cross platform. This opens players to an ever growing range of different levels all of which can be designed by anyone on any platform.
Once you have made your levels, they can be shared on the XML Games website community. Allowing anyone to browse and download to play. The hope here is that users can head onto their PC, code their own levels with the help of our handy guide, and then head onto their phone, and download their own level!
We plan to start out on Android creating a few open source games, but with enough funding hope to expand onto other platforms and more games!”
Given the Linux theme here I have to ask, what is your personal distro of choice?
“Primarily I use Ubuntu for work as I like its stability, however I do enjoy playing with Arch Linux because of its customisability.”
If you’d like to follow up on anything mentioned by Zac, check out the links below.
Getting feedback for your app during development is as simple as adding logging info where necessary and looking for the output in logcat. But if there’s a lot going on, the task of actually finding the lines can get a little sticky. Logcat does have a rudimentary filtering feature, which was covered in a recent ADB Commands article. But I often find that when I’m using broad (app-wide) filtering, I still spend considerable time scrolling through the output. There’s a tool that can make this a little less tedious by color coding logcat output.
The work is all done with a Python package that parses the logcat output, applying labels and columns as it goes. It monitors the output in real time, but you can also feed it capture files after the fact. You can easily tweak it to do whatever you want using the filter and profile features that Marshall Culpepper included in the project. I’d say you probably won’t have to go beyond user-level options to get it looking the way you wish.
This is obviously targeted at Linux users based on the example commands used in the documentation (egrep, etc). I don’t have a Windows box to test, but logcat and Python are both cross-platform tools, so there’s a chance it would work. Make sure to leave a comment if you are able to give it a whirl.
I found out about this package from a comment in a Reddit thread about a different color coding script.
March 21, 2013 By: Conan Troutman
XDA Elite Recognised Developer AdamOutler is at it again. Following up on his Verizon Note II root method, he continues to roll out safe and easy-to-deploy root exploits via CASUAL, the Cross-platform ADB Scripting, Universal Android Loader.This time, the device in question is the AT&T Samsung Galaxy S III.
One of the major benefits of CASUAL is that it is cross platform. Adam has been spending a great deal of time in bringing support for many different platforms to a consistent level. If you have him circled on Google+, you may have already noticed him tackling the OS X upgrade process in an effort to test these exploits for Mac users. That’s where you come in. Adam is especially keen to hear from users of both OS X and various different Linux distros about how CASUAL functions for them. It even works on the Raspberry Pi, so if you want to test it out on one of those and report back, I’m sure it would be much appreciated.
This latest mod will root an AT&T Galaxy SIII incredibly easily, as CASUAL handles the download and installation of drivers and runtimes. The end result is a fully rooted device courtesy of Elite Recognised Developer Chainfire’s CF-Auto Root. This will work even for those who are already rooted, so if you’d simply like to help test for compatibility you can do so without unrooting beforehand.
So if you have an AT&T SIII, rooted or not, what are you waiting for? Head on over to the development thread and lend a hand in making this the ultimate cross platform utility.
March 4, 2013 By: Jimmy McGee
Linux 3.4 Kernel has been compiled for the Galaxy S Plus GT-i9001. XDA Developer TV Producer and News Corespondent Jordan reviews this and all the other important stories from this week on the XDA-Developers Portal. Jordan talks about the Windows RT Porting Guide for Windows 32-bit apps.
In Jelly Bean-related news, Jordan talks about an app that makes Jelly Bean Toggles available to all. Jordan talks about one of the latest alternative mobile operating systems and its history, Tizen. Pull up a chair and check out this video. And if you any news to report, feel free to contact any XDA News Writer.
March 3, 2013 By: Haroon Q. Raja
This year’s Mobile World Conference was different from most. There were still all the device presentations, announcements, and revelations that we’ve come to expect from the biggest tech event of the mobile industry each year. What’s different was that this time, the spotlight wasn’t taken by hardware, but rather by software—and for good reason. After all, it isn’t every day that three upcoming mobile operating systems backed by big names like Samsung, Intel, Mozilla, and Canonical are showcased at the same event. Apart from Mozilla’s Firefox OS and Canonical’s Ubuntu Touch, MWC 2013 also saw Samsung and Intel finally showcase Tizen OS running on actual hardware.
Among all contemporary mobile operating systems, Tizen OS has had perhaps the most tumultuous and complex history. First there was Nokia’s Maemo and Intel’s Moblin, before the two companies decided to combine them together into MeeGo, in collaboration with many major hardware and software partners. Then Nokia decided putting all its eggs in Windows Phone’s basket, and abandoned the platform after releasing the amazing N9 running MeeGo with Nokia’s Harmattan UI that won hearts of users and critics alike, despite not making many sales due to Nokia’s abandonment. While all this was occuring, Samsung had also decided to build an open OS of its own in order to decrease its dependence on Android, and the result was Bada. After Intel’s abandonment, the future looked bleak for MeeGo, and it indeed proved out to be so as well. The OS was shortly abandoned completely by all other supporters as well, and Tizen was born under the patronage of The Linux Foundation. Later, Samsung decided to join the picture as well, with an aim to merge Bada with Tizen.
After being in works for several years under all the different names, it was actually disappointing to see what was showcased at the MWC demo. With a conventional home screen that seemed to be nothing more than a mere grid of icons and an overall UI not too different from Android’s, Tizen seems to bring nothing new to the table that might lure users into switching to it when devices running the OS show up in the market. Granted it’s still in the making and what was demoed was essentially an early preview, it came nowhere close to what Canonical showcased in Ubuntu Touch.
The experience offered by the OS running on the demo devices was sub par at best, being laggy as well as lacking anything truly special and intuitive that’s not already out there. For an OS that has been in the making for several years by now and has major names of the industry backing it, this seems nothing short of inexplicable. One good thing was the announcement of the Tizen 2.0 Magnolia SDK being made available for developers to start working on apps for the OS. That said, there’s still a long way to go before we start seeing devices running Tizen hit the market. There have been no official time frames announced in this regard, but it is expected to be late 2013 by earliest. Also, since Bada is essentially being merged into Tizen, many are speculating whether Samsung will decide to abandon the devices running Bada, or upgrade them to the new platform in the future.
Here at XDA, we get excited about any development in the smartphone industry, especially when it’s an open-source mobile operating system aimed to offer a completely open alternative to Google’s semi-open Android ecosystem. We have also merged our Tizen and Bada forums to consolidate development for them under once roof, where you can also join several discussions about the OS.
You can learn more about Tizen and download its SDK from the Tizen website.
If you are a kernel developer for Android devices, you have likely experienced moments of frustration time and time again when trying to build or port a kernel to a new device. Luckily, many of your worries may be eased. In an official statement, Linus Torvalds has made what could be considered as one of the most major announcements in the history of Linux by adding ARM support to the popular free and open-source kernel.
While the initial list of supported ARM architectures is confined to a few server SoCs and development boards, more devices including several consumer-oriented SoCs found in Android devices will be added to the list in the next few releases. It may still take a while for Android to catch up since the Android kernel usually lags a few versions behind the latest stable Linux kernel, but it’s a step in the right direction. As more SoCs gain support, maintaining kernel sources for these ARM devices could become a breeze.
What does it mean for the end users, some of you might wonder. You’ll see quicker ports of popular ROMs to all sorts of Android devices and the “Whats not working” list will shrink greatly, even for very early ports. If all goes as planned, we should start seeing all of this come to realization in 2013.