PS3: How to fix errors when loading PSN PKG games after upgrading to Rogero CFW 4.40 v1.02

After a lot of digging around, eventually I learned that the reason for this whole mess is because people were replacing eboot files to make games compatible with 3.55.

That made sense at the time, but when the newer firmwares started checking the eboot signatures, stuff started breaking.

So to resign the packages so they work with the newer firmwares, you'll need a special suite of programs.

At first I tried aldos tools, which seemed like a pretty good all-in-one bundle. To be honest, all I could really do was unpack some archives and check the ID of stuff. The installer didn't integrate with my Windows properly.

Then I tried RazorX's CFW Eboot & PKG Resigner. Looks noob friendly enough, but I had no idea what NPDRM meant. Couldn't find anybody that could explain it either.

As much as I wanted to use RazorX's utility, I could only get as far as resigning the eboot. For some reason, it just wouldn't repackage the PKG!

I was almost tempted to just search for the pre-fixed eboots until I noticed a reference to PS3 CFW 4.XX+ F.A.R. (Full Auto Resigner) Script. Just drag the PKG file to the script and it resigns the whole thing for you. Wow, this can't get any easier!

How to use it?

Download CFW_4.xx__F.A.R._Script_v0.5b .rar and extract it somewhere. Leave the folder open.

Find your PKG file and drag it over the file called "CFW 4.xx+F.A.R. Script (Drag Here).bat".

Wait for it to do it's thing. It's a little difficult to read the dark blue writing against a black console window, but wait for the terminal to disappear and you should have yourself a new PKG file (most likely with a different filename).

Copy the new PKG to the PS3 or USB and it should work fine.

So, repeat the process with any packages which don't work.

xA3I1zN
Time to get busy!

Sources

PS3: Proper fix for slow FTP transfer speeds over gigabit ethernet

The PS3 does indeed support full duplex gigabit ethernet, but it doesn't seem to automatically select it all the time. I had slow transfer speeds most of the time, but once in a while after a reboot it'd be fast.

slidecat 
Copying stuff and feeling like it's going nowhere? Yeah, I get ya.

But man, when it comes to the internet people sure do come up with some weird solutions.

A popular one floating around is to modify your (working) Windows settings and set up a special IP/subnet mask/gateway. Just do yourself a favour, spare yourself the pain and don't even try this method.

"Get a faster HDD". LOL harddrive write speeds are a limiting factor, but it wouldn't cause the speeds of 70Mb/s to drop down to 140kb/s.

There are suggestions of changing the FTP server on the PS3 or the FTP client on the PC. That's fine and dandy, but they're not really responsible for the huge drop in speeds.

Side note: I use FileZilla and MultiMan v4.30 for FTP.

Well Twig, do you have a better solution?

Of course! And here are some starting points. Make sure that...

  • You have an ethernet port that supports gigabit connectivity
  • You have at least a Cat5e (not Cat5) or Cat6 ethernet cable (read the writing on the wire). Cat5 does not support gigabit.
  • Your router is gigabit ready
  • Your PS3 isn't on the wireless network (This can happen if you ripped out the wired connection and the PS3 knows your wireless settings)
  • The FTP client you're using isn't limiting transfer speeds

If all those check out, then you might be victim of the PS3's buggy network speed detection. So I manually set the network configuration by going through...

  • Settings
  • Network settings
  • Internet connection settings
  • Custom
  • Wired connection
  • Manual settings
  • Speed and Duplex: 1000BASE-T Full-Duplex (or whatever else if you know exactly what you're doing)
  • IP Address setting: Automatic
  • DHCP: Do not set
  • DNS: Automatic
  • MTU: Automatic
  • Proxy: Do not use
  • UPnP: Enable
  • X to save
  • Now then test your connection.

If it doesn't work, you'll have to change the speed and duplex mode.

Otherwise, here comes fast copy-pasta!

Sources

Android: ADB Composite/Debug drivers for Telstra Uno (aka ZTE T12)

Most of the time you can get away with using the Google USB drivers that come with the SDK.

For some reason, the Telstra Uno only showed up in the Device Manager as an unrecognised device "MT65xx".

First off, this post by Andweeb showed me to a viable set of drivers.

Download usb_driver_MT65xx_Android_ZTE_v821.rar and extract them somewhere easy to access.

Now open up the folder you extracted it to, click through to "usb_driver" and edit "android_winusb.inf".

Depending on your operating system (x86 or x64), paste this under either "[Google.NTx86]" or "[Google.NTamd64]" respectively.

; Telstra Uno ZTE T12
%SingleAdbInterface%        = USB_Install, USB\VID_19D2&PID_0260
%CompositeAdbInterface%     = USB_Install, USB\VID_19D2&PID_0260&MI_01

Save, then use the edited inf file as the driver. Then you can enjoy debugging on this awkward, semi-passable phone.

bD7xm
Almost as awkward as this.

Sources

The links which almost helped.

Sublime Text: Binding "close all files" to keyboard shortcut

Had some trouble finding this in the documented list of commands.

So putting this up here in case anyone runs into it.

{ "keys": ["ctrl+shift+w"], "command": "close_all" }

Source

Django: Upload files to a dynamic path

For the projects I'm working on, we have a reusable "image file" model which stores information about an image (such as height, width, hash, image type, etc) and automatically stashes it to Amazon S3.

Any time you want to use an image in another model, you can just refer to it through a foreign key.

class BasicImage(models.Model):
caption = models.CharField(max_length=300, blank=True)
# ...
image = models.ImageField(storage = s3_storage, upload_to = "images", max_length = 500)

def __unicode__(self):
return "%s - %s" % (self.caption, self.image)

And an example of a  model which uses BasicImage.

class UserProfile(models.Model):
# ...
profile_picture = models.ForeignKey(BasicImage)

Whenever a user uploads a profile picture, it'll be uploaded to a folder called "images", along with every other image file. That's fine and dandy if you're ok with mixing user profile pictures with other images (such as company logos or user photos).

However, most people would like to separate things out a bit. Here's a relatively clean way of preventing a huge binary mess. (Key points are listed below)

def _image_upload_path(instance, filename):
# To customise the path which the image saves to.
return instance.get_upload_path(filename)


class BasicImage(models.Model):
caption = models.CharField(max_length=300, blank=True)
# ...
image = models.ImageField(storage = s3_storage, upload_to = _image_upload_path, max_length = 500)

def __unicode__(self):
return "%s - %s" % (self.caption, self.image)

def get_upload_path(self, filename):
return "dimg/%s" % filename


# Required to add new files to a different path
class UserProfileImage(BasicImage):
class Meta:
proxy = True # So this model doesn't actually need a new table

def get_upload_path(self, filename):
return "avatars/%s" % filename


# Updated user model so any pictures will be uploaded to /avatars folder
class UserProfile(models.Model):
user = models.OneToOneField(User, primary_key = True)
# ...
profile_picture = models.ForeignKey(UserProfileImage)

 

Take note of the differences:

  • Create a helper function called _image_upload_path()
  • Add BasicImage.get_upload_path(self, filename)
  • You'll need to use BasicImage as a base class for any other image models
  • Other image models should be a proxy class unless they contain additional information
  • Override get_upload_path() in your subclasses if you wish to customise the upload folder

abbot-rudder
Now you can upload random pictures like this into a separate folder

Sources

VmWare: Defrag all your virtual machine disks through command line

Some people are happy to wait for the progress bar in a setup screen to tick to 100%.

Power users would rather create a script that'll do it for them, without locking up VMware (still leaves the disk locked, but you can still run other guest machines).

To run a defrag from CLI:

"%PROGRAMFILES%\VMware\VMware Workstation\vmware-vdiskmanager" -d "X:\Virtual Machines\Windows 7 x64\Windows 7 x64.vmdk"

To defrag ALL of them in one line:

cd path\to\your\vms

for /R .\ %i in (*.vmdk) do "%PROGRAMFILES%\VMware\VMware Workstation\vmware-vdiskmanager" -d "%i"

This scans recursively for any vmdk files and runs the vmware-vdiskmanager command on it.

Sources

XBMC: How to use EventServer

In my quest to get the Wii remote working on XBMC, I've tried every possible API I was able to find and tried them all out.

Initially I thought I could get away with using window messages, sending WM_KEYDOWN, WM_CHAR and WM_KEYUP and VK_ENTER which worked until you started watching videos. For some reason, on-screen display (OSD) would stack up all input in a queue and replay them once you leave the OSD.

So I looked into more "official" control APIs. The HTTP-API was first on the list, but also deprecated no point building something upon that.

I also tried the HTTP-API replacement called JSONRPC. Although I got it working, that API felt like it was more complicated than it should have been. By the way, don't include the trailing backslash unless you like 404's.

The input methods would work fine for navigating menus, but when it came to controlling the video playback I had to use different commands. Seriously!?

2JX8XRl
This is what I felt like doing after wasting my time with that...

Here's some simple JSONRPC code that worked, just for the sake of it.

JavaScriptSerializer jss = new JavaScriptSerializer();
Object obj = new { jsonrpc = "2.0", method = "Input.Left" };
String data = jss.Serialize(obj);
WebClient client = new WebClient();

string text = client.DownloadString("http://localhost:8080/jsonrpc?request=" + Uri.EscapeDataString(data));

Now remember, this is just to send a simple request. You're not processing any data from it yet!

So came my last hope, EventServer. Well to say least, it worked but was also poorly documented. There was so much guess-work when it came to the input arguments, but when you've finally figured it out all the little puzzle pieces, it comes together very nicely!

Enabling EventServer on XBMC

First you've gotta have this enabled. Otherwise there'll be no event server to connect to.

  • Go to System > Services > Remote control
  • Enable "Allow programs on this system to control XBMC" (lol yeah, it's badly named)

screenshot000

XBMC EventServer libraries and sample code

Now for the fun part, choosing your poison. These EventServer client libraries were written between 2-5 years ago (at time of writing this blog post)

These libraries really save you a lot of time, so get the library for your language of choice. There are also example clients available which are worth taking a look at.

Coding

For the purpose of this tutorial I'll chose C#, a language I absolutely hate with a passion. Why the hell would I do that!? Because Wiimotelib is written in C#...

Anyways... copy "EventClient.cs" from the C# library into your project. Import the namespace.

using XBMC;

Now to set up the client. This is assuming you're running this code on the same machine that XBMC is running with the default event server port of 9777.

EventClient eventClient;

eventClient = new EventClient();
eventClient.Connect("localhost", 9777);
eventClient.SendHelo("Wii remote");

SendHelo() (another badly named function) will display a notification on your screen saying a new device has connected. Let's test out the connection shall we?

eventClient.SendNotification(
"Yo VIP",
"Vanilla ice ice baby"
);

This should display a nice little notification on your screen. If it doesn't, you're missing a vital step somewhere.

screenshot002 

Action commands

We'll start off with something simple. To control parts of XBMC functionality, you can just send specialised action commands.

eventClient.SendAction("mute");
eventClient.SendAction("nextsubtitle");

For a full list of supported actions, look at ButtonTranslator.cpp and search for "ActionMapping actions[]".

To implement some basic navigation, I tried out "left" and "right" but they didn't seem to work so I had to resort to button commands.

Button commands

This is where the magic happens. The following code will send a "enter" command to XBMC.

eventClient.SendButton(
"enter",
"KB",
XBMC.ButtonFlagsType.BTN_DOWN | ButtonFlagsType.BTN_NO_REPEAT
);

Simple enough, sends an "Enter" button command ("enter") to XBMC in the form of a keyboard ("KB") device map. This ensures that we're using the keyboard.xml keyboard mapping.

If you're wondering what keymaps are, check em out because you've already got a whole heap of mappings with your XBMC install (see "1. Location of keymaps")

Now you might also be wondering where I found these magic string values like "enter", or the deviceMap "KB". Even more confusing was the sample client code which uses deviceMap "XG".

Well I had to dig through a fair bit of XBMC source for that and it took up much of my time! For sanity sake, you can find some useful values for device maps in EventClient.cs to use in SendButton().

  • "KB" - Standard keyboard map
  • "XG" - Xbox Gamepad
  • "R1" - Xbox Remote
  • "R2" - Xbox Universal Remote
  • "LI:devicename" - valid LIRC device map where 'devicename' is the actual name of the LIRC device
  • "JS<num>:joyname" - valid Joystick device map where 'joyname' is the name specified in the keymap. JS only supports button code and not button name currently (ie. "JS0:WiiRemote")

Given the choices I went with keyboard, which makes life much easier. OK, so now what button do you want to send?

Check out ButtonTranslator.cpp in the XBMC source. It's the "best/neatest" way to see what buttons are supported by the given mapping.

Depending on the device map you're using, search for either:

  • CButtonTranslator::TranslateKeyboardString
  • CButtonTranslator::TranslateGamepadString
  • CButtonTranslator::TranslateRemoteString

For Joystick (JS) button presses, you're better off just gleaming the values from the keymap XML files. The <global> config should give you a fair idea of what the button IDs are.

Cleaning up

Now now, don't forget to clean up after yourself once you're done having fun. Remember to disconnect your client properly.

if (eventClient != null) {
eventClient.SendBye();
eventClient.Disconnect();
}

There are so many dead ends on a wiki page, and it seems that I've already run into most of them for you. Hopefully this tutorial provides more than enough information so it makes life easier for you.

rake-dance 

Sources

XBMC: Getting 404 File not found on your JSONRPC requests?

I'd hate to admit, but this one took me a few hours to figure out...

See this request?

"http://localhost:8080/jsonrpc/?request=<uriencodedrequest>"

Well, that's wrong. It's supposed to be:

http://localhost:8080/jsonrpc?request=<uriencodedrequest>

Can you spot the difference?

Yep, trailing slash! Damn it!

cuyqe 
Oh well, back to it!

Hotmail/Live/Outlook.com: How to disable MSN messenger chat

Not a bad switch. Things worked nicely, layout was crisp and clean, and it maintained most of the functionality that I used in the hotmail/live/outlook iteration.

Except for one thing... the stupid auto-login of Messenger. Previous version let me sign out, this one only lets me set "invisible", which also sets me to invisible on the desktop client!

j2MmI 
... NOT GOOD ENOUGH!

Most people suggest blocking "gateway.messenger.live.com" via the hosts file, but not everyone has administrative access to do that on every computer.

A more "general access" method that I've come up with is to get AdBlock and add some custom ad-blocking filters. To block it:

  • Open up your email inbox
  • Click on the "Adblock Plus" icon in the toolbar
  • Select "Filter preferences"
  • Custom filters
  • Select Ad blocking rules
  • Click Add filter
  • Paste in the pattern below

 

  • gateway.messenger.live.com (no longer works)
  • ||rendezvous.skype.com^$domain=mail.live.com (updated 4/11/2013) (no longer works)
  • ||gateway.messenger.live.com^$domain=mail.live.com (updated 12/04/2014) (no longer works)
  • |https://secure.wlxrs.com/*$Live.SiteContent.Messenger/* (updated 12/04/2014) (no longer works)
  • |https://a.gfx.ms/webim*$domain=mail.live.com (updated 12/9/14)

 

image
Now you should end up with a Messenger-less inbox. Except one little problem... you've got this hollow area on the right (in green)

image Check out dat ass on Hentai Kamen!

So, what to do? Well, if you're ok with leaving that space empty then just leave it. Otherwise, install the addon called Stylish and customise the CSS.

I created this userstyle, but feel free to just copy paste it into your own (under Tools > Add-ons > User styles > Write new style)

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("live.com") {
/* Remove RHS column space */
.WithRightRail { right: 0 !important; }
#RightRailContainer { width: 0; }
#c_cme li.c_mcp:nth-child(2) { display: none; }
.webIMMessagingContainer { display: none; }
.leftnav { bottom: 0 !important; }
.ContentLeft .c-SizerBar { display: none; }
}

There is one issue with this solution though. You'll lose the ability for your inbox to automatically show new emails. If you choose to use this method, you will have to refresh the inbox manually.

  • *Update 9/4/2014* Outlook updated their styling, so I updated this post.
  • *Updated 12/4/2014* Thanks Anon for the CSS to remove the icon.
  • *Updated 12/9/2014* Updated blocking and CSS to match new inbox layout. Updated instructions a little.


And that's it! Enjoy your chat-free experience on the new email.

image
Of course, emails and any personal details removed :)

Sources

Windows 7: Randomly loses focus and returns to desktop

OK, this thing was REALLY annoying me. It's not exactly random either, because it happens approximately 5-7mins into use after boot.

What happens is my HTPC boots straight up into XBMC, full screen program which plays movies. After about 5 minutes, something minimises XBMC and then displays the desktop. Very annoying!

I thought it was the notification bubbles, but it wasn't. I even turned them off system wide.

After a quick search or two, there have been suggestions it's fault of either Windows Action Center (which I already have disabled) or bluetooth drivers.

http://cdn.blogtechnika.com//wp-content/uploads/2011/01/bluetooth-icon-notification_thumb.png
Could it be, THIS?

I took a punt at it and ripped out the USB dongle. Lo and behold, it worked. A whole episode of Top Gear and no kickback to desktop!

This solution whoever, isn't quite ideal. Why? Because I use bluetooth!

So I did what I do best, I fiddled. After a little experimenting, it turns out that having the icon in the tray was causing it to steal focus from the current program and flick you back to the desktop.

So, right click on the icon and select "Open settings".

Untick the box that says "Show the Bluetooth icon in the notification area"

*update!* Also untick "Alert me when a new Bluetooth device wants to connect" (I forgot to put a red circle around this one as well!)

bluetooth

This way, Bluetooth is still enabled and as far as I know, the other settings should be fine. Hopefully this solves the problem for you.

i1d5I 
If it's anything else, sorry but you're gonna have to deal with yourself.

XBMC: How to pick a random background for your custom menu item (within a specific playlist)

Now that's a lengthy title! Now I'm pretty sure this is a common problem, but I haven't been able to find a tutorial for it anywhere (unless I was searching for the wrong keywords?)

What I wanted was simple, in theory! I created a smart playlist for all my anime, called "Anime Playlist". I also had a custom menu item in the home screen which took you straight there, however the background was boring and unrelated.

screenshot000 screenshot001

A cool, randomly selected background from an anime within the playlist. Hmm, how to go about doing that?

So, off to the XMBC forums I went and a nice Canadian by the name Vaikin gave me some directions to where I wanted to go.

dog-scientist-atheist-49845773629

Downloads

At time of writing, I'm running the latest release of XBMC (12/Frodo).

Firstly, you'll need the script.randomandlastitems addon. See if you've already got it (some skins bundle it) by checking the folder %APPDATA%\XBMC\addons\script.randomandlastitems.

Make sure you grab the right one for your XBMC build. I used script.randomandlastitems-2.0.3.zip. Download the zip and install it via:

  • System
  • Add-ons
  • Install from zip file
  • Find and install

Setup

Once installed, you can do the rest in XBMC. The instructions I write are for the skin Aeon Nox, so the layout or menus may be a little different for you.

  • Go to the System menu and press DOWN to "Edit main menu"

screenshot002

  • Now press UP to configure the "script.randomandlastitems" addon
screenshot003
  • Under "Smart playlist manager", select "Slot 1" and press ENTER

screenshot004

  • Select "Random Episodes"
  • Choose whatever you want for "Include already watched items?"
  • Select the playlist you want to restrict the backgrounds to (eg. Anime Playlist)

screenshot006

  • Repeat the same steps in Slot 2 if you have any other custom menus you'd like nice backgrounds for
  • Once you're done, back out to the "Edit main menu" screen
  • Press ENTER on your menu item (ie. Anime) to configure it
    • Type: Video Playlist > Anime Playlist
    • Choose Background: Anime Playlist (Episode Random)
    • (optional) Set InfoLine: Anime Playlist (Gives you the watched/unwatched count)

screenshot005
It should now look a little like this

Rinse and repeat for any other custom menus.

And there you have it! Here are some screenshots of the script working. It takes a few seconds before the background changes.

screenshot007 screenshot008 screenshot009

Sources

Android: Use an OTG (On The Go) cable with a Nexus 7

I thought plugging it in would "just work". It didn't.

There's a few things you need to do in order to get this functionality up and running.

  1. Root your Nexus 7 tablet
  2. Download the Stickmount app
  3. Grant it super-user access
  4. Now your device can access USB storage
  5. Try browsing it using your favourite app. If you can't access photos or videos on the external device, try out QuickPic. The images should come up when it's done scanning.

itjustworks
In other news, Apple stuff "just works"

Android: How to root a Nexus 7

At time of rooting, my Nexus 7 was on Android 4.2.1 (Jellybean, base build JOP40D) running on a Windows 7 machine.

First of all, I'd like to say this is not an ideal process for the average consumer. Rooting a phone is still harder than it should be, and there is lots of lingo a typical person would not know.

Secondly, I'd like to say that Nexus Root Toolkit software package by WugFresh is simply AMAZING. Props to you, I would have easily spent a whole day doing this without it!

*Updated 5/9/2014*

Took the chance to update the tutorial with newer screenshots and instructions after an Android update.

Preparing the tablet

First step, get Nexus Root Toolkit (NRT).

  • Leave the tablet unplugged
  • Download and run NRT (as administrator)
  • Once it's updated all the information it needs, it'll ask u to select a device
  • Click on "Auto detect device + build..." and then Apply

image

  • NRT will ask to make sure that your device has debugging enabled.
  • Follow the instructions on the screen.

On the tablet:

  • Enable debugging on your tablet by going to
    "About phone/tablet" > Tap build number 7 times
  • Press back
  • There should now be a "Developers" item above the "About" item
  • Tick "USB debugging" and confirm

Back on NRT:

  • Press OK to continue
  • The program will automatically download all the needed files, so let NRT do it's thing.
  • (you may not need to) Click OK to confirm download of the modified boot.
  • (you may not need to) Click OK to confirm download of the TWRP recovery
  • You'll now be presented with the main window

image

Unlocking

Some providers will lock you out of the device so you can't modify the kernel files.

  • Now on the NRT, unlock the device
  • The N7 will reboot again
  • When asked, press Power to confirm "unlock"
  • The N7 will reboot again
  • Perform the initial setup
  • Re-enable USB debugging via developer options
  • Now device is unlocked and ready to root

Let's root!

tumblr_mbzitanxl11qdlh1io1_400

    On the tablet:

  • Unlock the device and make sure it stays awake
  • On the main screen:

  • Click on the "Root" button
  • Click "OK" to begin
  • Wait for it to finish (there's a few reboots involved)
  • Once the success message appears, you're done!
  • Check to see if there's a "SuperSU" app installed
  • Run it and see if it works

And there you have it! If you really appreciate the trouble that wugfresh has gone through to get this toolkit up and running, donate a bit to him via the link below.

tumblr_lfeyxt1fGW1qfllkno1_400
A message to anyone donating (it's not wugfresh,
but I assume he'd be in the same pose)

Sources

Firefox: New private browsing window without restarting browser

Wow, they've finally done it folks! In Firefox 20, making a private tab/window now works WITHOUT having to close your existing session like how Chrome's incognito window and Internet Explorer's InPrivate browsing.

image
Firefox 20's private browsing window

image
Chrome's porn mode

Seriously, it should have been like this from the start. Opera's still one notch above the two quarrelling rivals though as it supports private tabs which you can mix with your existing non-private tabs in the same window.

image
Opera, still the superior porn-mode browser.

Ready for some better private browsing? Enjoy!

644018_10152555002240641_1157613485_n 
Ready for some tasty meat!

Android: Fix Spinner and Item theme when using ActionBarSherlock

Well this was certainly an interesting side-effect of using themes. I had a little trouble getting the themes to look "right". It had to do with the way that the adapter was being created.

before before-items

Use the snippet below to fix the problem. It's the middle line's magic which solved the theming issue for me.

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
dropEventType.setAdapter(adapter);

And there you have it, a nice default-style selection!

after

Android: Add ActionBarSherlock to your app

Sticking with the theme of the official compatability library, ActionBarSherlock aims to allow the use of the action bar design pattern by mimicking the experience that would be found natively on Android Ice Cream Sandwich with as little effort as required.

First of all, wow. I did not expect anyone to recreate the Android ActionBar with such ease of use for older devices. They've stuck to their mission statement pretty well, kudos to the devs there!

This tutorial is a verbose re-write of the usage documentation for ActionBarSherlock, in case anybody ran into the same uncertainties I had when implementing it.

Requirements

  • Java SDK 1.6+
  • Must compile using Android 4.0+ (API level 14)

If you're missing any of these, you shouldn't continue with this guide.

Setup

  • Edit "project.properties" and ensure that target is at least android-14 (Android 4.0 ICS)
  • Open up ActionBarSherlock\library as a new Android project and compile it (Go to "Project" menu > Clean). Make sure build automatically is ticked.
  • Leave the ActionBarSherlock project open!
  • Add the ActionBarSherlock project to your app libraries.

Right click your project > Properties.

Click on Android > "Add" > And select ActionBarSherlock

image

  • For the ActionBar to appear on your activity, extend said Activity from either SherlockActivity or SherlockFragmentActivity.
  • Now it's time to set a default theme for your app.

You can use the layout editor to preview themes before setting one. From what I've seen, majority seem to choose between Theme.Sherlock or Theme.Sherlock.Light as they're most Google-esque.

image

Once you've decided on one, just use the manifest editor and browse for the right theme under the Application tab.

Or set the theme manually in your AndroidManifest.xml:

<application android:theme="@style/Theme.Sherlock">

Code compatibility

Most likely you'll get errors at any implementation of onCreateOptionsMenu().

Firstly, change any imports of Menu/MenuItem from "android.view" to "com.actionbarsherlock.view".

Now update the function a little.

// Old function, this will generate errors when you subclass SherlockActivity.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
this.getMenuInflater().inflate(R.menu.select, menu);
return true;
}

Replace with:

// New, Sherlock compatible function.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
this.getSupportMenuInflater().inflate(R.menu.select, menu);
return true;
}

Note the use of getSupportMenuInflater().

Rinse and repeat for all activities using SherlockActivity.

By now you should have something that is ready to test!

gifs_19s
Enjoy your new toy!

A final note, if your app already has "android-support-v4.jar" included, feel free to remove it. The ActionBarSherlock library already has it included so including it twice may increase compilation time.

Source

Android: What the f*** is that "Google Settings" app that randomly appeared on my phone!?

SC20130301-073718

I'm pretty sure you're wondering that too. Yesterday Google pushed out a sneaky little silent update via Google Play Service. I'm a little uneasy about Google doing this, as my phone is no longer really "my phone" especially how they're able to on custom roms such as Cyanogenmod also.

They've also got the ability to remove "malicious" apps from your phone too, but let's just hope they're only malicious ones. Google does no evil right? Hmm, haven't heard that in a while. Oh well.

The app itself doesn't really seem to do much other than allow you to see which apps are using your G+ login details.

Some people are saying it's going to be built into Android 5 (Key Lime Pie) and this is just temporary. But if you have no use for it, feel free to remove or archive it away using your favourite usual app backup tools such as Titanium Backup or File Expert.

Damn you Google, I thought you were better than that. Most other updates like the Play Store usually have a notification of sorts.

DjyS1
But alas, all our complaints are just gonna get stone-walled.

On a side note, at least now we know there are backdoors into all the phones with the Play Store ;)

Sources

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog