[DEV][THE S-OFF CAMPAIGN] We need electrical engineers & experts in JTAG, OpenOCD!

Search This thread

#define

Senior Member
May 1, 2012
2,025
2,180
Is this thread dead?? I am trying to achieve S-OFF for the HTC Explorer, which is basically a stripped down(memory wise) version of the HTC Desire C.. And this thread has helped me a lot.. A lot a lot..

The last big thing that happened was NHB achieved S-OFF, but the phone gets rebooted into the ROM, right??
I am gonna try something like this on the Explorer too..
And I count on this thread for help..

Sorry if its spam.. Will remove it if it is..
 

artturnip

Senior Member
Jan 28, 2012
206
53
What happened was that whilst he was able to chainload an alternative hboot on top of the original, it insisted on restoring itself. If he/we could find what was causing this restore, we'd have temporary s off! :D

Sent from my Wildfire S A510e using xda app-developers app
 

#define

Senior Member
May 1, 2012
2,025
2,180
What happened was that whilst he was able to chainload an alternative hboot on top of the original, it insisted on restoring itself. If he/we could find what was causing this restore, we'd have temporary s off! :D

Sent from my Wildfire S A510e using xda app-developers app

Ok.. So then the temporary S-OFF could be used to further achieve true S-OFF... Right??
 
  • Like
Reactions: no.human.being

artturnip

Senior Member
Jan 28, 2012
206
53
Yes, I think so... but NHB thought that temporary would be more useful. As it poses none of the security risks (your device is only s off for a short while...) but you can still flash the radio if you wish! :D

Sent from my Wildfire S A510e using xda app-developers app
 
  • Like
Reactions: no.human.being

heavy_metal_man

Senior Member
Nov 6, 2011
2,749
752
ok so i have a htc wildfire cdma (bee) and i was trying to use fastboot to s-off via AT@SIMLOCK=7,0 command to the radio via fastboot oem rtask c, as theorised in this post but i am getting the error: FAILED (status read fialed (too many links)). any ideas what may be the cause of this? i have an unlocked bootloader from htcdev should it change things :)
bearing in mind that this is an older device i am not sure if this will work, but i am allowed to unlock the bootloader via htcdev, so i hold out hope :)
additional info:
BEE DVT2 SHIP S-ON RL
HBOOT-1.40.000
MICROP-0422
RADIO 1.00.00.0216
Dec 14 2011, 20:02:16

using windows 7 64bit and adb from android skd platform tools.
 
  • Like
Reactions: no.human.being

no.human.being

Senior Member
Oct 29, 2011
981
987
What happened was that whilst he was able to chainload an alternative hboot on top of the original, it insisted on restoring itself. If he/we could find what was causing this restore, we'd have temporary s off! :D

Well, technically it wasn't "on top". I let the "original" HBOOT from the phone load the exploit and this in turn loaded another HBOOT image which replaced (overwrote) the HBOOT code in volatile memory. So after the exploit was through, there's only one (the modified) HBOOT running on the phone. You can't run them "on top of each other", they're not operating systems. :)

However, either the system "below" (Iguana) or the (chainloaded) HBOOT itself somehow recognizes that the boot code has been tampered with and restores a "clean boot image" from the "unmapped area". If it's Iguana, we're most likely out of luck since we can't tamper with that (it's running on mARM and there's an MMU between "our code" running on aARM and Iguana running on mARM that's shielding us off), but chances are that it's actually the HBOOT code performing the restore (you can build an infinite loop into the boot code and then it will no longer restore but freeze the device) and then we could prevent it by removing the "restore logic" from the HBOOT image we load via the exploit.

Ok.. So then the temporary S-OFF could be used to further achieve true S-OFF... Right??

Yes, most likely.

Yes, I think so... but NHB thought that temporary would be more useful. As it poses none of the security risks (your device is only s off for a short while...) but you can still flash the radio if you wish! :D

Also true. The exploit must be performed from the host and while the device is in Fastboot mode. If you chose to make S-OFF permanent by flashing modified boot code, your NAND protection is permanently disabled and apps with root privileges might tamper with your Radio and boot code (if they manage to map the "unmapped area" in, which is not simple, though probably not impossible). However, the exploit alone, without flashing boot code, would already give you the ability to, say, flash the Radio. The phone will be S-OFF, but only beginning from the point where the exploit was performed and until a "cold reboot" (probably the next OS reboot) is issued. I find this option very tempting.
 
  • Like
Reactions: #define

#define

Senior Member
May 1, 2012
2,025
2,180
Actually now that I know whats really happening "behind the scenes", I agree with no.human.being...
With a temporary S-OFF, the user and user alone has access to the "forbidden" areas.. No other apps or anything..
 
  • Like
Reactions: no.human.being

heavy_metal_man

Senior Member
Nov 6, 2011
2,749
752
But we still need to try work out why the hboot rolls back, and without a dev with the device and/or a JTAG debugger this will be damn hard.

Sent from my HTC Sensation using xda premium
 
  • Like
Reactions: no.human.being

artturnip

Senior Member
Jan 28, 2012
206
53
But we still need to try work out why the hboot rolls back, and without a dev with the device and/or a JTAG debugger this will be damn hard.

Sent from my HTC Sensation using xda premium

How much does JTAG apparatus cost? I've got the device... but would probably need some kind of 'step by step' things... :eek:

Sent from my Wildfire S A510e using xda app-developers app
 
  • Like
Reactions: no.human.being

no.human.being

Senior Member
Oct 29, 2011
981
987
How much does JTAG apparatus cost? I've got the device... but would probably need some kind of 'step by step' things... :eek:

Hehe it's not that easy. You need four things.

1. The device itself.
2. A JTAG adapter.
3. A JTAG interface.
4. A computer with on-chip debugging software (OpenOCD).

The JTAG interface provides the proper electrical signalling that's required for JTAG debugging, while the JTAG adapter makes the mechanical connection to the phone's board. You have to open the phone (requires Torx screwdriver) and remove the board. Of course this requires you to disconnect all "peripherals" like the LCD screen, battery housing, etc. This is where problems start.

Since you have no battery housing, connecting the battery is hard. As long as you only want to use JTAG for programming (flashing) the device, you can just connect USB, which will provide power to the processor and you're ready to go. The problem is that the device's "self test" fails as long as it does not run from the Lithium cell, which means that it will be stuck in some very low-level initialization routine (PBL or something like that) and will never even get to execute HBOOT. That's of course not useful if you want to debug.

So you either have to actually connect the Lithium cell or you have to "emulate" it using a (strong! - the phone draws quite an amount of peak current and if the supply voltage "ditches in", self-test will fail as well) DC power supply and some resistors. I have figured out and described how it works here, but of course it requires some amount of equipment (DC supply and wires and clamps and resistors and whatnot) to get this done.

It's definitely not easy to do. Imagine you have this small board and then you have the JTAG adapter. The JTAG adapter uses sharp needles (so called "pogo pins") to connect to the board. (You have to grind off the insulation from the signal traces on the board where the JTAG adapter is contacting it. Be careful though not to grind off all the copper that makes up the trace! ;) ) The pogo pins will not stay in place, they have to be pressed against the board with considerable force to make reliable contact. I used two clothespegs, one of each side of the adapter, to accomplish this. Then of course you have USB on the board for Fastboot (that you need to run the exploit). And then you have four wires for the power supply and "Lithium cell emulation". It gets very messy soon and sometimes some clamps and wires will "randomly disconnect" from this mess and then you have to "reset the board" (disconnect power supply and USB is of course a reliable method) and start over. It's definitely not fun, but it works if you're very careful. :)

Then you hold the micro-switch for Vol-Down on the board, press the micro-switch for Power on the board, then release Vol-Down, give the board some time to get into the bootloader. Then you press "Power" once more to get into Fastboot mode. Then you run the exploit from the computer. Just before hitting Enter you begin holding Vol-Down on the board again to boot into the "hacked" bootloader. All that while not getting ANY response from the phone since no screen is connected and of course always hoping that all connections stay in place. You get the idea. :)

So JTAG debugging is extremely useful but it's definitely not easy. However, this would all not have been the problem. The problem was that the JTAG interface I have is for processors with 3.3 V logic voltage, while the MSM7227 only has 0.9 V logic voltage. You will either need a JTAG interface that works with processors running on such a low voltage (haven't found any) or you need to "shift" the logic levels between the interface and the board (haven't found any out-of-the-box circuit - it probably needs custom hardware and building this is a pain, that's why I gave up on JTAG).
 
Last edited:

heavy_metal_man

Senior Member
Nov 6, 2011
2,749
752
Are there no JTAG specific to the wildfire s alone? Do you think it would be possible to find a professional to build the custom circuitry?

Sent from my HTC Sensation using xda premium

---------- Post added at 03:51 PM ---------- Previous post was at 03:42 PM ----------

http://gsmserver.com/shop/gsm/riff_box_jtag.php
What about this JTAG? It claims nand control And one nand control for the marvel chip set, and I believe it comes with its own software?
Sent from my HTC Sensation using xda premium
 
  • Like
Reactions: no.human.being
G

GuestK00178

Guest
Why not just connect the lithium cell to the board?

Sent from my Baconator Over-9000
 

no.human.being

Senior Member
Oct 29, 2011
981
987
Why not just connect the lithium cell to the board?

It's hard to contact. It only has four small copper plates that are contacted by spring-loaded copper contacts in the phone. You cannot e. g. put a clamp onto them since there are no "pins" on the cell that you could use to get a grip on. Your only chance is pressing something against the contacts (but what would provide the mechanical tension that's required for doing this?) or solder some wires onto the cell (not good if you want to use the cell again in a "regular fasion", also Lithium cells should not be heated as this may lead to explosion).

What about this JTAG? It claims nand control And one nand control for the marvel chip set

It'll probably work. It's expensive as hell though.

and I believe it comes with its own software?

Yes, that's the problem. It requires its own software since it's not supported by OpenOCD. When using custom software, you usually don't know what features it has beforehand. OpenOCD is pretty much "standard software" in on-chip debugging, so when an interface is supported by OpenOCD, you know exactly what you get.
 
Last edited:

artturnip

Senior Member
Jan 28, 2012
206
53
Hmm... I'm not gonna be able to get involved in this JTAG malarky :mad: But I'm able to help any other way possible! :D

Sent from my Wildfire S A510e using xda app-developers app
 
  • Like
Reactions: no.human.being

heavy_metal_man

Senior Member
Nov 6, 2011
2,749
752
Yes, that's the problem. It requires its own software since it's not supported by OpenOCD. When using custom software, you usually don't know what features it has beforehand. OpenOCD is pretty much "standard software" in on-chip debugging, so when an interface is supported by OpenOCD, you know exactly what you get.

http://www.youtube.com/watch?feature=player_embedded&v=7yNQeSG3yn4 this is its jtag read write halt ect functions. would they suffice?
 
  • Like
Reactions: no.human.being

#define

Senior Member
May 1, 2012
2,025
2,180
Guys, is it okay for people from other devices' forums to use the exploit NHB created?? I'm trying to achieve S-OFF on HTC Explorer..
So I am asking for permission to use the exploit.. Granted??
 
  • Like
Reactions: no.human.being

Top Liked Posts