Hash-of-Codes

A small view of a large Android world

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

RAZR-HD / RAZR-M / Atrix HD Status

Posted by hashcode0f on January 23, 2013
Posted in: Android.

It has been quite some time since I’ve talked about the RAZR-HD which was so generously donated by the community at DroidRZR.com.  So I should do a quick recap of where we’re at with development:

Obviously we have a functioning Safestrap (which still needs a few tweaks to enable stock ROMs).  But, development for the RAZR-HD/M/AHD has been VERY sluggish on our end.  And I can totally understand if there are grumblings out in the community regarding our progress:

1. It’s not always that easy to pick up an entirely new platform and get rolling on it.  And I think we’re suffering a bit due to the MANY MANY changes in the QCOM devices.  Everything from RIL, to wifi, to the libs operate in different ways than on the OMAP phones we’ve been supporting.  So development just takes longer.

2. There has been some really good development for these phones.  One of the Atrix devs (E. Pinter) has done some GREAT work getting the XT925/XT926 (and potentially the M barring some bugfixes) up and running on CM10.1.  Unfortunately, the direction he took was to do the updates the way it’s intended: via the kernel and using AOSP drivers.  So this kind of development doesn’t work on the locked Verizon phones. :/

3. Currently, I’m working on getting kexec up and running for the QCOM phones in a similar way that the OMAP phones has kexec as an option.  You can see this work here:

Kexec-Tools: https://github.com/razrqcom-dev-team/kexec-tools/commits/master
Kexec-Modules (for use on the stock kernel): https://github.com/razrqcom-dev-team/android_kernel_motorola_msm8960-common/commits/jellybean-stock-kexecmodules

What’s been done?   Using the development edition phone as a testing device: I pulled the atag info given to the kernel via the bootloader, as well as the device-tree, and I’m using a custom kernel to troubleshoot the kexec process.  I’ve also had to customize the kexec tools to use a different method of loading / starting the kexec process.  Turns out the newer 3.0.31 kernel has new security features which are fixed some of the holes that were used to setup the kexec syscalls as was done on the OMAP phones.

Right now, I’m to a point where part of the kexec process goes on w/o any real indication of what’s happening.  In the past, developers like [mbm] and Kholk setup a vibrate to see where this process crashes.  However, those are still not working on the QCOMs.

So I took apart the phone and search for UART pads to get serial output up and running.  Here again, I was unsuccessful in my search over 3 nights of probing nearly every point on the motherboard I could find.

Couple of snapshots of parts of the RAZR-HD motherboard:

IMG_20130121_233008

IMG_20130121_231132

Next steps:

#1 Priority: Fix kexec and get a usable kernel out to the public.  This would fully leverage all of the great development that exists right now for the locked devices.

#2 If for some reason it doesn’t look like kexec is going to be an option, then we’ll revisit building CM10.1 using the existing portions of software that we have much like we do on the other Moto’s.

Sorry it’s taking such a long time to get rolling.  :/

Kindle Fire 2 sees Unlocked Bootloader / TWRP / AOSP Android (CM10.1)

Posted by hashcode0f on January 15, 2013
Posted in: Android.

JB Kindle Fire

Today, I posted over at XDA (http://forum.xda-developers.com/showthread.php?t=2100963) the instructions for setting up a 2nd-bootloader, TWRP and CM10.1 on the Kindle Fire 2.

Sounds boring? Why all the fuss over another Kindle Fire being turned into an Android tablet?

The new Kindle Fires from Amazon have bootloaders which attempt to prohibit flashing a custom OS. But, when developer fattire (of Nook Color fame) pointed out a potential exploit.. What can I say, I had to jump on it. :)

So after a week or 2 of work, and some help from verygreen (another NookColor dev) the end result is that AOSP-based Android can now be run on the new Kindle Fire 2.

I’m also working on similar setups for the KFireHD’s (specifically the 8.9 at this time) .. so look for more Kindle Fire fun to come.

How to manually remove Safestrap (via ADB)

Posted by hashcode0f on December 27, 2012
Posted in: Android.

First off there are very few circumstances where this should be used.  The most obvious one could be:

  1. You are having some kind of odd display issue where you feel Safestrap is causing a scrambled display, but can’t obviously see anything on the phone to go into the APK and use “Remove Recovery” button.  (I’ve never had this happen.)   NOTE: There’s a good chance that you will still see a scrambled display after Safestrap is removed and that it’s not actually causing the problem.  It just happens to be the last thing that shows before the boot animation which if that’s swiss cheesed means there are driver / kernel / display issues in the stock ROM.

Assumptions:

  • Connected via ADB either in Recovery itself or fully booted in the OS
  • Should be on the stock ROM slot

Commands to be entered as su (should show “#” command prompt):

  1. mount -t ext3 /dev/block/system /system (if you need to mount system)
  2. ls -l /system/bin/logwrapper.bin
  3. Double check that this #2 command shows you a file on your system!  If not, then you are not on the stock system and/or don’t have Safestrap installed: proceeding further could brick your phone!
  4. mv /system/bin/logwrapper /system/bin/logwrapper.bak
  5. mv /system/bin/logwrapper.bin /system/bin/logwrapper
  6. rm -rf /system/etc/safestrap
  7. Reboot.

Changes coming in Safestrap v3

Posted by hashcode0f on October 5, 2012
Posted in: Android, Safestrap.

[ NOTE: Safestrap v3.0 has been released for BETA: Download Here and make sure to read through the Instructions ]

I’m starting to field a lot of questions about what changes are coming in Safestrap v3 (for those of you who don’t know what Safestrap is check here: How-To-Safestrap).  Time for a blog post!

I have quite a few “issues” with Safestrap as it stands currently.  And I’m sure many of you do too:

  1. Too many different device-based versions: Each device has a separate APK installer and the whole process is customized for partition #’s involved.  This means that anytime I want to update Safestrap, I’m building/recompiling the thing 5-6 times, which makes me NOT want to update it with new features.  This is a big one for me personally.
  2. Too long to wait between ROM swaps from stock to safe-system.  We all wait that minute or more between swaps thinking.. there really should be a better way to store a seperate set of data.. shouldn’t there?
  3. By using “preinstall” or “webtop” partitions we’re effectively “breaking” a partition which will be checked during OTAs.  And while this isn’t a huge issue day to day, it’s a hassle when OTAs roll out to restore that partition.  Part of what Safestrap should be doing is providing a “hassle-free” way of flashing ROMs to our devices, even tho they have locked bootloaders.
  4. Why oh why can’t I flash my stock ROM?  Nuff said.
  5. We’re still using finicky hard button controls to navigate around recovery?  This is 2012 isn’t it?
  6. I’m not sure about you but doesn’t it seem like you always want to flash something when your battery is a bit low?  And there’s nothing worse than getting “stuck” in a low battery situation.  Why doesn’t battery charging work in recovery?

Enter Safestrap v3.0.  I’d like to say that I’m going to address every single one of these issues on the first release, but I will probably only hit the majority of them and then follow-up with a few late additions.

MAJOR CHANGES:

  • Safestrap will now use the internal emmc storage partition on our devices to create 2 image files for ext3 paritions: system and userdata.   System.img is hard set to 500MB and the userdata.img is user selectable in size from 1GB to 3GB.  Note: Size can be important here as it can limit the # of usable 2nd-system ROMs you have access to. (see below).  Also if playtesting determines that we need a cache.img per ROM slot then I will add that later before release.  But that’s another 200-300MB of space that I’d like to avoid if possible.
  • Multi-ROM swapping support: Based on the available space of the internal emmc storage partition (/sdcard in Android OS), we can now have from 1-4 safe-system ROMs available for flashing to.  This means you could have: a stock-based and kexec-based version of CM10 and AOKP.
  • Touch Based Recovery / Theming: Instead of using ClockworkMod Recovery as the base for the new Safestrap, I chose TWRP 2.2.2.1: http://teamw.in/project/twrp2  This is a fully touch-based recovery with all of the bells and whistles you would expect and some you wouldn’t.  (This page shows the default TWRP theme)
    • Safestrap support for ROM slot creation, management and selection is all under a sub-menu “Boot Options”
    • TWRP supports user-based themes loaded as /sdcard-ext/TWRP/Theme.zip.  I will post a full theme.zip which will install a TWRP theme when the design is more final.  Dev’s can take that .zip and replace their own art.  Here is the WIP template design for Safestrap v3: https://dl.dropbox.com/u/41149741/safestrap3-theme-template.png
  • Instant ROM swapping: Because we’re moving from the preinstall / webtop usage which didn’t leave room for a 2nd-userdata partition, we can now have nearly instant ROM swaps between stock and any one of the 4 available ROM Slots via recovery.   I might eventually add “instant boot” buttons on the splash screen for choosing a boot ROM during boot.  But, this isn’t in the planned 3.0 release.
  • Flashable “Stock” partition.  You will be able to flash the stock system in this go around.  For me personally, I’m not a huge fan of doing this, but I see reasons why users want this feature enabled.  I’m currently working on pre- and post- stock flash features such as saving the current version of Safestrap that is installed to /system/etc/safestrap + the logwrapper hijack and then re-installing them after the .zip flash is complete.  I’m on the fence about supporting 2nd-init / kexec boot from the stock ROM.  Isn’t that what we have 4 ROM slots for?
  • Safestrap v3 for Bionic, RAZR/MAXX/XT910, and Droid 4 is a single .APK to distribute.  It’s only because I need to rebuild Safrstrap for D3 as a GB-compatible binary that the Droid 3 needs a separate APK.   This will make updates easier in the future.
  • Battery Charging in Recovery.  Right now I have battery charging working for the test devices I’m using.  Hopefully it will be good for all 4 models which should be supported by the initial v3.0 release.

QUESTIONS / ANSWERS:

Question: Won’t the partitions running on emstorage (sdcard) cause additional wear and tear on the memory?
Answer: The primary /system and /userdata partitions are also on the same emmc chip as the /sdcard partition (emstorage).   So no, not in my opinion.  If you’re an expert with proof that this will in some way damage the phones I support, please send me an email with the details.  However, there are already other multi-boot supporting systems such as Boot Manager which do something similar to handle multi-ROM swapping.  This isn’t something entirely new.  This is just my implementation of it.

Question: Why the move in the STS-Dev-Team ROMs to establish the external SD card as the “primary” storage method?
Answer: The goal is to let users keep the internal emmc space as free as possible so that they can have more ROMs installed.  However, you can still use the /sdcard space for storage purposes.  Just don’t format it or you will lose the ROM slots you’ve created.

Question: I’m using a 2GB external SD card which is filled w/ music.  Won’t I have issues using the new ROMs which treat this as primary storage?
Answer: Short answer: probably.  Long answer: we’re also looking at a way of letting the user designate which storage location to use as default.  On a side note: Ebay has listings for 16GB+ micro sd cards for less than $15 (Just saw a class 4 16GB card w/ free shipping for $12).  Perhaps this is a good time to upgrade that external storage?

Question: How much will Safestrap v3.0 cost?
Answer: Free as always.  With no limitations.  Though, I’ve been asked about having a $5 “donate” version in the App Market.  Not sure if I really want to do that yet.

Question: When will Safestrap v3 be publically available?
Answer: When I think it’s “safe” for the general public and everything you guys will try and throw at it.. :P

Links Broken!

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

I realize that every link I’ve ever created on the internet is now completely broken.

Please be patient while I restructure: http://rombot.org/ROMs and upload what files that I saved locally.  And then I’ll need a bit of time to go back out onto the interwebs and correct every broken link.. ever.

Thanks!

How to Eat a Hat (Droid 3 developments) …

Posted by hashcode0f on July 21, 2012
Posted in: Android.

On June 11th, I wrote a semi-rant “Droid 3.. to be or not to be (ICS’d)”, and I discussed the exact reasons why I was “giving up” on ICS for the Droid 3.  Many of you who follow me on twitter (@hashcode0f) have seen hints that something has changed in the Droid 3 world and are seeing words like “kexec” floating around.

Here’s a review of some of the points I brought up in my earlier post and the counter point to what has changed since then.

1. 512MB RAM isn’t supported in Texas Instrument’s (maker of the OMAP4430 CPU in the Droid 3) stock kernel

Not true any more.  As of a month ago, TI has merged in new memory handling to support running their stock 3.0 kernel on 512MB devices.  You can see this development branch here at omapzoom.org under the “p-android-omap-3.0″.  This kernel source customized with Motorola’s drivers for the Droid 3 would enable an up-to-date ICS/JB experience just like the RAZR/Droid 4 and Bionic are currently getting.

2. The “ducati” HD codec binary doesn’t support 512MB RAM devices (similar to how the 3.0 kernel doesn’t)

My original argument: even if you could customize a 3.0 kernel to run on 512MB (which I have done for the Kindle Fire), I can’t compile my own 512MB complaint ducati binary.  And the one I use on the Kindle Fire probably won’t work for the Droid 3′s dual camera setup.

Not true as well now.  About 3 weeks ago TI merged in code to support building the ducati binary using a 512MB memory mapping.  NOTE: To-date TI has never actually built a FULL ducati binary using that 512MB memory map, but I’m working on this (more below).

3. To get a 3.0 kernel loaded on the Droid 3, we would need to use a technique known as “kexec”.  This allows an existing kernel to be fully replaced in memory almost like the device was rebooted.  You may have already heard of this on the RAZR where developers [mbm] and Kholk successfully booted a slightly custom version of the original 2.6 kernel (at the time).  My argument was that this process for getting a kexec system to work was also time consuming.

Since then, I’ve met another Droid 3 owner (and developer) named jonpry.  He was interested in putting a custom kernel on the Droid 3.  So, during out discussions, I told him: “if you make kexec work on the Droid 3, then I’ll take my best shot at getting a 3.0 kernel running on it.”  And he did.  Not only did he rebuild their process and get it working on the Droid 3, but also solved several issues that they had on the RAZR.  For example: the 2nd CPU now works as well!

Looks like I had some work to do.  But where to start …

4. My last argument was that the Droid 3 doesn’t have a usable 3.0 kernel to run on it.  And developing one from scratch would takes months of time and run into all of the first 3 issues.

As of the beginning of July, Motorola released the 3.0 kernel source for the RAZR and it’s a VERY good starting point for a kexec kernel to use on the Droid 3.

So, if all of these issues are now “solved” why doesn’t the Droid 3 have an ICS/CM9 ROM which works and acts like it should?

The short answer is: We do (sort of.. in progress).  As of a week ago, I have a full CM9 build using a new 3.0 kernel which has been heavily modified to more closely resemble a stock kernel from TI.

  • It’s using Jelly Bean ready graphics drivers
  • And has the code ready to load a 512MB memory mapped ducati binary enabling HD codecs and possibly camera.  NOTE AGAIN: this ducati binary actually doesn’t currently exist.  But, more on that later.

Status RIGHT NOW of the ICS/CM9 build using the new 3.0 kernel:

  • The newly updated graphics drivers create a fluid and fast UI like it should be in ICS and beyond (IMHO it’s actually a bit smoother than the current MotoICS-based RAZR, Droid 4 and Bionic builds due to their framebuffer issues)
  • Main audio is not working, but BT/Speaker phone are
  • Radio is up and running, calls work and 3G has been reported as working (VZW only, more testing for XT860 and other variants)
  • Touchscreen and other sensors are fully working
  • Internal SD card is not mounting for whatever reason, but external SD is
  • Wifi comes up VERY solid is perhaps the best it’s ever been on the Droid 3
  • Hard keyboard needs work in the device tree to fix key mappings

In general, this build is encouraging as it demonstrates how close the Droid 3 is to being brought up-to-date with the other devices that I support (RAZR, Droid 4 and Bionic).  And how well it cam run ICS and the Jelly Bean builds to come.

If you’re curious about seeing this build of CM9:

  • You’ll need to install Safestrap 2.0 (with kexec support) from here
  • Download the KEXEC CM9 ROM from here and install as you would any other ROM in Safestrap

NOTE regarding a new 512MB ducati: I made a contact at Texas Instruments who is working with me to build this binary.  It’s not the normal thing that he does, and Texas Instruments is a bee hive of activity these days. (read as: he is VERY busy with Jelly Bean changes and more).  So it may take some time to figure out the new ducati build and get a working 512MB binary, but with a little patience we’ll hopefully work it out and have what we need to make this the “complete” solution that all of us Droid 3 owners are looking for.

WHAT CAN I HOPE FOR BY USING A NEW 3.0 KERNEL-BASED ROM?

  • Future-proof display drivers not only supporting the ICS changes that were so badly broken prior to this kexec build, but also new features like triple buffering and vsync limits for Jelly Bean and beyond
  • Functional HD codecs for YouTube and Netflix as well as other encoding / decoding features that would never have been possible in the Gingerbread-based builds
  • Working camera (back, front or both possibly) using TI’s latest camera drivers which support instant picture taking, panorama, and face recognition
  • The latest (and future) Wifi drivers which support new functions such as Wifi Direct and Wifi Display as well as bug fixes straight from TI’s repositories

WHAT IF I’M USING A RAZR, DROID 4 or BIONIC AND I WANT THIS TOO?

My current plan is to finish more testing on the Droid 3 and then begin using this new kernel on ALL of our supported Motorola devices.  So this isn’t just good news for Droid 3 owners, it’s great news for everyone as long as we can work out the kinks and get a few missing pieces.

I will try and post more information as it happens via twitter (@hashcode0f) or on such sites as Droid Hive, XDA Droid 3 Development section, DroidRZR and/or Droid Forums, but don’t hate me if it doesn’t hit your particular forum of choice.

K is for Kindle Fire and J is for Jelly Bean

Posted by hashcode0f on July 15, 2012
Posted in: Android, Kindle Fire.

Image

About 24 hours after Google released the source to “Jelly Bean” Android(tm) (v4.1.1_r1), I was able to get a usable build running for the Kindle Fire! (technically available a week before the Nexus 7′s were shipped)

Mostly, this was possible because of the development state that the device is in.  We have a stable 3.x kernel and updated drivers which were nearly JB compatible out of the box.  And the Kindle Fire has a great community of developers working on custom ROMs and users who are willing to try them!  I think this is important as developing for a device which no one is interested in, is really just a waste of time.  [Update as of 07/20: Bit.ly stats show that Jelly Bean AOSP for the Kindle Fire has been downloaded over 7,000 times in about 8 days!]

Want Jelly Bean on your Kindle Fire?

This requires the following setup:

  • First, you need to root the current Amazon operating system that you’re running
  • Install a custom recovery (TWRP 2.2 or a compatible ClockworkMod Recovery)
  • You probably should be running FIREFIREFIRE (v1.4a) bootloader as this allows easy access to recovery
  • Grab the AOSP Jelly Bean build here
  • And away you go w/ the latest greatest Android operating system

Want more detailed information on all of the above?  Head over to XDA in the Kindle Fire Development section and get all of the information you need before attempting any of the above

Where does this end with the Kindle Fire?

It doesn’t!  I love working on the Kindle Fire and proving everyone wrong about how great a 512MB RAM device can perform.  I can’t think of a better device to play with.  Get one as a birthday gift or for <insert random holiday>?  Buy one cheap on eBay for $100?  Sure it has deficiencies in the touch screen (2 touchpoints?!  ugh) and could have probably used 16GB internal space.. but seriously, it performs as well as many tablets on the market today and it just gets better and better.

My current plans are:

  • Fix the charging notification issues
  • Fix the MIC input for voice recognition for a better GoogleNow experience
  • Enable OTG support for as many devices as possible
  • Keep updating the kernel for graphics and wlan drivers which support many new features in the Android OS.
  • Crank up nightlies for CM10 on rombot.droidhive.com

Enjoy

Posts navigation

← Older 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