Common Basic Android Terminal Commands Every Android Owner Should Know – Part 2 of 2

Those of you who read through the first part of the Common Basic Android Terminal Commands Every Android Owner Should Know post are aware that we covered five basic terminal commands device owners should know. Just to recap these were the: adb devices command, the adb push command, the adb pull command, the adb reboot command and the adb reboot – bootloader and reboot recovery command. This article discusses  the remaining five terminal commands namely:  the fastboot devices command, the fastboot OEM unlock command, the adb shell command, the adb install command and finally the adb logcat command.

 

6. The Fastboot Devices Command

The Android Debug Bridge (adb) no longer works when users are working on the bootloader. As such Android users that find themselves not booted in to their devices with the debugging tools not active to communicate with have no alternative but to use the fastboot command in place of adb. Fastboot is generally the most power tool available for the Android device however it can be typically observed that most Android devices do not come with this function enabled.

Android Fastboot

If your device happens to be fastboot enabled it is important to ensure that there is communication between the two. This is where the fastboot devices terminal command comes in to play. All an android device users need to do is key in “fastboot devices” at the prompt so as to receive a serial number much like in the Android Debug Bridge (adb) devices command we coved in part one of this article. If it seems like things are not working and you happen to be a Windows users then the most probably reason for this is that you may have a driver issue. Under such a circumstance heading online to look for a solution in the numerous forums dedicated to offering this type of assistance is the best place to start when trying to sort things out.

 

7. The Fastboot OEM Unlock Command

The OEM (Original Equipment Manufacturer) unlock command which is considered by most users the holy grail of Android commands  and helps users do one thing and one thing alone – which is unlock  Nexus devices (or a HTC device using the official HTC RUU tool). For those of you out there using devices from different manufacturers this Android terminal command will not apply to you. Such individuals have to source for a different tool or method of unlocking things e.g. through the use of ODIN (a computer software program used by Samsung in installing different firmware on devices via USB), .sbf (system binary files) or RUU (ROM Update Utility).

This article includes the Fastboot OEM Unlock Command as one of the basic terminal command that every Android owner should know because even though you as an individual users may not need it, this terminal command constitutes an important part of Android openness. Google is not concerned with what phone and tablet buyers do with the devices they have bought and as such include a simple way to crack them open. This is something we don’t usually see from many tech companies and such constitutes the main reason why most people choose Android.

Using the Fastboot OEM Unlock Command is fairly simple. Once you have ensured that your device and computer are communicating with the fastboot devices command discussed above you have to do is key in “fastboot oem Unlock” at the prompt and press enter. This action will present you with options so make sure you read through them carefully and select wisely.

Tip: Using the “fastboot oem unlock” will erase everything on your device.

 

8. The Android Debug Bridge (adb) Shell Command

This command usually confuses a lot of Android device users because there are basically two ways to use the Android debug bridge (adb) shell command, these are:

  • where the user actually enters the device command shell from their terminal and
  • where the user sends a command to the device to run its own command line shell

Android Shell

Source:

This image above illustrates a scenario where a user is inside the device shell listing the folders and files on their device. Getting to the point illustrated above is fairly simple. All one needs to do is key in “adb shell” and hit enter. Once in, a user can escalate themselves to the root if they need to. It is important to point out and further stress that adb shell command users need to exercise extreme caution here particularly in the case of those individuals who are not familiar ash or bash shells since thing can quickly turn bad if not careful. For those of you who are not familiar, ash and bash are command shells a lot like those used by Mac and Linux computer users. They are nothing like DOS.

The second way to use the adb shell command is in conjunction with one the ash commands that Android devices can run. This method of employing the adb shell command is typically used for more advanced tasks such as running tasks, changing permission on files and folders etc. Using the command is easy – “adb shel <command>”. An illustration of this would be altering the permission on a file as such: “adb shellchmod 666/data/filename”. As mentioned above it is important to remember to be extremely careful when using these commands.

 

9. The Android Debug Bridge (adb) Install Command

While the adb push command enables users to copy file to their Android devices, the Android debug bridge (adb) install command actually installs APK (Android PacKage i.e. .apk) files. Using the adb install command is very similar to using the adb push command since users need to provide the path to the files they wish to install. What this means is that it is always simpler to drop the application you want to install in to your tools folder than taking the longer approach that requires you to keying in the path. Once this is done, the next step involves you telling your device to sideload (this means installing apps without using the official Android Market) as such “adb install AppName.apk”.

To update an application you should use the -r switch i.e. “adb install –r AppName.apk”. There is also the -s switch which allows users to try install apps on their SD card if their ROM supports it and the –i switch which enables users to forward lock the application (i.e. install to/data/app-private). There are a number of other advanced encryption switches however those are left for discussion in another article.

To conclude with the adb uninstall command allows users to uninstall applications by their package name as such “adb uninstall AppName.apk”. This terminal command has a switch of its own too which is the –k switch. Using the –k switch however only helps users to uninstall the application but retain all the cache and application data in place.

 

10. The Android Debug Bridge (adb) Logcat Command

To some Android device users the adb Logcat command is one of the most useful terminal commands out there. However this command just prints a heap of gibberish unless one fully comprehends what they are looking at. This command enable users to return the events written to different logs in the functioning of Android systems and as such offers invaluable data for system debuggers and application developers. Most Android device users will only run this command when requested by an application developer nevertheless it is still important for device owners to know how to appropriately use it.

In order for a device owner to view their log out put on a computer screen they simply need to key in “adb logcat” and press enter. Though things may scroll down quite fast and as such affecting the chances of users finding what they are looking for there are a number of ways in which this can be dealt with, these are through the use of filters or text output. Filter switches are used when application developers have placed tags in their apps and wish to view what event logs are indicating about it. If needed most developers generally tell users what tags to append to commands. The text output approach on the other hand comes in handier since it allows users to log to a .txt file on their computers to allow for easy reading or access later. This command can be used as such: “adb logcat>filename.txt”. Users can let this command run while they do whatever it takes to crash the system program or application they are debugging, once done the command can be closed by hitting the CTRL + C Keys. The full log file can be found saved in the directory a user is working from e.g. the tools folder. This is what should be sent to the developer.

It is important to remember that sensitive data may be contained in the log files and as such it is vital to ensure that you trust the individual you are sending them to. Alternatively users can simply open log files in text editors so as to view what information is included and edit it accordingly.

There are numerous other switches for the logcat command that savvy developers can choose between. Some of the switches include: radio logs or main event, rotate log files on user device or computers and verbosity logs that allow users to change the verbosity of log entries and so much more. Some of these methods are slightly advanced and require users to read through the Android developer documentation before use.

 

Sources:

github

XDA Forums

Android Central

Stack Overflow

 

The Droid Guy

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

What you need to know about cell phone unlocking

unlocked

Did you know that as of Jan 26, 2013, it's "illegal" to unlock your phone? Of course you did. You've seen the "Sky is falling!" headlines

It's not quite that simple, but that's what you'll hear around the Internets today. The too-long-didn't-read simple version is that you'll likely not be affected in any way (minus the personal freedom aspect). But after seeing so many people worried, and some of the poor information they were receiving, we knew it was time to talk about it a bit. 

In 1998 Congress passed a law that provides copyright protection to the software (and software means written code, remember) that locks your cell phone to a certain carrier. This has nothing to do with rooting, or bootloader unlocking. It only covers locking your phone to a GSM carrier through software. As a provision of this law, the Librarian of Congress (which I imagined as a totally hot babe with her hair in a bun, and was quickly disappointed when I investigated) is allowed to grant exceptions, and did until his October 2012 decision to allow the DMCA to regulate cell phone locking. Fast forward to today, when the exceptions expired, and now the software used to lock phones is covered under the same copyright laws as most other software.

It sounds scary. But it's really not. Let's have a look.

read more


Android Central – Android Forums, News, Reviews, Help and Android Wallpapers

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

Nexus Availability Checker App for Android Lets You Know When Your Desired Nexus Device is Back in Stock

nexus-availability-checker

The Google Nexus 4 isn’t quite the success Google expected it to be with the device running out of stock since a few weeks now (basically a couple of weeks after launch). The same goes with the Nexus 10 which is also quite a popular tablet among Android fans, but sadly has been out of stock in the Google Play Store since the past two weeks. And since the Play Store is the only place where these devices are available, there’s no other way for the users to get their hands on these devices. With this condition, users usually resorted to visiting the Play Store listing frequently and clicking the F5 button to refresh the page and see if it’s back in stock the old fashioned way. But now, users might not have to do that anymore with an app letting you know of the devices’ availability via email.

This app called the Nexus Availability Checker, is pretty simple as you would have guessed by the name. It’s not an official Google app, but the UI is pretty idealistic to keep you updated on the availability of your favorite Nexus device. There are a few user defined settings which the users can play around with. The app lets you select the Nexus device that they would like to be updated about and can also select all three if that’s what they want. The app can be set to check the Play Store for availability at various time intervals ranging from once a minute to once a day. Prices are shown in the currency of your region, so that you know how much it costs exactly. The app is developed by Julien Vermet, so here’s shout out to him. There are plenty of users out there aching to get either of the Nexus devices, especially the Nexus 4. But its limited stock has often been disheartening for the users. With this, a notification will pop up (with vibrate or a tone) when your desired device is back in stock again.

We really love the idea of this app and it could go a long way in easing the process of waiting for your beloved Nexus to be back in stock again. However, if all the users grow fond of this app, then I guess we’re back to the same point where everybody is placing the order at the same time, in the end resulting in stocks running out. Download the app from the Google Play Store for free from the link provided below. You can also scan the QR code below to download the said app.

qr-code-nexusavailabilitychecker

Source: Google Play Store
Via: Phone Arena

The Droid Guy

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

The Samsung Exynos kernel exploit – what you need to know

Note 2

A new kernel exploit has been found (credit to alephzain at XDA) that affects some Samsung Exynos chipsets – which happen to power many of Samsung's more popular phones. Normally kernel exploits don't make the rounds as news, but this time the word "malware" got attached to it so it's got a bit of steam behind it.

Let's start this by reminding everyone that any app or program that roots your Android phone or jailbreaks your iOS device is malware by this definition. People really need to give up on that damn click-bait, and instead worry about educating people to help keep them safer. That's what we're going to try to do, so read on and lets have a look.

Source: XDA; More: Chainfire's ExynosAbuse root exploit thread

read more


Android Central – Android Forums, News, Reviews, Help and Android Wallpapers

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

You know your Linux installation is getting a bit old and crusty when …

While there’s always a pack of geeks telling me how they’ve been running the same Debian system since Potato, I’ve found that most desktop systems under any kind of heavy use by those of us who do a lot of experimenting and install a lot of software don’t last forever. Or they won’t last a long time without a great deal of maintenance and fixing mistakes made along the way.
LXer Linux News

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

10 things the “Average Joe” won’t know about Linux

How easy is it for someone to become familiar with Linux? Is there enough information to get started? This article is therefore written for people that have heard the term Linux and wants to know a bit more but doesn’t know where to begin.
LXer Linux News

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

5 things about FOSS Linux virtualization you may not know

KVM and XEN are both better than you think. To help clear out some of the misunderstandings about the status of FOSS Linux virtualization technology, Elizabeth Krumbach details the tools that deliver five advanced virtualization features that are evidently not yet widely known.
LXer Linux News

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

Python modules you should know: Pwtools

Next in our series of Python modules you should know is Pwtools. The package is used to generate and test passwords in Python programs.
LXer Linux News

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

Python modules you should know: SlimIt

Next in our series of Python modules you should know is SlimIt. I previously wrote about the minification of CSS files, the Slimit package is used for minification of Javascript files.
LXer Linux News

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

Some time-saving tips that every Linux user should know

Here is a selection of command-line tips that I’ve found useful when working on Linux. The emphasis is on somewhat less-known techniques that are generally important or useful to technical users. It’s a bit long, and users certainly don’t need to know all of them, but I’ve done my best to review that each item is worth reading in terms of projected time savings, if you use Linux heavily.
LXer Linux News

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

Ubuntu Smart TV, everything you must know!

TV is becoming smart and so is Canonical. Canonical has displayed the Ubuntu TV, prototype unit, at the ongoing mega event of Consumer Electronic Show the CES 2012 in Las Vegas. In the exhibition…


Unixmen

StumbleUponDiggTwitterFacebookRedditLinkedInEmail

Weekend Project: Get to Know Btrfs

The Butter/Better/B-tree Filesystem, Btrfs, is supposedly destined to become the default Linux filesystem. What makes it special, and what's wrong with good old tried-and-true Ext2/3/4?

Linux.com – Original Content Feed

StumbleUponDiggTwitterFacebookRedditLinkedInEmail