Related
Sorry for the novel, but I want to show the whole backstory to rule out quick fixes... I have an m7 a coworker asked me to take a look at. I don't know the full story, but apparantly he didn't do anything to the phone, he just woke up one day and it was suddenly broken. I'm not sure whether I believe him but I digress...
When I got it, about half the time the phone would just hang at the htc logo. If you power it off and back on, the other half of the time it would automatically bring itself to the bootloader. The bootloader said Tampered, locked, and security warning at the top.
I fought with it for a while, factory reset did nothing. I used htcdev to unlock the bootloader, and flashed twrp 2.8. Twrp was full of errors saying can't mount /data, can't mount /system, can't mount /cache etc. any time I tried to do anything it would keep complaining that it couldn't write to /cache/log/whatever.
Trying to format / wipe any of the partitions would fail. When I went to the mount screen, it showed "internal storage: 0mb" and clicking on that let me choose from internal storage 0mb and dgs USB 0mb.
Trying to adb side load in twrp failed as well, it would just say side load failed as soon as I entered the side load screen.
I installed twrp 2.3.6, and it did the exact same thing.
I then installed CWM touch 6.0.4.8, and it had basically the same errors about not being able to mount any partitions. The only difference with CWM was that the ADB side load would start, but trying to actually send any files to it fails. (Sending the file from the computer counts up and gets to 100%, but as soon as it gets to 100% it says the file is invalid (don't recall the exact error)
I finally found this link: (too new to port links, but google htc recover corrupted partitions, it's the first hit, from android revolution blog) and followed those steps, but when I run mkfs.ext4 for mmcblk0p36, 35 or 34 it complains that mmcblk0p36 is not a block special device.
I opened up adb shell, and ran ls /dev/block, it shows some mmcblk0, mmcblk0p1, mmcblk0p2, etc all the way up to p21, but there's nothing higher than 21. When I run that same command on my own m7 (running cm11) it has all the way up to p37.
I've tried to find more info about what's going on from there, but the only people I've found with similar problems all sent their phones back for warranty, and this one is out of warranty now.
So long story short, at this point am I right that it looks like a hardware fault and I'm sol? Or is there anything I'm missing about why half of those blocks would be missing? Do I stand a chance of remapping /data /system and /cache to lower numbered blocks or am I out to lunch?
This post was long enough without attaching logs or exact error messages, but if anyone thinks they might be of value let me know and I can include them.
Thanks!
joetomato said:
Sorry for the novel, but I want to show the whole backstory to rule out quick fixes... I have an m7 a coworker asked me to take a look at. I don't know the full story, but apparantly he didn't do anything to the phone, he just woke up one day and it was suddenly broken. I'm not sure whether I believe him but I digress...
When I got it, about half the time the phone would just hang at the htc logo. If you power it off and back on, the other half of the time it would automatically bring itself to the bootloader. The bootloader said Tampered, locked, and security warning at the top.
I fought with it for a while, factory reset did nothing. I used htcdev to unlock the bootloader, and flashed twrp 2.8. Twrp was full of errors saying can't mount /data, can't mount /system, can't mount /cache etc. any time I tried to do anything it would keep complaining that it couldn't write to /cache/log/whatever.
Trying to format / wipe any of the partitions would fail. When I went to the mount screen, it showed "internal storage: 0mb" and clicking on that let me choose from internal storage 0mb and dgs USB 0mb.
Trying to adb side load in twrp failed as well, it would just say side load failed as soon as I entered the side load screen.
I installed twrp 2.3.6, and it did the exact same thing.
I then installed CWM touch 6.0.4.8, and it had basically the same errors about not being able to mount any partitions. The only difference with CWM was that the ADB side load would start, but trying to actually send any files to it fails. (Sending the file from the computer counts up and gets to 100%, but as soon as it gets to 100% it says the file is invalid (don't recall the exact error)
I finally found this link: (too new to port links, but google htc recover corrupted partitions, it's the first hit, from android revolution blog) and followed those steps, but when I run mkfs.ext4 for mmcblk0p36, 35 or 34 it complains that mmcblk0p36 is not a block special device.
I opened up adb shell, and ran ls /dev/block, it shows some mmcblk0, mmcblk0p1, mmcblk0p2, etc all the way up to p21, but there's nothing higher than 21. When I run that same command on my own m7 (running cm11) it has all the way up to p37.
I've tried to find more info about what's going on from there, but the only people I've found with similar problems all sent their phones back for warranty, and this one is out of warranty now.
So long story short, at this point am I right that it looks like a hardware fault and I'm sol? Or is there anything I'm missing about why half of those blocks would be missing? Do I stand a chance of remapping /data /system and /cache to lower numbered blocks or am I out to lunch?
This post was long enough without attaching logs or exact error messages, but if anyone thinks they might be of value let me know and I can include them.
Thanks!
Click to expand...
Click to collapse
I don't know if the Unbrick Project would help or not. At least take a look at it to see if your situation might fit the criteria.
I'm seeing a few posts and qquestions about this with the latest Lollipop release being upon us.
There are several issues here and I wanted to write a quick note aboyut them both for you
1) You cannot SEE your /sdcard data after updating to lollipop
Cause:
Some strange difference between L and KK, where /storage/emulated and /data/media are not "alligned"
Fix:
Open a terminal emulator application and enter the following 2 line command (Press enter after each line)
Code:
su
restorecon -FR /data/media/0
Reboot
2) You have lost permissions to /sdcard
Cause:
You restored all your sdcard data using adb push or MTP whilst booted into recovery. IT screws up your permissions. These methods are fine for single files or backups that you waant to flash or restore, but as soon as you start pushing folders, this issue will be seen
Fix:
In a root explorer app, browse to /data/media/0 and locate your Download folder. Set the permissions for all on Download to read / write (Long press the Download folder > permissions)
Download and flash THIS ZIP from the thread below.
[TOOLS][ZIPS][SCRIPTS] osm0sis' Odds and Ends [Multiple Devices/Platforms] (by @osm0sis)
You can also download the zip to a computer and adb push it / MTP via recovery
3) 32 GB device shows the storage of 16 GB version
Cause:
Unknown. This has actually been happening since the Nexus 5 was released
Fix:
Wipe cache and data
4) TWRP backups are missing
Cause:
This is really unknown. We're not even sure that this can be fixed. Some say its a TWRP bug but that cannot be proven.
Sometimes backup folder is empty....
Fix:
Multiple things you can try. Some have to use restorecon command but usually that has to be done after every backup.
Others have just flashed the factory images
Some of us have never had issues so its hard to call it a bug, but there is definitely something funky going on here.
Other times, backups shows as an unknown file type, 0bytes in size. I haven't a specific fix as I have had no feedback from anyone who has fixed it. You could try deleting that unknown file then running the fix above.
Also, please update to TWRP 2.8.3.0
5) All I see in /sdcard is 0 folder
Cause:
Well known issue on /data/media/0 devices - which is the location of the /sdcard. Unsure of the cause on Nexus 5 though
Fix:
/sdcard is in /data/media/0. If you see a 0 folder in /sdcard, you're actually seeing /data/media/0/0.
To fix, just move /data/media/0/0/* to /data/media/0
I updated without a problem. Be sure to update to latest SDK and to wipe sdcard, eg. clean install.
Sent from Pure Nexus 5
alen1901 said:
I updated without a problem. Be sure to update to latest SDK and to wipe sdcard, eg. clean install.
Sent from Pure Nexus 5
Click to expand...
Click to collapse
Yep, the first issue is fine if you wipe your /sdcard.
The second one is caused by restoring your sdcard afterwards
I have used always Mixplorer and now after flashing 5.0 I cant see nothing under /root. Why so? Something with root permissions? everything else is ok. ( I want to modify build.prop a little )
do I need use some other file explorer?
restorecon -FR /data/media/0 fixed a problem I had with a bad TWRP folder on my Nexus 10 - many thanks!
rootSU said:
Yep, the first issue is fine if you wipe your /sdcard.
The second one is caused by restoring your sdcard afterwards
Click to expand...
Click to collapse
I restored everything except data and android folders back to sdcard, i even restored obb files and no problems at all. It is the best practice for users to restore only their data, not the ones android creates itself. Im sure most people just selects everything and transfer to pc/stick, then copy everything back.
Sent from Pure Nexus 5
Thanks dude. I wish I had this information this morning - would've saved me a lot of sweat.
I'm facing some serious issues today with this.
At first I encountered the issue when installing the flashable update. The OP suggested to execute few command lines in a terminal emulator, but it would only have worked if you rooted your device with cfroot. So I tried to re-root with cfroot with no luck: it kept saying already unlocked. At this point in the settings said I had 3/3 free gigs of storage. Out of desperation I tried to flash every single part of the stock image via fastboot, and re-do the procedure with cfroot and all. However after doing all of that I ended up with 12/12 free gigs, which is what I'm left with right now. I also tried to fix the permissions either with the root explorer app and by flashing the the provided fix, but nothing has happened. No traces of either Titanium backups or whatever files I had before on my storage, it's basically like a new phone with a blank 12 gb storage (keep in mind I have the 32 gb version). I really don't know what to do at this point anymore. Have I by any mean flashed the partitions of a 16 gb variant or something? Will I ever be able to get my storage back? Any help wuld be much appreciated.
Update: apparently I also flashed userdata so my phone believed to be a 16 gb unit. A data wipe fixed it. Obviously my storage is gone but that's my bad, I'll be more careful before udating next time.
vnvman said:
I'm facing some serious issues today with this.
At first I encountered the issue when installing the flashable update. The OP suggested to execute few command lines in a terminal emulator, but it would only have worked if you rooted your device with cfroot. So I tried to re-root with cfroot with no luck: it kept saying already unlocked. At this point in the settings said I had 3/3 free gigs of storage. Out of desperation I tried to flash every single part of the stock image via fastboot, and re-do the procedure with cfroot and all. However after doing all of that I ended up with 12/12 free gigs, which is what I'm left with right now. I also tried to fix the permissions either with the root explorer app and by flashing the the provided fix, but nothing has happened. No traces of either Titanium backups or whatever files I had before on my storage, it's basically like a new phone with a blank 12 gb storage (keep in mind I have the 32 gb version). I really don't know what to do at this point anymore. Have I by any mean flashed the partitions of a 16 gb variant or something? Will I ever be able to get my storage back? Any help wuld be much appreciated.
Update: apparently I also flashed userdata so my phone believed to be a 16 gb unit. A data wipe fixed it. Obviously my storage is gone but that's my bad, I'll be more careful before udating next time.
Click to expand...
Click to collapse
Yeah that's a different but common issue.
Thank you, rootSU. This fixed my issue.
So I have tried the fixes and all of my files are still in sdcard/0 and not just sdcard... Any help I can't figure this out?
rizhqrd said:
So I have tried the fixes and all of my files are still in sdcard/0 and not just sdcard... Any help I can't figure this out?
Click to expand...
Click to collapse
Move them manually.
Tried the first solution as it seems to be my issue, but it doesn't seem to work. Any ideas?
tomp100 said:
Tried the first solution as it seems to be my issue, but it doesn't seem to work. Any ideas?
Click to expand...
Click to collapse
Please explain your issue.
Hey thanks for this post. I've been through this issue like 3 times and keep forgetting about restorecon.
On that note, I was getting the following output:
~ # restorecon -FR /data/media/0/
restorecon: invalid option -- F
Click to expand...
Click to collapse
The fix appears to work without the "F" flag. Do you know why this is not a valid flag?
According to a general rundown of restorecon, the "F" flag does the following:
-F
Force reset of context to match file_context for customizable files, and the default file context, changing the user, role, range portion as well as the type.
Click to expand...
Click to collapse
RVDigital said:
Hey thanks for this post. I've been through this issue like 3 times and keep forgetting about restorecon.
On that note, I was getting the following output:
The fix appears to work without the "F" flag. Do you know why this is not a valid flag?
According to a general rundown of restorecon, the "F" flag does the following:
Click to expand...
Click to collapse
Not sure but glancing at the Dev preview thread, some had success with this:
restorecon -r /data/media/0/*
Tried both, all that happened is that /sdcard is now blank. /data/media/0 still lists all of the files, but /sdcard itself is empty or unlinked or something. I unfortunately don't know which of the two steps did it.
Quick question, I'm currently on slimkat and plan on clean flashing tonight via bigxies ROM. With this method of fixing the SD card, I won't lose all my data as far as downloads, pictures, etc.?
rootSU said:
Please explain your issue.
Click to expand...
Click to collapse
Essentially, the phone doesn't think it has an SD card. When i click on SD card in root browser, it is empty. Items that were on the SD card in 4.4.4 are now located in data/media/0/0 , and I am unable to move these items to SD. Also, if I try to dowload sonething off the internet, I get a "no SD card" message.
I can confirm that my issues were caused by importing my backed up /SDCard/ data via an "adb push" while in recovery.
If doing the same while the phone is booted into system, permissions are set appropriately and no further action is required.
Thanks again for this post!
Hi,
I have a Nook HD+ which i run with CM13 (cm_ovation-ota-MOB30D.160422) and I've run now into a bizarre problem:
Last week, suddenly the nook started over night to get into an infinite reboot cycle where it goes throught nook start up screen, then cyanogemod universal boot loader screen followed by the pulsing cyanogemod logo. Sometimes it gets to the login screen, sometimes it reboots before but never did i manage to log in.
Trying to restore now older nandroid backups and/or flashing different ROMs and they all fail as they cannot properly update /system (restore fails as it fills up the filesystem even though i haven't resized /system and it definitely was not full at the time of backup; flashing ROM fails as it complains that after update /system did contain unexpected content.
Starting to tinkering with adb shell, i notice that any changes, e.g., adding or removing files, i do on the internal storage (be it /data or /system) seems to be reflected by ls in the same mount cycle but as soon as i umount and remount the device the state is restored to the old state! Similarly, any mkfs.* run without error on the various /dev/block/mmcblk0p* but nothing really changed if i remount the same device after that (i.e., content is not wiped and filesystem type is still what it was before). [the same happens if i try the various wipes/factory reset options in the recovery. No error but no effect].
Note this all happened regardless of recovery (CWM 6.0.4.6 / TWRP 2.8.7.5; the former via external sdcard, the latter internal to the nook). Also strangely, as i boot "normally" (and end up in the boot cycle) i can't run adb logcat as the device is listed as 'unauthorized'. Also for some operations with CWM it warns me at the end that ''root access possibly lost' and asks me whether i want to fix /system/xbin/su) [but either option i choose doesn't change the noticeable behaviour]. Lastly, the whole boot cycles and actions in recovery are very sluggish.
This almost sounds like there is a rootkit on the nook which masquerades the changes but ignores them to stay in control. However, googling i didn't immediately found any hits referring to such a rather sophisticated rootkit.
Did anybody ever see such a behaviour and/or have an idea what's happening? Any thoughts to reset the whole device?
-michael-
PS: Strike-out above part about unauthorized device for logcat: i was trying to do logcat from a device which apparently i've never used before for the nook; doing it on another one which i've previously used allowed for logcat to work but the log itself didn't really give any insights and the adb logcat died a few seconds before the nook rebooted, so i don't have any of these criticial parts of the log ...
Certain models of the HD+ have been known to develop a read only internal memory. It acts like it is being written to but it does not actually happen. When that happens it is not repairable.
Sent from my SM-T707V using XDA Premium HD app
leapinlar said:
Certain models of the HD+ have been known to develop a read only internal memory. It acts like it is being written to but it does not actually happen. When that happens it is not repairable.
Click to expand...
Click to collapse
Hi Leapinlar,
thanks for your feedback: Rather surprising (& unfortunate) behaviour but still better than a rootkit
I guess so my option are only to install/boot CM from an sdcard (or getting a new device)?
-michael-
BTW: to run CM from sdcard i guess i need a no-emmc ROM (even though my emmc still works read-only and i can boot recovery from it)? If so, the latest one i found is https://iamafanof.wordpress.com/201...-4-4-4-for-bricked-no-emmc-nook-hd-04nov2014/ which is rather dated. Is there anywhere a new one or some pointers one what all has to be changed to make a emmc ROM turn into a no-emmc ROM so i could try changing a ROM myself? Thanks!
Hello guys,
I hope someone can help me with this problem...
So the thing is - yesterday I finally got OneUI 3 and Android 11 update (yay?). But ofcourse as soon as the phone rebooted and optimised all the apps and came back to main screen it rebooted after a minute or so...everytime. As soon as I enter my pin and unlock the phone it reboots after a short period.
The same problem happened when I de-bloated the phone a while ago via ADB - but I then enabled back all the apps except facebook and some "safe to debloat apps" which were not even system apps and it has since worked for almost a year. But here we go again....
I even "re enabled/installed" all the apps I could list in ADB ( so basically all the apps on the phone) and then went to wipe cache - but still no go.
I am also wondering if there is a posibility to somehow mount storage just to copy some files to my computer (which are important, and my latest backup is around a month old) and then I'll gladly do a a factory reset - no problem.
Any help would be appreciated, thanks!
If you're able to use ADB to enable/install apps, then you should be able to use "adb pull path/to/files" to copy the files to your computer. You could reboot into recovery mode and see if your computer pulls up the storage that way too. Also, if you have TWRP, you can use the file system to copy files to an external SD card. So you have a few options to get your files.
You can also create a back-up of specific apps (and their data) using "adb backup -f MyBackUpName.ab com.corp.AppName".
TacoDeMuerte said:
If you're able to use ADB to enable/install apps, then you should be able to use "adb pull path/to/files" to copy the files to your computer. You could reboot into recovery mode and see if your computer pulls up the storage that way too. Also, if you have TWRP, you can use the file system to copy files to an external SD card. So you have a few options to get your files.
You can also create a back-up of specific apps (and their data) using "adb backup -f MyBackUpName.ab com.corp.AppName".
Click to expand...
Click to collapse
Hello, thanks for the reply and helping out.
But all the commands and stuff is kinda useless because the phone reboots sooner than in 30 seconds after getting to the main screen. When I boot to recovery the storage doesn't get mounted.......
And I would've had TWRP but the phone is still under warranty so that's a shame, because on my backup phone I have it (and so did on all the previous ones) and it would be great. But IIRC if I install TWRP now, the phone needs to be wiped.
FFS samsung, what is this....because I now read a couple threads and posts on social media people having exactly same problem, and some didn't do anything with ADB prior to update. shame...
Hi,
I am in a bit of trouble I have a Motorola Edge 20 (2022) and I was playing with De-Bloater under Magisk. It worked really fine until I pushed the limit of how many Motorola apps i can remove. The last one was the wrong one, I think it was Motorola settings storage (provider) or so. Now the phone won't boot anymore and I was stupid enough not to back up the photos I made in the last three days.
I don't have TWRP on the phone (it's not available yet), so the Android recovery has to do. I saw that I can mount /system, but I don't know how to modify or even read it after mounting it. The internet is full of instructions of how to mount it and always mentions that you can then modify anything on it, but nowhere does it explain exactly HOW to do that
adb shell/push/pull just says "unable to... : closed"
The second option seems to adb sideload some zip. But what zip would I have to flash to disable the De-Bloater without factory resetting everything?
thanks
whoohoo! I jst discovered Safe Mode. Immediate problem thereby solved However, I am still interested in the first part of my question: how to use the mounted /system in Recovery Mode?
michael-brade said:
whoohoo! I jst discovered Safe Mode. Immediate problem thereby solved However, I am still interested in the first part of my question: how to use the mounted /system in Recovery Mode?
Click to expand...
Click to collapse
with stock recovery, youre unlikely to win as /data is decrypted (usually) and /system is largely unmountable and writeable (at least easily)
the usual prescription if you cant get into safe mode is:
Code:
adb wait-for-device shell magisk --remove-modules
from the bible (read on for TWRP ways which are 100% easier):
Magisk - Installation and troubleshooting:Magisk and MagiskHide Installation and Troubleshooting guide
didgeridoohan.com
which obviously removes all modules, even us experienced folks fond ourselves using the magical key combo to get into safe mode on occasion because we flew too close to the sun doping something in magisk
ironically debloating wasnt one of those times for me, i gave a log of what i debloated to the author of one debloater modules recently when he released a new version of his module and he was like "and it still boots?"...the list of debloated packages was at 135, and i could remove even more...
Thanks, good to know. But even adb wasn't able to connect anymore, Android got stuck even earlier.
However, I don't really mind if /system is read-only, I am more interested in how to (even theoretically) use the stock recovery. There is no manual and nobody said anything so far. So once you clicked "mount /system", what to do?
Lenovo (owner of Moto) has a online 'rescue' site that u can go to with your phone connected to the PC and it'll flash your Moto back to stock...prolly won't retain ur data, but it saved my a$$ a few times with my old twrp-less A/B slotted Moto G7. Can't recall the exact url but am sure u can dig it up with google.
Zaxx32 said:
Lenovo (owner of Moto) has a online 'rescue' site that u can go to with your phone connected to the PC and it'll flash your Moto back to stock...prolly won't retain ur data, but it saved my a$$ a few times with my old twrp-less A/B slotted Moto G7. Can't recall the exact url but am sure u can dig it up with google.
Click to expand...
Click to collapse
Hmm... but I can already do that without their help using fastboot. No need for the Android recovery.
Isn't it strange that there is a function we don't know how to use or how it works?