Sunday, August 23, 2015

BQ Ubuntu Phones launching finally in India!

It is about time Ubuntu Phones are launched in India. The Spanish smartphone manufacturer BQ has finally launched them worldwide recently.

The 8 GB BQ Aquaris E4.5 Ubuntu Edition features a 5 MP front camera and a 8 MP rear camera which has auto-focus, dual flash and full HD 1080p for real sharp video recording. It boasts a MediaTek Quad Core Cortex A7 processor and a 1 GB RAM for a faster experience. It has a 2150 mAh battery.

The 16 GB BQ Aquaris E5 Ubuntu edition comes with a lot more impressive features such as a 5" IPS HD (720 x 1280 pixels) display. The device features a 5 MP front camera and 13 MP rear camera, equipped with HQ Largan lenses and BSI sensors. It also boasts a 2500 mAh battery.

They both have a micro-SD slot with which you can increase your storage space up-to 32 GB. The batteries are non removable which maybe a negative aspect for some.

While the E4.5 goes for nearly Rs. 11,999/-, the  E5 goes for nearly Rs. 13,999/-. They both are for sale only on snapdeal for now. It is recommended to go for the E5 which has a better camera, a bigger battery and a better screen.

If you have more money to buy a better Ubuntu phone wait for the Meize MX4 Ubuntu version to launch soon.

Windows Fastboot and Linux

Windows 8 hibernates in fast boot mode so you can boot faster. This will cause problems when you switch to other OS make changes to filesystems and then boot back to windows. Read about it here.

And as far as i tested it no issues! Still it is only read only access better than nothing. More details on the process below:


Source:

Unable to mount Windows (NTFS) filesystem due to hibernation

Workaround for all versions of Windows:
There are three ways to mount a hibernated Windows partition:

  1. Boot into Windows and power down the system by shutting it down completely. You may then boot back into Ubuntu and the partition will mount in read-write mode automatically when you open it in Nautilus.Note that the "Shut Down" option may not be the one displayed in your start menu by default. You may need to click the button next to it to see further options.
  2. Manually mount the filesystem in read only mode.
    • Check to see if you have a mount point (folder for mounting your partition in) for your Windows partition in the folder /media using this command:
      ls /media
    • If you don't see a folder for your Windows partition, you should create one with the following command:
      sudo mkdir /media/windows
    • Next, mount the partition in read-only mode onto this folder with this command:
      mount -t ntfs-3g -o ro /dev/sda3 /media/windows
      Note that you should change /media/windows if your mountpoint is called something else.
    • Now you will be able to view/open files on your Windows partition using any program in Ubuntu. However you will not be able to write to the partition or modify any files as it is in read only mode.
  3. If you need to mount the partition in read-write mode and are not able to or willing to boot into Windows and shut it down completely there is a third option. However, it is not included here because it completely deletes hiberfil.sys and will cause you to lose all unsaved information in the hibernated Windows programs. The following is a quotation from man ntfs-3g about the option that would be used to do this.
    remove_hiberfile               Unlike in case of  read-only  mount,  the  read-write  mount  is               denied  if  the  NTFS  volume is hibernated. One needs either to               resume Windows and shutdown it  properly,  or  use  this  option               which  will  remove  the  Windows hibernation file. Please note,               this means that the saved Windows  session  will  be  completely               lost. Use this option under your own responsibility.
Solution (only for Windows 8):
There is a new feature in Windows 8 called Fast Startup. If this feature is enabled (which it is by default), Windows 8 does not actually completely shutdown when you choose shutdown. Instead, it does a "hybrid shutdown". This is something like hibernating; it makes booting Windows 8 back up faster. So, you need to disable this feature to be able to shut it down properly, and be able to mount the Windows partitions. To do this, boot into your Windows 8 and:

Note: disabling Fast Startup will most likely make your Windows 8 take a longer time to boot. There are no "exact" numbers, but let's say that if it took you 10 seconds to boot into Windows 8, it will now take you 50 seconds after disabling this feature.
1. Open Control Panel in the small icons view and click on Power Options.
2. Click on Choose what the power buttons do.
3. Click on Change settings that are currently unavailable.
4. Uncheck Turn on fast startup (recommended).
Click on the numbers above to see screenshots.
Click on Save changes. Now, shutdown Windows 8 and boot back into Ubuntu.
If you still aren't able to mount without getting errors, you may need to turn off hibernation completely. Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:
powercfg /h off
Source: Fast Startup - Turn On or Off in Windows 8.

Ubuntu Linux Versions

All even year .04 are LTS versions in Ubuntu. They get Five years of support from Ubuntu community and Canonical Inc.. 

LTS versions - Every even year April - 5 years of support from then.

Non - LTS versions - Every 6 months on April/October except the LTS cycle - 9 months of support from then.

If you want a more stabler smooth system LTS versions are recommended. For gaming purposes too this applies. But you would be better of with newer releases on this one. Mesa and Kernel updates mostly improve with latest versions.

For Testing out the current live test build you can go here:

http://cdimage.ubuntu.com/daily-live/current/ (updated daily)

Currently, for Nvidia gamers on Ubuntu they can use this ppa to get their driver updates easily,


To add the PPA run the following in a new Terminal window:
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get update
To undo this addition of ppa you can use the ppa-purge command. Not always does a driver update in Linux or any other OS for that matter goes smooth so research online forums before doing your graphic driver update!


Friday, February 20, 2015

Delete files older than certain period of time in UNIX

It is often required to delete old unnecessary archived files when administrating a UNIX system. So to make this work easier I have written the following command:

find /directory/path  -type f -mtime +1  -print | xargs -I {} rm {}

By executing this command, all files in the specified folder that are older than a day i.e. 24 hours will be deleted

If you want to specify the time in minutes do this

find /directory/path  -type f -mmin +360  -print | xargs -I {} rm {}

Specify your time instead of 360.

You could also write a shell script and schedule it in crontab to run it any time you want to.

CAUTION: slightest error could cause the loss of invaluable data. So do it at your own risk.

Monday, February 16, 2015

File systems usage in UNIX

It is hard to parse the output of the df unix command with the human eye. So I have written a simple solution for it. The following command will fetch you the list of filesystem whose usage is greater than eighty percent in descending order.
df -g | awk '{print $4 "\t" $7}' | sort -nrk 1 | egrep "([89][0-9]|100)%"
Output will be like this:
85% /filesystem1
82% /filesystem2
82% /filesystem3
81% /filesystem4

You can remove the final egrep to view all the file systems. Like this:
df -g | awk '{print $4 "\t" $7}' | sort -nrk 1
Feel free to comment below!

Unlocking user account in AIX

When you have a locked user account but still have root access and the old password you can unlock it by entering the following two commands:
chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s username 
chuser "account_locked=false" username
The first command sets the unsuccessful login count back to zero and the second command unlocks the account. The user can use his account without resetting his/her account.
Obviously the second command by itself wouldn't unlock the account so you would have to enter both the commands.

If you do not have the old password then do this in root:
echo username:password | chpasswd -e
If you feel insecure about giving your password like this then you can give your password in encrypted for :
perl -e'print crypt("password","salt")'; echo -e
echo username:cryptedPass | chpasswd -e
Please feel free to share your comments below

Friday, February 13, 2015

Guide to root your Moto G! Step 3 of 3

This is a important step. You have rooted your device and you have full access to your Moto G! So does your apps. Grant permission to only those apps that you feel right about or atleast Google them before granting full access. Granting root access to malicious apps puts you in danger so think twice before doing it.

Now That we have rooted your Moto G. We can do whatever we decide to do. However, There are three options..

Option 1: Install Xposed Framework

Xposed is a really awesome framework but it is only for stock roms. We can get access to most options and stuff you get by installing a rom. This is for those who feel stock rom is enough!

A few apps come to mind. You can install Greenify, LMT Launcher.

Option 2: Install a ROM

You can really enter into the world of Android and swim in its awesomeness by venturing into the the ROM arena. You have lots of options lots of customizing optiona and a ton of ROMs!
You can start by looking this XDA thread:
XDA Moto G ROMs and Kernels Index

You could also install a custom Kernel if you know what your doing.

I have tested a lot of ROMs. Only few have made a significant impact:
Xperience ROM
Cyanogenmod 11

Xperience rom with Lollipop 5.02 is currently my daily driver right now. If you find a better one say it in the comment below!

Option 3:Unroot

Rooting isn't for everyone. and might feel happier if their device is unrooted and locked.
Unrooting and locking the bootloader is also fun. Expect a Guide to unroot your Moto G in the Future!

I am open to your reviews and your experience doing this Guide. Please share your comments below!!

Guide to root your Moto G! Step 2 of 3

Proceeding with the guide...

Unlocking the boot loader

Power off the Android device.
Now press the power button and the volume down simultaneously for a few seconds
The fastboot screen comes on the phone.
Be careful on what you are doing here. Do nothing for now.
Connect your Moto G to your windows PC/ laptop using the USB cable.
And follow the clearcut instructions given to you by Motorola on unlocking the boot loader from here:
Motorola Unlocking the Bootloader

Your device is now unlocked. There will be a "Bootloader Unlocked" message at the time you power on the device. like this you can ignore it


Now that you have unlocked it we are moving on to the next step.

Flashing the Custom Recovery
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about this Guide
* before doing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.*/
We need to flash the recovery.img that we have previously downloaded.

Before doing please see to that the USB debugging option is enabled in the Developer options Settings. If not enable it.

Power off the Android device.

Now press the power button and the volume down button simultaneously to get into the bootloader.


It must say that your device is unlocked with status code 3.

Connect your device to your computer using the USB cable. In your phone it will say USB connected.

Now that it is connected open up a command prompt in the folder where you have downloaded the recovery image by right clicking while pressing the shift key.
fastboot devices
The above command will list your device. proceed to the next step.

Please rename the downloaded philz recovery image file as recovery.img. Now Enter this command:
fastboot flash recovery recovery.img
It might say partition size mismatch but its ok. Enter the next command.
fastboot reboot
It wil boot normally. Now place the SuperSu.zip file into your device by connecting with computer using USB cable. Place it any folder but remember the path.

Power off the Moto G and boot into the bootloader by pressing the power button and the volume down button simultaneously.
Select the recovery option by pressing the volume down button once and pressing the volume up button

Choose "Install Zip". Then select "Choose zip from /sdcard". Now select the folder in which the SuperSu.zip is present. And select the zip file. Select yes install zip and it will install the zip. When it finishes touch once anywhere and then select "Go Back". then select "Reboot System now".

And you are done!! Your Moto G is now rooted!

Next step is the important step proceed.
Next Step:Step 3 - What to do now?

Guide to root your Moto G! Step 1 of 3

When I rooted my Moto G, It was very hard to find a simpler good tutorial than this. So I am posting here the simple way to do it. I am doing this using a windows laptop.

Windows PC/LAPTOP instructions:
Download the Motorola Device Drivers from here:
Motorola Device Drivers
Install the 15 second ADB Fastboot installer downloading from here:
Follow the instructions properly.
ADB is necessary for backup and restore of data from your phone.
Fastboot is necessary to unlock your boot loader and for flashing the recovery.
Download these too:
latest version of philz recovery and SuperSu from here:

Philz Recovery (download the .img file and rename it to recovery.img after downloading)
SuperSU

Now that the windows is ready, moving onto the Next steps:

Firmware Download:
Not always does rooting your android or flashing a rom go according to plan. You may want to even want to device software to unroot your device. So it is necessary to always have your device's firmware when you do these stuff.
You can download these from here:
Filefactory Folder

for XT1033 you can find firmwares in the following XDA thread
XDA XT1033 firmwares

choose your firmware that fit your device. XT1033 firmware may not work for xt1032 and vice verse so choose the proper firmware. Firmware are While the firmware image is downloading proceed to the next step.

Taking Backup:
It is always good to have a backup. As we are about to unlock the boot loader, all the data on your phone will be wiped and be set back to factory settings.
If you do not want the current data, you can skip to the next step.
Do the following steps to take a backup:

1. Enable USB debugging under developer options in settings.
If you have done this already proceed to Step 2.
If you don't see the developer options in your settings then you have not yet unlocked it yet.
1a.To unlock it go to the About phone in settings and tap the build number 7 times.
It would display you are now a developer.
1b. Then go back and you will now see a developer options entry. Now do the aforementioned first step.

2. Connect your Moto G to your windows PC/ laptop. In notifications it will show "USB debugging connected"

3. Create a new folder on your desktop. Go into the folder and right click while pressing the shift key inside the folder. Choose the 'open command prompt here' . this fires up the command prompt in the current folder.

4. In the command prompt enter this command to check whether your device is connected or not.
adb devices
This will display whether a device is connected or not. Also in your device give access in the prompt that pops up.

5. Now that the device is connected, we can proceed with the backup. Enter the following command
adb backup -apk -shared -all
This prompts a encryption pin for the backup on your phone. It is recommended to enter a PIN and proceed. Although you can proceed without giving a PIN at all.
Please remember or note down the PIN because you will have to enter it again to restore the backup!
This would make a complete backup of your phone with all apps apks and data. It doesn't take a backup of your SMS messages and media. So copy all media from phone to computer through mass storage. Use the SMS backup and restore app to take backup of SMS messages.
This step could take about an hour depending the amount of data you have on your phone.
You will know the backup has ended when command prompt is ready to accept new commands.

Now that you have taken your backup. We can move to the next step to unlock your bootloader and flashing recovery.

Next Step: Step 2 - Unlocking Bootloader And flashing custom recovery

Saturday, January 31, 2015

The Start

I've deceided to start a blog on my daily experiences and tips i've been learning everyday..

The experiences will be useful to everyone..