I am pretty sure my factory.zip is corrupt or nonexistant from my mmcblk0p3. How do i move the factory.zip file over there from this thread http://forum.xda-developers.com/showthread.php?t=919353
Thanks
I just did this last night. First I booted into clockwork recovery and hooked up the nook to my computer and started up adb. I tried doing this when it was booted normally but I could not mount mmcblk0p3. Anyways once you are in recovery mode go to where adb is installed. Then these were the commands I did
Code:
adb shell mount /dev/block/mmcblk0p3 /emmc
adb pull /emmc/factory.zip factory-1.0.0.zip
adb push factory.zip /emmc/
The second line is me backing up my old 1.0.0 factory zip, just in case things went bad. Then I did the 8 failed boot reset and then reset /data
Thank You! I had something like that except i was missing emmc in the first line and i couldn't figure out why i couldnt mount mmcblk0p3. I want to make a how to once i reach 10 posts on this.
Hate to bring back an old thread, but, no matter how I have tried, I cannot mount /dev/block/mmcblk0p3... I always get invalid argument error... any help is appreciated.
>adb shell mount /dev/block/mmcblk0p3 /emmc
mount: mounting /dev/block/mmcblk0p3 on /emmc failed: Invalid argument
I have yet to be able to mount mmcblk0p3 to copy factory.zip to it.... hoping this would fix my install failed error on the 8 failed boot install.
NM.... fixed it... had to mke2fs /dev/block/mmcblk0p3 before I could mount it... got it fixed... the 8 failed boots works as it should again.
Related
Hi,
My G1 fell on the floor just an hour ago, and now it's stuck on G1 screen and adb logcat shows /data can't be mounted.
Through shell i've tried to mount it manually and get this :
mounting /dev/block/mtdblock5 on /data failed: Not a directory
Anyone knows how to fix this ?
OK, solved it by flashing my nandroid data.img through fastboot.
Hi i moved some files from system/app into the sd card to get some space so i could use the metamorph app but i didnt work so i was going to move back the files from the sd card to system/app but now they wont move there anyone know a soloution how to do this?
thanks in advance
system is readonly
you must do an
adb shell
mount /dev/block/mtdblock3 /system
then you can fool around with your system apps
mount /dev/block/mtdblock3 /system || I wrote that but it says
"mount: mounting /dev/block/mtdblock3 on /system failed: Device or resource busy"
i rooted my phone yesterday quite knew to android and i have no clue what to do
You are doing that in recovery mode right?
I tried in ClockworkMod Recovery v2.5.0.1 but it says Device or resource busy :/ have no clue.
ClockworkMod has a nice green menu on screen from where you can see (partitions menu) which partitions are already mounter and which are not.
You can also do adb shell and run "mount" in it to see which partitions are mounted and in what way. ClockworkMod has /etc/fstab so you can mount system just by running "mount /system". If system is already mounted, you can cd to /system/app and try "touch test". If you get permission denied then your system is mounted read-only otherwise you will see test file in /system/app if you run "ls".
I did adb shell and did run "mount" and it says /dev/block/mtdblock3/ on /system type yaffs2 <ro>
I downloaded a app called root explore and the main reason for that was so i could move some files from system/app so i could get some free space so i could use metamorph that was my plan and i moved some files i have eard you could move that wouldnt harm anything but it wasnt enough free space, so my plan was to move back the files i had moved into the sd card some went great but i have like 4 files that i cant bks it says "You cannot paste here because the file system is read-only" is there any other way to push those file into the system/app again? have tried the things u wrote up.
And im not a very pro of theese things i started with this yesterday so excuse me for being stupid!
This:
/dev/block/mtdblock3/ on /system type yaffs2 <ro>
...means that system is mounted read-only (mind that "ro" at the end).
Try running "mount -o remount,rw /system". If it doesn't help run "cat /etc/fstab" and post here the output. You need to be in recovery mode while doing this of course!
did "mount -o remount,rw /system" and it said mount: can't find /system in /proc/mounts
and the other one said
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/mtdblock5 /data yaffs2rw
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
/dev/block/mmcblk0p2 /sd-ext auto rw
used my brain a little now and in the recovery settings i did mount the /system in the menu and now i tried to write cd /system/app and now in the cmd it is like this "/system/app #" anything useful?
Sure... as I already told you try to run "touch /system/app/test". This command shoud make empty test file in /system/app. If you get permission denied then you have read-only system. If it suceede, then your /system is writable and you can see all the contents of /system/app by runing "ls".
I wrote that and it wrote the same
"touch /system/app/test"
no permmission denied then it may have worked?
i checked and there is a testfile in /system/app now
I think i got it to work now thanks man for all your help!
I get this error in CWR (3.2.0.1), I have a nook with a blue sticker:
Code:
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/command
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/command
Nothing, and I mean Nothing I have found in this forum solved this error, including the repartition-boot-stock+factory rest.
Any help guys? I am desperate!
adb is working but shell is not
This is what I got, anyone has an idea how to recover from this?
Code:
C:\Users\Barak>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
reifba said:
This is what I got, anyone has an idea how to recover from this?
Code:
C:\Users\Barak>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
Click to expand...
Click to collapse
Nothing, and I mean Nothing I have found in this forum solved this error, including the repartition-boot-stock+factory rest.
Click to expand...
Click to collapse
If you repartitioned, that may be the reason the adb command is not working....
patruns said:
If you repartitioned, that may be the reason the adb command is not working....
Click to expand...
Click to collapse
So I have 2 two problems in which the solution to one causes the other...
In the mean time I manged to run both the Froyo and HoneyComb from the sd card, but not the CM7 (which is the one I am trying to install on the internal memory)
using ADB to restore
I tried to use the methods described in:
:http://forum.xda-developers.com/showthread.php?t=919353
However it is not clear where should the factory.zip go?
for some reason it also says that the /dev partition is only 244MB so I cannot flash the system.img, it is probably the partition in the SD card and not the memory, so not much advancement here either. I also think that because it gives me 11223344556677 as the S/N and not the real one.
The quest to restore the nook continues...
Is there a way to manually repartition through ADB?
or anything? cause nothing solves the first error posted in this thread
reifba said:
I tried to use the methods described in:
:http://forum.xda-developers.com/showthread.php?t=919353
However it is not clear where should the factory.zip go?
for some reason it also says that the /dev partition is only 244MB so I cannot flash the system.img, it is probably the partition in the SD card and not the memory, so not much advancement here either. I also think that because it gives me 11223344556677 as the S/N and not the real one.
The quest to restore the nook continues...
Click to expand...
Click to collapse
factory.zip and rombackup.zip should be located on /dev/block/mmcblk0p3
system should be written to /dev/block/mmcblk0p5
1123344556677 is normal for the device listing when adb'ing in when running CWM on the uSD
to write the img files you need to use:
dd if=(IMG FILE ON SD) of=(PARTITION ON /dev... i.e. /dev/block/mmcblk0p1)
to help you out...here's a list of what goes where:
mmcblk0p1-boot.img
mmcblk0p2-rom.img
mmcblk0p3-factory.img
mmcblk0p4-logical.img
mmcblk0p5-system.img
mmcblk0p6-data.img
mmcblk0p7-cache.img
mmcblk0p8-media.img
problem:
thanks for the reply, I am studying more about andriod and adb now than during all my bachelor's.
just
adb push factory.zip /dev/block/mmcblk0p3 ??
and
adb shell dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
(in some places I saw they didn't write "/block")
and where is rombackup.zip from?
the problem is that for some reason /dev/ is only 244MB so I can't dd system.img, only the boot.img.
I wish that somewhere in the world would exist something that solves it from CWR, just some zip I would install to fix boot+factory+system in one stroke...
reifba said:
thanks for the reply, I am studying more about andriod and adb now than during all my bachelor's.
just
adb push factory.zip /dev/block/mmcblk0p3 ??
and
adb shell dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
(in some places I saw they didn't write "/block")
and where is rombackup.zip from?
the problem is that for some reason /dev/ is only 244MB so I can't dd system.img, only the boot.img.
I wish that somewhere in the world would exist something that solves it from CWR, just some zip I would install to fix boot+factory+system in one stroke...
Click to expand...
Click to collapse
to get factory and rombackup zip files on mmcblk0p3...
adb shell mkdir /sdcard/tmp3
adb shell mount /dev/block/mmcblk0p3 /sdcard/tmp3
adb push factory.zip /sdcard/tmp3
adb push rombackup.zip /sdcard/tmp3
more problems (desperation is looming)
DizzyDen said:
adb shell mount /dev/block/mmcblk0p3 /sdcard/tmp3
Click to expand...
Click to collapse
when I type the above I get
Code:
[email protected]:/ # mount /dev/block/mmcblk0p3 /sdcard/tmp3
Usage: mount [-r] [-w] [-o options] [-t type] device directory
I had to do it in the shell in order to su.
reifba said:
when I type the above I get
Code:
[email protected]:/ # mount /dev/block/mmcblk0p3 /sdcard/tmp3
Usage: mount [-r] [-w] [-o options] [-t type] device directory
I had to do it in the shell in order to su.
Click to expand...
Click to collapse
then I would use
mount rw /dev/block/mmcblk0p3 /sdcard/tmp3
If that doesn't work:
mount rw -o remout /dev/bloc/mmcblk0p3 /sdcard/tmp3
but it would appear something else is amiss... since it even shows the command should have worked... since everything other than the command (mount) the device (/dev/block/mmcblk0p3) and directory (/sdcard/tmp3) are optional parameters
My device: HTC One M7 Android 4.2.2, S-ON, Root, CWM recovery (years old version)
My ultimate goal was: Get xposed framework. Install via app failed after rebooting due to S-ON, so I wanted to install through recovery. (this is irrelevant to the issue IMO)
What I tried to get there: Decrypting my /data partition in adb (because CWM doesn't support it)
What I found: https : // forumDOTfairphoneDOTcom/t/how-to-mount-encrypted-data-in-recovery/25724
Everything(!) I actually did: (commands after $ means executed on host machine (ubuntu), prefixed by ~ # means run on phone in adb shell)
$ adb shell
~ # setprop ro.crypto.state encrypted
~ # vdc cryptfs checkpw "<wrong password>"
200 0 1
~ # mount /dev/block/dm-0 /data
mount: mounting /dev/block/dm-0 on /data failed: no such file or directory
(( a couple commands like ls and cat to find out what my /data partition should be ))
(( ended up finding out in fstab that it's mmcblk0p37 ))
~ # mount /dev/block/mmcblk0p27 ((accidentally wrong one))
mount: mounting /dev/block/mmcblk0p27 on /data failed: Invalid argument
~ # mount /dev/block/mmcblk0p37
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
(( notice i entered wrong password ))
~ # vdc cryptfs checkpw "<right password>"
200 0 2
~ # mount /dev/block/mmcblk0p37
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
(( a couple more tried of the previous two commands for no legit reason ))
~ # mount -o rw,remount /dev/block/mmcblk0p37
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
(( exit adb shell ))
(( execute $ adb remount )) (( as google suggested (on host machine, not in adb shell obv) ))
$ adb shell
~ # mount -t ext2 /dev/block/mmcblk0p37 (( accidentally wrong fstype ))
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
~ # mount -t ext4 /dev/block/mmcblk0p37
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
~ # mount -t ext4 /dev/block/mmcblk0p27 (( why not? ))
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
~ # exit (( i got frustrated ))
Before I did all this the phone was working normally (after install xposed via app (which gave me xposed version 3x because I had that one previously installed via receovery. But I wanted the newest (5x) so I went all that way)). After I did all these steps - which to me are readonly things which shouldn't brick anything - I got frustrated and wanted to give up, so I rebooted. Now everytime I enter the - 100% correct - password, it tells me to "try again" (guessing it means wrong password? idk).
The whole xposed stuff is irrelevant in my opinion, because after I've installed it using the xposed installer (APK) I rebooted twice and decryption worked fine both times.
What the hell have I done (I'd say I'm a linux expert and I honestly don't see how I could've possible broken anything by what I did) and how can I fix it?
UPDATE: I got myself the cryptheader from the "extra" partition using the read_emmc vulnerability. That way I got the encrypted key and salt. (cryptheader)
I then used this and a modified bruteforce script to check if my right password is still right. Result: It doesn't seem so.
My password contained special characters and was 15 chars long, bruteforce is not an option.
Is there anyway what I did could've changed the password? If so, can I reproduce and get the new key somehow? The cryptheader is not corrupted and still intact. The /data partition (encrypted) is not corrupted and still intact. (I assume this because the encrypted partition's hexdump starts with "This is an encrypted partition", which is a HTC easter egg.)
htcuser311 said:
UPDATE: I got myself the cryptheader from the "extra" partition using the read_emmc vulnerability. That way I got the encrypted key and salt. (cryptheader)
I then used this and a modified bruteforce script to check if my right password is still right. Result: It doesn't seem so.
My password contained special characters and was 15 chars long, bruteforce is not an option.
Is there anyway what I did could've changed the password? If so, can I reproduce and get the new key somehow? The cryptheader is not corrupted and still intact. The /data partition (encrypted) is not corrupted and still intact. (I assume this because the encrypted partition's hexdump starts with "This is an encrypted partition", which is a HTC easter egg.)
Click to expand...
Click to collapse
I'm far from being a linux expert but the simplest would be to factory reset using htc's recovery to remove /data encryption and start from scratch (unless you have some really important data that must be saved from your /data partition)
alray said:
I'm far from being a linux expert but the simplest would be to factory reset using htc's recovery to remove /data encryption and start from scratch (unless you have some really important data that must be saved from your /data partition)
Click to expand...
Click to collapse
I have decided to give up on trying and did a "factory reset" (formatted /data and /data/sdcard through CWM, rebooted, set up device for first use, formatted /data again through CWM to result in clean system).
Fun-fact: Before I did what bricked the system I actually made a backup. The device (µSD-Card) decided to go corrupted filesystem though. I managed to recover most of the files but the /system partition backup (which might have saved me) remained corrupted. I was able to restore all my personal data though, so doing a factory reset wasn't that bad for me.
Hi:
I've messed up my Note 9 pretty bad, such that no partitions mount in TWRP except cache - I'll need to do a data wipe, but I need to save data that I have in the Internal SD.
I've discovered via fdisk in TWRP that the media part - the Internal SD is partition sda25 - however can
t mount it in the terminal through a simple: mount /dev/block/sda25 /mnt
I get an error: mount failed: Invalid argument
I've tried: mount -t sdcardfs /dev/block/sda25 /mnt
This gives me also an error: mount failed: Not a directory
Mounting with -t vfat or exfat gives the Invalid argument error.
Anyone can help me with how to mount it, so that I may copy data off of it manually? I don't want to lose it. Many thanks.
白い熊 said:
Hi:
I've messed up my Note 9 pretty bad, such that no partitions mount in TWRP except cache - I'll need to do a data wipe, but I need to save data that I have in the Internal SD.
I've discovered via fdisk in TWRP that the media part - the Internal SD is partition sda25 - however can
t mount it in the terminal through a simple: mount /dev/block/sda25 /mnt
I get an error: mount failed: Invalid argument
I've tried: mount -t sdcardfs /dev/block/sda25 /mnt
This gives me also an error: mount failed: Not a directory
Mounting with -t vfat or exfat gives the Invalid argument error.
Anyone can help me with how to mount it, so that I may copy data off of it manually? I don't want to lose it. Many thanks.
Click to expand...
Click to collapse
cant you simply wipe the affected partitions(except data of course)? then flash a rom?
have you tried;
mount /sys/block/sda25 /mydata
or
mount /dev/block/sda25 /mydata
or
adb
mount -o rw /dev/block/sda25/data /mydata
in both cases /mydata is just the mount point so I believe it can simply be called what ever you want including just /data
have you read:
https://android.stackexchange.com/q...data-partitions-in-recovery-mode-in-adb-shell
edit:
by any chance when you first flashed twrp, did you forget to format data?
if yes then flash back stock AP file(original phone's firmware) in Odin AP slot only and you should be good to go.( you shouldn't loose any files in internal storage)