Hash-of-Codes

A small view of a large Android world

  • Home
  • Downloads
  • How-To Safestrap (Updated for v3.04)
  • Current Projects

New Safestraps for Motorola ICS updates

Posted by hashcode0f on June 22, 2012
Posted in: Android.

Unless you’ve been hiding under a rock for the past month or so, then you know that Motorola has been steadily putting out ICS leaks for the Droid RAZR, Droid 4 and more recently Droid Bionic.

Due to kernel changes and handling of the capacitive keys, I decided it was time to do a few Safestrap updates!

So the following are newly released Safestrap versions to be run only after installing an ICS leak/OTA from Motorola:

  • (XT912 ONLY) RAZR :: v2.00 [ 2012-05-20 ] md5sum: 1ab13e27f2225d490cb497d215269363
  • Droid 4 :: v2.00 [ 2012-06-02 ] md5sum: 2de0c1331c8bcaf256c462cbf1ca3255
  • Bionic :: v2.00 [ 2012-06-22 ] md5sum: a44fe2555423f9fb74042ad9c10cff94

What’s New?

  • Code base updated to Koush’s CWRecovery 5.5.0.4 (from 5.0.2.6 previously)
  • Added handling for the front-side capacitive buttons (home, menu, back, search) using a modified version of Nathan Grebowiec’s touch source.  (For Droid 4 and Droid Bionic — RAZR didn’t have this problem)
  • All devices were updated to correctly load stock-based and custom ROMs in Safe System using the new init files.

Make sure the FIRST thing you do after performing the Motorola update is go back into the new Safestrap and do a non-safe backup for restoring later should you need to.

Enjoy and play it safe!

Droid 3.. to be or not to be (ICS’d).

Posted by hashcode0f on June 11, 2012
Posted in: Android.

You’ll have to pardon me while I go on a bit of rant here.  Hopefully you’ll hang in there and at the end of this have a better understanding of “why” the Droid 3 is in the state it’s in and where it may be going next.

As most of Droid 3 owners are well aware by now, Motorola has officially crushed our hopes and dreams by saying “NO.” to any ICS upgrade.

Shocking?  For many I would imagine, yes.  The device is a spry 10 months old.  But, over the last few months, I tried to warn people that I couldn’t see Motorola putting in the time to make ICS run correctly on the Droid 3.  What exactly did I mean by that?  Or perhaps I should just say “Why won’t Motorola be upgrading the Droid 3 to ICS”?

The answer is astonishingly simple: RAM.

Add to that, how the OMAP4 design has changed from Gingerbread to Ice Cream Sandiwch and it can provide a rather bleak picture of how difficult it has been to bring functions like HD codecs and full camera support to the device.

I know you’re seeing OMAP3 phones with something like hardware acceleration and usable codecs for viewing video and possibly a video camera running at 10fps.  And you’re saying: Why not us?  What have you been doing with the Droid 3?  And why would having 1GB of RAM be so important anyway?  Isn’t most of it wasted?

–

Let’s start with the RAM issue.  Yes, most of it is waste… in Gingerbread.  However, the way ICS is supposed to run on the device there is over 320MB of memory which is allocated by the OS for use by HD codecs, and graphic texture memory.  Some quick napkin math = not enough left for the OS (would need about 250MB+ for a bare bootup in most cases).

What the hell happened to the RAM in ICS?  Why so much?  It all comes down to the initial source code provided by Texas Instruments.  If you’re a company like Motorola, you take a look at what TI has done setting up OMAP4 devices for a specific version of Android.  From there you pickout a nice starting point in their code (we’ll call this starting point: 4AI.5 which equates to ICS 4.0.4)

To use the 4AI.5 kernel source as it comes from TI, you need a device with 1GB of RAM.  There are more than 3-4 places in the source which have hard-coded memory maps which make the assumption of 1GB of usable RAM.  And it get’s worse.  Not just the kernel is mapped for 1GB of RAM.  There is a second set of source that is also provided by TI for compiling the binary which runs on the HD codec processor (called Ducati in our device).  That source is ALSO mapped for 1GB of RAM.

Let me ask you a question?  Have you seen *ANY* OMAP4 phones w/ 512MB running ICS yet?  No.  As a matter of fact, there is only 1 device in existence running an official version of ICS, and thats the Archos Gen9 80 tablet.  And it’s unique in that Archos took the time to develop a completely custom way of running memory management in ICS to support 512MB of RAM.  (I’ll bring this device up later).

With the current onslaught of phones and technology progression, MOST companies like Motorola just don’t have the time to redesign the 4AI.5 kernel to make it work with 512MB RAM.  They have bigger fish to fry, and more devices to sell.

Q: So, we’ve established why in theory having 1GB RAM makes it easier for a company like Motorola to bring an ICS update to the device, but… that doesn’t really explain the lack of HD codecs and full camera support for the current ICS ports for Droid 3, Bionic, RAZR and Droid 4 that I’ve been working on.  After all, we’re not using a true ICS kernel.  We’re using the original Gingerbread kernel!  Aha!  We don’t *need* 1GB RAM for that!
A: Quite right.  And the current Gingerbread HD codec binaries which get loaded onto the Ducati processor also don’t work with the ICS operating system .. at all.  In general, the Gingerbread binaries work in Gingerbread structures called “overlays”.  In Ice Cream Sandwich, the entire graphical sub system works on “native Window” structures instead.  — Uh.. what?

This means you can’t use Gingerbread ducati binaries in ICS.  They don’t talk the same language.

So how does the current camera hack work?  It’s exactly just that.  A hack.  It uses a pre-compiled Gingerbread camera library to read from the Gingerbread ducati binary what the camera is viewing at that particular moment.  And then it shoves it right on to the frame buffer, bypassing the entire OS.  This also means stuff that uses the camera like bar code scanners, Google Goggles, etc.  All will not work.

Q: So why does it seem like nothing has been happening over the last few months?
A: Simple.  There really hasn’t been much happening.

That’s not to say I haven’t been looking at options or running tests on viable paths to take to get those features worked out.  They just haven’t been working and/or end up being too much work for 1 guy like me to do.

Case in point: We’ve established that KEXEC can work on the Droid 3.  That means we can load a new kernel.  What would it take to get a kernel loaded that has support for all the “stuff” we’re missing from ICS?  Answer: “A lot of work”.  It took me 4 months of work to get a usable kernel (as it stands today) for the Kindle Fire.  And it’s not even done.  Imagine adding to that: a camera, a 3G modem, bluetooth, and other devices that the Kindle Fire doesn’t even have.  It might take me 6-7 months to bring a full fledged ICS kernel to the Droid 3.

Q: But, perhaps, I don’t have to do a FULL ICS kernel.  What about “back porting” just enough of the kernel to get Syslink 6.0 running so that we can load the necessary binaries to run HD codecs and camera?
A: Great idea!  However, remember that whole 1GB RAM issue?  There is only 1 ducati binary in existence (that I know of) that runs on 512MB and that’s from the Archos Tablet I mentioned before .. and it only has a 720p front-facing camera.   So there’s a very good chance you can’t use it for full camera support and isn’t that 1/2 the reason for re-writing the kernel?!

The last option would be to hack in some kernel “modules” which are much smaller than a full kernel and somewhat easier to manage.  And some of you may have seen me working from time to time on different versions of these.

To date: I’ve never been able to load any ducati binary on the Droid 3 using kernel modules.  It’s a brutal process of ripping out routines and replacing them w/ Gingerbread counter parts and in the end, I don’t know if it will ever work.

But, since I’m just 1 guy and not a whole army of coders who work full-time on it, this last option is still probably the only viable option at the moment.  And even then, I still *need* Texas Instruments to probably step up their support for 512MB devices and create a new ducati binary which we can run which has full camera support, etc.

Q: What *IS* the future of development for the Droid 3?
A: While I will continue to tinker with backporting enough function from the ICS kernel to make a usable ICS build … the truth is, we’re probably looking at CM 7.2 as a decent alternative where you can actually use the majority of the device’s functions.

Q: When will I start work on CM 7.2?
A: Probably as soon as things settle down w/ the RAZR and Droid 4 MotoICS leaks (few weeks).

And that’s it.  /rant-off.  I hope you can all keep in mind that I do this at night, on weekends, during holiday breaks and while I sleep sometimes.

I’ll try and do a better job of keeping everyone in the loop. :)

Safestrap v2.0 for ICS-LEAK RAZRs

Posted by hashcode0f on May 22, 2012
Posted in: Android.

So it’s May!  And I have a quick update as it is VERY busy in the Motorola world of phones.

There are official ICS leaks out for both the RAZR and Droid 4!  And of course with these leaks moving users to an ICS-based kernel, we need a new version Safestrap! (RIGHT?)

SAFESTRAP 2.0 for CDMA RAZR (XT912) On Motorola ICS-LEAK (2nd-System Bootstrap / Recovery)

[ After installation, when you first enter recovery do a BACKUP of your original Non-Safe system.   You will need this backup when you want to go back to stock for upgrades. ]

** INSERT STANDARD DISCLAIMER: I’m not responsible for any damage you do to your phone using my tools.  **

[ Make sure you get the RAZR ICS-LEAK 2.0 version -- DROID 4 version should be coming soon. ]
RAZR ICS-LEAK Safestrap v2.00 Download Here
Instructions for Use

** BRICK WARNING: DONT USE IN COMBINATION WITH BOOTSTRAP — REMOVE BOOTSTRAP PRIOR TO INSTALLING SAFESTRAP **

TO ENTER RECOVERY:

Enter recovery via the Splashscreen on boot-up.  The screen stays up for around 8-10 seconds and if you hit the [ MENU ] button, it takes you to Safestrap Recovery.  Hitting [ SEARCH ] key will continue with the boot.

QUICK SUMMARY OF SAFESTRAP:

  • Safestrap attempts to keep your device in a relatively “safe” state while flashing custom ROMs.
  • This means that you are not clobbering your original system and taking a chance at bricking.
  • Where does the ROM get installed?  Safestrap uses the preinstall partition instead.
  • Inside the recovery your preinstall partition is known as the “system” partition.  And if you ever need to reference the main system it’s called “systemorig”
  • The recovery handles 2 sets of data.   1 for your stock phone ROM (non-safe system) and 1 for your custom ROM (safe system).  When you swap from non-safe to safe or safe back to non-safe, the recovery will back the current one up and replace it with the other.  That’s why it takes a minute.  Be patient, let it happen.  Profit.
  • You can only flash custom ROMs to the safe system.
  • Almost everything else about the recovery works like ClockworkMod Recovery.

KNOWN ISSUES:

  • USB Mounting from inside Recovery doesn’t work yet.  I show that the LUN file is being written to, but it just doesn’t do anything.  This may differ depending on the kernel in your particular leak.

SPECIAL THANKS TO:

  • Koush who develops such a GREAT recovery system and the makes the source available for others to use.
  • The Atrix dev team who I pulled the internal/external SD card support from
  • The Defy dev team that originally developed the Bootmenu source which I stripped down and used for the Splashscreen.

As always, let me know what you think!

New Blog!? Why oh why?

Posted by hashcode0f on March 7, 2012
Posted in: Android, Personal. Tagged: web location.

I’ve obviously moved the blog from Blogger to WordPress, and I the reason is simple:

  • Blogger’s interface / design limitations were driving me nuts.  I’ve wanted to seperate the downloads for a while not, but have been too busy / lazy to do it.

Expect to see more content start flowing into the static navigation pages as I get more time to work on it.

But, to start, I’ve seperated out the Safestrap downloads from Droid 3′s.   And I’ll add in a new Droid 4 section soon.

And I know there’s a TON of broken links.  I’ll fix those as well.

You can bookmark the new web location for the site: http://blog.hash-of-codes.com (or let http://www.hash-of-codes.com redirect you)

The Quest for Fire … Kindle Fire that is

Posted by hashcode0f on March 1, 2012
Posted in: Android, Kindle Fire.

NOTE to the phone users which I support:
Yes, I’m also working HEAVILY on the phones to get some features fixed and others added.  Never fear. :)   However, kernel work has a large place in the future of phone development, and this has been a GREAT experience.  Hopefully, the work I’m putting into the Kindle will pay off for the phones I work on as well.

For those of you that don’t know, I’ve been fairly active developing ICS for the Amazon Kindle Fire.

A little history of the device:

  • TI OMAP4430 CPU (just like Droid 3, Bionic, RAZR and Droid 4)
  • 512mb memory
  • 7″ form factor tablet (1024 x 600)
  • Runs Amazon’s customized version of Android (2.3.4 Gingerbread)
  • Unlocked bootloader
  • Current kernel is 2.6.35.7, TI tag: L27.13.1-Beta
  • 8gb internal emmc storage area w/o an external sd slot

Since the Kindle Fire has an unlocked bootloader, I felt it would be a GREAT experiment in learning about kernel development and work on some of the systems that are currently unavailable on the Motorola phones I support.

Enter a few weeks of blind kernel development.  There is no serial port on the Kindle Fire.  I would try backporting some of the ICS kernel’s features and if the kernel didn’t boot.. well that was it.  Toss the code and start over.

Few weeks ago, the identified the UART motherboard pads in this XDA thread, and I KNEW IT WAS TIME TO LEARN TO SOLDER!
http://forum.xda-developers.com/show….php?t=1471813

So, I ordered all of the goods needed and got ready to get to work:
SparkFun FT232R for translating serial output to USB.
Soldering Station
Set of small electronics screwdriver set

I wouldn’t recommend that everyone jump in and do this:
- In general you risk damaging your Kindle Fire
- Taking the back cover off incorrectly can break off the small tabs that hold it into place, making it difficult to keep on. (I did break 1 tab during this procedure — but the cover still fits nicely)
- Soldering is not a joke. You need to go do the research and practice. I took out a motherboard from an old laptop and did 10+ tests where I took a wire and soldered it to a pad on the board. Even then… things didn’t go entirely smoothly (read below). YouTube also has a GREAT series on how to solder (you’ll have to get over the fact that it’s the 80′s):
http://www.youtube.com/watch?v=vIT4ra6Mo0s

Anyway so here we are with the pics:

This is the equipment I used.


Here I have the back cover off of the Kindle. I recommend using a plastic flat tool to pry the rubberized portion up and away from the front. That way you avoid breaking too many of the small tabs.


Motherboard is out! Note that the pictures make this look like it’s fairly good size. It’s not.


Here’s a better shot right before I moved the Motherboard to start soldering on the wires to the 4 pads on the right. They are so small that at this point I nearly stopped and put the entire thing back together. The tests I did on the other motherboard: the pads were slightly larger and had more solder on them.


Here’s a shot of the Motherboard with the new wires attached. I didn’t realize at the time that I only needed GND and TX0 attached. I did all 4. And originally I thought I’d have enough solder to attached the wires just by tinning the tip and wires. Such was not the case. I had to pin the wires down with a clamp so I could use 2 hands and add just enough solder to hold the wires to the pads.


And here’s the Motherboard back in the Kindle. I flattened one of the speaker screens and ran the wires out through the top so they could be connected to the SparkFun.

I had a real scare while re-attaching everything. The battery connector didn’t go in perfectly straight and I bent a pin. Had to pull the battery out and use a very thin screwdriver attachment to go into the connector and straighten it out.

This was around 2:30am. But that didn’t stop me from booting it up and checking the output!

This pastebin shows the bootloader and then the kernel output via the new UART connection:
http://pastebin.com/6tEB3PBr

NEXT STEPS FOR KINDLE FIRE ICS KERNEL DEVELOPMENT?

I’ve been working with the Nook Tablet guys as we’ve been hammering on the kernel backport modules. They also have a guy who soldered a UART connection and is working on a 3.0.8 kernel. Amazingly the Nook Tablet is nearly identical to the Kindle Fire. So much so that they have the same TI tagged kernel as we do (L27.13.1-Beta).

I will probably grab the work-in-progress kernel that they’ve been developing and load up the 3.0 kernel config I already have out on GitHub.

And we’ll see where stuff is going wrong.

A camera by any other name …

Posted by hashcode0f on February 23, 2012
Posted in: Android.

Is just a camera.

Especially when it’s on our cell phones.. and we all take it for granted.

But ICS for the Droid 3/Bionic/RAZR has been without. And it has been mildly annoying for some and a downright show stopper for others.

For me, it has been a month and a half long battle of wills where I tried about 4 different ways of getting the camera to play nice in ICS. Everything from kernel modules to GB camera code changes.

And I was getting ready to start yet another way of fixing the camera when:

2 days ago XDA user rapmv78 posted a very nice fix for the Droid 3 camera (which works on RAZR and Bionic as well).

This fix enables the main camera for normal point and click use (currently). Things like panorama, face unlock and other features will need work.

That said, I’ve dug into his software rendering solution and I’m currently working on more changes which will *possibly* make the camera more ICS friendly. Only time will tell.

So, if you’re feeling particularly generous or want to show your appreciation for the new camera function. Drop by:
http://forum.xda-developers.com/showthread.php?t=1510485
and post a thank you / donation to rapmv78.

A RAZR, Motorola phones and Hashcode: State of the Union

Posted by hashcode0f on February 2, 2012
Posted in: Android.

As most of you who follow me on Twitter have heard, I’m getting a RAZR today.

It was a generous gift by the DroidRZR.com community, and I am thankful to be getting it.

Why get a RAZR? What’s the deal? Am I going to stop Droid 3 development? Rumor has it that I also have a Droid Bionic.. is that true?

No I’m not stopping development for Droid 3.

Read on.


Lately, I’ve been considering the pace of the cell phone market and Android growth.  Sadly, we’ve all seen phones become obsolete 2 months after they were released.  And these are GOOD phones, that can run anything out there today.  Add to that the fact that development on these phones is so spread out, it’s hard sometimes to feel good about staying with Motorola and not jumping ship to the Galaxy Nexus or some phone which is the dev pick of the week.

I’d like to ask the rhetorical question:

Q: How do we encourage MORE development across what is essentially 3-4 phones in 5 months?

A: I HAVE A PLAN.

  1. The first step is getting a stable ICS running on ALL of them.  Especially, the phones who have the most developers / themers and modders.  That’s where it starts.  Get someone who wants to create something a nice blank canvas.
  2. That “canvas” happens to be a 960×540 sized phone screen.  All of these phones are setup NEARLY the SAME when it comes to the Android OS and the graphics that runs on it.  And they all face the same challenges getting ICS up and running on them.
  3. I will personally get involved in helping to port ANY AOSP/CM9 ROM from the phone that it was created on to the others.  OR educating those willing on how to port over ROMs from 1 phone to another. 

SO if we have 3-4 phones worth of developers pumping out ROMs, THEMES and MODS.. why shouldn’t we have more stuff going on here than any other group of phones out there?

The answer is simple: we should and WILL.

Some keys to successfully pulling this off:

  • When you port someone else’s work to a different phone: KEEP THE ORIGINAL CREATOR’S “BY LINE” INTACT.  Sure, add yourself as the person who did the port.  But give credit where credit is due.  Hey, if I knew I could do something for 1 phone but have it possibly end up on 3 others.. I’d be that much more interested in doing it.
  • Stick together, and help each other out.  If you know of a solution to a problem and you see someone asking for help, why not help them?  They could be on their way to creating the most BADASS ROM ever.
  • Keep it fun.  No drama.  Nothing kills development faster than drama.  We’re all adults (or close).  Why not just discuss it and work it out?

SO, summary time:

I have a Droid 3, Bionic and a RAZR.  And I fully intend to use each one to help get us to my Master Plan(tm) (see above).

Posts navigation

← Older Entries
Newer Entries →
  • Development Team

    Hashcode
    » Twitter @hashcode0f
    » Donate via Paypal

    DHacker29
    » Twitter @dhacker29
    » Donate via Paypal
  • Recent Posts

    • RAZR-HD / RAZR-M / Atrix HD Status
    • Kindle Fire 2 sees Unlocked Bootloader / TWRP / AOSP Android (CM10.1)
    • How to manually remove Safestrap (via ADB)
    • Changes coming in Safestrap v3
    • Links Broken!
  • Archives

    • January 2013
    • December 2012
    • October 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.com
Blog at WordPress.com. Theme: Parament by Automattic.
Hash-of-Codes
Blog at WordPress.com. Theme: Parament.
Follow

Get every new post delivered to your Inbox.

Join 132 other followers

Powered by WordPress.com
Cancel