Saturday 18 August 2012

root recover and root a bit more

I'm sure it's an omen but after the G300 I got a HTC desire (as my wife upgraded her phone this week) and as my Brother got his G300 working great he passed on his San Francisco (ZTE).

The Desire runs a (for me) a nice Android interface and has been a great workhorse so I just wanted to root it and put a bootloader.

The rooting needs the S-Off so I used Revolutionary which is available for Windows and linux - I also got myself the AmonRa image (recovery-RA_2.0.1.img)

Revolutionary requires a beta code (if you look on HTC developer site they do a similar unlock through a code), this was just a case of putting the phone in debug mode and running revolutionary from the linux terminal, put the code in and the S-OFF mode was immediate.

Put the phone in Hloader (hold Vol-down and power) and you see a new purple header for revolutionary.

Next step was to pop AmonRa on which needed you to select Fastboot from the recovery menu, it then shows "fastboot" - plug the USB cable in and this changes to say "fastboot USB", I used the fastboot files with the CWM and just executed the AmonRa manually from linux terminal "./fastboot-linux flash recovery recovery-RA_2.0.1.img"

This puts the recovery image on, you can test this by holding Vol-down and power to Hboot and then select "Recovery" the screen will pause 2 or 3 seconds but then the AmonRa loader will load.

I used AmonRa as I just prefer it, no other reason, CWM would probably have been just as good.

Finally I popped the root  file "su-2.3.6.3-efgh-signed.zip" into the root of the SD card, then use the option to install from SD card and the HTC is rooted.

Time from start to finish, about 20 minutes tinkering.

I've not updated the Android itself but can now make a Nandroid backup, run root apps like Link2SD and so on, which is all I wanted.

The ZTE was already rooted and had CWM installed, with CM7 Android, the problem was the battery life was terrible so I looked for alternatives.

I located Swedish Snow and got that, with CWM this was just a case of putting the zip onto the SD card and installing from there.

Only time will tell if the battery life is better, the interface is fine though and works great, everything's there and I can't find any apps that don't work.

I rounded the afternoon off by replacing the left hand screen hinge in my brothers Laptop !

Tuesday 14 August 2012

Hauwei Ascend G300 ADB rules.d files for linux (Ubuntu 11.04)

Just in case anyone needs the rules.d files for the linux adb here are my android rules files.

They reside in /etc/udev/rules.d

I'm not sure which one actually activated recognition of the G300 but it doesn't seem to upset anything having both these in.

In the rules.d folder create a file called 99-android.rules (note the character after the 99 is the minus sign)

If you're in a terminal and in the folder /etc/udev/rules.d just type

sudo gedit 99-android.rules

Paste this into it

SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
#Google
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
#Acer
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
#Dell
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
#HTC
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
#LG
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
#Pantech
SUBSYSTEM=="usb", SYSFS{idVendor}=="10a9", MODE="0666"
#Samsung
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
#ZTE
SUBSYSTEM=="usb", SYSFS{idVendor}=="19d2", MODE="0666"

Save the file and if you ls-al you will see the file 99-android.rules there.

chmod the file so it's executable

sudo chmod +x 99-android.rules

ls -al will show the file and permissions as (in my example)

-rwxr-xr-x 1 root root 1106 2012-08-12 15:49 99-android.rules


The file name in green is to highlight the fact it's executable.

At this point you could try rebooting and see if the phone is seen by adb devices, if not then try adding the next file.

in the same directory I also have 51-android.rules so make a file with that name and edit it as before, paste these lines in....

## SUBSYSTEM=="usb", ATTR{idVendor}=="12d1",ATTRS{idProduct}==”1030”, MODE="0666"
## BUS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", GROUP="plugdev", MODE="0660"

SUBSYSTEM=="usb", SYSFS{idVendor}=="618e", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="d00d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="d00d", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0451", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="e79", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0e79", MODE="0666"


Save the file, again make it executable by

sudo chmod +x 51-android.rules

 ls -al should show the 2 files as...

-rwxr-xr-x 1 root root 1576 2012-08-12 15:14 51-android.rules
-rwxr-xr-x 1 root root 1106 2012-08-12 15:49 99-android.rules

The G300 identified itself to adb and that allowed me to run the bootloader unlock and the root file.

Hope this helps anyone searching for the adb files.

As I say I'm not 100% sure which file was needed (or both), one file was put in to recognize my pulse mini, different Ubuntu versions need these files differently i.e one might only use the 51-android.rules while another might need the 99-android.rules one.

But my system doesn't mind they are both there and for the 3 minutes it takes to make the files and paste the contents in it's hardly hard work.

You can restart the services for udev and adb but to ensure the files are read fully etc I just rebooted my server, I try not to reboot it too often and almost went a whole year without a reboot (although in linux terms a year without a reboot is hardly worth speaking about, I spoke to one customer who has genuinely not rebooted fully [power cycle boot] in 15 years and still runs the exact same system configuration, it's never been updated and he runs fine).

For info my brother got an unlock code for £2.99 and his G300 is now unlocked from Vodaphone and working perfect on Giff Gaff, he had to enter the service numbers manually for SMS etc but they only took a couple of minutes, the phone appears very nimble, has an excellent display and ICS looks great on it.

Don't forget by the way you need your phone in debug mode (in the android settings) so that it does not mount as a USB storage device but stays active as a phone - the G300 notifies you it is connecting as a debug device.

Then when you type "adb devices" you should get a response from whatever phone is connected and you can continue.


Sunday 12 August 2012

Hauwei Ascend G300 bootloader B926 ICS Rom

My Brother bought one of these as there is an ICS update, the instructions on
http://www.modaco.com/topic/355583-guide-how-to-install-ics-403-b926/

are very good but we had one or two problems.

There have been one or two queries if you can unlock the bootloader with linux.

Although I have one PC in the house still running Windoze I had already done some updating on my pulse mini and installed Amon Ra so we had a go at putting CWM on and unlocking the phone more.


The modaco guide is pretty good, steps we took were...

We Rooted the phone using superrecovery, this is easy enough in linux and this link has Windows, Mac and linux versions.

Put the phone in the fastboot mode by holding DOWN and  POWER, after a few seconds the phone vibrates and you get the hauwei screen, release power but hold down for a couple of seconds - we found if we didn't do this the phone carried on and booted.

If it stops with the Hauwei logo then plug in the USB cable and in a terminal run the superrecovery file.

This just involves making sure the shell file (.sh) is executable as with linux no files are automatically executable.

If you're sitting in the superrecovery directory type

sudo chmod +x ./install-superrecovery-linux.sh
then type
./install-superrecovery-linux.sh

In linux "./" means "here" - when you use DOS it effectively does the same thing but you don't need to type ./, linux is an implicit operating system so will do whatever you tell it.


Once done you get a message to restart the phone, I had an error but the first two lines said

sending 'recovery' (5074 KB)... OKAY
writing 'recovery'... OKAY

As long as they say OKAY then you're fine.

Remove the battery and USB cable, wait a couple of seconds, reinstall the battery, hold UP and Power this time to get into the recovery mode.
It should say "reboot phone", press the power button.

Once the phone has loaded, scroll through your app lists to see if SU (Super User) is there, if it is then it's rooted.

We followed step 1 to back up the IMEI as we found later this was important to get the loader screen back etc.

I got mine from here  don't worry it says downgrade guide I just used the link to get the program APK (you don't need to copy the file structure to your SD card just the APK).

You also need the phone set to allow 3rd party applications to install (in the settings) or you cannot run the 5irom application.

To run the APK install something like Astro file manager, run it and locate the toobox5irom.APK when you select it you get the option to install it and then the root (SU) will pop up for you to grant SU permission, once you do you can back up the IMEI.



Once that was backed up we made a security copy of the 5imei folders onto NAS drive.

Next step was to download the ICS update, you notice if you unpack this that it has two directories, one says dload, the other Vendor, you do NOT need to apply the Vendor update, if you do the phone will switch to Chinese (you can if you're lucky change it to English which is what we did but it causes a big delay).

You apply the dload update by simply copying the dload folder to your SD card so you can see the dload folder itself.
Hold both the UP and DOWN keys, and Power, the phone responds very quickly to say it's applying an update and takes about 2 minutes to apply.



As long as you're not in Chinese mode now you let it boot into ICS, make sure USB debugging is on and we also turned off fastboot in the settings - this caused some problems with Link2SD for example as it starts the phone up without applying new mount points etc.

NOTE - Don't confuse "fastboot" with "fastboot" - the phone has a fastboot option in the Android settings, this is the one we turned off, it ensures SD card etc are scanned fully on boot up, the difference is only a few seconds. It's just a toggle, On or Off in the settings section (sorry no screenshot :-( )

The other Fastboot is holding Down and Power to get the Hauwei loading screen. It's a bit confusing but if you're this far I don't think you will have any problems. 

The phone will boot into ICS as below.


By the way the pictures here are from Hauwei so not fully in English but they show pretty much what you will see.

Anyway at this point we are really neck and neck with Modaco instructions, the next step is to re-root it and unlock the boot loader.

The link to the unlock file keeps dropping or saying invalid link but I got a copy and I would say it fills me with dread seeing it run on a Windows system, it even shut the PC down so I might be looking at a reload on that machine.

Needless to say it failed to unlock the phone anyway despite everyone saying it was the "only" way to do it.

I downloaded bootloader from here
The file is b926-root-bl.zip.

Now I need to point out that I have adb (Android Debug Bridge) installed on my linux machine just in case anyone has problems etc.
Also to do this step you keep the phone in ICS i.e not in bootloader or recovery mode, just normal phone mode - plug in the USB cable and it says "USB installer mode" or similar on the top, the debug mode prevents the phone mounting as a USB memory device.

Don't mail me for help on this as I know literally nothing on ADB I just know it's installed and when I type
adb devices

in a terminal I see (the phone was in recovery mode at the time)

List of devices attached
C8D15E99DD97    recovery


If you see no devices it's important you make sure this works or you can't send the bootloader over.

You need to have the phone set to enter debug mode which is in the settings, if you didn't do this then test again.

Once you see your phone then you should be good to go.

In the bootloader folder you need to make the root and the bootloader shell files executable.

type

sudo chmod +x  bootloader-linux.sh
sudo chmod +x root-linux.sh

And to run them just type (while you're in the directory)

./root-linux.sh

The terminal should show the file progress as below.
735 KB/s (10324 bytes in 0.013s)
451 KB/s (22364 bytes in 0.048s)
4453 KB/s (831313 bytes in 0.182s)
9 KB/s (386 bytes in 0.040s)

And the bootloader unlocker

./bootloader-linux.sh
Again the terminal shows the file progress.
3335 KB/s (4194304 bytes in 1.228s)
4839 KB/s (4194304 bytes in 0.846s)
8192+0 records in
8192+0 records out
4194304 bytes transferred in 2.169 secs (1933750 bytes/sec)
8192+0 records in
8192+0 records out
4194304 bytes transferred in 1.579 secs (2656303 bytes/sec)

At this point you have ICS, Root (check in the applications that it shows SU) and you have the bootloader unlocked.

Now to install CWM, you put the phone in the fastboot mode by holding DOWN and power (remember to unplug USB, remove battery, put battery in, hold the buttons and when it's stuck on the hauwei logo plug the USB cable in).

I downloaded CWM easy installer from here

As with most of these files they have Windows and linux version in the zip.

Again, you make the installer executable within linux.

Move to the cwm directory and type

sudo chmod +x install-cwm-recovery-linux.sh

and to run it

./install-cwm-recovery-linux.sh

You can see the two errors I kept getting but the main bit is the OKAY .

sending 'recovery' (5212 KB)... OKAY
writing 'recovery'... OKAY
./install-cwmrecovery-linux.sh: line 3: syntax error near unexpected token `('
./install-cwmrecovery-linux.sh: line 3: `echo Now reboot to recovery to root your device (pull battery, then hold volume up and press power).'


Now if you remove the USB cable and battery, install the battery and hold UP and Power you boot into CWM.

I then copied the google apps installer (zip file) into the SD card available here

Keep the file as a zip.

Boot into CWM, select install a zip file from sd card.


and locate the google file(gapps-ics-20120429-signed.zip), the center button on the G300 acts as "select" by the way.

CWM will show it installing the Google apps package.

Finally you press power to go back to the main CWM screen and select "wipe data/factory reset".

Once done I removed the battery and powered up to a fully working ICS with the Google sign in screen, a quick "about phone" will confirm ICS, you can check SU (we installed Link2SD which requires SU so the root worked fine), we also booted into CWM and made a full recovery backup.

A nice note, Hauwei also offer 16gb Cloud storage which pops up.

I hope this helps anyone in the same situation I have been in, after a few hours messing I found my issue was adb was not seeing the phone - I updated my rules.d files to include the google phone identity and rebooted my server, the phone was seen straight away.

The adb part is perhaps the most critical and it was interesting the phone was seen fine before we did the ICS update but no after - no idea why but these are all the steps I did to resolve it so I hope you enjoy this phone as well.










Friday 10 August 2012

The Promise of things to come....

The recipe was alluring and offered the taste of home cooked Macaroons quickly and easily.






Queue £5+ spent on ingredients by my enthusiastic wife.....

The harsh reality soon hit home ...


Thankfully I don't like Macaroons, I had a Vanilla slice instead...

And now you know why I do most of the cooking at home.

Wednesday 1 August 2012

Running Great

Had the 116 ED for a few weeks now and took it for a run to Telford 100 miles away, it just breezed there, almost felt like I'd only done 30 miles.

So I took it to the East coast a return trip of 196 miles, its a combination of many twists and turns, almost constant gear changes etc.

The Avensis would have used about 3/4 of it's tank on this run, the Insignia 1.6 SRI used almost an entire tank (about 8 gallons) so nearly £50 of fuel with the best I had being 21mpg, the Avensis climbed a little on it's run to almost 40mpg but both were very costly to pop to the beach and back.
The Passatt would have returned almost identical to the Avensis so they were about £35 in fuel (About 6 gallons I think)

The BMW did it in 1/4 of a tank of fuel, lets say it did it the trip on 4 gallons and the computer was  advising me it still had over 300 miles left, almost enough to go there and back twice more.

This is pretty amazing considering the stop/start, accelerate/brake and challenge the journey gives, MPG suffered due to this, returning just over 51mpg but when your comparing it to the previous cars it's easy to see the clear winner.

The country roads didn't represent much of a challenge, in fact you could get to cruising speed very quickly with little effort compared to previous cars and the road holding showed itself in that you could go around corners at previously untried speeds.

So far it's great, I'm getting about 3 weeks out of a tank running to and from work instead of 2 weeks, even now after coming back from the beach I've pottered around for 4 days and it still says 300 miles left so it's returning economy and performance where normally you get one or the other.

The Insignia for example was badly under powered with it's 1.6 petrol engine, you had to rev rev rev to get anything out of it, a burst of activity at the top end then a gear change and drive it hard to get any speed.

With the twin turbo in this engine you get your Diesel torque and turbo push early, then as that one starts to fade in comes the big boy and you get lively and demanding acceleration, it's almost constant from start to red line.

With almost 3k on the clock now and 15k until service due it will be interesting how it goes over the coming months.