Showing posts with label apkedit. Show all posts
Showing posts with label apkedit. Show all posts

Tuesday, April 21, 2015

How to install Android 5.1 lollipop CyanogenMod 12.1 ROM in Micromax Yu Yureka

Yu Yureka can now be updated with the latest version of custom Lollipop update, thanks to the release of Android 5.1 based CyanogenMod 12.1 ROM from the industrious XDA Developer, varun.chitre15.
hirpara
The new CM12.1 ROM follows the recent release of Cyanogen OS 12S update (click link to see tutorial) for the flagship handset and it is mandatory to ensure that your smartphone is already running the Cyanogen OS 12S update, before you start flashing the CM12.1 ROM on the handset.
Micromax Yu Yureka hirpara
Android 5.1 CyanogenMod 12.1 ROM hits Micromax Yu Yureka: How to install
Interested users may browse for the original CyanogenMod source code via github and also find the necessary Yu Yureka kernel source code for CM12 ROM here.
The Android 5.1 CyanogenMod 12.1 ROM can be installed either via TWRP or ClockworkMod (CWM) recovery, using the step-by-step guide posted below.
Micromax Yu Yureka hirpara
IBTimes UK reminds readers it will not be held liable for any damage to device during or after the Android 5.1 Lollipop firmware installation. Users are advised to proceed at their own risk.
Pre-requisites
  • The instructions given in this guide are meant for the European variant of Micromax Yu Yureka only. Verify device model number by navigating to Settings > About Phone.
  • Ensure the phone has at least 80% battery charge to prevent unexpected device shutdown (due to battery drain) while installing the ROM.
  • Back up data and settings using a recommended custom recovery tool, like ClockworkMod (CWM) or TWRP, as it creates a complete image of the existing phone setup. In Recovery, choose Backup and Restore and tap Backup.
  • Verify correct USB drivers for the phone are installed on the computer (download Yu Yureka USB drivers).
  • Enable USB Debugging mode via Settings > Developer Options (if running Android 4.0 or above) or Settings > Applications > Development (if running Android 2.3 or earlier).
  • Ensure that the device is rooted with CWM recovery installed and its bootloader is unlocked.
Downloads Required
Android 5.1 CyanogenMod 12.1 ROM for Micromax Yu Yureka
Google Apps
Steps to Install Android 5.1 Lollipop on Micromax Yu Yureka via CyanogenMod 12.1 ROM
Step 1 - Download Android 5.1 CyanogenMod 12.1 custom ROM for OnePlus One on the computer.
Step 2 - Connect and mount the phone's USB mass storage on computer with USB cable.
Step 3 - Now, copy the downloaded CM12.1 ROM zip file to the root folder on the phone's SD card.
Step 4 - Power off the phone and disconnect its USB cable from computer.
Step 5 - Boot the device into Recovery Mode by pressing and holding Volume Up, Volume Down and Power buttons together for around 7 to 8 seconds.
Step 6 - Once the phone enters CWM Recovery, perform a full data wipe task by clicking Wipe Data/Factory Reset. Use the Volume keys to navigate between options and Power button to select an option in the Recovery Mode.
Step 7 - Perform Wipe Cache Partition and wait until the process completes.
Step 8 - Perform Wipe Dalvik Cache as well. To do this, go to 'advanced' option and then click Wipe Dalvik Cache. This will help in preventing boot loop issues or any boot ROM related errors during firmware installation.
Step 9 - Then return to the main recovery menu and choose Install Zip from SD card.
Step 10 - Click Choose Zip from SD card. Use volume keys to navigate to the CM12.1 ROM zip file that you copied earlier to your phone's SD card and choose it by tapping the Power button. Confirm the ROM installation on next screen and the installation process will begin.
Note: Repeat Step 9 and Step 10 to install Google Apps (Gapps) as well.
Step 11 - Once the ROM and Gapps installation completes, go to "+++++Go Back+++++" and select Reboot System Now in the Recovery menu.
The phone will now reboot and the first boot may take about five minutes to complete. So, please be patient.
Your Yu Yureka is now running the latest Android 5.1 Lollipop via CyanogenMod 12.1 custom ROM. Go to Settings > About phone to verify the firmware version installed.

Tuesday, March 3, 2015

How to Decompile and Recompile Apk(anroid Application ) by using Apktool

How to Decompile and Recompile Apk(anroid Application ) by using Apktool

hirpara

REQUIREMENTS:
1. Basic Terminal Knowledge
2. Java JRE here
3. 7zip here
4. Notepad++ here
5. Apktool & Baksmali/Smali + Signer for all GB/ICS/JB ROM v2 here





  • ::::Extract Apktool to folder directory::::
  • Windows XP: C:\Document and Settings
  • \your computer name\here
  • Windows 7: C:\Users\your computer name\here



1. Copy and paste framework-res.apk to apktool folder
2. Copy and paste Apk you want to edit to apktool folder. For example: Settings.apk
3. Now Open Command Prompt.bat (CMD)


[Install framework-res.apk and Decompile apk]
Code:
apktool if framework-res.apk [Press Enter]
apktool d Settings.apk [Press Enter]
4. Now you will see a decompiled folder with a name Settings






5. Now you can start editing png, xml, smali file etc..
6. After editing is complete, Now Recompile it..
Code:
apktool b Settings [Press Enter]




 
How to Decompile and Recompile Apk(anroid Application ) by using Apktool
7. After Recompile is complete, go to Settings folder, Open dist folder and open Settings.apk

by using 7zip
8. Open Original Settings.apk which is on the apktool folder by using 7zip
9. Now Drag & Drop META-INF folder and AndroidManifest.xml from Original Apk to Modded Apk which is on the dist folder.









10. Finally, push back your Modded Apk into the system/app or push manually by using Root Explorer/Root Browser or make a Flashable Zip.

Thursday, February 26, 2015

Android Audio Manager New Tutorial

in  post, I will be discussing about using , AudioManager Class in Android applications.

with AudioManager Class provides access to volume and ringer mode control which was added in API level
I wrote separate post about using AudioManager in getting and setting the current device’s volume (Media player, , Notification etc) long back.

But in this post, I am going to discuss about using AudioManager in getting and setting the ringer mode (Silent, Vibrate and Normal).
What is Seekbar?
A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch the thumb and drag left or right to set the current progress level or use the arrow keys.
Usage: Seekbar can be used to adjust media player volume, set brightness of the screen, seek a playing music etc.
What are we going to develop?
We will develop a simple application to demonstrate how it is used to set Media player, Ringer, Alarm and Notification volume for your device.


Quick Links.

  • Project Structure
  • Code Listings
  • Demo
  • Download Source Code

Project .Structure

Layout creation:
  • Create new android project [File >> New >> Android Project] with project name SeekBarExample
  • Click next and select target android device version [I chose version 2.2]
  • Click next and enter package name – ‘com.prgguru.android’
  • Click finish

Code Listings

Layout XML:
Open main.xml present under /res/layout folder and replace the XML with the below one.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Adjust Media player volume"
        android:textAppearance="?android:attr/textAppearanceLarge" android:padding="10px"/>
    <SeekBar
        android:id="@+id/seekBar1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    <TextView
        android:id="@+id/textView2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Adjust Ringer volume"
        android:textAppearance="?android:attr/textAppearanceLarge" android:padding="10px" />
    <SeekBar
        android:id="@+id/seekBar2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />   
    <TextView
        android:id="@+id/textView2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Adjust Alarm volume"
        android:textAppearance="?android:attr/textAppearanceLarge" android:padding="10px"/>
    <SeekBar
        android:id="@+id/seekBar3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    <TextView
        android:id="@+id/textView2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Adjust Notification volume"
        android:textAppearance="?android:attr/textAppearanceLarge" android:padding="10px"/>
    <SeekBar
        android:id="@+id/seekBar4"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</LinearLayout>
Application layout will look like:
Change to graphical layout of Main.xml, the layout design should look like below:

Create following objects under SeekBarExampleActivity class to refer seekbars and to get audimanager:
1
2
3
4
5
private SeekBar mediaVlmSeekBar = null;
private SeekBar ringerVlmSeekBar = null;
private SeekBar alarmVlmSeekBar = null;
private SeekBar notifyVlmSeekBar = null;
private AudioManager audioManager = null;
Suggests an audio stream whose volume should be changed by the hardware volume controls. Add following snippet inside onCreate method after ‘super.onCreate(savedInstanceState)’
1
2
3
4
this.setVolumeControlStream(AudioManager.STREAM_MUSIC);       
this.setVolumeControlStream(AudioManager.STREAM_RING);   
this.setVolumeControlStream(AudioManager.STREAM_ALARM);
this.setVolumeControlStream(AudioManager.STREAM_NOTIFICATION);
A separate method ‘initControls’ to handle the seekbars is going to be created, call it inside onCreate method:

1
initControls();
private void initControls() {
//Return the handle to a system-level service - 'AUDIO'.
audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
//Find the seekbar 1
mediaVlmSeekBar = (SeekBar) findViewById(R.id.seekBar1);
//Set the max range(Volume in this case) of seekbar
//for Media player volume
mediaVlmSeekBar.setMax(audioManager
        .getStreamMaxVolume(AudioManager.STREAM_MUSIC));
//Set the progress with current Media Volume
mediaVlmSeekBar.setProgress(audioManager
        .getStreamVolume(AudioManager.STREAM_MUSIC));
//Find the seekbar 2
ringerVlmSeekBar = (SeekBar) findViewById(R.id.seekBar2);
//Set the max range(Volume in this case) of seekbar
//for Phone ringer volume
ringerVlmSeekBar.setMax(audioManager
        .getStreamMaxVolume(AudioManager.STREAM_RING));
//Set the progress with current Ringer Volume
ringerVlmSeekBar.setProgress(audioManager
        .getStreamVolume(AudioManager.STREAM_RING));
//Find the seekbar 3
alarmVlmSeekBar = (SeekBar) findViewById(R.id.seekBar3);
//Set the max range(Volume in this case) of seekbar
//for Alarm volume
alarmVlmSeekBar.setMax(audioManager
        .getStreamMaxVolume(AudioManager.STREAM_ALARM));
//Set the progress with current Alarm Volume
alarmVlmSeekBar.setProgress(audioManager
        .getStreamVolume(AudioManager.STREAM_ALARM));
//Find the seekbar 4
notifyVlmSeekBar = (SeekBar) findViewById(R.id.seekBar4);
//Set the max range(Volume in this case) of seekbar
//for Notification volume
notifyVlmSeekBar.setMax(audioManager
        .getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION));
//Set the progress with current Notification Volume
notifyVlmSeekBar.setProgress(audioManager
        .getStreamVolume(AudioManager.STREAM_NOTIFICATION));
try {
    //Listener to receive changes to the SeekBar1's progress level
    mediaVlmSeekBar
        .setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
    public void onStopTrackingTouch(SeekBar arg0) {
        }
    public void onStartTrackingTouch(SeekBar arg0) {
        }
    //When progress level of seekbar1 is changed
    public void onProgressChanged(SeekBar arg0,
        int progress, boolean arg2) {
    audioManager.setStreamVolume(
        AudioManager.STREAM_MUSIC, progress, 0);
    }
 });
   //Listener to receive changes to the SeekBar2's progress level
   ringerVlmSeekBar
         .setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
   public void onStopTrackingTouch(SeekBar arg0) {
        }
   public void onStartTrackingTouch(SeekBar arg0) {
        }
   //When progress level of seekbar2 is changed
   public void onProgressChanged(SeekBar arg0,
        int progress, boolean arg2) {
    audioManager.setStreamVolume(
        AudioManager.STREAM_RING, progress, 0);
     }
 });
   //Listener to receive changes to the SeekBar3's progress level
   alarmVlmSeekBar
        .setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
   public void onStopTrackingTouch(SeekBar arg0) {
        }
   public void onStartTrackingTouch(SeekBar arg0) {
        }
   //When progress level of seekbar3 is changed
   public void onProgressChanged(SeekBar arg0,
        int progress, boolean arg2) {
     audioManager.setStreamVolume(
            AudioManager.STREAM_ALARM, progress, 0);
    }
 });
   //Listener to receive changes to the SeekBar4's progress level
   notifyVlmSeekBar
        .setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
   public void onStopTrackingTouch(SeekBar arg0) {
        }
   public void onStartTrackingTouch(SeekBar arg0) {
        }
   //When progress level of seekbar4 is changed
   public void onProgressChanged(SeekBar arg0,
            int progress, boolean arg2) {
     audioManager.setStreamVolume(
        AudioManager.STREAM_NOTIFICATION, progress,0);
    }
 });
} catch (Exception e) {
    e.printStackTrace();
}
}


Demo

Let us test the application:
Run click on the project >> Run as >> Android application
You could see following screen:

Saturday, February 7, 2015

How To CREATE Android Custom ListView with Example

Android Custom ListView with Images and Text  Example


hirpara group

Creating Project:

Make sure you have properly setup the Android SDK, AVD for Testing the Application. Create a New project in Eclipse IDE with the package as “hirparagroup.customlistview”. Create the Main Activity as “MainActivity” and the main Layout as “activity_main”.

Creating Layout:

The Main layout for our project is “activity_main” which has a ListView to display the array with images.
activity_main.xml
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >
    <ListView
       android:id="@+id/list"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
    </ListView>
</RelativeLayout>
Next step is to create a layout for the list item that is to be displayed in ListView. Create the layout as list_single.xml which has a TextView to display to the Array and a ImageView to display set of images in each list item. Here I have created the layout as TableLayout with ImageView and TextView in a Row.
list_single.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <TableRow>
        <ImageView
            android:id="@+id/img"
            android:layout_width="50dp"
            android:layout_height="50dp"/>
        <TextView
            android:id="@+id/txt"
            android:layout_width="wrap_content"
            android:layout_height="50dp" />
</TableRow>
</TableLayout>

Creating Activity:

Before Creating the MainActivity we must create a CustomList class for our custom ListView.
CustomList.java
package learn2crack.customlistview;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class CustomList extends ArrayAdapter<String>{
private final Activity context;
private final String[] web;
private final Integer[] imageId;
public CustomList(Activity context,
String[] web, Integer[] imageId) {
super(context, R.layout.list_single, web);
this.context = context;
this.web = web;
this.imageId = imageId;
}
@Override
public View getView(int position, View view, ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
View rowView= inflater.inflate(R.layout.list_single, nulltrue);
TextView txtTitle = (TextView) rowView.findViewById(R.id.txt);
ImageView imageView = (ImageView) rowView.findViewById(R.id.img);
txtTitle.setText(web[position]);
imageView.setImageResource(imageId[position]);
return rowView;
}
}
Next step is to create MainActivity. Here we are defining the array “web” which is displayed as text in ListView. Next we define a array imageId to store the Image Id. The images should be placed in the location /res/drawable/. Next custom list adapter is displayed. When a list item is clicked it shows a Toast that it is clicked.

MainActivity.java
package learn2crack.customlistview;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;
import android.app.Activity;
public class MainActivity extends Activity {
  ListView list;
  String[] web = {
    "Google Plus",
      "Twitter",
      "Windows",
      "Bing",
      "Itunes",
      "Wordpress",
      "Drupal"
  } ;
  Integer[] imageId = {
      R.drawable.image1,
      R.drawable.image2,
      R.drawable.image3,
      R.drawable.image4,
      R.drawable.image5,
      R.drawable.image6,
      R.drawable.image7
  };
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    CustomList adapter = new
        CustomList(MainActivity.this, web, imageId);
    list=(ListView)findViewById(R.id.list);
        list.setAdapter(adapter);
        list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                @Override
                public void onItemClick(AdapterView<?> parent, View view,
                                        int position, long id) {
                    Toast.makeText(MainActivity.this"You Clicked at " +web[+ position], Toast.LENGTH_SHORT).show();
                }
            });
  }
}

Creating Manifest:

No other special Permissions are required for our project.
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="learn2crack.customlistview"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:targetSdkVersion="17" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="learn2crack.customlistview.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Blog Archive

increase adsense earning

Package
URL OR WEB ADDRESH

Live Traffic Feed