Mount sdcard from recovery - Samsung Galaxy Nexus

Hi,
on my Galaxy Nexus don't works the mount /sdcard from recovery by ADB.
adb shell
~ # mount /sdcard/
mount: can't find /sdcard/ in /etc/fstab
~ #
if type mount, the result below:
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache on /cache type ext4 (rw,nodev,noatime,nodiratime,barrier=1,data=ordered)
Help me thanks

Wrong subforum. This should be in Q&A section.
ge-Nexus-t mit Tapatalk

You can't mount the SD because it's not UMS.
You can push and pull files in recovery with ADB though.

El Daddy said:
You can't mount the SD because it's not UMS.
You can push and pull files in recovery with ADB though.
Click to expand...
Click to collapse
What's UMS?

pilot-calc22 said:
What's UMS?
Click to expand...
Click to collapse
USB Mass Storage.

How to do for flash recovery .IMG from adb ?
Can I with echo command etc. Etc.
How ?

pilot-calc22 said:
How to do for flash recovery .IMG from adb ?
Can I with echo command etc. Etc.
How ?
Click to expand...
Click to collapse
That's not something you do in recovery. You flash it with fastboot while booted into the bootloader.
The command would be fastboot flash recovery nameofrecovery.img

El Daddy said:
That's not something you do in recovery. You flash it with fastboot while booted into the bootloader.
The command would be fastboot flash recovery nameofrecovery.img
Click to expand...
Click to collapse
If in ADB type "flash_image recovery namerecovery.img "
I've this error: can't find recovery partition
Why ? Thanks

pilot-calc22 said:
If in ADB type "flash_image recovery namerecovery.img "
I've this error: can't find recovery partition
Why ? Thanks
Click to expand...
Click to collapse
You can't use that on the GNex. However, you can do it in an ADB shell with root access:
Assuming recovery.img is stored on /sdcard, the command would be:
dd if=/sdcard/recovery.img of=/dev/block/platform/omap/omap_hsmmc.0/by-name/recovery

Related

Can't mount /system as read-write

Hello folks,
on my HTC Desire with OpenDesire 3.5.2 I'm trying to install the dropbear ssh-deamon according to a german tutorial (I'm not allowed to put the link here... ).
It is on www and then android-hilfe.de and then, go /root-hacking-modding-fuer-motorola-milestone/14241-per-ssh-auf-den-milestone.html
I'm connected to the phone using adb and shell'd into.
Now, they say that I have to mount /system as read-write to put a file (dropbear) into /system/bin. The command is
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
and results in no errors. mount then says:
Code:
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
so in my opinion, /system shoult be writable.
But everything I try results in an "Out of memory" error: Creating directories, copying files - anything.
Only deleting files is possible: I backed-up and then deleted some ringtones from /system/media/audio/ringtones, and I'm also not able to copy the backup of them I did before onto the sdcard back into the directory again
I read in another thread, that the error "Out of memory" itself is a bug and should mean "No permission". But why don't I have permission?
df -h gives me
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 203.4M 0 203.4M 0% /dev
tmpfs 203.4M 0 203.4M 0% /mnt/asec
/dev/block/mtdblock3 250.0M 106.4M 143.6M 43% /system
/dev/block/mtdblock5 147.6M 53.9M 93.8M 36% /data
/dev/block/mtdblock4 40.0M 1.1M 38.9M 3% /cache
/dev/block/vold/179:1
3.7G 2.9G 744.3M 80% /mnt/sdcard
/dev/block/vold/179:1
3.7G 2.9G 744.3M 80% /mnt/secure/asec
so there definitively IS enough memory for a 720kB file.
Any ideas?
You can only write to system on the desire via adb from recovery.
If above post didn't explain it enough...
There is no write access to /system partition yet, except via a overlay file system. Have a search and you'll find, like everybody else.
thank you! Yes, that is the problem. I read this also somewhere, but didn't remember it.
I still cant write files even though im in recovery?
zoltrix said:
I still cant write files even though im in recovery?
Click to expand...
Click to collapse
Type "adb remount"
(Without "")
zHk3R said:
Type "adb remount"
(Without "")
Click to expand...
Click to collapse
Im trying to relfash my recovery and i keep getting the no space issue.
If i type in adb remount, i can no longer mount my sd card that is holding my image..
http://forum.xda-developers.com/showthread.php?t=805141
EDIT: If i figure out how to s-off my phone, will that fix it?
zoltrix said:
Im trying to relfash my recovery and i keep getting the no space issue.
If i type in adb remount, i can no longer mount my sd card that is holding my image..
http://forum.xda-developers.com/showthread.php?t=805141
EDIT: If i figure out how to s-off my phone, will that fix it?
Click to expand...
Click to collapse
Just follow the thread in Desire Android Development and you'll have S-OFF easy.
PRO TIP: Use a flash drive rather than burning the .iso on a CD.
Yea but, will i need s-off to flash this recovery?
I know s-off lets you do stuff within fastboot, but im not too sure what taht really means
zoltrix said:
Yea but, will i need s-off to flash this recovery?
I know s-off lets you do stuff within fastboot, but im not too sure what taht really means
Click to expand...
Click to collapse
nevermind, ive done my research and s-off fixed my problem!
details
could you please describe in a little bit more details how you have managed to write the /system mount point ?
thanks in advance ...
btw, there are o bunch of guys that want this answer
What? and Why?
I too would like to know more about writing to /system.
adb remount appears to switch the mount point from "ro" to "rw" (as shown with mount command) but I still get the same "Read-only file system" response when I try to adb push files.
What exactly is the issue here? Is it related to S-ON / S-OFF ?
What do I have to do to be able to write to /system?
(other than reboot into recovery; when I copy files in Recovery, they are gone after a normal reboot)
Thanks

[Fixed] Editing /system/customize

Hi!
I can't edit or push anything in/to /system/customize.
I want to push widget.txt (Power Controls) in there but it won't work.
I tried Root Explorer as well as adb.
When I edit the existing file and save it the file just disappears.
When I overwrite the preexisting file, the preexisting is being deleted but the other file never appears.
I also can't create a file or a folder.
Anybody knows what the problem is?
My Desire is running with Leedroid 2.4 btw. And yes I mount it and Root Explorer has su rights.
Sent from my HTC Desire using Tapatalk
You need to be s-off to be able to write to the system partition while booted. If you don't know if you are s-off then you aren't. Best is to use adb while in recovery.
Sent from my HTC Desire using XDA Premium App
I know that I'm not s-off. I didn't know that you need to be s-off to be able to write to /system/.
I didn't say so anywhere, everywhere you ask for help, it just says "push the file via Root Explorer, that easy".
Must have been punk'd.
I tried with adb, didn't seem to work.
Guess I made something wrong.
I'll try again.
Edit:
"adb remount" gives me the following error:
"remount failed: Unknown error: 0"
Don't know that means, adb devices says that my device is connected.
Any thoughts?
adb devices:
D:\Documents and Settings\Administrator>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT03ZPL12245 recovery
D:\Documents and Settings\Administrator>adb shell mount
rootfs on / type rootfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nodev,noatime,nodiratime)
Solution for "remount failed: Unknown error: 0":
Mount in the recovery menu.
Thxbb

[Q] What if formatting with mkfs.vfat does not complete?

As already noted here http://forum.xda-developers.com/showthread.php?p=35801278#post35801278
my KF's SD card seems to be "corrupt". When booting into recovery all I see is the TWRP boot/background screen (no menus etc). I can launch adb shell.
"df" does not complete:
#df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 228596 32 228564 0% /dev
but nothing more...
"mount" completes and shows (all?) mount points:
#mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p12 on /sdcard type vfat (rw,nodev,noatime,nodiratime,fmask=0000,dmask=0000 ,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Then I tried formatting the the SD card:
#busybox1 mkfs.vfat /dev/block/mmcblk0p12
but this does not complete neither.
What else can/should I try?
I also played around with with SoupKit. To no avail.
Thx
Clemens
If this is a first gen. kindle http://forum.xda-developers.com/showthread.php?t=1949372 and http://forum.xda-developers.com/showthread.php?t=1850038 may be useful.
# umount /sdcard
umount: can't umount /sdcard: Device or resource busy
who could be using the mount point?
Side note (as mentioned in the other thread):
Switching into fastboot moe
# idme bootmode 4002
fails too... the command does not complete
Check to see if you have bad blocks on your sdcard:
Code:
adb shell
dd if =/dev/block/mmcblk0p12 of=/dev/null
It should return your ins, outs and partition size. If it freezes or doesn't do anything for more than 10 minutes, you probably have bad blocks.
And you should probably check the data and cache partitions as well.
If you run into bad blocks (the dreaded EMMC bug), you'll have to use the partition workaround found somewhere in this thread.
"That's a special kind of stupid. The kind that makes me laugh."
First of all thanks for all your help and of course: Merry Christmas!
soupmagnet said:
If it freezes or doesn't do anything for more than 10 minutes, you probably have bad blocks.
Click to expand...
Click to collapse
thats what it does ...rather...
soupmagnet said:
And you should probably check the data and cache partitions as well.
Click to expand...
Click to collapse
How? I recreated them using SoupKit several time...
soupmagnet said:
partition workaround
Click to expand...
Click to collapse
are you talking about this here? http://forum.xda-developers.com/showthread.php?t=1388996
Usually, if the sdcard is affected by the EMMC bug, so too will the data and cache partitions be affected (possibly even system). As a matter of fact, based on your description, it probably wouldn't hurt to check the recovery partition as well
Check them the same as with the sdcard:
Code:
dd if=/dev/block/mmcblk0p5 of=/dev/null <recovery>
dd if=/dev/block/mmcblk0p9 of=/dev/null <system>
dd if=/dev/block/mmcblk0p10 of=/dev/null <data>
dd if=/dev/block/mmcblk0p11 of=/dev/null <cache>
"That's a special kind of stupid. The kind that makes me laugh."
soupmagnet said:
Code:
dd if=/dev/block/mmcblk0p5 of=/dev/null <recovery>
dd if=/dev/block/mmcblk0p9 of=/dev/null <system>
dd if=/dev/block/mmcblk0p10 of=/dev/null <data>
dd if=/dev/block/mmcblk0p11 of=/dev/null <cache>
Click to expand...
Click to collapse
as expected, none of the dd's comes to an end ...
If only I could unmount the sdcard ...
I guess it's recovery "sitting" on it?
#ps
...
1291 root 19544 R /sbin/recovery
1292 root 3416 S /sbin/adbd recovery
...
How can I proceed? Having no fastboot, not being able to use parted...

ADB Help

Hello there,
does anyone know how to mount the galaxy s4 as writeable via adb?
mount -o rw,remount -t yaffs2 /dev/block/mmcblk0p9 /system
is the Red Coloured the right Path?
Antalor said:
Hello there,
does anyone know how to mount the galaxy s4 as writeable via adb?
mount -o rw,remount -t yaffs2 /dev/block/mmcblk0p9 /system
is the Red Coloured the right Path?
Click to expand...
Click to collapse
omg no no no no.
if you are talking about trying to use "adb push <name of file> <destination file>"
Then you must use "adb remount" if it fails, you are not on an insecure kernel. Thus your only option is to push to the sdcard then use "adb shell" and navigate to your sd card and use "cp <name of file on sdcard> <destination file location>"
as for the commands, it is NOT what you have posted. it is simply
mount -o rw,remount /system
nothing else is needed. You will seriously mess something up if you try mounting it as yaffs2 considering we use ext4 now. FYI, the above command can only be entered AFTER first entering "adb shell" which gives you a command line on the device to execute commands.
Sent from my ASUS Transformer Pad TF300T using Tapatalk 2
No, i want uninstall apk's/apps via adb and theerfore i have to mount it as writeable, and, also i want to:
pm list packages -f > file.txt and got error read only system...
What exactly is yaffs2?
Sent from my GT-I9505 using xda app-developers app
Antalor said:
No, i want uninstall apk's/apps via adb and theerfore i have to mount it as writeable, and, also i want to:
pm list packages -f > file.txt and got error read only system...
What exactly is yaffs2?
Sent from my GT-I9505 using xda app-developers app
Click to expand...
Click to collapse
Then you need to use
adb shell mount -o rw,remount /system
thats it. To uninstall apks, use:
adb uninstall <package name>
And you are getting a read only system error because you are trying to create that "file.txt" file onto your "root" directory.
do this:
adb shell cd /data/media/0
then try to do your list packages.

KF2 Soft brick - /data and /sdcard read-only

My mom has a Kindle 2nd Generation running 10.5.1 stock.
The other day, it started rebooting, but not in the traditional bootloop sense. The OS would load to the lock screen, you could swipe and use it (albeit sluggishly) for approximately 30 seconds before it rebooted again. So, it made it impossible to access the device via ADB.
I made a factory cable, accessed fastboot, and did the following:
fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
fastboot -i 0x1949 flash recovery otter2-twrp-2.6.3.1-recovery.img
fastboot -i 0x1949 flash boot otter2-freedom-boot-10.4.6.img
(if using a fastboot USB cable, swap to a normal USB cable before entering the next command)
fastboot -i 0x1949 oem recovery
Click to expand...
Click to collapse
This worked fine. I was able to get into recovery mode with TWRP and access ADB. I pulled all the data off the /sdcard partition. This was a big concern since my mom has been using this thing for a couple years now and she's collected quite a bit. Originally, my directive was to factory reset and reflash the stock firmware from Amazon: update-kindle-10.5.1_user_5174820.bin. It would be nice if they supplied a checksum, but they don't apparently.
Anyway, the more I thought about it, I thought I could clear some caches, uninstall some apks and that would resolve the issue without a new system image. Then I started to notice the problem:
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 336.6M 136.0K 336.5M 0% /dev
/dev/block/mmcblk0p13
5.6G 4.8G 755.9M 87% /data
/dev/block/mmcblk0p13
5.6G 4.8G 755.9M 87% /sdcard
/dev/block/mmcblk0p12
639.8M 11.0M 628.8M 2% /cache
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/dev/block/mmcblk0p13 on /data type ext4 (ro,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p13 on /sdcard type ext4 (ro,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p12 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
~ #
Click to expand...
Click to collapse
Both /data and /sdcard are read-only. They also use the same block device. Maybe that's normal? I've already tried remounting the partitions read-write to no avail.
mount -o rw,remount /sdcard
mount -o rw,remount /data
Click to expand...
Click to collapse
Both commands execute as if they were accepted successfully (ala no output). However, rechecking mount's output, shows no change. It's still read-only.
I've tried sideloading in TWRP, but that resulted in a protocol fault. Also through TWRP, the factory reset succeeds, but actually does nothing. All of the data is still there. My other idea is to push the image onto the /cache partition (there's just enough room), and try to install that way, but I have a feeling that 1) won't work and 2) may exacerbate problems.
I'm stuck. Anyone have any ideas?
Solved
I was able to free the partitions.
fastboot -i 0x1949 erase userdata
Click to expand...
Click to collapse
It must have been some sort of corruption in userspace. I had previously tried a wipe through TWRP which was claimed to be successful. I still can't determine if TWRP doesn't check all their syscalls and handle the return codes or the Linux subsystem in Android is the root of the bugs. Either way, upon reboot, the device returned to factory "out of box" state.

Categories

Resources