[Q] Partition tables - Asus Transformer TF700

Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?

MysticMgcn said:
Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
Click to expand...
Click to collapse
I get "/system/bin/sh: fdisk: not found" when trying to run the command. Tried running as su as well, it still said fdisk wasn't found.

SteveG12543 said:
I get "/system/bin/sh: fdisk: not found" when trying to run the command. Tried running as su as well, it still said fdisk wasn't found.
Click to expand...
Click to collapse
Hmm, would you mind trying from ADB in recovery?

MysticMgcn said:
Hmm, would you mind trying from ADB in recovery?
Click to expand...
Click to collapse
Sure, I can do that. It'll be a bit before I can get to a computer though.
Btw I'm on the stock recovery, if that matters at all.
Sent from my ADR6425LVW using XDA Premium.

I used adb to reboot the tablet into recovery and I got he fallen android with red triangle with no response to adb queries. I then powered the device off and then used power / vol down to get the mini EFI-like menu, then used Vol Up to pick RCK. Same thing.
Am I missing something?

MysticMgcn said:
Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
Click to expand...
Click to collapse
The Transformer does not use a traditional partition table.
fdisk -l confirms: "Disk /dev/block/mmcblk0 does not contain a valid partition table" (run from a shell session root prompt directly on the device in ConnectBot)
AFAIK, it uses a GPT which is stored at a yet-unknown-to-me location (maybe at the end of the MMC). After booting, the kernel log (dmesg) always says "Primary GPT is invalid, using alternate GPT.". I assume this is by design because I've seen it also on the TF101.
Another thing is that some partitions are hidden from the OS (everything related to bootloader, recovery and kernel). While I could find the recovery and kernel images inside mmcblk0 (offsets 0x380000 and 0xB80000), the bootloader itself seems to be completely inaccessible from the OS.

_that said:
The Transformer does not use a traditional partition table.
fdisk -l confirms: "Disk /dev/block/mmcblk0 does not contain a valid partition table" (run from a shell session root prompt directly on the device in ConnectBot)
AFAIK, it uses a GPT which is stored at a yet-unknown-to-me location (maybe at the end of the MMC). After booting, the kernel log (dmesg) always says "Primary GPT is invalid, using alternate GPT.". I assume this is by design because I've seen it also on the TF101.
Another thing is that some partitions are hidden from the OS (everything related to bootloader, recovery and kernel). While I could find the recovery and kernel images inside mmcblk0 (offsets 0x380000 and 0xB80000), the bootloader itself seems to be completely inaccessible from the OS.
Click to expand...
Click to collapse
Boo Face!! Well thank you for the info. The offsets may still prove useful to get me out of this recovery bootloop I'm in.

Use parted not fdisk for emmc
MysticMgcn said:
Could someone please post their partition tables by running "fdisk -l /dev/block/mmcblk0" in ADB?
Click to expand...
Click to collapse
I know this is an old post but I think the command you are looking for is "parted /dev/block/mmcblk0" then type "print" and hit enter.

Related

Nexus 5 with dead flash memory?

I went to use my Nexus 5 (D821) earlier today but it wouldn't turn on. Holding power didn't seem to work, so I assumed the battery was flat and left it charging for a couple of hours. Now it gets stuck at the first black and white "google" logo forever. The device is unlocked and rooted, but was working fine, and nothing was changed leading up to the issue.
I'm able to access the bootloader and fastboot still, but nothing seems to work.
Attempting to flash a partition (fastboot flash recovery twrp.img):
FAILED (remote: flash write failure)
Attempting to erase a partition (fastboot erase userdata):
FAILED (remote: failed to erase partition)
I can boot TWRP by running fastboot boot twrp.img, but attempting to mount any partitions results in errors such as:
E: Unable to find partition size for /system
E: Unable to mount /system
Also, attempting to install a zip shows that internal storage is 0MB in size.
At this stage, I suspect the flash memory has died a horrible death, and I'm trying to work out how to set the tampered and unlocked flags back to false to I can return it under warranty, however this is proving difficult too. If I run 'fastboot oem lock', it appears to succeed (the bootloader even changes to 'LOCK STATE - locked'), but as soon as I reboot the device, it reverts back to unlocked, and the padlock shows up again.
I've even tried manually via:
echo -ne "\x00" | dd obs=1 count=1 seek=16400 of=/dev/block/platform/msm_sdcc.1/by-name/misc
echo -ne "\x00" | dd obs=1 count=1 seek=16404 of=/dev/block/platform/msm_sdcc.1/by-name/misc
but these don't seem to have any effect on the flags.
So now I'm out of ideas, and just hoping I can set these flags back before sending the device for warranty. Any ideas?
There's nothing you can do about it now. Just send it back. I doubt they'll blame flash memory failure on unlocking the bootloader
Sent from my Nexus 5 using Tapatalk
I was helping a guy yestreday, he had a some problem like you. When you turn on the phone, the flashchip shuts off for some reasone. I was looking for the mmc or mmcblk device in the /dev then /dev/block after I booted a twrp like you, but I could not find any device called mmcblk or mmc, even the partitions was missing like mmcblk0p1 etc...
cat /proc/partitions just give me an empty screen, that it didnt find any storage device.
rootSU said:
There's nothing you can do about it now. Just send it back. I doubt they'll blame flash memory failure on unlocking the bootloader
Click to expand...
Click to collapse
I'm just a little worried they'll refuse to honour the warranty without even bothering to check the hardware. Aren't they within their right to do this given the warranty terms? Sounds like I don't have any choice!
bitdomo said:
I was helping a guy yestreday, he had a some problem like you. When you turn on the phone, the flashchip shuts off for some reasone. I was looking for the mmc or mmcblk device in the /dev then /dev/block after I booted a twrp like you, but I could not find any device called mmcblk or mmc, even the partitions was missing like mmcblk0p1 etc...
cat /proc/partitions just give me an empty screen, that it didnt find any storage device.
Click to expand...
Click to collapse
I'm seeing a bunch of partitions listed when I run 'cat /proc/partitions', so I guess my issue might be a little different.
What I'm confused about though, is if the NAND flash is truely dead, how does the bootloader run? Isn't this stored on the same NAND flash chip? Also, aren't the lock state and tamper flags on the same chip? If so, how are these still accessible, but not writeable? I'm guessing it's not a complete failure, but only a partial one... Thoughts?
It surely isn't fully dead. It could be a corrupt partition or bunch of partitions being the issue. But the bootloader also isn't fully functional as you cannot relock it.
You definitely need to reset tamper flag for RMA, but for warranty, don't they have to prove that the hardware fault was caused by the unlocked bootloader? I know Samsung refuse warranty on modification but I don't think Google do. It is a developer phone after all.
That said, you've no choice as I can see. I'm not aware of anyone having warranty rejected or approved with an unlocked bootloader yet
sir_earl said:
I'm seeing a bunch of partitions listed when I run 'cat /proc/partitions', so I guess my issue might be a little different.
What I'm confused about though, is if the NAND flash is truely dead, how does the bootloader run? Isn't this stored on the same NAND flash chip? Also, aren't the lock state and tamper flags on the same chip? If so, how are these still accessible, but not writeable? I'm guessing it's not a complete failure, but only a partial one... Thoughts?
Click to expand...
Click to collapse
Can you post the outpot for the cat /proc/partitions command?
rootSU said:
I know Samsung refuse warranty on modification but I don't think Google do. It is a developer phone after all.
Click to expand...
Click to collapse
I'm not sure if the process is different here in New Zealand. I was under the impression LG deals with warranty issues here, and Google isn't involved?
bitdomo said:
Can you post the outpot for the cat /proc/partitions command?
Click to expand...
Click to collapse
I'll have to take a photo, as I can't find any way to run adb or save the log off. Give me a minute!
sir_earl said:
I'll have to take a photo, as I can't find any way to run adb or save the log off. Give me a minute!
Click to expand...
Click to collapse
you can do the whole thing with adb from your pc.
you need the naked usb drivers for that, and if you running windows 8 or 8.1 you have to turn off driver signiture enforcement inorder to isntall the drivers.
and then with adb shell command you can use your cmd window on the pc as a terminal window on your phone
bitdomo said:
you can do the whole thing with adb from your pc.
you need the naked usb drivers for that, and if you running windows 8 or 8.1 you have to turn off driver signiture enforcement inorder to isntall the drivers.
and then with adb shell command you can use your cmd window on the pc as a terminal window on your phone
Click to expand...
Click to collapse
adb was working with the Nexus when the rom was booted, but can't seem to find the device when running TWRP or fastboot (not sure if the server can run there?) Will the naked usb drivers resolve this issue?
Regardless, I've attached the photo with the partitions.
sir_earl said:
I'm not sure if the process is different here in New Zealand. I was under the impression LG deals with warranty issues here, and Google isn't involved?
Click to expand...
Click to collapse
google are only involved in that all this is done on behalf of them. They commission the phone. But the mandate is that it's a developer phone
rootSU said:
google are only involved in that all this is done on behalf of them. They commission the phone. But the mandate is that it's a developer phone
Click to expand...
Click to collapse
That's somewhat comforting. We shall see how it goes! Not looking forward to being without a decent phone for however long the warranty process takes though!
sir_earl said:
That's somewhat comforting. We shall see how it goes! Not looking forward to being without a decent phone for however long the warranty process takes though!
Click to expand...
Click to collapse
Please do let us know how you get on. It will be interesting to confirm how the unlocked bootloader goes down.
sir_earl said:
adb was working with the Nexus when the rom was booted, but can't seem to find the device when running TWRP or fastboot (not sure if the server can run there?) Will the naked usb drivers resolve this issue?
Regardless, I've attached the photo with the partitions.
Click to expand...
Click to collapse
Yes naked drivers will help you, but keep in mind that fi you are running windows 8 or 8.1 you have to turn of driver signiture enforcement.
Could you mount the system partition?
$ mount -o rw /dev/block/mmcblk0p25 /system
$ cd /system
and try to make folder like
$ mkdir asd
and then remove it
$ rm -rf asd
if that works we can write the flash chip, so it must be some kind of partition corruption.
bitdomo said:
Yes naked drivers will help you, but keep in mind that fi you are running windows 8 or 8.1 you have to turn of driver signiture enforcement.
Could you mount the system partition?
$ mount -o rw /dev/block/mmcblk0p25 /system
$ cd /system
and try to make folder like
$ mkdir asd
and then remove it
$ rm -rf asd
if that works we can write the flash chip, so it must be some kind of partition corruption.
Click to expand...
Click to collapse
I'm able to use adb now, so that's a start.
Trying to mount with the command you gave gives:
mount -o rw /dev/block/mmcblk0p25 /system
mount: mounting /dev/block/mmcblk0p25 on /system failed: Invalid argument
sir_earl said:
I'm able to use adb now, so that's a start.
Trying to mount with the command you gave gives:
mount -o rw /dev/block/mmcblk0p25 /system
mount: mounting /dev/block/mmcblk0p25 on /system failed: Invalid argument
Click to expand...
Click to collapse
for me this command works.
I use twrp 2.6.3.4
bitdomo said:
for me this command works.
I use twrp 2.6.3.4
Click to expand...
Click to collapse
Running same twrp here, so I guess it's failing because it can't mount the partition due to some kind of corruption.
rootSU said:
Please do let us know how you get on. It will be interesting to confirm how the unlocked bootloader goes down.
Click to expand...
Click to collapse
Will do. I'm curious though, if random corruptions like this can occur, isn't it possible that the bootloader could appear unlocked if it's reading a corrupt piece of memory? If that's the case, they can't just assume the user has unlocked the bootloader in cases where the flash chip fails, correct? Granted, this isn't the case here, but it must have some impact!
sir_earl said:
Running same twrp here, so I guess it's failing because it can't mount the partition due to some kind of corruption.
Click to expand...
Click to collapse
I don't know what else you could do. You can try to lock and reset tamper flag by mmcblk0p15 and not with ...../by-name/misc, if it works probably you could not unlock your bl again.
Try to lock bl and reset tamperflag (adb shell):
echo -ne "\x00" | dd obs=1 count=1 seek=16400 of=/dev/block/mmcblk0p15
echo -ne "\x00" | dd obs=1 count=1 seek=16404 of=/dev/block/mmcblk0p15
---------- Post added at 12:45 PM ---------- Previous post was at 12:43 PM ----------
sir_earl said:
Will do. I'm curious though, if random corruptions like this can occur, isn't it possible that the bootloader could appear unlocked if it's reading a corrupt piece of memory? If that's the case, they can't just assume the user has unlocked the bootloader in cases where the flash chip fails, correct? Granted, this isn't the case here, but it must have some impact!
Click to expand...
Click to collapse
bl lock state and tamper flag stored at the misc partition, so bl can read it but ti seems it fails to write it, i don't know the reasone why, but it seems tha path to the partitions by-name is missing

[Q] Mounting userdata partition on PC

Hello all,
Last night I ran the following command (with the phone in recovery and everything unmounted) to back up my Nexus 5's userdata partition to my computer:
Code:
adb pull /dev/block/platform/msm_sdcc.1/by-name/userdata
My phone is encrypted, so I use "cryptsetup --type=plain open" to obtain a plaintext version on /dev/mapper/my-nexus-backup. But I cannot mount the mapped device using "mount"! It complains that iit can't find the filesystem.
So, how would I mount such an image? Or, even better, what's the best way to dd it back to the userdata partition on the device?
And yes, next time I will just use a Nandroid, even if it means having to erase things to make room.
See if @rootSU or @bitdomo can help. They're gurus at this type of stuff
Sent from my Nexus 5 using XDA Free mobile app
Sorry, where are you mounting exactly? Are you trying to mount an image on a Linux box after the pull?
If not can you please share the full step of commands and what you expect to happen please?
Sent from my Nexus 5 using Tapatalk
rootSU said:
Sorry, where are you mounting exactly? Are you trying to mount an image on a Linux box after the pull?
If not can you please share the full step of commands and what you expect to happen please?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Hey rootSU. I pulled the image from my phone, decrypted it, and tried to mount it:
Code:
$ adb pull /dev/block/platform/msm_sdcc.1/by-name/userdata
$ su
# losetup /dev/loop1 userdata
# cryptsetup open --type plain /dev/loop1 nexus
Enter passphrase:
# mount /dev/mapper/nexus /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/mapper/nexus,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
I'm not sure why that doesn't work. It's just ext4, right? I'd still find it instructive to figure out how to mount it; hopefully you can shed some light?
As far as getting the image back on the device's partition, I was a bit stuck, because there's obviously no room on the device to copy it to. I finally figured out a method involving netcat. Essentially I forwarded a local TCP port to my device (in recovery) using adb, then used netcat to feed dd the image.
Code:
$ adb forward tcp:4444 tcp:4444
$ adb shell
# nc -l -p 4444 -e dd of=/dev/block/platform/msm_sdcc.1/by-name/userdata
This will hang as it waits for an inbound connection. From a second shell:
Code:
$ dd if=userdata | nc localhost 4444
My 28GiB image took around 6 hours (!) to complete. Nandroid is probably the way to go.
Nandroid won't backup sdcard but you can use foldersync to back that up.
Yes it is just ext4
I've never done anything like this before with an encrypted device but my assumption was if you adb pull a file, it would decrypt it on the fly.. Does it not?? If it does, I'd just dd it to an img.
Sent from my Nexus 5 using Tapatalk
rootSU said:
Nandroid won't backup sdcard but you can use foldersync to back that up.
Yes it is just ext4
I've never done anything like this before with an encrypted device but my assumption was if you adb pull a file, it would decrypt it on the fly.. Does it not?? If it does, I'd just dd it to an img.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Nope, in this case, userdata is the encrypted *device*; in any case TWRP knows nothing about the encryption. The pull was identical to using dd to copy the file. Of course, if you wanted to decrypt your device without wiping data, you could probably have TWRP decrypt the data partition, then dd or pull the resulting /dev/block/dm-0 file (which is equivalent to my /dev/mapper/nexus file I created). Haven't tried it though; ain't nobody got time for that.
I wonder why it wouldn't mount. Oh well. I'm just happy that my device is the way it was yesterday.
I'd love to have a play with this but I just don't have the time to start encrypting and decrypting stuff
Out of interest what about adb whilst in android?
Sent from my Nexus 5 using Tapatalk
rootSU said:
I'd love to have a play with this but I just don't have the time to start encrypting and decrypting stuff
Out of interest what about adb whilst in android?
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
You would have the exact same results, as the /dev/* files are the physical disks represented as a file. The crypto drivers read/write this block device file to present a decrypted /dev/block/dm-0 device. Then the kernel mounts dm-0 as an ext4 filesystem on /data. All the files I mentioned are pullable with adb, assuming you have sufficient privileges. You don't need fancy tools to read/write them, which is why the netcat hack worked. Thus is the power of Unix!
You can screw around with it if you want in regular desktop Linux with a "device" you make from a bunch of 0s. Do:
Code:
# dd if=/dev/zero of=disk.image count=100000
# losetup /dev/loop0 disk.image
Now you can do "mkfs.ext4 /dev/loop0" and "mount ..." or whatever, and the data will be written to the "device" disk.image.
some time ago I backed up /dev/block/sda from my android 12 phone.
I forgot it was encrypted..
and that it had 34 partitions.
userdata partition WAS sda34.
how can I momentarily mount the backup in android?
losetup is present...

[SOLVED] "E: can't mount /sdcard" CWM 6.0.4.5 after trying L preview.

[SOLVED]
there may be other causes of this error, so there is no guarantee this will always be the fix.
"E: can't mount /sdcard"
in my case was "E: can't mount /sdcard" caused by some corrupted files in /data.
see here:
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
i was able to fix this with instructions from this thread: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
boot phone into recovery, and ensure you are able to to see your device with the command:
sudo adb devices
then use this command:
adb shell ‘e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata’
it should prompt you to hit enter to repair several times. simply hit enter each time you are prompted until it resolves.
after that you should be able to access your data through recovery or adb pull.
the "/data/media/0/0/" problem
i thought we were passed this bug, but somehow i caused it again.
it isn't particularly difficult to fix, provided you have proper access to your data.
i just used solid explorer to move the contents of to "/data/media/0/0" to "/data/media/0" and "/data/media/0/clockworkmod" to "/data/media/clockworkmod".
any sort of root file manager should be fine.
original thread:
current situation: nexus 5 has no system data. i can get into fastboot and CWM recovery, but CWM can't perform any functions due to "E: can't mount /sdcard"
[update/edit:
[email protected]:~$ fastboot devices
0370333c437f5965 fastboot
[email protected]:~$ adb devices
List of devices attached
0370333c437f5965 recovery
]
is there anything i can do from fastboot?
should i reflash the recovery or use a different recovery?
do i have to flash stock images?
anyway to back up my data to my pc first?
full story (in case something dumb i did is relevant):
ok, so i flashed the L preview from vomer's thread (http://forum.xda-developers.com/google-nexus-5/development/rom-n5-l-developer-preview-t2796003), and yes i made a nandroid backup (wish i'd copied it to my pc now...)
i dirty flashed because i'm dumb and thought i would format /data anyway. it didn't, but actually didn't cause too many problems (no force closes, but the home button didn't work.)
i went back to recovery and formatted /data, /cache, and dalvik, then reflashed the L zip and made a backup of this fresh install.
messed around with L for awhile, but wanted to go back to my previous setup. so i went back to recovery to restore my nandroid. there was only that most recent backup in the list.
i poked around and realized my files were now located inside "/sdcard/0/0/" so i formatted /data, /cache, and dalvik and flashed my rom (latest aokp, 4.4.4) and gapps. the phone booted up fine but got infinite play services force closes. i assume this is because flashing my rom hadn't actually cleared /system first.
so i go back into recovery once more, format /system, and try to flash the rom again.
E: can't mount /sdcard
i'm assuming my data (and my backup) is still there somewhere in /sdcard/0/0/ but i have no idea how i might access it.
any help would be appreciated. i can definitely return to stock and start over, but i'd much rather have my data.
Click to expand...
Click to collapse
Fastboot flash the stock userdata.img
You'll need to adb pull everything from /data/media first
Yes you should use another recovery but not for this reason
Sent from my Nexus 5 using Tapatalk
rootSU said:
Fastboot flash the stock userdata.img
You'll need to adb pull everything from /data/media first
Yes you should use another recovery but not for this reason
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
i'm not super familiar with this. i've only really used adb with guides for specific tasks.
do i just use "adb pull /data/media /where/i/want/it/to/go"
i'm using ubuntu if that matters.
Yep.
Boot into recovery
Open terminal
mkdir sd_backup
adb shell
mount /data
exit
adb pull /data/media/* /sd_backup
Sent from my Nexus 5 using Tapatalk
rootSU said:
Yep.
Boot into recovery
Open terminal
mkdir sd_backup
adb she'll
mount /data
exit
adb pull /data/media/* /sd_backup
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
ahh, the "/data/media/*" was the part i was looking for.
not sure i understand the
"adb shell
mount /data
exit"
part.
vonlupe said:
ahh, the "/data/media/*" was the part i was looking for.
not sure i understand the
"adb shell
mount /data
exit"
part.
Click to expand...
Click to collapse
In what respect?
They're commands. Type them in the terminal
Sent from my Nexus 5 using Tapatalk
rootSU said:
In what respect?
They're commands. Type them in the terminal
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
[email protected]:~$ adb devices
List of devices attached
0370333c437f5965 recovery
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
~ # exit
Try and do "adb root" first..
Sent from my Nexus 5 using Tapatalk
rootSU said:
Try and do "adb root" first..
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
[email protected]:~$ adb root
adbd is already running as root
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
~ #
not sure if this is relevant or weird or not, but "datadata"??
[email protected]:~$ adb shell
~ # ls
boot fstab.hammerhead sdcard
cache init seapp_contexts
charger init.rc sepolicy
data internal_sd storage
datadata mnt sys
default.prop proc system
dev property_contexts tmp
emmc recovery ueventd.goldfish.rc
etc res ueventd.hammerhead.rc
external_sd root ueventd.rc
file_contexts sbin
fstab.goldfish sd-ext
~ #
vonlupe said:
[email protected]:~$ adb root
adbd is already running as root
[email protected]:~$ adb shell
~ # mount /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: Invalid argument
~ #
Click to expand...
Click to collapse
[email protected]:~$ adb root
adbd is already running as root
[email protected]:~$ adb shell
~ # mount /data
~ # exit
[email protected]:~$
Click to expand...
Click to collapse
Could be your data partition is screwed too. Can you still boot into L? if not, I think your data is done for. Basically you have to format data going to and from L.
No idea what "datadata" is.
rootSU said:
Could be your data partition is screwed too. Can you still boot into L? if not, I think your data is done for. Basically you have to format data going to and from L.
No idea what "datadata" is.
Click to expand...
Click to collapse
no, i formatted /system, that's when everything broke.
thanks for all your help! i'm going to keep poking around, as i'd rather like to keep my data. i have the stock 4.4.4 images if i need to wipe though.
vonlupe said:
no, i formatted /system, that's when everything broke.
thanks for all your help! i'm going to keep poking around, as i'd rather like to keep my data. i have the stock 4.4.4 images if i need to wipe though.
Click to expand...
Click to collapse
Just fastboot flash the L system.img and boot.img
rootSU said:
Just fastboot flash the L system.img and boot.img
Click to expand...
Click to collapse
hmm, will that work?
will it boot without userdata.img?
it's just usuerdata that wipes everything, right?
vonlupe said:
hmm, will that work?
will it boot without userdata.img?
it's just usuerdata that wipes everything, right?
Click to expand...
Click to collapse
Userdata wipes data if flashed and no it is not a requirement. Will it work, not sure. Try it.
Also flash a cache.img just incase because dodgy cache can prevent mounting too
Sent from my Nexus 5 using Tapatalk
AHA!!
i found this thread: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
which instructed me to run
‘e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata’ in adb shell.
and it worked!!!
i was able to mount /data and am currently running adb pull /data/media/ (no asterisk, btw)
and backing up all my data.
will update OP if this resolves everything.
Cool
Sent from my Nexus 5 using Tapatalk

[Q] TF700T stuck on Teamwin splash screen

My son tried flashing his TF700T to a custom rom (jellybean 4.4.4)
that appeared to be successfull
however after a few days it rebooted itself and now only boots to the teamwin splash page and stays there
just prior to the teamwin splash page 4 green penguins appear in the top left hand corner of the display.
Let me know what additional information you need to help me diagnose and fix this issue
thanks in advance
dneusitz said:
My son tried flashing his TF700T to a custom rom (jellybean 4.4.4)
that appeared to be successfull
however after a few days it rebooted itself and now only boots to the teamwin splash page and stays there
just prior to the teamwin splash page 4 green penguins appear in the top left hand corner of the display.
Let me know what additional information you need to help me diagnose and fix this issue
thanks in advance
Click to expand...
Click to collapse
Do you have adb access when it is stuck on the twrp curtain ?
Thx Josh
it is stuck on the twrp/teamwin curtain
dneusitz said:
it is stuck on the twrp/teamwin curtain
Click to expand...
Click to collapse
Yes but connect it to a PC and see if you can get adb access. Search on the 700 forums here how to do that if you don't understand as it is too long to retype it all out for you.
adb devices returns the following
List of devices attached
0123456789ABCDEF recovery
please advise what i should do next
thanks
dneusitz said:
adb devices returns the following
List of devices attached
0123456789ABCDEF recovery
please advise what i should do next
thanks
Click to expand...
Click to collapse
What does this command do ?
Code:
adb reboot-bootloader
If you get there look in the upper left for the bootloader version ....
Should start with 'epad' and also contain the SKU of your tablet e.g. would be 'WW' 'US' 'TN'
Get this info if you can ....
Thx Josh
the command
adb reboot-bootloader
does nothing
the tf700t still is sitting on the twrp curtain. nothing appears on the screen
on the PC side the command appears to be waiting on a reply from the tf700t
dneusitz said:
the command
adb reboot-bootloader
does nothing
the tf700t still is sitting on the twrp curtain. nothing appears on the screen
on the PC side the command appears to be waiting on a reply from the tf700t
Click to expand...
Click to collapse
Try a different usb port ...
If that does not work, what does this do ......
Code:
adb shell
with change command prompt to shell, type this in shell
Code:
start recovery
What happens with this ?
Thx Josh
i appreciate your help and patience with me
tried different usb ports
still the same behaviour from adb reboot-bootloader as stated previously
adb shell returns
~ # 4[6n
please note that the 4 in the text above is actually a leftward pointing arrow
I do not understand your instruction "with change command prompt to shell, type this in shell"
when i type start recovery in front of the prompt returned by adb shell like this
~ # 4[6n start recovery
start recovery is echoed and i get the adb shell prompt again like this
~ # 4[6n start recovery
start recovery
~ # 4[6n
nothing happens on the tf700t. i am still at the twrp curtain
dneusitz said:
i appreciate your help and patience with me
tried different usb ports
still the same behaviour from adb reboot-bootloader as stated previously
adb shell returns
~ # 4[6n
please note that the 4 in the text above is actually a leftward pointing arrow
I do not understand your instruction "with change command prompt to shell, type this in shell"
when i type start recovery in front of the prompt returned by adb shell like this
~ # 4[6n start recovery
start recovery is echoed and i get the adb shell prompt again like this
~ # 4[6n start recovery
start recovery
~ # 4[6n
nothing happens on the tf700t. i am still at the twrp curtain
Click to expand...
Click to collapse
Ok, give this a try .....
http://forum.xda-developers.com/transformer-tf700/help/guide-t2853546
Thx Josh
the command
adb shell insmod /bootit.ko
causes the tf700t to shut down immediately
and the USB connection is lost
Next thing you can try to diagnose the problem when it hangs at the TWRP curtain (preferably 1-2 minutes after turning it on):
adb pull /tmp/recovery.log
adb shell dmesg > dmesg.txt
dmesg.txt and recovery.log files are attached
My thanks again for all the help
dneusitz said:
dmesg.txt and recovery.log files are attached
Click to expand...
Click to collapse
TWRP seems to hang after trying to mount the data partition. Run this to see if the mount worked:
adb shell mount > mount.txt
If the output file doesn't contain a line for /data, try mounting it manually and see if it contains the usual directories for an Android /data partition (e.g. app, data, local, media, misc, ...):
adb shell mount /data
ls /data > data.txt
If there is file system corruption on /data, we can try repairing or formatting it in the next step - is there any important data on the device that we should try to recover?
dneusitz said:
dmesg.txt and recovery.log files are attached
My thanks again for all the help
Click to expand...
Click to collapse
Maybe if you would also get a partition table .....
Code:
adb pull /proc/partitions
Thx Josh
adb shell mount > mount.txt output attached as is adb pull /proc/partitions
there is no line for /data in the mount.txt file
adb shell mount /data results in mount: can't read '/etc/fstab': No such file or directory
there is no data on the tablet that he needs to recover. everything of importance is on the SD card
dneusitz said:
adb shell mount /data results in mount: can't read '/etc/fstab': No such file or directory
Click to expand...
Click to collapse
Oops, I forgot that you need to specify everything when mounting manually in TWRP:
Code:
adb shell mount -t ext4 /dev/block/mmcblk0p8 /data
You'll probably get another error message.
The command
adb shell mount -t ext4 /dev/block/mmcblk0p8 /data
never comes back from the tf700t
dneusitz said:
My son tried flashing his TF700T to a custom rom (jellybean 4.4.4)
that appeared to be successfull
however after a few days it rebooted itself and now only boots to the teamwin splash page and stays there
just prior to the teamwin splash page 4 green penguins appear in the top left hand corner of the display.
Let me know what additional information you need to help me diagnose and fix this issue
thanks in advance
Click to expand...
Click to collapse
I am having the same issue too
Hopefully this can be resolved... Hanks in advance!
dneusitz said:
The command
adb shell mount -t ext4 /dev/block/mmcblk0p8 /data
never comes back from the tf700t
Click to expand...
Click to collapse
OK, then TWRP is having the same problem which explains why it hangs. I've never seen mount hang, but this is most likely due to filesystem corruption.
To recreate the filesystem (this will irrecoverably delete all user data on the device), try this:
Code:
adb shell make_ext4fs -l -16384 -a /data /dev/block/mmcblk0p8
Make sure you get it exactly right - use copy+paste. The command should take a couple of seconds to minutes at most and output a few lines of text.

[SOLVED] Help to mount userdata in linux or repair userdata.img

After an Update of Two magisk modules, my Ulefone Armor 11 5G staied stucked on boot logo, I can only enter in recovery or fastboot.
I try to build a TWRP, but it is not able to mount userdata.
I was able to download with the help of mtkclient all the partition on my phone, even userdata , it took 7 hours.
I wanted to load the image in linux but using mount disk imag or using the command sudo mount -o loop userdata.img ~/Armor_11_5G doesn't do anything not even an error message.
I'm wondering if the filesystem was corrupted during the update.
Is it possible to repair the fylesystem like in Windows?
Thanks
did you previously disable encryption and factory reset long time before the modules updates failed?
what do you mean mount doesn't do anything not even an error message? either it give error message or it succeed.
I didn't disable encryption before updating the modules, I already updated this modules many times.
what do you mean mount doesn't do anything not even an error message? either it give error message or it succeed.
Click to expand...
Click to collapse
That is the problem, it doesn't succed and I don't have an error message. The file is 256 Gbyte big, I don't know if it plays a role. I'm using Ubuntu 22
if phone is encrypted that's just 256G garbage. post the output of
Code:
$ parted <file> unit B print
Here are the results of parted
Code:
Error: /home/*****/Public/userdata.bin.img: unrecognised disk label
Model: (file)
Disk /home/osboxes/Public/userdata.bin.img: 249208733696B
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Thanks
You may try https://www.cgsecurity.org/wiki/TestDisk_Download
I'd be glad for your feedback.
sorry thought it's whole disk, but it's only 232G file therefore parted won't print partition table
does apply to FDE only
assuming this file is dump of single userdata partition, open with HxD editor. if the partition image is not encrypted, you will see lot zeros within first 1024 bytes.
in that case you can check for file system type is ext4 or f2fs.
Code:
$ xxd -l 1080 dump.img | grep 53ef
$ xxd -l 1024 dump.img | grep 1020.f5f2
But most likely the userdata partition is encrypted, therefore no way to recover data offline.
The easiest way not to load Magisk modules is, not to load Magisk. Flashing stock boot.img will solve it.
Beware, in case you disabled encryption beforehand, booting stock boot.img will force encryption. This may take long time without notice.
I never disabled encryption, I don't know if Magisk do it without informing. I used this phone for an year without a problem.
After the update I left the phone on for one night but nothing happens. I tried to reflash the stock boot image, and again a whole night wait, but again nothing happens.
Reading the fstab the file system should be ext4.
The file is the dump of the whole userdata partition of my Ulefone Armor 11 5G.
I did a backup of the whole system before doing any experiment so if the partition table is corrupted maybe if I reflash back the userdata partition with a working partition table I have again access to the datas.
there is no partition table in userdata partition, I just gave you wrong advise. because the phones total storage is 256G, I made wrong assumptions (you can view partition table from file pgpt.bin)
full 1:1 backup is impossible for FBE encryption because encryption keys are stored in TEE. once you factory reset device backup of userdata + metadata becomes useless.
fstab doesn't tell you what file you just have dumped. if you can't find ext4 super magic (#7) it's impossible to loop mount that file (and impossible to decrypt on linux PC)
if you can't fix boot-loop by stock boot.img then it's unrelated to magisk modules. you can however enable adb in default.prop and capture adb logcat during boot-loop for further analysis. you could also inject own script that deletes some files (only DE encrypted files, CE encrypted files requires lock screen credentials aka pin/pattern)
boot this TWRP and get log from adb
Code:
$ fastboot boot recovery.img
$ adb shell twrp decrypt '1234'
$ adb pull /tmp/recovery.log
https://twrp.me/faq/openrecoveryscript.html
full 1:1 backup is impossible for FBE encryption because encryption keys are stored in TEE. once you factory reset device backup of userdata + metadata becomes useless.
Click to expand...
Click to collapse
With mtk client I was able to do the backup of tee1 and tee2 and also of gpt_backup and gpt_main.
$ xxd -l 1080 dump.img | grep 53ef
$ xxd -l 1024 dump.img | grep 1020.f5f2
Click to expand...
Click to collapse
Doesn't produce any results.
I have immediately the command prompt.
you can however enable adb in default.prop
Click to expand...
Click to collapse
How can I do that? Which value should I change in default.prop?
so your "backup" is encrypted. please note Trustonic Kinibi is TEE OS running in secure memory one can't access or backup with mtkclient. the tee partitions in phone storage do not contain any encryption key (none of the partitions does, secure memory is not even a partition). the only crypto related partition is metadata used for keydirectory of metadata encryption (on top of FBE encryption) but it is useless for backup purposes.
yes you can modify default.prop in boot.img, ro.secure=0 should give root access.
https://forum.xda-developers.com/t/...hone-with-broken-screen.2965462/post-85905033
Code:
ro.secure=0
ro.debuggable=1
persist.service.adb.enable=1
in case the default.prop modification is not sufficient, you need additional command to be executed as root.
Code:
# settings put global adb_enabled 1
as you installed magisk, you could use magisk overlay.d/sbin/ for running startup script.
https://forum.xda-developers.com/t/...ithout-losing-your-data.4383255/post-86934375
aIecxs said:
boot this TWRP and get log from adb
Code:
$ fastboot boot recovery.img
$ adb shell twrp decrypt '1234'
$ adb pull /tmp/recovery.log
https://twrp.me/faq/openrecoveryscript.html
Click to expand...
Click to collapse
How about this TWRP? it should be able to decrypt userdata. if decryption failed, provide recovery.log
Until tomorrow I cannot do a logcat and I cannot find my view logcat on my laptop.
I unpacked boot.img with Carliv Image Kitchen and there is no default.prop, that is present in the recovery as prop.default.
Is there a way to backup secure memory of Trustonic?
How about this TWRP? it should be able to decrypt userdata. if decryption failed, provide recovery.log
Click to expand...
Click to collapse
I already tried that version but it cannot decrypt, that' why I'm trying to build my own version of TWRp with the help of the creator of that version of TWRP, but I'm stucked.
oh, you know how to build TWRP with proper FBE + metadata encryption support? have a look at other Oppo devices how they did... good luck.
regarding default.prop in boot.img (it's a symlink to system unfortunately) you can do it the other way
use magisk overlay.d/sbin/
create a boot script that does the thing with resetprop -n <prop_name> <prop_value>
don't use outdated Carliv Image Kitchen! use osm0sis AIK from link above.
oh, you know how to build TWRP with proper FBE + metadata encryption support? have a look at other Oppo devices how they did... good luck.
Click to expand...
Click to collapse
I'm learning.
I try to integrate the decryption service following the suggestion of ADeadTrouser on Github, but the service doesn't want to start and I don't understand why.
I never checked Oppo, I will take a look at them also, thanks for the suggestion.
I think I figured out now the adb logcat at least. hope that helps
https://forum.xda-developers.com/t/accessing-my-phone-with-a-dead-screen.4542763/post-88016019
I tried your script butr nothing happens, the telephone is not listed when I type
Code:
adb devices
and if I type
Code:
adb logcat
I receive the message waiting for device
you might follow the thread
wenyendev said:
You may try https://www.cgsecurity.org/wiki/TestDisk_Download
I'd be glad for your feedback.
Click to expand...
Click to collapse
I run the software on the image and it identify the contents and can read the encrypted and not encrypted part, that means that all the files are there, but I cannot mount in Linux or in TWRP
The fact that I cannot mount in Linux or TWRP the userdata image/partition can be that is corrupted the partition or the file index?
That would also explain why the script for Magisk provided by aIecxs is not able to copy the adb_key from the cache in the data partition.

Categories

Resources