[TUTORIAL][LINUX][HOW_TO]Unlocking bootloader and Rooting HTC Explorer in Linux

Search This thread

Oblidor

New member
Jun 4, 2013
4
2
The error log clearly quotes this:
Code:
wrong updater binary API; expected 1 or 2, got 3
Therefore, I would like to know, which is the device that you are flashing the Superuser.zip on. If its another device, please look into the rooting tutorials of that device, and get a "Superuser.zip" or an equivalent from that tutorial.

I can see that the logs say that, but it doesn't really tell me what the problem is. :) As I'm doing this on a HTC Explorer I would expect that the recovery image and Superuser.zip files are compatible :)

After much testing yesterday until late evening I managed to get it working using:

This recovery image: http://xdaforums.com/attachment.php?attachmentid=913094&d=1329843100
and this Superuser.zip: http://xdaforums.com/attachment.php?attachmentid=832400&d=1325076959

After I tried to format the SD card to ext2, but the phone could not recognise it so I defaulted back to two partitions with FAT32 :(

But at least it worked and now my wife can use the phone again, as I managed to free up space on the puny internal space. :cyclops:
 
Last edited:
  • Like
Reactions: R0ck7ane

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Glad you could get this working.

I can see that the logs say that, but it doesn't really tell me what the problem is. :) As I'm doing this on a HTC Explorer I would expect that the recovery image and Superuser.zip files are compatible :)

After much testing yesterday until late evening I managed to get it working using:

This recovery image: http://xdaforums.com/attachment.php?attachmentid=913094&d=1329843100
and this Superuser.zip: http://xdaforums.com/attachment.php?attachmentid=832400&d=1325076959

After I tried to format the SD card to ext2, but the phone could not recognise it so I defaulted back to two partitions with FAT32 :(

But at least it worked and now my wife can use the phone again, as I managed to free up space on the puny internal space. :cyclops:

Note that the kernel of the ROM should support ext2/3/4 partitions. The stock kernel doesn't support ext2/3/4 partitions. So, I would recommend you use the Link2SD app here (https://play.google.com/store/apps/details?id=com.buak.Link2SD), as you already have 2 fat32 partitions. Select Fat32 as the partition format the first time you run the app.

Derp around a little bit, you will learn how to use the application.
 
  • Like
Reactions: Oblidor

Oblidor

New member
Jun 4, 2013
4
2
Note that the kernel of the ROM should support ext2/3/4 partitions. The stock kernel doesn't support ext2/3/4 partitions. So, I would recommend you use the Link2SD app, as you already have 2 fat32 partitions. Select Fat32 as the partition format the first time you run the app.

Derp around a little bit, you will learn how to use the application.

Yes I'm using the Link2SD. That was the reason I rooted the phone as the stock apps where eating all the space and gmail could no longer be synced. I had misunderstood in that I though also the stock ROM supported ext-fses. But I see that custom ROMs can handle this without Link2SD. Anyway it works with Link2SD so I leave it as it is. Saved me a lot of $ as alternative would be getting a new phone. So again thanks very much for your tutorial :) :good:
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Glad you found it useful :)

Yes I'm using the Link2SD. That was the reason I rooted the phone as the stock apps where eating all the space and gmail could no longer be synced. I had misunderstood in that I though also the stock ROM supported ext-fses. But I see that custom ROMs can handle this without Link2SD. Anyway it works with Link2SD so I leave it as it is. Saved me a lot of $ as alternative would be getting a new phone. So again thanks very much for your tutorial :) :good:

In the meanwhile, you can also hit the thanks button. It keeps me motivated! :fingers-crossed:
 
  • Like
Reactions: Oblidor

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
The problem lies in the zip file :p

I can see that the logs say that, but it doesn't really tell me what the problem is. :) As I'm doing this on a HTC Explorer I would expect that the recovery image and Superuser.zip files are compatible :)

After much testing yesterday until late evening I managed to get it working using:

This recovery image: http://xdaforums.com/attachment.php?attachmentid=913094&d=1329843100
and this Superuser.zip: http://xdaforums.com/attachment.php?attachmentid=832400&d=1325076959

After I tried to format the SD card to ext2, but the phone could not recognise it so I defaulted back to two partitions with FAT32 :(

But at least it worked and now my wife can use the phone again, as I managed to free up space on the puny internal space. :cyclops:

The update-binary was problematic. updating thread with new superuser.zip.
 
  • Like
Reactions: Rishik999

sujay_mon

New member
Jul 10, 2013
1
0
Hi everyone at XDA! You might have bought your HTC Explorer, and, even had decided to root it, but, didn't still try because you were on linux, and most of the tutorials talked about using Microsoft Windows? :( :( :(

That isn't a problem anymore. If you have some basic knowledge of linux, you can easily root your device, on a linux machine!!!

There are some advantages of using a traditional linux machine, instead of Microsoft Windows, to root your device. The first and foremost among them, is linux not requiring special drivers. Microsoft Windows needs drivers for almost every smartphone nowadays, but, this is not the case with linux. It is very versatile, and supports many smartphones, natively, without the need to install any extra drivers. The next being that, Android is based on Linux. So, most of the features that you can find on any Linux machine, you can find on Android too (if you know where exactly to look).

Why this tutorial? Many are finding it difficult to unlock their bootloaders on a linux machine, and many, are also finding it difficult, to use linux to root their device.

First, you need to get an understanding of what this “rooting” process is all about.

“Unlocking your bootloader” and “rooting” your device are completely different steps, and unless you get an understanding of them both, you wouldn't be able to go about doing these steps.

To quote @mikevipsr at http://xdaforums.com/showthread.php?t=1839477,





So, now that unlocking the bootloader is the first step towards gaining root priviledges, you must also know what “rooting” exactly means.



Ok, so, the risks are permanent damage to device, or an inoperable device. Frankly speaking, I never even bothered about what would happen to my device if I messed up while unlocking the bootloader or rooting it. And, its not because I can afford another phone. Its because I had the hope that I can resurrect it if I mess up things :p

All to be said has been said. Now, if you wish, you can proceed to unlock your bootloader, or, turn back, having your same old device, with the Stock firmware (and the additional bloatware that comes with it) :p


i am not getting Unlock bootloader msg @Last step
 

Mukesh7

Senior Member
Jul 26, 2013
52
4
Superuser

hi i try all the steps sucessfully
finally while booting i unpluged my device and gone to recovery and try to install superuser but it showns error failed ...pls help
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Hmm... it still doesn't work I guess...

hi i try all the steps sucessfully
finally while booting i unpluged my device and gone to recovery and try to install superuser but it showns error failed ...pls help

I changed the update-binary from a newer CM build, and hoped it works, but it doesnt :p

Anyways, try the recovery.img from this: A310E Recovery.zip
and superuser.zip from this: Superuser.zip
 

Holocast

New member
Oct 11, 2013
1
0
can't open superuser.zip

I changed the update-binary from a newer CM build, and hoped it works, but it doesnt :p

Anyways, try the recovery.img from this: A310E Recovery.zip
and superuser.zip from this: Superuser.zip

I was getting a similar error with the original superuser.zip and recovery.img:
Zip Install Complete
|Superuser 2.3.6.3 |
|SU binary 2.3.2-efgh |
|Bash 4.1 |
|Busybox 1.18.4 |
mount() expects 4 args,got 3
E: Error in /sdcard/Superuser.zip (Status 7)
Error flashing zip '/sdcard/Superuser.zip'
Updating partition table details...
Failed

With your new Recovery.img and superuser.zip it says :
E:Can't open /sdcar/superuser.zip
(bad)
Installation Aborted. I'm stuck :/ PLEASE HELP!
 
Nov 4, 2009
15
4
OnePlus 6T
I was getting a similar error with the original superuser.zip and recovery.img:
Zip Install Complete
|Superuser 2.3.6.3 |
|SU binary 2.3.2-efgh |
|Bash 4.1 |
|Busybox 1.18.4 |
mount() expects 4 args,got 3
E: Error in /sdcard/Superuser.zip (Status 7)
Error flashing zip '/sdcard/Superuser.zip'
Updating partition table details...
Failed

With your new Recovery.img and superuser.zip it says :
E:Can't open /sdcar/superuser.zip
(bad)
Installation Aborted. I'm stuck :/ PLEASE HELP!

1. Download the file "A310E Recovery.zip".
2. Extract recovery.img from that zip.
3. Flash recovery.img file as mentioned in the OP (1st page).
4. Flash Superuser.zip from recovery.
 

halifage

Senior Member
Mar 16, 2013
527
95
Redmi 9C
Hi,
I can't seem to get pass the <<waiting for device>> when i execute "fastboot flash recovery..." command.
I am trying to flash twrp recovery and root an HTC sensation with unlocked bootloader.
Please help. Thanks.

---------------------------------------------------------

EDIT: I just had to add super user permissions :)
 
Last edited:

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Hi,
I can't seem to get pass the <<waiting for device>> when i execute "fastboot flash recovery..." command.
I am trying to flash twrp recovery and root an HTC sensation with unlocked bootloader.
Please help. Thanks.

---------------------------------------------------------

EDIT: I just had to add super user permissions :)

So, working???
 
  • Like
Reactions: halifage

halifage

Senior Member
Mar 16, 2013
527
95
Redmi 9C

Yes! Thanks for the quick reply.
I have another quick question: is there a way to flash boot.img in TWRP after flashing rom without using fastboot? the device is S-ON and rooted.
Alternatively, is there a way to S-OFF using linux?
I find it a bit annoying to have to go back to the machine after flashing each rom.
Thanks.
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Yes! Thanks for the quick reply.
I have another quick question: is there a way to flash boot.img in TWRP after flashing rom without using fastboot? the device is S-ON and rooted.
Alternatively, is there a way to S-OFF using linux?
I find it a bit annoying to have to go back to the machine after flashing each rom.
Thanks.

Hmm... ROMs have their own boot.imgs, and they get automatically flashed when you flash your ROM. These lines trigger it:

Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
       write_raw_image("/tmp/boot.img", "boot"),
       delete("/tmp/boot.img"));

Else, if you want to alternatively flash separate boot.imgs, everytime, you could use the "flash_image" utility of the recovery. Connect your phone to the computer, and push the boot.img to /tmp/ using
Code:
adb push boot.img /tmp/

Then, flash it using
Code:
flash_image boot /tmp/boot.img

About s-off... I see this (http://unlimited.io/juopunutbear.htm) is a way for doing, it, and they're great! Their first pre-requisite is this:
We only support Ubuntu 12.04 (and newer) 32bit, you may use a LiveCD if you have the wrong OS installed natively. LiveUSB will NOT work!

And, about you s-off'ing your device, be sure to read a lot about it, the risks involved, and then go for it :)
 
  • Like
Reactions: halifage

halifage

Senior Member
Mar 16, 2013
527
95
Redmi 9C
Thanks.
So where and when do i insert the trigger lines so that the roms flash their own boot image?


Sent from my XT910 using xda app-developers app
 

thewisenerd

Senior Member
Sep 27, 2012
1,385
2,996
Thanks.
So where and when do i insert the trigger lines so that the roms flash their own boot image?

They automatically do that, so, no worries! :highfive:

Every ROM's zip file has a boot.img. Open up a ROM file's zip, and you'd find a boot.img :D And, when you are installing it via TWRP, the boot.img is automatically flashed from the ROM's zip file :cowboy:
 
  • Like
Reactions: halifage

halifage

Senior Member
Mar 16, 2013
527
95
Redmi 9C
Great! Thanks a million man!
But when i flashed Viper yesterday i had to flash the boot image separately.
So now i just need to write these command lines and I'll never have to worry about that right?

I'll try and update you :thumbup:

Sent from my XT910 using xda app-developers app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Unlocking bootloader!

    Ok, so, you want to unlock your bootloader, and root your device; and not to forget the fact that you are on a linux machine. Please note that this tutorial is made specifically for linux machines, and it WILL NOT work on windows, though the steps are pretty similar.

    Now, that you are a linux user, you MUST have the courage to boldly tamper around with your system files and all the stuff, and most importantly, have knowledge about the command line.

    The operating system that I would be using for this tutorial is Ubuntu 11.10. This can be done even in Ubuntu 12.10 without any hassles.

    01.jpg

    Some basic terminology I will be using in this tutorial:
    1. machine: your PC, or laptop
    2. device: your htc explorer
    That's it!

    So, now, let's get to work.

    First, we have to set up ADB and fastboot for our machine. Contradicting the fact that you have to download the massive Android SDK tools and set them up, ITS NOT REQUIRED (if you are just going to root your device). You can simply install them using “aptitude”.

    Open up the command prompt, and run the following commands, one by one.

    Don't copy-paste them, or, you will never get to experience linux fully.

    Code:
    sudo apt-get install openjdk-7-jre

    Code:
    sudo apt-get install android-tools-adb

    Code:
    sudo apt-get install android-tools-fastboot

    Remember that it may ask for your password. Just type in your password and hit “enter”. IT WILL NOT SHOW YOUR PASSWORD!

    ADB and Fastboot set up, now, you have to head over to https://www.htcdev.com/register/ and register yourself as a user there.

    02.jpg 03.jpg

    Make sure you give a working mail id, because they are going to send you an email with an Unlock_code, with which we will be unlocking the bootloader of your device.

    After registering yourself as a user and logging into your account, head over to https://www.htcdev.com/bootloader/.

    04.jpg

    There, you will be given some terms and conditions which you will have to accept. Among all, the most important one is that, you will be losing your warranty.

    05.jpg 06.jpg

    So, you will be faced with the HTC's instructions on unlocking the bootloader. We will be skipping most of the steps, because this is Linux. The steps are different, and I will be saying them shortly. Skip to page 3 of the instructions( http://www.htcdev.com/bootloader/unlock-instructions/page-3 ) and scroll down to the end.

    If you can see a similar image in your browser, you are at the right place.

    07.jpg

    Open up the Terminal in Linux.

    Here, we are going to type in some commands which will help us unlock the bootloader.

    Before that, take out the battery of your device, and insert it again. Now, switch on the mobile by pressing down the “Power Button + Volume Down Button” key combination.

    If you see a screen similar to the one below, you are doing it correctly.

    DSCN1433.JPG

    You can navigate through the four options using the “Volume Up” and “Volume Down” keys. Below are the screenshots, which shows you the option “Fastboot” and “Recovery” highlighted.

    DSCN1433.JPG DSCN1434.JPG

    Now, make sure that “Fastboot” is highlighted, and press the “Power” button to select the option. Now, connect your device to your machine using the USB cable. If you see “Fastboot USB” at top, like in the image below, you are doing it correctly.

    DSCN1437.JPG

    Now, in your machine, you had opened up the terminal (remember?).
    Let us make a new directory to avoid confusion. Type in the following commands to make a new directory, and navigate to that directory.

    Code:
    mkdir android

    Code:
    cd android

    The above commands make a directory named “android” in your home folder, and the next command “cd android” changes the directory i.e. Navigates into the folder which had been created.

    Now, in the terminal, type the following command:

    Code:
    fastboot devices

    If you can see a similar image, then, your device is connected properly, and is also identified by your machine.

    08.jpg

    Now, type in the following command.

    Code:
    fastboot oem get_identifier_token

    You will see the following image below.

    09.jpg

    Now, select the data and copy it, by right-clicking on the screen.

    10.jpg 11.jpg

    Now, execute the following command.

    Code:
    gedit

    It will open up “GEdit” which is similar to notepad in linux. We now paste the data which we copied using “Control + V” key combination. We need to edit this data, so that it can be recognised by the server.

    12.jpg

    Delete all the <bootloader> text, so that it looks like the following below. If all the lines end at the same place, then, you have done it correctly.

    13.jpg

    Now, press “Control + A” and copy the following data. We have to paste this data into the browser window which was open.

    14.jpg

    Click on the submit button, and an Unlock_code will be sent to your email address. You can close the Gedit program which was open.

    15.jpg 16.jpg

    Copy-paste the “Unlock_code.bin” file into the “android” folder, which is in your home directory. Note that this file is small, very small, only 256 bytes of data, yet, is essential.
    13
    Flashing a Recovery

    Now, execute the following command:

    Code:
    fastboot flash unlocktoken Unlock_code.bin

    18.jpg

    You will see the following screen in your terminal.

    19.jpg

    You will see the following screen in your device. Make sure you select “Yes” using the “Volume keys” to navigate between “Yes” and “No”.

    DSCN1438.jpg

    DSCN1441.jpg DSCN1442.jpg

    On selecting "Yes", your phone will automatically reboot into the operating system. But, that's not what we want. We want to root the device. So, let it boot into your operating system. After it does, pull out the battery again, and boot your phone into “Fastboot” using the “Power button + Volume Down” button key combination. Select “Fastboot” and make sure your device is connected and your device reads “Fastboot USB” on the screen.


    Download the following file: http://www.mediafire.com/?a17t0atwqg4tai7

    Copy-Paste the file into the “android” folder in your root directory. Now, execute the following command in your phone.

    Code:
    fastboot flash recovery recovery.img

    then,

    Code:
    fastboot reboot-bootloader

    Your device will reboot into bootloader.
    Make sure that “Bootloader” is selected and press the “Power” button.

    Now, make sure that “Recovery” is selected, and press the power button. If you see a similar image in your device, then, you have successfully unlocked the bootloader of your device, and even flashed a “recovery” which is used to flash custom ROMs.

    DSCN1447.JPG

    Go to “Reboot” and reboot your phone (system), as we have to copy some files to your SD Card.

    DSCN1448.JPG
    12
    Hi everyone at XDA! You might have bought your HTC Explorer, and, even had decided to root it, but, didn't still try because you were on linux, and most of the tutorials talked about using Microsoft Windows? :( :( :(

    That isn't a problem anymore. If you have some basic knowledge of linux, you can easily root your device, on a linux machine!!!

    There are some advantages of using a traditional linux machine, instead of Microsoft Windows, to root your device. The first and foremost among them, is linux not requiring special drivers. Microsoft Windows needs drivers for almost every smartphone nowadays, but, this is not the case with linux. It is very versatile, and supports many smartphones, natively, without the need to install any extra drivers. The next being that, Android is based on Linux. So, most of the features that you can find on any Linux machine, you can find on Android too (if you know where exactly to look).

    Why this tutorial? Many are finding it difficult to unlock their bootloaders on a linux machine, and many, are also finding it difficult, to use linux to root their device.

    First, you need to get an understanding of what this “rooting” process is all about.

    “Unlocking your bootloader” and “rooting” your device are completely different steps, and unless you get an understanding of them both, you wouldn't be able to go about doing these steps.

    To quote @mikevipsr at http://xdaforums.com/showthread.php?t=1839477,

    WHAT IS A BOOTLOADER?
    The bootloader performs basic hardware initialization, verifies the integrity of the operating system, starts the operating system, and provides a method to update device software. This validation is important to verify that the software loaded on the device will not damage sensitive components (radios, processors, etc.) or violate regulatory or carrier requirements. Google provides a base bootloader as part of the Android operating system, and most device manufacturers optimize this for their specific devices.

    WHAT DOES IT MEAN TO UNLOCK THE BOOTLOADER?
    Unlocking the bootloader is the first step towards gaining root privileges. Some developers and enthusiasts unlock and root in order to experiment with applications or with custom builds of Android. Needless to say, you should not attempt to unlock the bootloader unless you know what you are doing.

    So, now that unlocking the bootloader is the first step towards gaining root priviledges, you must also know what “rooting” exactly means.

    WHAT IS ROOTING?
    Rooting is when the user has gained root or administrative privileges on the device. In general, this gives users access to make modifications that would not normally be possible. With such privileges comes both risk and additional capability-best left to the very technically savvy. With rooting, you could make changes to the device that may permanently damage it or render it inoperable.

    Ok, so, the risks are permanent damage to device, or an inoperable device. Frankly speaking, I never even bothered about what would happen to my device if I messed up while unlocking the bootloader or rooting it. And, its not because I can afford another phone. Its because I had the hope that I can resurrect it if I mess up things :p

    All to be said has been said. Now, if you wish, you can proceed to unlock your bootloader, or, turn back, having your same old device, with the Stock firmware (and the additional bloatware that comes with it) :p
    10
    Rooting the Device!

    Now we have to root the device.

    Download this file: http://www.mediafire.com/download/0b71k7maak05asx/Superuser.zip

    Copy this file to your SD Card by whatever means possible :p

    Reboot your phone into “Recovery” and go to “Install”. Browse to the place where you have kept the “Superuser.zip” file.

    DSCN1449.JPG DSCN1450.JPG

    Swipe to confirm flashing the file. Then, “Reboot system”.

    Thus, you have successfully rooted your phone.

    If you ran into any troubles, please notify in the thread.
    10
    Reserved

    the last one :p

    This is for future updates.

    Note: Recovery used in this is TWRP 2.4.1
    Using the old superuser.zip (with updated binaries to solve probs when flashing) by jaggyjags, until i figure out something.

    Special thanks to @Rishik999, for giving me this idea :p