Tag Archives: apk

Installing Google Glass in an Android Phone

Ok in this article we will see how to install Google Glass in your Android phone.
Actually we are installing some apps that are specific(That comes with) to the glass. These apps are taken from the explorer glass system dump(OS).

There are more things you can explore using the System dump but as for now. We will bring the basic functionality of the Google Glass to the Android phone.

Prerequisites – You need a wifi connection to authorize the google account to your glass software. Reason is google glass only has wifi connectivity so its only means to connect to internet is through wifi, so they don’t have data related libraries’ so if you are connected through your data connection it wont work. But if you don’t have a wifi, create a hotspot through a laptop or smartphone and change your data into wifi. But you can try using the data connection and post a comment if it works.

There must be a

Step 1
Download the GoogleGlass.rar

Step2
Extract the file.

Step3
To simply install, copy these files into the SD Card of your android phone and
click on them and
it will prompt you, from which app to open the file,
select the package installer.
(If this is not the first time you are installing an app in this method you can skip this sline)Then it will ask you to enable the third party app/unknown source app installation,
which you can find in the Settings–> Security
Now you can install the apks.

First of all Instal the following files

  • glassbrowser-modded.apk
  • GlassCamera.apk
  • GlassHangouts.apk
  • glasshome-modded.apk
  • glassmaps-modded.apk
  • glasspeople-modded.apk
  • glasssetup-modded.apk
  • GlassSound.apk
  • glassvoice-modded.apk

Step4
After installing all these apks (Don’t run any of the apps as soon as you install), before opening any app open the ‘Glass Setup’ app which is available now in your app list.
And you will see the following screen.
Screenshot_2013-07-19-16-45-41

At this point you must login to
https://www.google.com/myglass using your google account that you wish to associate with your glass App.

First you will see this page in your browser
step1

Now click on the Start link and you will go to this page
step2

As usual agree to the agreements and click continue
step3
Add the wifi name and password(You can try using fake name and password).
And click on the Add network
step4

Now you will see this. Screen, in the original glass you can scan the code but in the app we have installed in the phone that feature won’t work. But if you keep the Google Setup app open, automatically the continue button will be enabled, if it did not work, close the app and restart the app and it will get authorized and you are ready open the Google Glass.
😀

Now you will be redirected to your Glass Companion page, here you will see all the glasswares(In google glass apps are called glasswares) you have subscribed, here you can manage them. Or there is an app called glass companion, which I have added in the rar you downloaded now.

This is the Website Glass Companion
GlassCompanionWeb

This is the Android App
Screenshot_2013-07-19-17-16-45

Now you can Open the ‘Glass Home’ App from your App list
And you will See this View
Screenshot_2013-07-03-14-35-221

And start the operations by saying the magic word ‘ok glass’And you will see available commands
google-glass-interface-ok-glass

So this is how the google glass works,
for how to use commands please see my first article on Google Glass

Most of the commands will not work,
Ok glass–> google… will wok and it acts like google now.
Ok glass–>Send a message to will work if you have added contacts from your gmail account in the glass comapnion

Most of the others will not work. But in my next post I’ll write an article on how to make the command ‘take a picture works’, be ready some basic android programing stuff will be there.

Be ready to do some Android Code…!

Download the Whole System Dump from Here
gitHub-download-button

Update (12/3/2014): Now after the GlassSneakPeak GDK is released, now you can develop apps using the GDK and add your own commands easily and can open them using voice commands. I am not sure but if you manage to get the latest XE12 Glass OS or later and install it in the phone it should work. If I have time Ill publish a new post on it.

Sony Xperia Illumination Bar Code(Some Code that May Interest you)

Here in this blog I am adding the illumination bar control activity class which I hacked and got from the famous Illumination bar App for Sony Xperia Android Phones. Hope you can get the basic Idea of the classes you have to access to take control of the lights Happy Coding.

If you are new to Illumination Bar App try it in the Google Play App Store

If you want to know how to hack an Android App step by step, please check my Blog on Android App Hacking

Thank You

illuminationcontrol.java

package com.rundgong.illuminationcontrol;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.ContextWrapper;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.Iterator;

public class IlluminationControlActivity extends Activity
{
public static final int LED_RGB = 1;
public static final int LED_WHITE = 0;
public static boolean sAccessibilityIsMissing = false;
public static final int sWhitePos = 6;
public static int testBlinkCounter = 0;
BooleanItemSummary mAlwaysOnSummary;
ArrayList mAppConfigs;
ArrayList mAppNotificationDatas = getDefaultApps();
GeneralSettingsSummary mGeneralSettingsSummary;
LinearLayout.LayoutParams mLayoutParams;
View mMainView;
NightModeSummary mNightModeSummary;
ArrayList mPhoneConfigs;
SelectThemeColorSummary mSelectThemeColorSummary;
BooleanItemSummary mTempDisable;

static
{
sAccessibilityIsMissing = true;
}

private void addAppNotifications()
{
LinearLayout localLinearLayout = (LinearLayout)this.mMainView.findViewById(2131165198);
localLinearLayout.removeAllViews();
localLinearLayout.addView(getHeadlineView(getString(2131034117)), this.mLayoutParams);
Iterator localIterator1 = this.mAppNotificationDatas.iterator();
Iterator localIterator2;
if (!localIterator1.hasNext())
localIterator2 = new UserApps(this).mUserApps.iterator();
while (true)
{
if (!localIterator2.hasNext())
{
return;
AppNotificationData localAppNotificationData1 = (AppNotificationData)localIterator1.next();
ConfigItemSummary localConfigItemSummary1 = new ConfigItemSummary(this, localAppNotificationData1.displayName, localAppNotificationData1.packageId, true);
localLinearLayout.addView(localConfigItemSummary1, this.mLayoutParams);
this.mAppConfigs.add(localConfigItemSummary1);
break;
}
AppNotificationData localAppNotificationData2 = (AppNotificationData)localIterator2.next();
ConfigItemSummary localConfigItemSummary2 = new ConfigItemSummary(this, localAppNotificationData2.displayName, localAppNotificationData2.packageId, true);
localLinearLayout.addView(localConfigItemSummary2, this.mLayoutParams);
this.mAppConfigs.add(localConfigItemSummary2);
}
}

static void fileLog(CharSequence paramCharSequence)
{
}

static int getBaseIntensity(int paramInt)
{
int i = 255;
switch (paramInt)
{
case 6:
default:
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
}
while (true)
{
return i;
i = 4;
continue;
i = 8;
continue;
i = 17;
continue;
i = 34;
continue;
i = 79;
continue;
i = 143;
}
}

static BlinkData getBlinkTimeFromPosition(int paramInt)
{
BlinkData localBlinkData;
switch (paramInt)
{
default:
localBlinkData = new BlinkData(0, 0);
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
}
while (true)
{
return localBlinkData;
localBlinkData = new BlinkData(0, 0);
continue;
localBlinkData = new BlinkData(1000, 1000);
continue;
localBlinkData = new BlinkData(500, 500);
continue;
localBlinkData = new BlinkData(150, 150);
continue;
localBlinkData = new BlinkData(2000, 2000);
continue;
localBlinkData = new BlinkData(2000, 5000);
continue;
localBlinkData = new BlinkData(2000, 10000);
continue;
localBlinkData = new BlinkData(2000, 30000);
continue;
localBlinkData = new BlinkData(2000, 60000);
}
}

static int getColorFromPosition(int paramInt1, int paramInt2)
{
int i = getBaseIntensity(paramInt2);
int j;
switch (paramInt1)
{
default:
j = -1;
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
}
while (true)
{
return j;
j = -16777216 + 65536 * i;
continue;
j = -16777216 + i * 256;
continue;
j = -16777216 + i;
continue;
j = -16777216 + 65536 * i + i * 256;
continue;
j = i + (-16777216 + i * 256);
continue;
j = i + (-16777216 + 65536 * i);
continue;
j = i + (-16777216 + 65536 * i + i * 256);
}
}

static ArrayListgetDefaultApps()
{
ArrayList localArrayList = new ArrayList();
localArrayList.add(new AppNotificationData("com.android.calendar", "Calendar"));
localArrayList.add(new AppNotificationData("com.android.email", "Email"));
localArrayList.add(new AppNotificationData("com.facebook.katana", "Facebook"));
localArrayList.add(new AppNotificationData("com.google.android.gm", "Gmail"));
localArrayList.add(new AppNotificationData("com.google.android.apps.plus", "Google+"));
localArrayList.add(new AppNotificationData("com.google.android.gsf", "Google Talk"));
localArrayList.add(new AppNotificationData("com.twitter.android", "Twitter"));
localArrayList.add(new AppNotificationData("com.whatsapp", "WhatsApp"));
return localArrayList;
}

static int getDefaultLedNumForDevice()
{
if (Build.MODEL.contains("ST25"));
for (int i = 1; ; i = 0)
return i;
}

private TextView getHeadlineView(String paramString)
{
TextView localTextView = new TextView(this);
localTextView.setGravity(17);
localTextView.setText(paramString);
localTextView.setBackgroundColor(-12303292);
localTextView.setTextColor(-1);
return localTextView;
}

static String getLedIdFromNumber(int paramInt)
{
if (paramInt == 1);
for (String str = "com.sonyericsson.illumination.intent.extra.value.BUTTON_RGB"; ; str = "com.sonyericsson.illumination.intent.extra.value.BUTTON_2")
return str;
}

public static void illuminate(ContextWrapper paramContextWrapper, int paramInt1, int paramInt2, BlinkData paramBlinkData, int paramInt3)
{
Intent localIntent;
if ((paramBlinkData == null) || (paramBlinkData.onTime == 0))
{
localIntent = new Intent("com.sonyericsson.illumination.intent.action.START_LED");
 localIntent.putExtra("com.sonyericsson.illumination.intent.extra.LED_ON_TIME", paramInt2);
}
while (true)
{
localIntent.putExtra("com.sonyericsson.illumination.intent.extra.PACKAGE_NAME", "com.rundgong.illuminationcontrol");
 localIntent.putExtra("com.sonyericsson.illumination.intent.extra.LED_ID", getLedIdFromNumber(paramInt3));
 localIntent.putExtra("com.sonyericsson.illumination.intent.extra.LED_COLOR", paramInt1);
 paramContextWrapper.startService(localIntent);
 return;
 localIntent = new Intent("com.sonyericsson.illumination.intent.action.START_LED_PULSE");
 localIntent.putExtra("com.sonyericsson.illumination.intent.extra.LED_NO_OF_PULSES", paramInt2 / (paramBlinkData.offTime + paramBlinkData.onTime));
 localIntent.putExtra("com.sonyericsson.illumination.intent.extra.LED_PULSE_ON_TIME", paramBlinkData.onTime);
 localIntent.putExtra("com.sonyericsson.illumination.intent.extra.LED_PULSE_OFF_TIME", paramBlinkData.offTime);
}
}

private void refreshGUI()
{
this.mNightModeSummary.update();
this.mSelectThemeColorSummary.update();
Iterator localIterator = this.mPhoneConfigs.iterator();
while (true)
{
if (!localIterator.hasNext())
{
addAppNotifications();
return;
}
((ConfigItemSummary)localIterator.next()).update();
}
}

private void startBackgroundService()
{
startService(new Intent(this, BackgroundService.class));
startService(new Intent(this, NotificationService.class));
}

public void addMoreAppsButtonClicked(View paramView)
{
startActivity(new Intent(this, AddAppsActivity.class));
}

public void donateButtonClicked(View paramView)
{
startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H7LW4D3XWK9GC")));
}

AlertDialog getAccessibilityDialog()
{
AlertDialog.Builder localBuilder = new AlertDialog.Builder(this);
localBuilder.setMessage(2131034157).setCancelable(false).setPositiveButton("Yes", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface paramDialogInterface, int paramInt)
{
IlluminationControlActivity.this.startActivity(new Intent("android.settings.ACCESSIBILITY_SETTINGS"));
}
}).setNegativeButton("No", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface paramDialogInterface, int paramInt)
{
paramDialogInterface.cancel();
}
});
return localBuilder.create();
}

public void helpButtonClicked(View paramView)
{
startActivity(new Intent(this, HelpActivity.class));
}

public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
this.mMainView = ((LayoutInflater)getSystemService("layout_inflater")).inflate(2130903043, null);
setContentView(this.mMainView);
this.mGeneralSettingsSummary = new GeneralSettingsSummary(this);
this.mAlwaysOnSummary = new BooleanItemSummary(this, getString(2131034129), "keyLightAlwaysOn");
this.mTempDisable = new BooleanItemSummary(this, getString(2131034130), "tempDisableIllumination");
this.mTempDisable.setEnableText(2131034131);
this.mTempDisable.setDisableText(2131034132);
this.mNightModeSummary = new NightModeSummary(this);
this.mSelectThemeColorSummary = new SelectThemeColorSummary(this);
this.mPhoneConfigs = new ArrayList();
this.mAppConfigs = new ArrayList();
startBackgroundService();
this.mLayoutParams = new LinearLayout.LayoutParams(-1, -2);
this.mLayoutParams.setMargins(0, 1, 0, 0);
LinearLayout localLinearLayout1 = (LinearLayout)this.mMainView.findViewById(2131165196);
localLinearLayout1.addView(getHeadlineView(getString(2131034114)), this.mLayoutParams);
localLinearLayout1.addView(this.mGeneralSettingsSummary, this.mLayoutParams);
localLinearLayout1.addView(this.mAlwaysOnSummary, this.mLayoutParams);
localLinearLayout1.addView(this.mTempDisable, this.mLayoutParams);
localLinearLayout1.addView(this.mNightModeSummary, this.mLayoutParams);
localLinearLayout1.addView(this.mSelectThemeColorSummary, this.mLayoutParams);
LinearLayout localLinearLayout2 = (LinearLayout)this.mMainView.findViewById(2131165197);
localLinearLayout2.addView(getHeadlineView(getString(2131034116)), this.mLayoutParams);
ConfigItemSummary localConfigItemSummary1 = new ConfigItemSummary(this, "SMS", "sms", false);
this.mPhoneConfigs.add(localConfigItemSummary1);
localLinearLayout2.addView(localConfigItemSummary1, this.mLayoutParams);
ConfigItemSummary localConfigItemSummary2 = new ConfigItemSummary(this, "Missed Calls", "missedCalls", false);
localLinearLayout2.addView(localConfigItemSummary2, this.mLayoutParams);
this.mPhoneConfigs.add(localConfigItemSummary2);
ConfigItemSummary localConfigItemSummary3 = new ConfigItemSummary(this, "Battery Full", "batteryFull", false);
localLinearLayout2.addView(localConfigItemSummary3, this.mLayoutParams);
this.mPhoneConfigs.add(localConfigItemSummary3);
ConfigItemSummary localConfigItemSummary4 = new ConfigItemSummary(this, "Battery Empty", "batteryEmpty", false);
localLinearLayout2.addView(localConfigItemSummary4, this.mLayoutParams);
this.mPhoneConfigs.add(localConfigItemSummary4);
}

public void onResume()
{
super.onResume();
refreshGUI();
if (sAccessibilityIsMissing)
getAccessibilityDialog().show();
}

public static class BlinkData
{
int offTime = 0;
int onTime = 0;

public BlinkData(int paramInt1, int paramInt2)
{
this.onTime = paramInt1;
this.offTime = paramInt2;
}
}
}

Let’s Hack Android Apks

Ok guys i know many of you have tried to hack android apks using APK tool, but is it a success????
No I don’t think so you get a encrypted code, but you get the images out of it.

But here I am gona guid you using 2 tools
one is Dex2JAR and the other one is the JD GUI
Download Dex2JAR here
Download JDGUI here

Ok now I hope you know how to get an apk file from an Android App, the easiest way is to use the App Super Backup app available in the Google Market.

1.Get the APK from your phone memory card , where the Super Backup normally puts the apk.

2.Extract the DEX2JAR file

3.copy the APK file you want to extract code in to that file

4.now open the command prompt and change the directory

(command to change directory in command prompt”cd C:\Users\Amalan\Desktop\dex2jar-0.0.9.9\dex2jar-0.0.9.9″)to the directory where you have copied your APK in my case the directory is “C:\Users\Amalan\Desktop\dex2jar-0.0.9.9\dex2jar-0.0.9.9”

5.now to convert the APK to JAR type this command “dex2jar.bat ‘yourapp.apk’ ” and press enter and you will get the JAR file of your APK.

6.now extract the JDGUI and there you will find ‘jd-gui’ exe file, run it

7.now drag and drop the JAR file you just created, Voila you will find all the code in it. Not a Single Encryption the total code is available to you.

8.here you wont get any drawable files, for that use APK TOOL or just rename the ‘.apk’ to ‘.rar’ and extract and you can take all the images.

Thats it you have successfully Extracted the full source code out of your favorite Android App