Tuesday, January 28, 2014

Z1 Zen / How To Verify The Existence of DRM Keys

I'm happy to report that patience has paid off, and I'm very thankful. I would like to introduce you to the Service Menu on Sony smartphones. Specifically, the is the SERVICE TESTS / SECURITY menu option.

To access, simply dial:
*#*#7378423#*#*

And the lines you see there are my DRM keys. :-) How's that for a definite answer? Our friendly little experts in the 'droid community get NO credit for this find. Google, however, does. What makes this find even sweeter is that is comes directly from an official Sony Xperia Z1 document: The "Sony Test Instructions" for the Xperia Z1. I'll happily take an official document over any discussion forum, tyvm.


How It Was Found:
I Googled many different combinations of terms, none led to any useful Android site. However, the terms "sony" "service menu" led me to an official Sony service document for some old strange Sony phone. But the text that Google found in this document also showed a menu very similar to the Z1 service menu. And, it clearly defined the SECURITY menu option as DRM keys. I knew the Z1 also had a SECURITY menu option. So, I then searched for this same type of service manual for the Xperia Z1, and there it was, in black & white. I kept a copy of this document. The image above is comes from that document.

Additional Confirmation:
Furthermore, to reinforce my confidence, I used the Walkman app to play my music. I also used this app to download album information and art for my music. Walkman performed perfectly. In fact, I now realize that it's a nice little app. If the DRM keys were missing, Walkman should have crashed. And it certainly should not have downloaded ANY information or art work.

Backing Up The TA Partition:
Additionally, I rooted again so that I could back up the TA partition [TA backup requires root]. I successfully made a backup of my TA partition. At this point, that doesn't mean much, by itself. It's still unclear to me of what happens to the TA partition after the bootloader is unlocked. The DRM keys would be lost for ever, but is the partition itself still exist or is it deleted? Since my TA backup was successful, I know that some form of the TA partition still exists. So, if [a big 'if'] the existence of a TA partition is also means the existence of DRM keys, then it's more reassurance for me. I probably won't be doing much more research on the TA partition, so it will remain a question.

My next step is to upgrade the Z1 to the new FW. My current FW is version 4.2.2, and this version will lose camera operation if I unlock the phone. The newest version has remedied this problem.


To be clear:
I'll put it steps in order to demonstrate the danger of just partial information:

#1 Backup all data, use Sony PC Companion, it's amazing
#2 Back up your apps & data, use Moborobo, it's also amazing
#3 Root the device
#4 Backup the TA partition, use TA Backup
#5 Make a Nand Backup, use Nandroid or other
#6 Which firmware will you be flashing?
      A: Custom FW: Unlock the device & flash the CFW
      B: Stock FW: Flash the Stock FW [use Flashtool]

Out of those six steps, 4 include important backups. Four separate, exclusive backups, and omitting any one of those could potentially be an unfortunate loss. This isn't really a HOW-TO, but this is a group of information that should ALWAYS be posted together, unfortunately it usually isn't.

What has taken me weeks to piece-together could have been easily obtained in a few well written paragraphs. It's such a waste of time. Handing one piece of information out at a time like these people do, is often worse than ignorance, and it can never better than ignorance.

I often joke around about serious topics, but I know how fortunate I am to even have such a device. Family changes everything in life. And my conscience wouldn't allow me any peace if my flippant behavior caused the loss of such an expense [or any other for that matter]. That's where the patience comes from. :-)


Sunday, January 26, 2014

Z1 Zen / I've Possibly Voided My Sony Z1 Warranty

As I mentioned before, rooting is insanely simple. How simple? Well, is the click of one button simple enough? If the only decision being maid by me is the sole click of a button, then someone else is making the decisions for my precious phone. I'm poor, if this thing breaks, or is stolen, I'm out. I had to actually pass up on some photography equipment in place of this phone. So, yeah, precious.

'The Process' Update:
I rooted the Z1, and then, later flashed a stock ROM back over that. [essentially unrooting the device] The stock ROM was not my exact same firmware, but very, very close. I wanted to complete an unroot procedure before I moved on to unlocking the bootloader.


The Nand Conundrum: 
After much study, I realize that I should have made a Nand backup of my original firmware [after rooting]. But I didn't. I flashed a stock ROM to unroot the device, to remove all traces of the root. The root program was in chinese, and now the device takes 2 whole minutes to boot.

No where, that I read, did it mention to do a nand backup of the system before flashing a stock ROM. The only backup warning I was finding were backups to protect any data you might lose. There was nothing on my phone I needed to save. So, yeah. So I rooted, then flashed a stock ROM, that's it. Theoretically, my bootloader should have never been unlocked, and it's almost definite that my new stock firmware will have no negative effect, or even noticeable difference. But it does seem important, now, that preservation of the original system is optimum. But, we move on.

Unlocking Confusion:
Unfortunately, I don't know [or trust] what this rooting hack had done. It's clearly more than just root, because the phone is slower, and has other various behavior quirks.

There is no expert on the web that can answer one simple question: How can you test the presence of DRM keys. If DRM keys exist, the TA partition is intact, and so is the warranty. It's been asked countless times. It's been answered just as many times. However, the answers are NEVER direct, often rude, and usually reveal that NO ONE actually knows. Yes, they will tell you "If you unlocked your bootloader, your DRM keys are lost forever". Genius. Repetitious, redundant genius... but not an answer to the question.

Moving On, But Not Really:
I could just push all this aside, and just move on to unlocking and installing CFW's. But, because the DRM keys may still be intact, I want to preserve my warranty, if I can. So, I've put aside my anticipation to customize my phone, for now. Hopefully patience will pay off.

What I've Found9:
Some of the previous post is coming to pass, already... especially the parts about conflicting "facts", misinformation, and strangely conspicuously missing information. The "strangely conspicuously missing information" means...If you represent yourself as knowledgeable & experienced, and portray yourself as such, why would pertinent, vital facts and warnings be missing from your advice? I know it's not on purpose, but how a person represents themselves is how they will be perceived. A doctor who never went to med school will eventually make a novice mistake, and someone else will pay more dearly than he.

More Xperia Background:
It turns out that Sony Xperias have a partition called the TA partition. This partition contains the DRM keys. That the same DRM used by the media industry to control copyright infringement.

In this case, the DRM keys allow all of Sony's specific apps on the phone to work. [like Bravia, Walkman, TrackID etc...] The bootloader MUST be unlocked before custom firmware [CFW] can be flashed. However, if the device bootloader is unlocked, the TA partition is either altered or deleted, the experts are not clear on which, and the DRM keys are lost forever. So along with the loss of your Sony Walkman app, you are also blessed with a voided warranty. The DRM keys are unique to each device, so you can't get them from another device or off the web. Sony can't even provide them, they are that unique. You would actually have to replace the board inside the phone to have those keys...ridiculous, of course, it means they're gone.

Warranty Loss...
All of that is not so bad. I don't really care much for Sony's apps, I don't use any of them. And if I never need my warranty, I'll never feel that pinch either. But if the warranty IS voided, that secure feeling that accompanies the warranty is also voided. Yes, most likely, none of this will affect me, but I'd like to make that decision for myself...I'd rather not have to spend weeks pouring over these antisocial Android websites, never really attaining understanding of such a mishap, nor even a definite answer, or reasonable solution.

How Long:
Though I've spent many hours trying to get the answers I need, to make informed decisions, I've actually spent a very small amount of time on actual phone hacks. The root took less than a minute. The backups took less than 10 minutes. The stock ROM was flashed in less than 10 minutes.  That's it.

More Specifics:
I didn't unlock the bootloader, yet. If it is indeed unlocked, it would be due to the use of the root program [vroot]. I'm no saying that is even possible, unless my bootloader is unlocked. However, I can't understate how proper warnings are missing on many of the pages I read. It was on some, but not on many others. In some cases, it's there, but not clear, or it's buried in other tech jargon.

I Move To The Beat of My Own Dead Horse:
What if someone was to only read the pages with the missing information? They'd never even be aware of the damage they would be doing. And it's not a theory, hundreds of people are crying on these forums for their 'now' useless, worthless devices. Crying on the same boards that led them to phonelessness. Hey, I just invented that... that word is mine, you MUST provide credit to me if you use my word, even in mid-conversation. By the way, that's the attitude you can expect from the folks on the Android forums. Set your watch to it. Hyperbole? Yes. Accurate? YES.

I can't spend as much time on this as I'd like, but again, I'll be patient, the answers ARE out there.

Tuesday, January 21, 2014

Taking A Leap of Faith, Kinda....

Finally getting around to a bit of customization of my Sony phone. This is my 3rd Android, but it's only my 1st Sony 'droid. I love it, it's an amazing device. And just like the Samsung & Toshiba before it, rooting time has come. It's the first step to really taking control of the device. I always put it off for a bit because [every time] there is such a huge learning curve for this kind of task.



Rooting has become insanely simple.So why the hesitation? There is so much that needs to be considered:

Will I brick my device?
Will I void my warranty?
Will I loose DRM capabilities?
Will I loose customer support?
Will my battery life degrade?
Will the device loose speed/ run slow?
Will my actions cause it to boot up slow?
WiFi problems? Network Problems?
Will some of the device capabilities be lost [forever]?

The list can go on and on. This Sony model is the perfect example. It's camera is THE biggest selling point of the Z1. In fact, it's camera is one of the biggest topics in the Android world right now, and probably of all time [since the beginning of the smartphone revolution, that is] And... everyone who unlocked their device, lost the use of their camera... of all of the things on that device to lose function, they lost the use of the one thing that sat it apart from other phones... the very reason they bought it....irreversible gone. This would eventually be fixed with a firmware update, but what if it hadn't? And here's the kicker, many of these people had their phones unlocked using the Sony official software, not hack tools. Sony themselves were inadvertently doing it.

There is so much difference between Android makers & models, and most importantly of all... most of the Android hack world is a perpetual experimental work-in-progress. The level of misinformation is staggering. The opposing opinions on what is good, what is safe, and what is right is legendary. To those of us who are not fanboys or even enthusiasts... to those of us that just want to play with our new toy, none of this is common knowledge. We aren't driven to hack or exploit or program...it doesn't interest us, and the time spent negotiating this learning curve is a labor of love, the relevance of this new knowledge has a fleeting shelf life, diminishing by the month or week instead of year.

The bulk of people who run, moderate, program, and "help" on the Android forums around the web are often impolite, unhelpful, offensive, and even contrary to the spirit of teaching/helping. This leads to non-participation. Which then leads to people making decisions without having attained full understanding of what they need to know.

People who are senior members of the 'prestigious' Android hacking communities often post information as fact, that often turns out to be false... to the sorrow and loss of the naive. Additionally, you may get perfectly legitimate information, however, one, or more, vital facts will be left out. A fact that changes everything.

The truth is, these people running the websites are just like us. They know little more than we do, they are just passing off information that someone else posted else-where. Often they are driven by the "thanks" that they shamelessly beg for in every post. Meaning: They aren't experts, and post-count or seniority has no affiliation with experience, knowledge. nor even wisdom. If your goal is gratification, then it can't be teaching, because it shouldn't be about you.

That's the learning curve of which I speak. There are 10,000 [yes, I counted every one of them], permanently bricked Androids that belong to people that trusted these very same experts. We can never fully know for sure of "what's fact", but if you read enough testimonies on a wide-web scale [not just a few popular web-sites] it's possible to gain a fair amount of confidence.

Even with all the Android roots, unlocks, and CFW flashing as well as iPhone/iPad jailbreaking/unlocking that I've done, I admit that I have little confidence starting out. I want to know as much as possible before I take an active role into phone hacking. And every time it starts out just like this. It's an absolute confusion that will only increase, at first, but with diligence, it will certainly begin to make sense. Regardless of what I learned with previous devices, the device industry changes so fast that past knowledge will play only a small part in any present operations.

The difference between the various Androids out there is staggering. Sony is a perfect example, so much is different about this company, and this particular phone, that most of what I learned from Samsung & Toshiba devices is irrelevant. Sure, the general basics are identical, but all of the specifics are not. It's like the difference between being asked to find a sea shell on the beach and being asked to find a specific species of shell on the beach. So, now that I've made this even more confusing, I begin...