Nandroid backup files - Android Software Development

Hey people
I was wondering if the image files that nandroid creates are encrypted?
Reason I ask is I want to do a Android based final year project for my degree but it has to be security related.
Anyone got any other ides on what I can do that can be done in 6 months and not been done before?
thanks

Nandroid packs the files into a yaffs2 image that is not encrypted (as far as I can tell).

Gene Poole said:
Nandroid packs the files into a yaffs2 image that is not encrypted (as far as I can tell).
Click to expand...
Click to collapse
ok cheers
Wonder how hard it would be to encrypt it.

Well encryption can sometimes lead to corruption, which no one wants with a backup...

Nekromantik said:
ok cheers
Wonder how hard it would be to encrypt it.
Click to expand...
Click to collapse
What did you have in mind? Did you want to just protect the backup with simple encryption, or be able to use the file-system image with encryption in-place like linux EFS?

Gene Poole said:
What did you have in mind? Did you want to just protect the backup with simple encryption, or be able to use the file-system image with encryption in-place like linux EFS?
Click to expand...
Click to collapse
I was thinking just a simple encryption so that you cant restore the backup without the key.
Not sure if I will be able to use this for me project but am seeing the android "expert" at my university on friday to discuss things.
Will be good to have XDA for help

Related

Encryped files on SD Card then updated ROM, can't view the files now

Hey everyone, I'm an idiot and completely forgot I encrypted the files on my SD Card. I installed a new ROM and now the images I previously had on the memory card are not able to be read by any software and the phone. My guess is, is that the encryption I had prior to flashing the new ROM has encrypted the file to where I can't even view them. Is there anyway to reverse this process? I know it defeats the whole prupose of encryption, but these pictures are important to me since they were pictures of my nephews at my cousin's wedding. I know they wouldn't be the greatest quality images, but I would still love to have them back. Any help on this matter is greatly appreciated
kman79 said:
Hey everyone, I'm an idiot and completely forgot I encrypted the files on my SD Card. I installed a new ROM and now the images I previously had on the memory card are not able to be read by any software and the phone. My guess is, is that the encryption I had prior to flashing the new ROM has encrypted the file to where I can't even view them. Is there anyway to reverse this process? I know it defeats the whole prupose of encryption, but these pictures are important to me since they were pictures of my nephews at my cousin's wedding. I know they wouldn't be the greatest quality images, but I would still love to have them back. Any help on this matter is greatly appreciated
Click to expand...
Click to collapse
Well, I have a feeling that you are out of luck here. Usually, encryption works with two keys: one at the source and one with the application that did the encryption. These keys are randomly generated. Since you wiped out the original ROM (and the encryption program and (probably) the 2nd key along with it), you are probably screwed. Sorry - wish I had better news. Now, there are special programs and stuff that break cryptography, and I don't know how secure the encryption with WM is, but that is probably not a practical solution. Sorry.
Well, that wasn't what I wanted to hear, but I feel it is the truth and accurate. I appreciate the response and explanation, thanks. Damnit, with my urgency to have the newest ROM, i lost some great pictures of family, oh well.
This is by design. The unique encription key is created during cold boot following a hardreset.
http://blogs.msdn.com/jasonlan/arch...card-wipe-and-encryption-what-s-the-deal.aspx
Ouch!!!!What a bummer
I almost did this with data on a PC which I sold last week. Copied files and tried opening them on my laptop. Luckily I still had the PC to unencrypt my FLICKS...LOL
Oops, that just reminds me I had an encrypted NTFS folder on the PC I upgraded to Vista last week (clean install). Usually never use that thing...
Meh, fortunately it was only an outdated copy of a folder I have on the main PC. But yeah, haven't even checked it, but there won't be any chance there either.
Fortunately I didn't encrypt my SD, as my phone now will just hang upon boot after I installed some program that screws up when loading the Today plugin. Hard reset in the way I guess... is there no safe boot in WM6?

Nand Backup for cloning

I would like to know if it's possible to make a Nand Backup via recovery screeen and then recover it in another Tatto, so I can export the ROM, with apps and settings to a friend's tattoo
If not, is there any other way?
Thanks in advance
Zriel said:
I would like to know if it's possible to make a Nand Backup via recovery screeen and then recover it in another Tatto, so I can export the ROM, with apps and settings to a friend's tattoo
If not, is there any other way?
Thanks in advance
Click to expand...
Click to collapse
i did that...it should work...for me all right
Sure it's possible! Since you have identical HW he will get an exact copy of your device (don't know if cache partition is cloned though, could be necessary when using custom ROM using cache as dalvik cache...)...
samsung
Do you think samsung is better ???
they may answer but some thing like "we know it is a problem, but we are working on it, and can not help you now..."
john
Well, I have to say that it hasn't been any success, so it seems not possible. Maybe there's something I gave made wrong, but it says that Nand backup is not possible.
Zriel said:
Well, I have to say that it hasn't been any success, so it seems not possible. Maybe there's something I gave made wrong, but it says that Nand backup is not possible.
Click to expand...
Click to collapse
you have to copy the content of HT99****** into your device's HT99°°°°°°°°
don't copy the HT99****** folder because that is the code of the phone backupped...it is compared with the device to restore and they doesn't match ...
so copy the subfolder of the desired backup to your /HT99°°°°°°°
try this

[IDEA] Implement Firerat's Custom MTD Partition for HD2

Hi. Maybe few words about me first. I'm not a developer, I don't know how to do it and I have to ask more experienced users. Ok that's it, to the point now. Ah, and I didn't know if this thread was proper to be posted in Development sub-forum, so it's here. If it was possible, if the thread meets requirements to be there, maybe it's possible to move it there? I'm not sure how many devs visit those section, so obviously there is greater chance for finding an answer there, but again, I wasn't sure if it was right.
While I was a G1 user one genius known as "Firerat" created very nasty script - it allowed users to manually, by simply creating a .txt file on sdcard with proper values and running a .zip from recovery, resize partitions like /system, /data and /cache on the phone. I don't know if you're familiar with G1 stuff, but previous there was only one way to chage partitions and it was achieved by custom SPL called Haykuro SPL. This modification (MTD part hack) was created because of need for even more space on /data and allowed to shrink /system and /cache to smallest value possible, so /data took up as much space as it was possible. Here is source thread in G1 Development section:
http://forum.xda-developers.com/showthread.php?t=717874
There you can dive in details, because my knowledge and understanding in this things end very quickly .
On HD2, we have come a great way. From pure Windows Mobile, it was possible to run Linux kernel from sdcard by HaRET.exe, then run Android. After few month team of gods gave us MAGLDR, a tool that allows us to replace Windows Mobile from NAND with Android system. Then after few more weeks someone made Clockworkmod Recovery possible, giving us posibilty to create partitions on sdcard, do a nandroid backup/restore. But one MAJOR thing wasn't done as it should. Recovery in theory should give us possibility to flash ROMs from sdcard without need of computer. And theoretically it's possible, but... Yes, you have to have proper partition configuration flashed by DAF.exe with PC before. Imagine what a great obstacle it is for diagnosed with ORD!
Now you realise what I'm talking about? Combine these two things and bam! I'm just asking, just giving you an idea. Maybe it is possible to adapt those scripts to HD2 and replace old habits (flashing recovery by DAF.exe on PC) with simple script and one .txt file!
Again, maybe it's not possible since we are still using old SPL from WM times. Maybe MAGLDR is build in such way that those scripts are not possible. Maybe there is a thousand reasons... but I've never seen such an idea.
So please, is there one person who are good in this stuff and can explain me wether it's possible or not?
So maybe I can rest assured that I have to cure my ORD
OR
we can move on to work on making this idea reality .
cure for ORD....
I DON'T THINK SO.
Flashed from my fingers to your face
On a serious note, though, have you looked at clk? It is supposed to be useable without a pc. Therefore you can configure the partition on your phone. Is my understanding of that correct?
Maybe T-Macgnolia can explain this better than I .
I'm still trying to get my head round it, before I commit to changing over to clk...
Flashed from my fingers to your face
raven_raven said:
Hi. Maybe few words about me first. I'm not a developer, I don't know how to do it and I have to ask more experienced users. Ok that's it, to the point now. Ah, and I didn't know if this thread was proper to be posted in Development sub-forum, so it's here. If it was possible, if the thread meets requirements to be there, maybe it's possible to move it there? I'm not sure how many devs visit those section, so obviously there is greater chance for finding an answer there, but again, I wasn't sure if it was right.
While I was a G1 user one genius known as "Firerat" created very nasty script - it allowed users to manually, by simply creating a .txt file on sdcard with proper values and running a .zip from recovery, resize partitions like /system, /data and /cache on the phone. I don't know if you're familiar with G1 stuff, but previous there was only one way to chage partitions and it was achieved by custom SPL called Haykuro SPL. This modification (MTD part hack) was created because of need for even more space on /data and allowed to shrink /system and /cache to smallest value possible, so /data took up as much space as it was possible. Here is source thread in G1 Development section:
http://forum.xda-developers.com/showthread.php?t=717874
There you can dive in details, because my knowledge and understanding in this things end very quickly .
On HD2, we have come a great way. From pure Windows Mobile, it was possible to run Linux kernel from sdcard by HaRET.exe, then run Android. After few month team of gods gave us MAGLDR, a tool that allows us to replace Windows Mobile from NAND with Android system. Then after few more weeks someone made Clockworkmod Recovery possible, giving us posibilty to create partitions on sdcard, do a nandroid backup/restore. But one MAJOR thing wasn't done as it should. Recovery in theory should give us possibility to flash ROMs from sdcard without need of computer. And theoretically it's possible, but... Yes, you have to have proper partition configuration flashed by DAF.exe with PC before. Imagine what a great obstacle it is for diagnosed with ORD!
Now you realise what I'm talking about? Combine these two things and bam! I'm just asking, just giving you an idea. Maybe it is possible to adapt those scripts to HD2 and replace old habits (flashing recovery by DAF.exe on PC) with simple script and one .txt file!
Again, maybe it's not possible since we are still using old SPL from WM times. Maybe MAGLDR is build in such way that those scripts are not possible. Maybe there is a thousand reasons... but I've never seen such an idea.
So please, is there one person who are good in this stuff and can explain me wether it's possible or not?
So maybe I can rest assured that I have to cure my ORD
OR
we can move on to work on making this idea reality .
Click to expand...
Click to collapse
Hello raven_raven,
This is indeed a good idea and can make our HD2 PC independable. I will support you as much I can.
Though I have some questions for you.
Q1: Is it possible for this script to brick our device?
Q2: Can we choose the partitions which we resize (for example I would like to resize only /system, /userdata and /cache and leave the others as is) and if yes the other partitions /boot, /recovery will be formated or data will be kept as is?
Q3: What the bootloader has to do with it?
Q4: What SPL has to do with it?
For your knowledge in HD2 their are 2 bootloaders, MAGLDR and cLK (cedesmith's Little Kernel) which makes HD2 a native android device.
In MAGLDR partitions are made along with the flashing of CWM with the help of DAF.exe
In cLK partitions are directly managed by the bootloader when flashed.
malybru said:
On a serious note, though, have you looked at clk? It is supposed to be useable without a pc. Therefore you can configure the partition on your phone. Is my understanding of that correct?
Maybe T-Macgnolia can explain this better than I .
I'm still trying to get my head round it, before I commit to changing over to clk...
Flashed from my fingers to your face
Click to expand...
Click to collapse
Tried cLK, but it can't change partitions as you would like it to, you can't change it on the go without PC.
zach.antre said:
Hello raven_raven,
This is indeed a good idea and can make our HD2 PC independable. I will support you as much I can.
Though I have some questions for you.
Q1: Is it possible for this script to brick our device?
Q2: Can we choose the partitions which we resize (for example I would like to resize only /system, /userdata and /cache and leave the others as is) and if yes the other partitions /boot, /recovery will be formated or data will be kept as is?
Q3: What the bootloader has to do with it?
Q4: What SPL has to do with it?
For your knowledge in HD2 their are 2 bootloaders, MAGLDR and cLK (cedesmith's Little Kernel) which makes HD2 a native android device.
In MAGLDR partitions are made along with the flashing of CWM with the help of DAF.exe
In cLK partitions are directly managed by the bootloader when flashed.
Click to expand...
Click to collapse
A1: No, it is not possible. Firerat is genius and he does masterpiece of scripting, those scripts are 100% safe. It will of course break you ROM, but simple nandroid backup/flashing a new ROM will fix it.
A2: We resize /system, /data and /cache. You simply put two values in text files, i.e.:
Code:
mtd 130 2
First number is how many mb you want to spend on /system, second on /cache. Rest of internal memory is used by /data. /boot and /recovery are not touched by this script.
A3: I don't know for sure, just connected it to Haykuro SPL, which also changed partitions back then.
A4: Don't know for sure, I'm simply intermediate in this stuff, just wanted to pass an idea, I don't have required knowledge and experience to make this idea come true.
I know that there are 2 bootloaders, but I don't know how they work and how far you can modify partitions from recovery by using each of them. HD2 obviously isn't a native Android phone and regarding that either this idea may be impossible to implement or has to be completely redesigned. I really don't know .
Just wanted to pass an idea, but I'm terribly dissapointed how little response I received...
Well you would have more people responsed if you were posting in development forum under the label [call for development].
cLK is modified "little kernel" for HD2...
since there is no danger of bricking our device I am going to test it and report.
Sent from my Nexus One using XDA App
zach.antre said:
Well you would have more people responsed if you were posting in development forum under the label [call for development].
cLK is modified "little kernel" for HD2...
since there is no danger of bricking our device I am going to test it and report.
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Great thing to see that someone tries. Be warned though, I'm not responsible for any data loss and damages or whatever, as always . Please be sure that you read original thread and understood how this script is working.
Maybe I'll ask a mod to move this thread to Development section...
raven_raven said:
Great thing to see that someone tries. Be warned though, I'm not responsible for any data loss and damages or whatever, as always . Please be sure that you read original thread and understood how this script is working.
Maybe I'll ask a mod to move this thread to Development section...
Click to expand...
Click to collapse
Yeah i did, don't worry about it.
I have read the original thread, i have compared the different devices mount points (as much i could) and conclude that is the same.
What i have also noticed is that kernel must be patch in order for this script to work and the script checks for a specific bootloader? I'm not sure, i need to restudy that thread.
Anyway, I tried using the script but didn't happen anything.
I formated all partitions except /boot and /recovery
I first created the mtdpartmap.txt in SD root and flashed via CWM the script FR-recovery-v1.5.8-CustomMTD_S.zip
Then reboot and again to recovery
Flashed ROM and then flashed FR-boot-v1.5.8-CustomMTD_S.zip
Reboot to ROM worked fine.
I run terminal
#df
Sizes where the same as before
Exactly, first you apply new partition map to recovery, next you install ROM in those new partitions either by flashing or nandroid backup-ing, then patch kernel to work with this new layout.
Huh, it would be too easy to simply run it and bam! it works. Even Firerat made different scripts for different devices. I'm curious what's the problem. Is recovery on a different level than those in native Android devices, which means that it can't change partition size? Or is it just problem of adjusting script to HD2 like it was done for Hero or Evo? I wonder if Firerat would like to investigate, but it would be impossible to achieve it without HD2, and from what I know he does not have one.
What person should I ask to move my thread to another section?
raven_raven said:
Exactly, first you apply new partition map to recovery, next you install ROM in those new partitions either by flashing or nandroid backup-ing, then patch kernel to work with this new layout.
Huh, it would be too easy to simply run it and bam! it works. Even Firerat made different scripts for different devices. I'm curious what's the problem. Is recovery on a different level than those in native Android devices, which means that it can't change partition size? Or is it just problem of adjusting script to HD2 like it was done for Hero or Evo? I wonder if Firerat would like to investigate, but it would be impossible to achieve it without HD2, and from what I know he does not have one.
What person should I ask to move my thread to another section?
Click to expand...
Click to collapse
Well, I guess Firerat need to come by and post a thread in HD2 Dev forum since it is his work.
He could ask what info he needs for the HD2 such as partition layout and filesystem in each partition etc... I am sure many people are willing to help with that.
I also think that SPL is locking the partition tables (not sure) and the way we are flashing just overcome that. Else when i used the script should have f**cked up my partitioning.
You can ask an HD2 moderator to move this thread but first ask for Firerat permission.

[Q] Factory restore

I need a .img of the original rom, where can i find? Thanks
Aran83 said:
I need a .img of the original rom, where can i find? Thanks
Click to expand...
Click to collapse
You cant, every NST is unique and using an image from another NST will cause trouble for both you and the NST it came from.
Thanks, nook is bricked but I can read the main partition, which .img I install?
Sorry for my english.
Aran83 said:
Thanks, nook is bricked but I can read the main partition, which .img I install?
Sorry for my english.
Click to expand...
Click to collapse
There's no img you can install.
You can try booting n2T-Recovery (v0.2) from a SD card and see if that helps. (Do not write that image to your NST!)
If not, send me a PM and I'll try to help you out
Something else you can try:
1) Flash noogie.img to an sd card.
2) Hook up your nook to a pc via usb once it has booted, and you should see all the partitions exported there.
3) In one of those partitions (recovery maybe? I'm struggling to remember), there's a factory.zip, which you can then install using the "Install from zip" feature of clockwork mod.
If you go this route, you'll have to reflash your sd card with clockwork mod after you've extracted the factory.zip using noogie.
Seems like kind of a pain, but I just recovered my device using this.
Remains in the screen ROOTED FOREVER and i can't do anything
I think, for michaelwill's method, you need to have linux running. I suggest you to try ros87's suggestion.
if I use backup from nook of my friend?
Aran83 said:
if I use backup from nook of my friend?
Click to expand...
Click to collapse
That is not a good idea, since each NookTouch has a unique information to register. If you are thinking of full restore from your friend's image (1.8GB image), it will overwrite your unique information. In that case, you and your friend's devices cannot register to BnN (or just one device). People says the info is stored in /rom. If you want to know more, you need to dig more. Otherwise try factory reset suggested by ros.
herofmm said:
That is not a good idea, since each NookTouch has a unique information to register. If you are thinking of full restore from your friend's image (1.8GB image), it will overwrite your unique information. In that case, you and your friend's devices cannot register to BnN (or just one device). People says the info is stored in /rom. If you want to know more, you need to dig more. Otherwise try factory reset suggested by ros.
Click to expand...
Click to collapse
Correct!
Using a image from another NST is a very very bad idea!
There are a lot of stuff that's unique to your NST stored in /rom and in rombackup.zip on the Factory partition.
This includes:
Serial Number
Main Board Serial
Product ID
Manufacturing date
SHA hash of Private Key
Public Key in modulus form
WiFi Calibration file
Some unique binary file for your eInk screen
MAC Address
Battery Type
Duplicating the serial will make you or your friend unable to register with B&N
Duplicating / Faking the private/public key pair, will most likely make you unable to register with B&N (I'm currently testing this)
Duplicating a WiFi calibration can cause degraded WiFi performance
Duplicating that EPD vcom file (eInk screen).. well who knows
Duplicating the MAC will cause network troubles if used on the same network.
The wrong Battery Type (I've seen three different so far) can cause charging troubles, and will cause incorrect charge indication.
Don't go there!
NookRestore.img
Try writing NookRestore.img to an mSD card. (You can get a copy at my website: NootRoot)
Hard reset
I had issues rooting my NST and got stuck in a boot loop. After digging and digging through forums I finally discovered the secret to a hard reset. The instructions said to hold the power and the two bottom side buttons down together for over 20 seconds. That worked! My NST was back to when I pulled it out of the box. I then proceeded to re rooting. (my mistake was I did not upgrade the OS before rooting). My bad. Hope this helps someone recover from a stuck boot loop.
Good luck.
chucktate said:
My NST was back to when I pulled it out of the box.
Click to expand...
Click to collapse
No it wasn't, Factory Reset doesn't remove root files or system apps installed by root tools, it only clears custom apps and settings.
While you might think it's back to stock, there are still leftover files and changes in /boot and /system
ros87 said:
Correct!
Using a image from another NST is a very very bad idea!
There are a lot of stuff that's unique to your NST stored in /rom and in rombackup.zip on the Factory partition.
Click to expand...
Click to collapse
Hi, I've just found a way around this - it is possible to restore somebody else's .img file, provided you've backup up your rombackup.zip. Then after, using Noogie, you can overwrite rombackup.zip and the contents of it which are on a different partition. The only danger is that you would potentially overwrite battery type config file, as Nook has couple of them. I gave it a try on mine and it seems fine.
sokoow said:
Hi, I've just found a way around this - it is possible to restore somebody else's .img file, provided you've backup up your rombackup.zip. Then after, using Noogie, you can overwrite rombackup.zip and the contents of it which are on a different partition. The only danger is that you would potentially overwrite battery type config file, as Nook has couple of them. I gave it a try on mine and it seems fine.
Click to expand...
Click to collapse
That is correct.
Problem is that most people who end up in a state where Factory Restore doesn't work has usually managed to overwrite their partition tables and part of the /rom partition.
And at this point it is too late to backup rombackup.zip as it's usually fragmented and cannot be recovered by ext2 file recovery tools.
So.. do a full backup before you do anything to your NST
I found if you restore with holding the two lower buttons it will remove all rooted files.
Googie2149 said:
I found if you restore with holding the two lower buttons it will remove all rooted files.
Click to expand...
Click to collapse
Read post 13 by ros87!
ros87 said:
No it wasn't, Factory Reset doesn't remove root files or system apps installed by root tools, it only clears custom apps and settings.
While you might think it's back to stock, there are still leftover files and changes in /boot and /system
Click to expand...
Click to collapse
Go to my website, download nookRestore.img and write it to an mSD card, Erase and De register, Power Off, then insert mSD then power up, then follow on screen instructions!
[OT - Removed]
[OT - Removed]
Torimu.Joji said:
I'll update the website and post links to XDA.
Click to expand...
Click to collapse
Thank you sir!
By posting proper links you help ensure that people get the most recent software and information

Ideas to recover DRM

It's just an idea but if we can access on the entire hard disk, I think it's possible to recover DRM.
It exists softwares to recover datas deleted. Maybe a way to explore.
Everybody knows datas are never totally erased.
Have discuss
Ps : sorry for my bad eng
Sent from my D5803 using XDA Free mobile app
This is flash memory. If they delete it and afterwards send the command to trim or gc then it's gone for good.
The unlocking process is too fast, I do not think they are rewriting the partition. I think they only remove the DRM then dalvik cache / cache and reboot the phone.
But I could be wrong.
I tried different software, they are effective on my SD card.
But my problem is that I do not see the internal hard disk of the phone, so I can not try it.
My phone is boot unlocked. No root / No recovery
If it was possible this would have been done already.
Skickat från min LG-V500 via Tapatalk
I don't talk about "if we can, if it's possible", i talk about doing this, to trying this.
for now, no one has tried.
Being negative without trying, is the best way of failing
dahod said:
It's just an idea but if we can access on the entire hard disk, I think it's possible to recover DRM.
It exists softwares to recover datas deleted. Maybe a way to explore.
Everybody knows datas are never totally erased.
Have discuss
Click to expand...
Click to collapse
The tools that are used to recover deleted files from a file system operate on the premise that deletions are performed by marking the sectors allocated to the file as 'free' in the allocation table without actually erasing the file data contained on the disk. Recovery tools can scan the entire disk to discover file chains and then rewrite the recovered data to some other device.
These tools will not work on the Trim Area (TA) because it is not a file system, but a raw partition that is accessed by directly reading/writing data at known addresses. There is no allocation table or file chains to recover.
The DRM keys are deleted when the bootloader is unlocked by overwriting the key data with 0x00 or 0xFF. This can be verified by dumping the TA partition of an unlocked device and examining the raw partition.
cschmitt said:
The tools that are used to recover deleted files from a file system operate on the premise that deletions are performed by marking the sectors allocated to the file as 'free' in the allocation table without actually erasing the file data contained on the disk. Recovery tools can scan the entire disk to discover file chains and then rewrite the recovered data to some other device.
These tools will not work on the Trim Area (TA) because it is not a file system, but a raw partition that is accessed by directly reading/writing data at known addresses. There is no allocation table or file chains to recover.
The DRM keys are deleted when the bootloader is unlocked by overwriting the key data with 0x00 or 0xFF. This can be verified by dumping the TA partition of an unlocked device and examining the raw partition.
Click to expand...
Click to collapse
That makes perfect sense. Taking things one step back, why shouldn't we consider rewriting the DRM keys to the TA though? They're consistent among Z3C devices after all...Is there a bootloader validator that will just overwrite the keys again? Or preventing the overwrite in the first place, rather than worrying about an impossible recovery of the deleted key data?
If neither is possible, could you explain why please?
matapo said:
That makes perfect sense. Taking things one step back, why shouldn't we consider rewriting the DRM keys to the TA though? They're consistent among Z3C devices after all...Is there a bootloader validator that will just overwrite the keys again? Or preventing the overwrite in the first place, rather than worrying about an impossible recovery of the deleted key data?
If neither is possible, could you explain why please?
Click to expand...
Click to collapse
We don't have the keys because w/o root we cannot dump the TA partition. If bootloader is unlocked to gain root, keys are wiped.
The assumption that the keys are common among all devices may not be correct. In previous Z series devices restoring the TA partition from a different device would brick it. This indicates the TA contains some device specific signature, etc. The keys could be protected with device-dependent public/private key encryption tied to IMEI and some private key. If Sony went to the trouble of protecting their IP with DRM, they are going to protect the DRM keys as well.
i thought with towelroot you can root without bootloader unlock ? if not, we just need a possibility to root without bootloader unlock and than we can backup the keys ?
yelp, only that needing JUST a way to root without unlock sounds so easy while it's not.
dahod said:
The unlocking process is too fast
Click to expand...
Click to collapse
TA.img is exatcly 2MB, writing 2MB of zeros to flash memory only takes fractions of a second.
cschmitt said:
We don't have the keys because w/o root we cannot dump the TA partition. If bootloader is unlocked to gain root, keys are wiped.
The assumption that the keys are common among all devices may not be correct. In previous Z series devices restoring the TA partition from a different device would brick it. This indicates the TA contains some device specific signature, etc. The keys could be protected with device-dependent public/private key encryption tied to IMEI and some private key. If Sony went to the trouble of protecting their IP with DRM, they are going to protect the DRM keys as well.
Click to expand...
Click to collapse
Thanks for the explanation - much appreciated! Hopefully, someone will attempt the 'almost impossible' and find an exploit or two like towelroot, allowing for root access without compromising the bootloader then. Seems like our only option. Sony hasn't made this easy...I can understand why our fellow users are upset.
Just so people don't get confused: that doesn't mean that the DRM keys can be recovered when the phone was already unlocked, but they can be restored if a backup is made before.
PS: and restoring the keys automatically relocks the bootloader which means they can only be used by stock roms iirc. At least that was the case with RomAur I've been using, restoring the keys resulted in a bootloop.
Thank you all for your explanations, I hope that a great mind will find the solution for those who have already unlocked.
Sent from my D5803 using XDA Free mobile app
For the root exploit on the older Z devices, did the exploit work only on certain firmware versions, or could it work on most or all of the versions?
I'm asking this because I've for the notification for a system update, but I've been holding back on installing the update, thinking that perhaps any exploit might be patch in newer versions.
Thanks.
Only specific versions. But it was possible to downgrade, root and then upgrade while keeping root. Towelroot then worked with various versions that used an affected kernel version.
My brain wouldn't let me sleep last night over this (probably stupid) idea:
If /system can be written to by certain tools (correct me if I'm wrong, but afaik you can flash .ftfs with flashtool with a locked bootloader), would it not be easier to find an exploit there (in the .ftfs)?
Much easier said than done, yes, but sounds much easier than finding an exploit in Android, imo.
I guess tampering with an FTF changes its checksum so it cannot be used anymore.
Iruwen said:
I guess tampering with an FTF changes its checksum so it cannot be used anymore.
Click to expand...
Click to collapse
Well yes, you cannot alter an ftf, but what if we somehow made a small img of system and tricked flashtool into tricking it's actually just the system part of an ftf?
Flashtool then flashes the rooted system image and viola, root achieved!
You know, just how Nexus devices have a recovery (factory) image for each partition? Why not make this work?
Ofc just a (probably wayy off) theory, but it seems plausible.
dahod said:
Thank you all for your explanations, I hope that a great mind will find the solution for those who have already unlocked.
Sent from my D5803 using XDA Free mobile app
Click to expand...
Click to collapse
I wouldn't bet on it. The 'issue' has been there since the Xperia Z, the only solution has been to backup the partition before unlocking, else it's gone for good.

Categories

Resources