Tuesday, 17 February 2015

Beginners Guide: Making the first Android Application Project

Every time I show my newly developed Android application in my college, the first question my friends ask and demand for an answer is 'how exactly should we make an Android application?' and 'where should we start from?'. So for the people having the same curiosity and interest for Android Apps, I have decided to spend some time writing a short tutorial guiding every one of them to become future Android developers. Before reading this, please note that I assume everyone who visited this page to create their first Android app, have a minimum knowledge about Java SE, the main programming language you will be dealing with, and XML to create the User Interface for you application.

Requirements to Make an Android Application:

  • Java JDK (Java Development Kit), the versions change from time to time, download it from here.
  • Android ADT Bundle, which includes Android SDK(manager) and Eclipse (the console where you will be creating apps). Download it from here.
Though Google recommends Android Studio, most of the developers use Eclipse. Download the above softwares and install them. Android ADT Bundle doesn't require any installation. Just download the zip file and extract it. When you are done, let's proceed.

Note: You can now develop Android apps on-the-go on your Android phone or tablet using the app AIDE. It works same as Eclipse. Apps developed using AIDE can be exported to Eclipse. Thanks a lot for the developers - original thread here.

Getting things ready:

When you open Eclipse for the first time you will be asked to select the location to your workspace, where all your developed apps will be stored in the future. Just create a folder in your desired location and link to it.

Creating the Android App:

So because this is your first Android application, all your app does is simply display a text on the center on screen.

Before making the app, you will need to know some terms related to Android development.

  • Activity - Activity is one what you see on your Android device's screen when the app is running. It is your app's user interface which includes text widgets, button widgets and more.
  • Class - Every Activity(XML file) will have a Java .class file running behind it.
  • Android Manifest - 'AndroidManifest.xml' is the heart of the application. It includes all the Java .class files used for running the application, app theme, and the sdk level used to create the app.

If you are getting confused, just read and ignore them. You will get to know them later by yourself. All you need to remember is "User Interface is managed by .xml files and programming is managed by .class files".

When you are ready with Eclipse, follow the below steps to create your first application.
  1. Click File --> New --> Android Application Project.
  2. Enter the Application name as anything you like. I'm entering MyFirstApplication.
  3. Click Next three times and now select 'Blank Activity' (We'll talk about this later).
  4. Leave the Activity name as 'MainActivity' and click finish. This creates two files. A .Class file named 'MainAcitivity.java' and a .Xml file named 'activity_main.xml'
The activity_main.xml file has the code that makes the UI of your Android application. The Xml file is referred as layout file, which by default is located at res/layout/xml file here.



First of all, remove the code in activity_main.xml and paste the below code.
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
   xmlns:tools="http://schemas.android.com/tools"  
   android:layout_width="match_parent"  
   android:layout_height="match_parent"  
   android:orientation="vertical"  
   android:gravity="center">  
   <TextView  
     android:layout_width="wrap_content"  
     android:layout_height="wrap_content"  
     android:text="Hello world" />  
 </LinearLayout>  
  
Every layout file will have a type of layout which surrounds all the widgets. LinearLayout is what all the beginners start with. The next thing you need to know is layout_width and layout_height. These properties specify the dimensions of layout. The Orientation property specifies the order of widgets present inside the LinearLayout. The Gravity property specifies the location of child widgets inside the layout.

Inside the LinearLayout we have a 'TextView' widget that simply displays the desired text on the screen. The 'text' property specifies the text that needs to be displayed.

We are done with UI, now let's look at code which handles the xml file. Remove the code inside the MainActivity and paste the below code.     
 package com.example.myfirstapplication;  
   
 import android.app.Activity;  
   
 public class MainActivity extends Activity {  
   
   @Override  
   protected void onCreate(Bundle savedInstanceState) {  
     super.onCreate(savedInstanceState);  
     setContentView(R.layout.activity_main);  
   }  
   
 }  
   
The above code has a method onCreate, which runs the first time when the activity is created. You need not know about the arguments now. Next the UI required for this code is set using the method setContentView(R.layout.layout_name); This code is enough for your app to display the required text on the screen. Now its time to test your code.

Your app can be tested in Android virtual device but I recommend connecting a real device to pc and debug the app. To test your app, you need to enable 'USB Debugging' on your device. Usually this option is found in 'Developer Settings'. Enable it and connect your device using USB cable.

Now click 'Run --> Run' or press 'Ctrl + F11', you device should be automatically detected and listed. Your app will be automatically installed and opened in your device.

Congrats! you have made your first Android application. Go play with the code and see the changes in the application. These are basic steps to make the Android application. There are lot of topics to know in Android development. All the information you need can be found at developer.android.com and your doubts can be clarified at Stackoverflow.com.

Friday, 13 February 2015

How To Break Windows 8.1, 8, 7, Vista and Xp Administrator Password Using Kali Linux Live Boot

break windows passwords kali linux

Sometimes you may have to break windows pc password for any purpose. There are many softwares out there that can do it and the most known one is the OphCrack, which uses rainbow tables to break windows passwords. In this tutorial we are going to use Kali Linux live CD or USB to break the admin password. Using this tutorial you can break both guest and Admin password. Now lets look at the requirements. If you already have a bootable Kali Linux medium you can skip to breaking(cracking) process.

Requirements:

  • An Empty CD or USB drive (2GB would be fine).
  • Kali Linux ISO. Download it from here (32bit and 64bit, both will work).
  • Win32 Disk Imager to flash the ISO to CD or USB. Download it from here.
  • Access to some other PC to make Kali Linux CD.

Creating Kali Linux Live Boot CD or USB:

When you have got all the required things, follow the below steps.
  • Download the Win32 Disk Imager and open it.
    break windows passwords kali linux
  • Insert the empty CD or plug in your pen drive to USB port. In this tutorial i am going to use USB drive.
  • In Win32 Disk Imager select the drive letter of your inserted USB drive.
  • Now specify the location of the Kali Linux iso and then click on write.
    break windows passwords kali linux break windows passwords kali linux
  • Wait for the flashing process to complete and when done, remove the USB from the pc.
Now we have a bootable USB drive. Let's start the hacking process.

The Breaking Process:

When you are ready, follow the below steps one by one to break password.
  • Plug in the Kali Linux Live USB to any of the USB ports and switch on the pc.
  • Enter the BIOS Settings and set the first boot device as USB hard drive, save the settings and restart the pc.
  • Now you see a Kali Linux welcome screen with a list of options.
  • Select the 3rd option which says Live (forensic mode). Wait for the booting process to complete.
  • Once you are on desktop click terminal or press Ctrl + Alt + t to open terminal.
  • In terminal window press the following commands (just type the bold letters) one by one carefully.(follow screenshots)


cd /

cd media/  
 --Displays the list of local drives, you need to find out which one has windows installed on it--

cd hard-drive-name/  
--Replace hard-drive-name with the name of your local drive having windows in it--

cd Windows/System32/config/



ls -l SAM*



chntpw -l SAM



chntpw -u account-name SAM  
--Replace account-name with the name of windows account you want to hack, if you going to hack Admin account just type Administrator--
Now enter 1 to remove Administrator account password. Again enter below command.

chntpw -u account-name SAM

Now enter 4 to unlock Administrator account.

You're done! You have just hacked ADMIN password. Now turn off the Kali Linux. Remove the USB drive and restart the pc.


Also see:
When windows boots up you can see the administrator account, just click it and you will be logged in! Happy Hacking!

Screenshots:(click to enlarge)

break windows 8.1,8,7 admin passwords kali linux

break windows 8.1,8,7,vista,xp administrator passwords kali linux

break windows admin passwords kali linux


break windows admin passwords kali linux


Disclaimer: Breaking passwords without Administrator permissions is illegal. Lets Hack Something and its authors claims no responsibility for any cyber malpractices. This tutorial is for educational purpose only.