Related
Hi fellow xda-members,
I've already posted this in the One XL section, but I realized it is a more generic problem/more generic technical question.
Thats why I post this again to maybe reach the real experienced guys from xda whom maybe know an answer to my specific question.
Ive summarized the most important points to not double-post the question.
I recently wiped my One XL 32GB with the HBOOT Factory Reset,
didnt know that it wipes the internal storage aswell...
Needless to say that I work with the phone and the data is priceless...
I already piped the whole block device(mmcblk0) via netcat and dd,
opened it with a hex editor and found out the whole fat-partition is nulled.
From what I know and heard, the only way to really secure delete any storage device
is to overwrite the data several(Mostly heared 7 times) times to avoid unwanted recovery.
The Partition wasnt formatted and neither mounted yet, there should be no changes made from android since the wipe.
If you take that into account, there's a hope to recover the data.
Does someone have experience with jtag raw data recovery?
Is there any way to gather other/deeper data with jtag?
Thanks for all replys
criestr
Its possible that the external storage is on a second MMC device.
During the research in order to build the TWRP recovery for this device I have noticed a very interesting fact. Although the phone is sold as a device with 8 GB internal memory, the memory chip used inside seems to be two times bigger. There is an unused (non-formatted) partition "mmcblk0p38" labeled as userdatabak and its size is 7816 MB. There is no data there, it is a completely blank partition. It will be interesting if the mmcblk0p37 (userdata) partition can be resized in order the reported internal memory of the device to be increased. I intend to experiment with this soon and will post an update here if I have some success. If anyone is interested and is willing to share ideas regarding the resizing I will be glad to see them.
does parted print show the partitions?
The 6039k (dual sim version) already has 16gb of rom and 1,5 of ram, maybe the parts used in the mono sim one are the same but just turned down, still strange for the manufacturer to cripple the phone on porpuse, more memory means an even better phone for the price and more sales...
Demetris said:
does parted print show the partitions?
Click to expand...
Click to collapse
No it doesn't. The partition table contains a protective MBR sector, and unfortunately parted cannot handle this layout. I'm playing with a raw image of the entire phone memory and successfully resized the partitions in it. But I used gdisk and resize2fs ... gdisk however is not available in the recovery mode on the phone. In this thread @meghd00t has a static build of gdisk which should do the trick. I will try to use it later directly on the device.
SUCCESS!!!
I did it ! The static build of gdisk works perfectly (big thanks @meghd00t). Here are screenshots before the repartitioning and afterwards. I will post a guide how can be done later today.
petrov.0 said:
I did it ! The static build of gdisk works perfectly (big thanks @meghd00t). Here are screenshots before the repartitioning and afterwards. I will post a guide how can be done later today.
Click to expand...
Click to collapse
So the phone is being sold as a 8gb somewhere? If no negative repercussions then great find! I thought the 4.7 had 16gb as well.
famewolf said:
So the phone is being sold as a 8gb somewhere?
Click to expand...
Click to collapse
Yes, the version with one sim card is with 8GB internal memory even according to gsmarena and is sold like this
famewolf said:
If no negative repercussions then great find! I thought the 4.7 had 16gb as well.
Click to expand...
Click to collapse
What you mean with negative repercussions ?
petrov.0 said:
I did it ! The static build of gdisk works perfectly (big thanks @meghd00t). Here are screenshots before the repartitioning and afterwards. I will post a guide how can be done later today.
Click to expand...
Click to collapse
Good job Sir!! This is what makes XDA such an amazing place to be!! This should be put on the main XDA portal!!
Nope stop or Alcatel will change the nands on new batches
Demetris said:
Nope stop or Alcatel will change the nands on new batches
Click to expand...
Click to collapse
Too late . The guide is already in the development section.
petrov.0 said:
Yes, the version with one sim card is with 8GB internal memory even according to gsmarena and is sold like this
What you mean with negative repercussions ?
Click to expand...
Click to collapse
I wondered at the possibility the chip actually was used for something such as a system backup. I also considered the possibility they sold it as an 8gb because areas in the 2nd partition did not pass quality standards and could possibly result in data loss over time. Cpu makers used to sell quad cores that failed tests as dual cores with the other two cores "locked"....and of course folks figured out how to unlock them but the system would crash from time to time.
Maybe the 6045i has 32GB??? Jajaja
famewolf said:
I wondered at the possibility the chip actually was used for something such as a system backup.
Click to expand...
Click to collapse
Initially I thought about this too. It is possible. But how can we know this? And why you will leave a completely blank partition there ? Belive me there is nothing else than zeroes in it.
famewolf said:
I also considered the possibility they sold it as an 8gb because areas in the 2nd partition did not pass quality standards and could possibly result in data loss over time.
Click to expand...
Click to collapse
Not likely. The memory chip probably will not leave the factory with size bigger than the offered from the actual manufacturer of the device (the phone in this case). If there are bad blocks they will not be seen by the software and will not be available to the user at all. But this is only a speculation based on my limited knowledge on the NAND chips (and little googling about the NAND technology). For now my device works with internal memory twice bigger than the initial one and only the time will show how durable the memory chip is.
And hey this is xda-developers. Why we participate here if not to play with our devices ?
techware7 said:
Maybe the 6045i has 32GB??? Jajaja
Click to expand...
Click to collapse
Sorry...no userdatabak partition on the 6045.
Thanks for sharing that. Im very interested in expanding my storage but how would that work with any further update such as OTA or even rooting? Would we have to undo the partition, would the update force us to re partition afterwards, or does this thing have no influence whatsoever to all of this? Sorry if the question seems stupid
Sent from my 6039Y using Tapatalk
Rorshan said:
Thanks for sharing that. Im very interested in expanding my storage but how would that work with any further update such as OTA or even rooting? Would we have to undo the partition, would the update force us to re partition afterwards, or does this thing have no influence whatsoever to all of this? Sorry if the question seems stupid
Sent from my 6039Y using Tapatalk
Click to expand...
Click to collapse
Rooting has no relation to the expansion of the device internal memory. Regarding the OTA ... who knows. Do you have an official update? I do not. In the upgrade for the 6045 the checks were only for the system files and the recovery partition. But prior an official update we can't know how the same will work. Personally I don't think that the owner of a modified device should use the OTA prior to check what will happen after it.
petrov.0 said:
Rooting has no relation to the expansion of the device internal memory. Regarding the OTA ... who knows. Do you have an official update? I do not. In the upgrade for the 6045 the checks were only for the system files and the recovery partition. But prior an official update we can't know how the same will work. Personally I don't think that the owner of a modified device should use the OTA prior to check what will happen after it.
Click to expand...
Click to collapse
Okay. But then is there any way to undo these changes in order to get OTA updates? Would restoring from a system image or any other form of backup affect the partition and get it back to its original state? Or should we definitely not try to expand the memory if we want updates?
Rorshan said:
Okay. But then is there any way to undo these changes in order to get OTA updates?
Click to expand...
Click to collapse
The resizing of the partition does not require root access (except from the recovery during the resizing), so you will be able to check for OTA updates (from the phone) and to receive them (when such are available), if your device is not rooted. As I said earlier however, because we still don't have an official update, we don't know what will be the checks in it and also what modifications will be included.
Rorshan said:
Would restoring from a system image or any other form of backup affect the partition and get it back to its original state?
Click to expand...
Click to collapse
No, the size of the partition will remain the same. To restore its initial size you will have to use gdisk again (in order to change the GPT layout), or if you have a backup of the entire memory chip (mmcblk0) prior the repartitioning, to flash it back to the device.
Thank you for this great find. I can confirm partition #38 (7.3Gb) exists on my 6039Y -2AVDRO7. Still, I'll wait for feedback if future OTAs work ok with the extended partition space.
@petrov.0 did you try to write and read from the extended memory blocks after the new allocation? I mean, is there any chance that the partition was only simulated and data might get corrupted?
@ anyone can post the partition table from a 16Gb DualSIM 6039Y, out of curiosity? thanks
rioachim said:
Thank you for this great find. I can confirm partition #38 (7.3Gb) exists on my 6039Y -2AVDRO7. Still, I'll wait for feedback if future OTAs work ok with the extended partition space.
@petrov.0 did you try to write and read from the extended memory blocks after the new allocation? I mean, is there any chance that the partition was only simulated and data might get corrupted?
Click to expand...
Click to collapse
Yes I did. I filled all the space with raw partiton images and then checked their md5susms.
So recently my device stopped recognizing the SanDisk 64gb micro-SDXC I had formatted as internal storage. As far as I am aware when you format a SD this way the phone turns it into an encrypted volume and stores the key on internal storage, presumably somewhere the user cannot normally access it. The card itself is not dead, plugging it into my computer verifies this, but I cannot access it. I think some write operation failed and made it invisible to the phone. the phone did the same thing to a 128gb PNY card, but I reformatted it on PC, then reformatted it again on the phone and now the PNY is working fine. my question is, is there any way to extract the encryption key for my 64gb card(Root based tool or otherwise) from the card profile on my phone and decrypt it on a PC so I can reclaim my data? The phone still has a profile for the card, so presumably the key is still in internal storage somewhere. I had about 40gb of media on that card that I had not backed up (photos, videos, music and such). My ohone is not currently rooted but i wouldnt mind rooting it if someone has a root only solution.
I would wipe cache, then data then try another ROM.
sciencetor2 said:
So recently my device stopped recognizing the SanDisk 64gb micro-SDXC I had formatted as internal storage.
Click to expand...
Click to collapse
It is possible, though I have not done it before, I avoid adoptable storage for this reason. Do NOT wipe your ROM, or you will permanently lose your encryption key to your data that you have on the card.
If you put the SD card into a Linux PC that can recognize the partitions (Windows will not show it), you will see two partitions, android_meta and android_expand. To decrypt the big one, android_expand, you will need to recover your key from the phone.
To recover the encryption key, you will need either root access or a custom recovery like TWRP, to access '/data/misc/vold' to retrieve the encryption key (aes-cbc-essiv:sha256). Save the .key file to somewhere safe.
Then something like
dmsetup create crypt1 --table "0 `blockdev --getsize /dev/sdb2` crypt \
aes-cbc-essiv:sha256 00010203040506070809010a0b0c0d0e0f 0 /dev/sdb2 0"
mount -t ext4 /dev/mapper/crypt1 /mnt/1/
More info here - http://nelenkov.blogspot.com/2015/06/decrypting-android-m-adopted-storage.html
Once you have recovered your data, reformat the card and use it as portable storage
SenK9 said:
More info here -nelenkovDOTblogspotDOTcom/2015/06/decrypting-android-m-adopted-storageDOThtml
Once you have recovered your data, reformat the card and use it as portable storage
Click to expand...
Click to collapse
(url edited due to new user restrictions)
Thank you! this is exactly what I was looking for, but i couldn't find anything on google about anyone figuring out all the details (encryption key location, encryption method, usable tool for decryption)
now is there any way i can root, extract the key, then unroot so that i can RMA the phone? It seems to now render any sd i put into it unreadable by itself within about 5 minutes of formatting, regardless whether i format as internal or portable. not sure if this is hardware (reader malfunction) or some software is writing to the card incorrectly, but it is now doing it consistently.
sciencetor2 said:
(url edited due to new user restrictions)
Thank you! this is exactly what I was looking for, but i couldn't find anything on google about anyone figuring out all the details (encryption key location, encryption method, usable tool for decryption)
now is there any way i can root, extract the key, then unroot so that i can RMA the phone? It seems to now render any sd i put into it unreadable by itself within about 5 minutes of formatting, regardless whether i format as internal or portable. not sure if this is hardware (reader malfunction) or some software is writing to the card incorrectly, but it is now doing it consistently.
Click to expand...
Click to collapse
I do not believe it's possible to root or change the recovery without unlocking the bootloader, unless there's some other method I'm not aware of. Even MM systemless root method - http://forum.xda-developers.com/mot...t-moto-x-style-xt1572-br-marshmallow-t3259380, requires unlocking the bootloader, which of course then technically voids the warranty.
However, in this case, it might be worth contacting Moto to inform them of what's happened, it's definitely some kind of bug in the software which has caused this, and thus you are stuck in this catch-22 situation. They might make an exception or have some other solution. Let us know how you go.
SenK9 said:
... requires unlocking the bootloader, which of course then technically voids the warranty. ...and thus you are stuck in this catch-22 situation.
Click to expand...
Click to collapse
Even more of a catch 22 situation, because if i read that correctly, the process for unlocking the bootloader also requires wiping the phone (and thus, the encryption keys) (i miss geohot with his 1 click soft roots). I will wait a little while and see if I or anyone else reading this thread can find a way around that, but it seems ill have to contact Moto support either way, since my 16gb model is barely usable without an SD card.
This is another example of why taking control of your phone before something goes wrong is so important.
Did you try wiping cache yet?
lafester said:
This is another example of why taking control of your phone before something goes wrong is so important.
Did you try wiping cache yet?
Click to expand...
Click to collapse
I checked the recovery menu but there didn't seem to be an option for wiping cache on this device (recovery menu was a little different than I am used to, only had option for factory reset) Also, while wiping cache might conceivably prevent it from screwing up future cards, I don't know if it will fix this one, and i'm not sure if i wanna risk wiping anything without getting my hands on the encryption keys first. if it becomes apparent that i'm just not getting root without wiping, then I'll try playing around with recovery options to at least get back SD slot usage.
You can erase cache in fastboot. If you are locked there is no way to root without wiping data.
lafester said:
You can erase cache in fastboot. If you are locked there is no way to root without wiping data.
Click to expand...
Click to collapse
Isn't that what the setting "OEM Unlocking" under "Developer Options" is for? I thought I read that, if you enable this option before you unlock the bootloader, it allows you to unlock without the wipe/factory reset?
YITBOS said:
Isn't that what the setting "OEM Unlocking" under "Developer Options" is for? I thought I read that, if you enable this option before you unlock the bootloader, it allows you to unlock without the wipe/factory reset?
Click to expand...
Click to collapse
I hadn't heard that... Got a source?
YITBOS said:
Isn't that what the setting "OEM Unlocking" under "Developer Options" is for? I thought I read that, if you enable this option before you unlock the bootloader, it allows you to unlock without the wipe/factory reset?
Click to expand...
Click to collapse
No all that does is allow you to unlock (providing you have a key of course).
well it looks like nobody has found a non wiping solution to root my phone, so I'm going to have to give up on the data and see if I can get back SD functionality, or just RMA the phone. I think i will also publish a script that allows you to plug in your phone and the SD at the same time and allow you to decrypt an internal formatted card by pulling the keys and using them to mount the drive to help people who are in similar situations, but have root. Thanks anyway for the help.
Hi Everyone, I'm stuck in the same catch 22 situation. Device is not rooted or bootloader unlocked, so can't access the key, and trying to root/unlock bootloader will wipe the keys. Any updates, @sciencetor2??
Have you written to Motorola/google about this?
I'm still not ready to give up on the data... hundreds of vacation pictures, that couldn't get backed up.
I'm in the same boat any good news on this?
As long as the phone can see the card, you can change it to portable storage. However, if something goes wrong and phone can not see the card anymore, it's nearly impossible to access the volume without the retrieving the key from the phone, and you must root the phone in order to get the key, as I understand.
I have another similar problem, SD card becomes locked writing and disappears from phone, even I used it as portable storage. And the card can't be formatted at all. So I believe the phone somehow does something and change the state of SD card!
Did anyone find a solution yet. Stuck with same problem. Will loose very important data.
Same here.
I adopted my sdcard as internal storage in CM13.
It was constantly in bootloop, so I formatted the internal memory of the phone to install a new rom ...
But now I can not recover the data within the sd because I can not access it nor with the new rom (I can not even mount it from TWRP) nor from a linux PC (the filesystem is unknown).
Pretty much ... I did not know that the sdcard adopted were encrypted!
Any solution? :\
Hello everybody!
Is there any way to recover the deleted ".key" file?
so i havent gotten back on this thread in a while but i think i at least figured out the "why" on why the card was no longer being recognized. it seems to come down to read/write speed. my 64GB and 128GB cards that i was having the issue with were both U1 cards, which means their read/write is only sitting around 10Mbps, and both of those had issues being detected by the phone after a little bit of time in use. I replaced the card in the same phone a few months back with a high throughput U3 card, and it has been running smoothly ever since. this leads me to the hypothesis that if the card is not fast enough for the phone's taste, it will just ignore it (or timeout on reads, not sure which is actually happening) which is leading to the issues we are experiencing. unfortunately this doesnt lead us to a solution for recovering from the existing cards, but hopefully it will help avoid making the mistake of using a slow card in the future.
Hi,
So I actually think this issue may be two fold. But first, I must say that to date, the GN4 had been the best handset I've had to date hands down.
Ever since I've updated to Marshmallow however, on occasion the handset will suddenly shutdown due to reported battery drain. This typically occurs around 30% mark. I've seen on some forums that by doing a factory reset could resolve this.
In preparation to do this reset, I decided to decrypt my handset including card so that I could back up my data. However, during the decryption process the handset shutdown. In restarting the GN4 (N910c) the card is now no longer able to mount (getting card not inserted).
If I connect the card to my pc/mac I can see my data filenames but unable to open some of them presumably due to encryption from the GN4. I have managed to create a backup of the card, with what looks like partially encrypted and decrypted files (looks like it was cut off 50% of the way) so i guess what i want to do now is copy those files to a new card and then decrypt the remainder somehow.
I haven't performed a factory reset yet, and I really don't want to lose that data so I've bought a new card. Does anyone have an idea on what I can do to decrypt the data on the new card? I do have the initial GN4 password used to encrypt.
Thanks!
Cheeky bump.. Anyone have a clue?
I saw scrolling through the unofficial pixel expirence rom page and seen Somone state how AOSP ROMS don't work on Verizon but CAF roms do. It's this True?
Long story short I was working at TMobile and now lost the amazing employee discount I had because I got a better job. Now everyone on the plan wants to go back to Verizon and we are and I'm just trying to research how this device work on Verizon being a LTE only device (CDMA-Less)
I'm using lineageos on Verizon with pulse SMS just fine
clapper66 said:
I saw scrolling through the unofficial pixel expirence rom page and seen Somone state how AOSP ROMS don't work on Verizon but CAF roms do. It's this True?
Long story short I was working at TMobile and now lost the amazing employee discount I had because I got a better job. Now everyone on the plan wants to go back to Verizon and we are and I'm just trying to research how this device work on Verizon being a LTE only device (CDMA-Less)
Click to expand...
Click to collapse
Alright, so I have this 6T that I'm not enthralled with due to significant drawbacks (on Verizon specifically) that preclude my typical flashaholism.
The drawbacks actually compound each other, culminating in a frustrating custom ROM experience:
1. Device encryption: unlike Samsung, whole device decryption is not supported. That means that various months' security patches prevent simple flashing without formatting internal storage.
For example, RomA has April security patches, so you cannot flash any Rom with March security patches because the data partition is encrypted with April specifications. To flash a Rom with earlier security patches, you MUST format your internal storage, wiping out all downloads, photos , etc stored there. Which wouldn't be as cumbersome if there was an external SD card built in that you could simply copy stuff from...but there isn't.
2. No external SD card: means that when you format internal storage (which will happen more often than you would think due to device encryption and A/B slots), there's no handy way to recover your wiped stuff. I'm carrying around a thumb drive, for crying out loud.
3. A/B slots: you have to keep track of what rom and oos version you are running on each slot. Furthermore, flashing any rom now includes multiple additional steps and inter-flash reboots to work properly. Even experienced flashers will need to backup their device to external storage devices (thumb drive, because no external SD card) due to this unnecessary complexity.
Finally, on VZW, there isn't a custom ROM available as I write this that has full MMS capabilities. Only Liquid, Havoc, and AOSiP can use MMS and even then it's limited to only jpg under 800kb.
In other words, I'm already potentially plotting my next phone as a Moto z4 force...
I have a developer friend who made his android 11 rom work on my oneplus 6t with verizon. If you're curious it's Kang OS...
reaper000 said:
Alright, so I have this 6T that I'm not enthralled with due to significant drawbacks (on Verizon specifically) that preclude my typical flashaholism.
The drawbacks actually compound each other, culminating in a frustrating custom ROM experience:
1. Device encryption: unlike Samsung, whole device decryption is not supported. That means that various months' security patches prevent simple flashing without formatting internal storage.
For example, RomA has April security patches, so you cannot flash any Rom with March security patches because the data partition is encrypted with April specifications. To flash a Rom with earlier security patches, you MUST format your internal storage, wiping out all downloads, photos , etc stored there. Which wouldn't be as cumbersome if there was an external SD card built in that you could simply copy stuff from...but there isn't.
2. No external SD card: means that when you format internal storage (which will happen more often than you would think due to device encryption and A/B slots), there's no handy way to recover your wiped stuff. I'm carrying around a thumb drive, for crying out loud.
3. A/B slots: you have to keep track of what rom and oos version you are running on each slot. Furthermore, flashing any rom now includes multiple additional steps and inter-flash reboots to work properly. Even experienced flashers will need to backup their device to external storage devices (thumb drive, because no external SD card) due to this unnecessary complexity.
Finally, on VZW, there isn't a custom ROM available as I write this that has full MMS capabilities. Only Liquid, Havoc, and AOSiP can use MMS and even then it's limited to only jpg under 800kb.
In other words, I'm already potentially plotting my next phone as a Moto z4 force...
Click to expand...
Click to collapse
Dude I am sorry but using any phone other than oneplus 6t is just ludicrous to me. Encrypted format data in recovery oh all gone. A/B slots only have to worry about that if you're dual booted and you're not. Me I am running colt & kang on mine. This phone is freaking awesome get enough space you don't need sd card.
reaper000 said:
Alright, so I have this 6T that I'm not enthralled with due to significant drawbacks (on Verizon specifically) that preclude my typical flashaholism.
The drawbacks actually compound each other, culminating in a frustrating custom ROM experience:
1. Device encryption: unlike Samsung, whole device decryption is not supported. That means that various months' security patches prevent simple flashing without formatting internal storage.
For example, RomA has April security patches, so you cannot flash any Rom with March security patches because the data partition is encrypted with April specifications. To flash a Rom with earlier security patches, you MUST format your internal storage, wiping out all downloads, photos , etc stored there. Which wouldn't be as cumbersome if there was an external SD card built in that you could simply copy stuff from...but there isn't.
2. No external SD card: means that when you format internal storage (which will happen more often than you would think due to device encryption and A/B slots), there's no handy way to recover your wiped stuff. I'm carrying around a thumb drive, for crying out loud.
3. A/B slots: you have to keep track of what rom and oos version you are running on each slot. Furthermore, flashing any rom now includes multiple additional steps and inter-flash reboots to work properly. Even experienced flashers will need to backup their device to external storage devices (thumb drive, because no external SD card) due to this unnecessary complexity.
Finally, on VZW, there isn't a custom ROM available as I write this that has full MMS capabilities. Only Liquid, Havoc, and AOSiP can use MMS and even then it's limited to only jpg under 800kb.
In other words, I'm already potentially plotting my next phone as a Moto z4 force...
Click to expand...
Click to collapse
Do you know of a easy method that I can keep track of what ROM and OOS version I am running on each slot short of using fastboot commands and booting into each slot?
rodken said:
Do you know of a easy method that I can keep track of what ROM and OOS version I am running on each slot short of using fastboot commands and booting into each slot?
Click to expand...
Click to collapse
Sorry, but I don't.
Although I am rooted, the absence of twrp for my current device (pixel 6 pro) has left me at stock. Sigh.