[Q] Mount /system from adb recovery? - Vibrant Q&A, Help & Troubleshooting

I've searched all over google and these forums and found lots instructions for different phones that don't seem to work for the vibrant.
I've been trying to modify some of the icons and such in the framework-res.apk. I'm trying to boot into recovery, mount the /system partition and push the modified file back.
Can anyone provide me with the adb command to mount the /system partition on the vibrant or a link to a thread that has the information.
Thanks...

you can't do it in stock recovery, you must be in clockworkmod recovery. IF you're in clockworkmod recovery, got the the mounts section and there you can mount /system, /data/, /sdcard and a few others with a graphical interface.
But incase you want it for some future reference:
Code:
su
mount -o rw,remount /dev/block/stl9 /system
and for this to work, su must be granted root permission (which it can't from stock recovery)

geoffcorey said:
you can't do it in stock recovery, you must be in clockworkmod recovery. IF you're in clockworkmod recovery, got the the mounts section and there you can mount /system, /data/, /sdcard and a few others with a graphical interface.
But incase you want it for some future reference:
Code:
su
mount -o rw,remount /dev/block/stl9 /system
and for this to work, su must be granted root permission (which it can't from stock recovery)
Click to expand...
Click to collapse
Thanks for the response. When I go into clockwork recovery I can't connect via adb? When I adb devices it doesn't list anything. When I'm in the stock recovery it lists my device.
Am I missing a step?
Thanks in advance for the help.

Related

how to mount internal storage through ADB?

Hi guys
my screen cracked today and I can't see anything, but I want to access the internal storage, can I do it through ADB command? how?
thanks
no one?
Sent from my Optimus 2X using Tapatalk
You need to be able to get the mobile into CWM recovery so adb will work. From the PC:
Code:
adb devices <- Your mobile should appear when this runs
adb shell
# mount /system
# mount /data
# mount /sdcard
Now you can copy the contents that you want with adb shell cp [source] [destination].
/sdcard is the internal memory of the phone
/sdcard/sd_external is the SD card attached to the phone (if any)
Hope this helps.
i have installed ABD and i have rebooted in recovery mode (CWM-based Recovery v5.0.2.3)
but when i type adb devices i got nothing
Any help ??
The phone has to be booted to use adb don't it with USB debugging ?
Sent from my GT-I9100 using xda premium
Hi,
I have a very similar problem, my screen is broken, though my phone still boots.
I have booted to the phone, ADB sees the device, and I can type ADB shell and get the # prompt.
I then type "mount /system" (without the quotation marks) but I get the following error message:
mount: can't read '/etc/fstab': No such file or directory
I am running Windows 7 64Bit. If anyone can advise me, that would be appreciated.
Thanks,
James
Hi, I have a smiliar need, my phone is stuck in some kind of bootmode where I cant access Android. I can however access it through adb, but when I run the mount /system command, i get:
Usage: mount -r -w -o options -t type device directory
same with /sdcard
there is no fstab file on the phone either.
How do I mount the internal storage? It's a OnePlus 3

Mounting the second partition of SDCARD as internal memory

Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
My device is i9003 and it's running on MIUI at the moment. By default MIUI didn't detect my external SD or my internal SD but after editing "vold.fstab" I was able to mount the first partition of my external SDCARD as external memory and everything was good, I could finally use the camera and pretty much do everything else.
But I was still unable to mount the second partition of my external SDCARD as my internal memory which meant none of my messages could be saved and the phone would pretty much go back to factory settings after a reboot, this apparently is because the /data partition (present on the internal memory) stores all the user data such as the time, the theme I'm using, etc and not having a /data partition meant none of these settings were really saved.
Having no internal memory also means I cannot install any apps such as Link2SD.
Moving on, after many hours of googling I found out that it might not be possible to mount the internal memory using "vold.fstab" and the only way to do it could be by mounting the memory manually during init.
So here's what I want again, I want to use the second partition of my external SDCARD as internal memory, this is likely to solve all my problems and make my phone usable again.
Thanks for all the help, appreciate it.
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
kuisma said:
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
Click to expand...
Click to collapse
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
EDIT: would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img? In case it's the latter, I'm going to need help doing it.
PhantomPhreek said:
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
Click to expand...
Click to collapse
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
kuisma said:
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
Click to expand...
Click to collapse
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
PhantomPhreek said:
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
Click to expand...
Click to collapse
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
kuisma said:
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
Click to expand...
Click to collapse
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
EDIT: Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?
PhantomPhreek said:
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
Click to expand...
Click to collapse
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
kuisma said:
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
Click to expand...
Click to collapse
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
PhantomPhreek said:
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
Click to expand...
Click to collapse
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
kuisma said:
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
Click to expand...
Click to collapse
haha, I used CWM to create the partitions initially, but then I used a software called MiniTool, works well. Can I get you to to do it?
PhantomPhreek said:
Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
Click to expand...
Click to collapse
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
kuisma said:
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
Click to expand...
Click to collapse
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
PhantomPhreek said:
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
Click to expand...
Click to collapse
FAT32.
kuisma said:
FAT32.
Click to expand...
Click to collapse
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
PhantomPhreek said:
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
Click to expand...
Click to collapse
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
kuisma said:
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
Click to expand...
Click to collapse
What bugs me is the fact that the external SD is not detected, from what little knowledge I have, external SD is unrelated to the internal SD which I currently have problems with, meaning it should be detected without a problem.
Also I have to add, CWM doesn't detect my external SD right away, when I go to recovery and go over to "Choose zip from sdcard" it says "E:Can't mount /sdcard/". The solution I've found coincidentally is to go to "mounts & storage", mount "/emmc", pull the SDCARD out plug it in again and then "mount /sdcard" this works perfectly and I'm able to flash roms from the sdcard.
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
kuisma said:
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
Click to expand...
Click to collapse
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
PhantomPhreek said:
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
Click to expand...
Click to collapse
The files you mailed me does not correspond to the ROM you refereed.
The /etc/fstab show that /data is mounted as an rfs file system, not ext4. So either format partition #3 on the sdcard as rfs (Samsung proprietary), or edit /etc/fstab and change "rfs" to "ext4". I'd prefer the later, assuming your kernel supports ext4. Else use ext3.
Code:
/dev/block/mmcblk0p3 /data rfs rw
But you can't have flashed the ROM you told me you did. It excepted an ext4 file system ...

CM10 - external_sd mount location

I jumped from stock to CM10 and have found an issue I need resolved, but am not sure how to go about it.
On stock, I didn't have
/sdcard/ is the path for the internal memory
/sdcard/external_sd/ is the path for the actual add-in slot you buy yourself.
This is great because the file explorer apps don't need special access to get to, and things are at least somewhat logical on how they're laid out.
On CM10:
/storage/sdcard0/ is internal memory
/storage/sdcard1/ is external memory
There are symbolic links of /sdcard and /external_sd but to access the latter, I need to tell apps like ES file explorer to change their base path rather than just having a nested mount structure.
I've tried using terminal emulator to go in and create a symbolic link, but I get 'operation not permitted' messages. I've also tried editing /etc/vold.fstab to have it change the mount from /storage/sdcard1 to /storage/sdcard0/external_sd, but the filesystem is read-only and 'mount -o remount,rw /' doesn't have an effect even though it doesn't complain.
How can I change the mount structure back to how I want it and how it's easier to access/navigate it in my apps?
Run into some situation, hopefully someone can shed some light
Did you mount this files as r/w?
Sent from my SAMSUNG-SGH-I717 using xda premium
johnrippa said:
Did you mount this files as r/w?
Sent from my SAMSUNG-SGH-I717 using xda premium
Click to expand...
Click to collapse
In my original post I mention trying to get it remounted as r/w, the command doesn't complain but the filesystem stays read-only.
Try busybox mount -o remount,rw /system
If that fails, use an app to do it.
ChronoReverse said:
Try busybox mount -o remount,rw /system
If that fails, use an app to do it.
Click to expand...
Click to collapse
Any particular apps to recommend? I had tried issuing the remount command on / and not /system. I will give that another try.
ChronoReverse said:
Try busybox mount -o remount,rw /system
If that fails, use an app to do it.
Click to expand...
Click to collapse
I was able to modify the mount point to be /storage/sdcard0/external_sd/ for the external SD slot, but when I rebooted CM it got stuck and would buzz every 10 seconds or so and stayed that way indefinitely. Not sure why this breaks CM so bad but there you have it. Oh well.
Might be a better idea to just add links so you get your old /sdcard/external_sd
I'm not currently on a CM10 ROM or else I'd test.
ChronoReverse said:
Might be a better idea to just add links so you get your old /sdcard/external_sd
I'm not currently on a CM10 ROM or else I'd test.
Click to expand...
Click to collapse
Symbolic links don't work on a FAT based filesystem (which the SD card mounts are), unfortunately.

HELP! Boot loop

So, I wanted to upgrade my rezound the 8-12 stuff. Log story short, I unlocked with HTCdev again and everything seems to have gone Ok, but obviously it didn't.
My phone will not boot. It just sits and spins on the cyanogenmod bootscreen.
Current specs:
S-OFF
JB HBOOT 2.25
Radios: 421/424r
I've tried re-flashing my rom, and kernel to no avail. Same problem as before.
HELP!
If you are s on did you flash the boot.img file
xkjonathanxk said:
If you are s on did you flash the boot.img file
Click to expand...
Click to collapse
I'm s-off
Wait what exactly where you doing ?
Ok, here's a bit more info.
Just reflashed the kernel again. When I wipe dalvic-cache it says:
E:Can't mount /dev/block/mmcblk0p35
(File exists)
Error mounting /data/dalvic-cache!
Try
luis86dr said:
Try the following in adb:
adb shell
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p35 /data
Samsung Galaxy S3
Click to expand...
Click to collapse
/sbin/sh: su: not found
/ # mount -o remount,rw -t ext4 /dev/block/mmcblk0p35 /data
mount -o remount,rw -t ext4 /dev/block/mmcblk0p35 /data
mount: mounting /dev/block/mmcblk0p35 on /data failed: Invalid argument
what recovery are you using because the error you are getting is most common in cwm
Amon RA 3.06
Hmm researching and the only thing found was to lock bootloader and flash the ruu and root again
try this thread seemed to have the same problem as you
http://forum.xda-developers.com/showthread.php?t=1907758
Well, I tried the stuff at the end of that post and it booted! BUT, I lost everything. I think I might have a backup to restore so hopefully it's not too bad.
Thank you for the help.
kkozma said:
Well, I tried the stuff at the end of that post and it booted! BUT, I lost everything. I think I might have a backup to restore so hopefully it's not too bad.
Thank you for the help.
Click to expand...
Click to collapse
You're also running a very old version of Amon Ra. You should upgrade to v3.16.

Nabi 2 Flashing trouble with TWRP

Hello, I have a Nabi sitting around and decide to get it out, update it and put it to use. My flashing skills are novice, I do a phone or tablet once in a blue moon and it it usually been with a AIO or relatively trouble free.
I have TWRP 2.3.3.0 and the Kernel is 1.9.3.7 from last year I install custom recovery
I attempted to install Monarch UI Removed/SuperSU & SU Binaries Installed including BusyBox 3.0.13( Fuhu/Nabi/Keenhi Stuff Removed ) - n3wt when that failed I attempted Stock Rom 3.0.13 via TWRP - aicjofs
I did a full Wipe, attempted to install with TWRP and ADB sideload.
The ADB sideload reaches 100% on PC and is marked failed on the Tablet in TWRP sideload UI.
Installing in TWRP I get the following errors in the Terminal
Code:
Updating Partitions details...
E:/Unable to mount '/data'
E:/Unable to mount '/data'
E:/Unable to mount '/system'
E:/Unable to mount '/cache'
E:/Unable to mount '/data'
E:/Unable to mount '/addon'
I also tried installing Stock Version 1.9.37 with similar results.
In the mount menu I can't selec "Using internal storage" or any of the mount options.
Also all wiping options for cash and system fail.
Next I re-installed TWRP 2.3.3.0 through fastboot to make sure everything was clean and it appeared to all take, and I still get the same results trying to flash.
So I am at a loss as what to try next and would appreciate any help.
While posted I've been trying NabiLab here is the error I received on a stock recovery.
*********** Restore Nabi to Factory 1.9.37 from ANDROID ****************
Install recovery to Internal or External SD card?
-If external make sure your card is installed-
1. Internal SD
2. External SD
Choose an option:1
Files are prepared. Press any key to begin restore.
Press any key to continue . . .
rebooting...
When TWRP is done booting press enter
Press any key to continue . . .
Pushing stock recovery to your device
Ignore external SD card error if you have none installed
This files are 1.2GB this will take many minutes. Please wait.
mount: mounting /system on ext4 failed: No such file or directory
mount: mounting /cache on ext4 failed: No such file or directory
mount: mounting /data on ext4 failed: No such file or directory
mount: mounting /addon on ext4 failed: No such file or directory
mkdir: can't create directory '//data/media/TWRP/BACKUPS/0123456789ABCDEF/abcdst
ock123': No such file or directory
1332 KB/s (8388608 bytes in 6.149s)
9 KB/s (48 bytes in 0.005s)
Click to expand...
Click to collapse
jumbojimx said:
Hello, I have a Nabi sitting around and decide to get it out, update it and put it to use. My flashing skills are novice, I do a phone or tablet once in a blue moon and it it usually been with a AIO or relatively trouble free.
I have TWRP 2.3.3.0 and the Kernel is 1.9.3.7 from last year I install custom recovery
I attempted to install Monarch UI Removed/SuperSU & SU Binaries Installed including BusyBox 3.0.13( Fuhu/Nabi/Keenhi Stuff Removed ) - n3wt when that failed I attempted Stock Rom 3.0.13 via TWRP - aicjofs
I did a full Wipe, attempted to install with TWRP and ADB sideload.
The ADB sideload reaches 100% on PC and is marked failed on the Tablet in TWRP sideload UI.
Installing in TWRP I get the following errors in the Terminal
Code:
Updating Partitions details...
E:/Unable to mount '/data'
E:/Unable to mount '/data'
E:/Unable to mount '/system'
E:/Unable to mount '/cache'
E:/Unable to mount '/data'
E:/Unable to mount '/addon'
I also tried installing Stock Version 1.9.37 with similar results.
In the mount menu I can't selec "Using internal storage" or any of the mount options.
Also all wiping options for cash and system fail.
Next I re-installed TWRP 2.3.3.0 through fastboot to make sure everything was clean and it appeared to all take, and I still get the same results trying to flash.
So I am at a loss as what to try next and would appreciate any help.
While posted I've been trying NabiLab here is the error I received on a stock recovery.
Click to expand...
Click to collapse
Wrong TWRP version is my guess. http://forum.xda-developers.com/showpost.php?p=62391871&postcount=2635 There are the 3 versions you need to try.
Thanks, got it fixed.
It was the wrong TWRP. Then I wasn't seeing any recovery files. ADB was giving me an odd generic serial number, I did a back up and then dumped the files in the TWRP created folder and they appeared.
Original Post.
aicjofs said:
Wrong TWRP version is my guess. http://forum.xda-developers.com/showpost.php?p=62391871&postcount=2635 There are the 3 versions you need to try.
Click to expand...
Click to collapse
Thanks for the reply.
I tried all 3 versions of TWRP in your post . TWRPv263 for ICS Nothing (cache,data,system, extsdcard etc) will mount. TWRPv285 for JB&KK Everything but /system will mount.
Using all 3 versions of TWRP I tried to install 3013stock.zip and 3013bootloader. No files from the extracted zip show up in TWRP recovery tab.
So I assume the issue I am aiming at is getting /system to mount in either KK or JB version of TWRP. v285?
Click to expand...
Click to collapse

Categories

Resources