Saturday, 11 January 2014

Samsung SGH-S730M - Thou shall not be rooted - Part 1

As with any steps like this if you choose to try rooting your phone or installing custom Roms etc then this is your own choice and no one but yourself is to blame if it all goes wrong.

I was given one of these phones which is carrier locked to Telus in Canada.

It's not much different to any small Android phone but I was interested if I can 1) Root it and 2) Unlock the Carrier.

I suppose the easiest way to unlock the SIM is just purchase an unlock code but I did find some info on actually editing an XML file to remove carrier lock.

The first issue seems to be root and looking everywhere you then find the usual sites that direct you to pop up city with thousands of pop ups and "this can only be done using a Windows PC " etc.

One program was unlockfree which I installed on my daughters Windows machine (just before I wiped it and rebuilt it), this installed all sorts of junk on the machine as expected and was clearly just a way of infecting the machine with downloaders etc.

I also tried Root_with_Restore_by_Bin4ry which went through the stages but wouldn't root the phone - fortunately with this program I could run it through Linux with my existing adb set up.

Rummaging through adb web site itself I noticed Samsung_Quick_Root but this had possible issues and looked like it needed a Windows program first.

I then stumbled across Poot- http://forum.xda-developers.com/showthread.php?t=2204259

You download the APK, I then used ES File Explorer to install this onto the machine, it installs Ministro Library (which appears to be a way of Poot accessing some external files ?).

Anyway, I followed the instructions and rebooted - SU check confirms I have root.

I did install Rom Manager and SU checker earlier and these all said root was not running, now they both say root is OK.

It appears the phone has CWM installed as when I ran Rom Manager it asks me to set up recovery options, the first one says the phones not supported so I chose the 2nd one, I chose the option to say my phone wasn't on the list and it asked me to chose CWM 2.x or 3.x so I picked 3.x. It then refreshed to show the current recovery option is ClockworkMod 5.X.X (right hand image) so I assume this means there is a newer version already installed in the phone ?


         

Poot shows Root access, as does Root checker (Right hand image)

         

 So at the moment I have root access and CWM so I can take a full backup in case I mess things up.

Some key presses that were handy, power down the phone then hold Volume +, Home and Power - the phone will buzz and you see the Samsung name appear, release the keys.

This takes you into a menu where you can factory erase the phone if you need.



Acer Iconia A500, Dead ... or is it ?

My Daughter has one of the A500 tablets, it's been a great tablet - although it's dual core and nothing special compared to the current market it's always been nice and nippy, has front and rear cameras, 16GB of storage, a nice solid build and up to now .. reliable.

We turned it on to find it stuck at the Acer logo, nothing would shift it and it was clear something was wrong.


A quick whizz around the web and some suggestions, one is to go into a recovery mode that clears the cache and restores the system.


To do this you make sure the screen orientation switch is off (to the right) , hold Volume + and Power, when it buzzes, release Power but keep holding the Volume button, quickly switch the screen orientation switch.


A message pops up on the top left saying it is erasing cache, release the buttons and after clearing the cache it reboots.


In this case it didn't, still stuck at the Acer logo.


There are suggestions that it's either 


1) A corrupt loader or Operating system

2) A hardware fault.

One solution is to go on the web and get some OS roms, you rename the rom to update.zip (it must be lower case and that file name), pop it on an SD card and then boot into a different recovery option.


To do this you hold Volume - and power, when it buzzes release power, it tries to load recovery from SD card.


I get an android chappie with a rotating logo then one on his back with a red triangle - things are clearly not good.


In addition, some roms are encrypted so you need the Acer decrypt program, I ran this in Wine (windows emulator) and it decrypted them fine, if you can double click the update.zip and it opens, revealing the files inside then it's not encrypted.

I tried several roms (perhaps 10) and some seemed to get a little further than others.

There is a third mode, the unit can go into a loader mode (APX) which puts it in a position it can accept a full update.


To do this I need my CPU ID, the only problem, I can't power up to get it.


The device isn't seen in lsusb so I make a quick amendment to /etc/dev/rules.d/51-android.rules

Adding two lines of code

SUBSYSTEM=="usb", ATTR{idVendor}=="0502",ATTR{idProduct}=="3325",  MODE="0666", SYMLINK+="a500"

SUBSYSTEM=="usb", ATTR{idVendor}=="0955",ATTR{idProduct}=="7820",  MODE="0666" 

Re-start udev and I can see the device now reporting as an Nvidia device.


lsusb
Bus 002 Device 024: ID 0955:7820 NVidia Corp.

I found a great guide on running a simple script, it then reveals your CPUID - here.

In my case I'm running a 32 bit OS (I should really upgrade to 64 bit but it never crashes and I've never needed to reload my server OS EVER).

so in my case I replace a printf command with one for 32 bit OS.

My file looks like this, I created a file called cpuid.sh

pasted this code in

#include 
#include 
#include 

int main(void)
{
    unsigned char data[64];
    int received_length;
    int r = 1;
    libusb_context* ctx = NULL;
    libusb_device_handle* dev_handle = NULL;

    libusb_init(&ctx);
    dev_handle = libusb_open_device_with_vid_pid(ctx, 0x0955, 0x7820);
    if(dev_handle)
    {
        r = libusb_bulk_transfer(dev_handle, 0x81, data, sizeof(data), &received_length, 10000);
        if (r == 0)
        {
            if(received_length == 8)
            {
                printf("uid: %#016lx\n", *(uint64_t*)data);
            }
            else
            {
                r = 1;
                printf("Error: We got %d bytes of data instead of the 8 bytes we expected...\n", received_length);
            }
        }
        else
        {
            printf("Error: USB read failed!\n");
        }
        libusb_release_interface(dev_handle, 0);
    }
    else
    {
        printf("Error: Failed to open device!\n");
    }
    libusb_exit(ctx);
    return r;
}

Then you chmod +x the file so you can run it i.e

sudo chmod +x cpuid.sh

Before I can run it I need to put the A500 into APX mode, to do this power down (hold the power button), then put a paper clip in the reset hole, press and hold, press and hold power for 3 seconds, release power (keep the reset button pressed), hold reset for 1 more second then release.

It sound complex but it's easy to do, it's just holding reset for 1 second longer than power.
Now I can run the cpuid script to see if I can extract this out.

Run it with administrator permissions (./ means run it HERE i.e this directory)

sudo ./cpuid.sh

It creates a file called apx.c

run that by just typing 

./apx
 And you see your CPUID (you see here the command being run at the end of my directory location)

kevin@server:~/Desktop/A500/A500_fw$ ./apx
uid: 0x037C61C141C00257

So now I have a CPU ID, this means I can use a full restore option - this needs a CPU ID to lock the build to the system and is unique.

I then looked at using nvflash with bootloader_v9.bin, I saw issues in that it formats the memory in the tablet - partition 4 then puts the bootloader in but I had errors when I tried to format, clearly the machine was trying but things were going to be difficult.

Looking around there are many solutions to this, it's quite difficult to find what boot loader options you need and matching this to roms etc. so I found one solution that offered perhaps the simplest, it puts the machine back to Android 3 then you can perform standard upgrades to return to Jelly Bean.

This solution runs in windows and runs quite a simple process.

This is an Euu package requiring APX mode - you must have your CPUID to be able to use these.
The package I got was EUUs_SBK_Acer_A500_1.016.05_COM_GEN1
Just ignore the other roms (which I tried anyway), if you have CPUID and can get into APX mode then scroll down to locate the EUU roms and get that one.

Basically you launch the program (I just clicked the DotnetDetector and this launched it), DON'T plug the tablet in yet.

It would normally locate the firmware you are on then find the latest firmware but without a tablet connected it then goes into a fall back mode, offering to update a non functional tablet.

At this stage you click OK then put the tablet in APX mode and connect USB.

You need to supply CPUID and it's not 100% clear in what format, I found it does NOT need the 0x at the beginning so paste the CPUID without.

I also found if you make an error and it fails to close the program and reboot the tablet, it seems to fail always if the first entry is wrong.

The updater advises this will take about 10 minutes, you see the tablet soft boot into APX loader mode and the files downloaded.

At the end just reset the tablet - I popped a paper clip into the reset hole.

The tablet booted into native Android 3.xx, I connected on Wi-Fi and checked for updates, I think it total I had 4 updates.

The tablet is now up and running, fingers crossed it was just a combination of the unit having low power and my Daughter writing files to it that corrupted it.

Great respect to the people who published the web sites, they explained a great deal but putting my experience down here cuts down about 40 hours of messing about, you can do this now in about 2 hours, even less if you have your CPUID.

One word of advice, if you get your CPUID - PUT IT SOMEWHERE SAFE then you can skip right to the end and reload in 10 minutes.

Update : I didn't realize until an hour or two later that it only updated within Android 3.xx , to go up to Ice Cream Sandwich log into the Play store and look for ICONIA TAB UPDATE ENHANCEMENT, install this then when you check for Android updates (settings, About phone) you get a prompt to upgrade to ICS.





Thursday, 7 November 2013

HP N54L Microserver and Ubuntu - Part four

The Microserver is running great, one thing I noticed was it came with a single 2GB piece of memory, with a slot spare.

It's more efficient running two DIMM modules (dual channel) so I waited until the server was bedded in and no issues and found a brand new module on Ebay for £10.

Installing it was so quick I forgot to take some photos, there are a few guides on the web showing how to slide the system board forwards.

It now powers up with 4GB and the memory usage shows at 9%.

If there was an issue I noticed the current Firefox build seems to suffer memory leaks, I might have my cache set very high as well but I noticed with 2GB of RAM that every now and then when I'm running multiple windows I see a lot of memory used.

If Firefox was closed and memory monitored it didn't always release all the memory, I'll monitor it now I've got more and see what happens.

It might be I need to set the Cache at a sensible level, I often have them set quite high.

At the moment I'm still running 32 bit Ubuntu on the server, there was no need to format and rebuild the system - I've got a hard drive bay empty so might invest in another SSD (the same as my laptop) and install an SSD in for the OS, at that point I might switch to 64 bit.

My Samsung 128gb Pro is running great, although expensive the laptop runs quickly and file movement is lightning fast, if I see an offer on one of these drives I might snap it up and rebuild the server OS, boot up times should be insane.

Thursday, 31 October 2013

Clocking some miles up in BMW 116ED

Went Blackpool to see Illuminations, this was a very expensive trip in my Avensis as when I got there I didn't have enough fuel to get home - it's 125 miles there but I used more than half a tank in that.

This time we went in the BMW, I used less than 1/4 of a tank, I also drove about 1/3 of the way cross country to avoid Motorway roadworks, this would kill the fuel economy in the Avensis but the BMW shrugged it off.

Return trip was 75% cross country with only a small bit of motorway driving, I took the famous Snake Pass route back as I'd not been over it for years.

All in all 250 miles and 59.2 MPG so well impressed, I still had over 1/2 a tank left and so had more than enough for a weeks driving to work.

This week I've gone South Wales (Port Talbot), I still had more than enough fuel left to get there but topped up so I had a full tank.

This was Motorway, then M50 and down to the M4 and around the new Port Talbot Dock road which was a nice bit of road, someone's done their homework and laid a decent bit of tarmac - from there to my hotel was an easy drive.

Anyway, the trip there and back was 485 miles in all, I've still got 230 miles range remaining and got 60.1 MPG on the trip, trust me I was not hanging about so all the more reason to be pleased.

I'm settling into a routine of just saying 59 MPG, 60 MPG etc on every trip, in the end this is returning at least 59.3 MPG every time I pop onto a motorway but the urban driving is returning  a good 50 MPG or more which knocks socks off my previous cars, I've got to the point where I'm happy it's consistent on it's fuel consumption, some cars I've had needed gentle coaxing to get economy out of them, some simply didn't bother and others were beyond salvation.
With this I just get in and drive, enjoying the fact that even when I drive it hard I am getting a good return, I've had many cars in the low 30 MPG area and had to suffer this or drive below motorway speeds.
I still need to remind myself to use the stop/start and be a good boy at traffic lights but old habits die hard.

Oil consumption, so far I've used about 0.5 litre in 19000 miles which is brilliant, I've had one or two cars that were very good on oil consumption but I'm always impressed when I use as little as this, some have drank like Oliver Reed and needed an almost constant supply of the black stuff which is quite an expense when they need fully synthetic oil these days.

Wednesday, 16 October 2013

BMW 116ED 18,000 miles and counting

Clocked 18000 miles so far and everything's spot on.

Still getting good fuel economy, did a 585 mile round trip to Scotland, including all the stop/start and traffic etc I clocked 59.3 average over the trip, the Eco mode said I had added 106 miles to the fuel economy through driving style which matched exactly the remaining etc.

The best yet was a trip to Grimsby where I clocked 72.4 mpg over the 90 mile trip, this was mainly due to the roads having a 50mph limit almost all the way so I kept a constant speed.

looking back even a few years to the economy we used to get I'm finding it amazing I can go Scotland and back and still have over 100 miles left in the tank, or go Bristol, then Oswestry, home cross county over the pennines and have 105 miles left.

Service counter says 4000 miles to service so that would equate to 22k service, mines fleet maintained but 22k is a great interval for a diesel.

Monday, 14 October 2013

XLZ 6934 - Black Polo - thanks a bunch

Nice when your'e sitting stationary in traffic and someone rolls backwards, then keeps rolling, you honk your horn, still rolling , honk a few more times and they still rolling.

Even nicer when they roll into the front of your car with an nice thud then simply drive off.

I just had time to get her number and check I had no major damage and she was away without even apologising or getting out her car - I might be wrong but in the UK that's an offence not to stop and exchange details. So I'd like to say Thank's a bunch to the ignorant woman who clearly cannot drive and has no respect for anyone else or the law.

I'll be checking more carefully later, any damage and i'll be declaring a hit and run on top of any repair needed.

Saturday, 12 October 2013

Grrrrrrr Roadworks and The Clowns of Power

I sometimes think the UK is going backwards, I went on a business trip to Scotland and endured enough roadworks to drive a man insane.

On my return I got on the A1 at Scotch Corner and found a sea of solid traffic, 3:30pm and the road was solid, this was the same for some 15 miles and then you see it, a massive large load blocking two lanes so for much of the trip this has taken the entire A1 meaning no traffic can pass, then as we get to a three lane section the traffic trickles past - at a guess some 25 miles needed to get past one large load.

Why on Earth do we continue to do this, we move massive loads in broad daylight at a time approaching Rush hour, in this case it took me almost 90 minutes to get past, and by then it was the middle of Rush hour - Call be a cynic but moving these things in the middle of the night when the roads are all but totally empty would seem a wise idea ?

One person said to me (at a Council he worked at), it was to do with meeting Ferries and other deadlines so in effect the entire road system pays the price.

After calming down I then went on another trip, this time to Bristol and then up to Oswestry.

Bristol in my mind is always the land of road works, for years now I've travelled to Devon and Cornwall on holiday and I can't remember a time the M5 has not had roadworks at Bristol.

Anyway, I make my way down, through 3 lots of roadworks, have the meeting, leave at 9pm - the hotel was 300 yards from the M5 junction, and ... the M5 was closed for ... Roadworks - the Detour took me (you guessed it) SOUTH and then some 10 miles later you turn around to go North.

How the hell someone gets paid to make these decisions I'll never know, so I do 10 more miles to get where I started then have 135 miles left to do, 3 more sets of road works on the M5, then I see a sign M50 closed (for Roadworks), I'm loosing the will to live now, get to the M5/M6 Junction and the M6 South is closed (for Roadworks - seems to be a pattern here), a nice queue South all probably going on a detour North if Mr. Detour has any influence.

Get off onto the M54 and yup, roadworks - three lots of Roadworks so I think that's something like 9 seperate sections of Roadworks today !

Even better was getting around Shrewsbury, I thought Milton Keynes had a lot of roundabouts but this is a mere child fantasy against Shrewsbury.

Sat Nav constantly said, in 500 yards take the roundabout, then you go over it, and in 500 yards take the roundabout, over that, rinse and repeat - I lost count, perhaps 10 roundabouts, all within a mile or less of each other, fuel economy goes out the window here and I almost called the Council to suggest they pop some roadworks on the roundabouts to keep the theme going.

Someone said to me once, I don't know why they make motorways so long in America - I think it's simple, it stops them going stir crazy.

The only plus side, if I had a swear box in the car that night at £1 a word, I think I would be well in excess of £250 if not more.

The final nail in the coffin of my misery was returning home the next day, I went through some roadworks, another round of multiple roundabouts, fought my way through Stoke on Trent (which was no worse than expected), then thought I'll take the M1 as Derby is always busy at 5pm, ah here we go - signs light up "M1 Closed Northbound due to accident" - so I pop through Derby OK - no issues and I know it's coming, go down a shortcut to miss out the Motorway and there it is "ROAD CLOSED for roadworks" - I swear someone's having a joke at my expense here ! I turn around, down a road to take perhaps a 7 mile detour, get out onto the first main road and ... I'm in a queue for ... I can't say it ... beings with R ... sounds like Bodeworks .... Get through that, and finally get within 3 miles of home .. ah hang on what's going ... ah for Feck sake ... ROADWORKS ... I may as well put my entire salary in the Fricking Swear box ...

I think I'll just give up.