Coming from a Galaxy Nexus, this is how I have mounted system.img files:
Code:
simg2img system.img raw-system.img
mount -o loop raw-system.img /mnt/system
But this doesn't seem to work with the Moto X. How do you mount the system.img from the Moto X factory image?
I have the same problem. I tried to mount the image as a loop device, but the filesystem was unrecognized.
Tsjoklat said:
I have the same problem. I tried to mount the image as a loop device, but the filesystem was unrecognized.
Click to expand...
Click to collapse
Has anyone figured out how to do this? It seems the Moto X system.img is some kind of encrypted image that has a "MOTO..." magic/signature.
I'm screwed up with Safestrap (I think) and can't get a working bootloader, with the boot process looping. I can manage to get into the stock ROM somehow by fiddling with the USB cable (to get into some bail-out bootload?) and get into my rooted OS.
The directions for manually uninstalling Safestrap recovery is:
u
mount -o remount,rw /system
mv /system/etc/init.qcom.modem_links.sh.bin /system/etc/init.qcom.modem_links.sh
rm -rf /system/etc/safestrap
rm /system/etc/firmware/q6.mdt
ln -s /firmware/image/q6.mdt /system/etc/firmware/q6.mdt
mount -o remount,ro /system
but I don't see a /system/etc/init.qcom.modem_links.sh.bin file, which seems to indicate that the original stock .sh file got deleted. I need to manually restore it back from the stock system.img (I think). I assume Safestrap uses its copy of init.qcom.model_links.sh to execute safestrap, and renames the stock .sh to .sh.bin.
I don't know why I get stuck in the boot loop, but there's some warning about encrypted images.
Thanks for any help.
Related
Hey guys,
I rooted my Nexus one but I have a small problem getting into the recovery image.
In the modaco instructions you have this red text
Check if there's no /system/etc/install-recovery.sh script if you keep booting back in the stock recovery (exclamation mark with a little Android).
This is exactly what is happening to me and all I would like to know is....
How can I make this exclamation android disapear?
The file /system/etc/install-recovery.sh is there... but can I delete it or modify it somehow?
Why not use fastboot and flash the recovery?
I actually tried to do that but I have the same problem when trying to boot up in recovery.
Actually finally managed to get into the recovery image just now after using fastboot to flash the image once again.
However after rebooting the phone I still have the same problem. So basicly, this works if I just flash it, power off phone and run the custom recovery image. After that I get the little android with the exclamation mark.
Just to show what I do when flashing the reccovery image.
Superboot aquired
Code:
- MAC - Open a terminal window to the directory containing the files, and type 'chmod +x install-superboot-mac.sh' followed by './install-superboot-mac.sh'
I get success on this and my root access seems to work. (I am only running Market enabler to make it work)
Code:
Copy recovery-RA-nexus-v1.7.0.1.img to a location where fastboot can find it. ( Put this in my home folder under superboot\recovery-RA-nexus-v1.7.0.1.img
Boot your phone into fastboot mode (power on while holding the trackball)
Connect your phone via usb to your [B]MAC[/B]
./fastboot devices (to make sure that fastboot "sees" your phone)
./fastboot flash ./recovery recovery-RA-nexus-v1.7.0.1.img
So, I continue... Any idea why I am still getting the little Android? I have
also
hjaltih said:
Hey guys,
I rooted my Nexus one but I have a small problem getting into the recovery image.
In the modaco instructions you have this red text
Check if there's no /system/etc/install-recovery.sh script if you keep booting back in the stock recovery (exclamation mark with a little Android).
This is exactly what is happening to me and all I would like to know is....
How can I make this exclamation android disapear?
The file /system/etc/install-recovery.sh is there... but can I delete it or modify it somehow?
Click to expand...
Click to collapse
same problem with me i can not do it!
Well look no further becouse I have found the solution to our problems.
Superboot again and start with
Code:
adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Then you type
Code:
rm /system/etc/install-recovery.sh
Now follow instructions to install the Recovery image
After this you will hopefully not have any problems
help
sorry to bring this back... but, i need some help here...
when i enter $ su... i get "permission denied"
You need to have root access, google it or look in the development section for guides.
Cannot remove /system/etc/install-recovery.sh
Nexus One FRF91, unlocked and rooted.
SDK and USB driver installed, Windows XP.
Using ConnectBot I can see /system/etc/install-recovery.sh is present
I recovery boot into RA-nexus-v1.7.0.1
fastboot and adb both see the device.
adb remount returns remount failed: Invalid argument
If I go into adbshell and try mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system I get failed: Invalid argument
Have I missed something?
Any help would be most appreciated!
I can work around it with adb shell, still puzzling why adb remount will not work though...
Hi!
I have rooted my phone (LG Optimus 2X) and mistakenly deleted some files.
I have these files, and want to push them back using adb, put my problem is, that when i try to mount the system in read / write mode using "adb remount" i get this error: "remount faileded: Operation not permitted".
I can't figure out how to fix it, i can pull files etc.
I have also tried to use the adb shell, and copy the files from the internal sdcard, but i'm getting the same error.
Only read-mode.. :/
Anybody who can help, fixing this problem?
If you want to mount /system just write:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Then you're good to go
How to unmount into read-mode only?
Thank! - You saved my day
mrhtml said:
How to unmount into read-mode only?
Thank! - You saved my day
Click to expand...
Click to collapse
A little easier to type...
Mount r/w
Code:
busybox mount -o,remount -rw /system
Mount r/only
Code:
busybox mount -o,remount -r /system
Edit: You shouldn't post stuff like this in dev
I was in the process of installing another OS as a dual boot option on my touchpad along with webOS.
When I remounted the boot partition rw using the command...
mount -o remount,rw /boot
a special character was accidentally inserted into the mount point name.
Now I had two boot mounts showing with the ls command, one with a special character showing as "boot?".
To fix this, I unmounted the boot partition, which left a file named "boot" in the root directory and a directory named "boot?". I was able to rename the" boot?" directory to "abcd" since the root name was taken by the file.
At this point, I'm not sure what the command should be used to remount the boot directory correctly. Please help quickly as I am unable to reboot at this time...
duh1 said:
I was in the process of installing another OS as a dual boot option on my touchpad along with webOS.
When I remounted the boot partition rw using the command...
mount -o remount,rw /boot
a special character was accidentally inserted into the mount point name.
Now I had two boot mounts showing with the ls command, one with a special character showing as "boot?".
To fix this, I unmounted the boot partition, which left a file named "boot" in the root directory and a directory named "boot?". I was able to rename the" boot?" directory to "abcd" since the root name was taken by the file.
At this point, I'm not sure what the command should be used to remount the boot directory correctly. Please help quickly as I am unable to reboot at this time...
Click to expand...
Click to collapse
What OS are you trying to install? What other commands did you run that's preventing you from booting? (based on what you've said you've run above, you should still be able to reboot since you haven't actually changed anything in /boot yet?) .
You could try: "rm /boot ; mkdir /boot ; mount -o remount,rw /boot" I guess.
If you told me more about what you are trying to do and what you have already done, I could help more.
And don't worry even if you have modified /boot such that it won't boot normally. I can help you correct that, but I'd like yo know more about what you are trying to do and what you have done so far.
jcsullins said:
What OS are you trying to install? What other commands did you run that's preventing you from booting? (based on what you've said you've run above, you should still be able to reboot since you haven't actually changed anything in /boot yet?) .
You could try: "rm /boot ; mkdir /boot ; mount -o remount,rw /boot" I guess.
If you told me more about what you are trying to do and what you have already done, I could help more.
And don't worry even if you have modified /boot such that it won't boot normally. I can help you correct that, but I'd like yo know more about what you are trying to do and what you have done so far.
Click to expand...
Click to collapse
I was reinstalling LuneOS and was in the process of making the /boot partition writable using the command....
mount -o remount,rw /boot
I had accidentally inserted a special character after /boot in the above command. This created two /boot entries as seen using the ls command.
One entry was /boot same as before, and a new entry shown as /boot? (the ? replaces the special character that cannot be displayed).
It seems I had created a second mount point with an undisplayable name.
I then issued an unmount command. to try to fix the issue...
umount /boot
This turned the /boot partition into a 6MB file named boot, and an empty directory named /boot? which I was able to rename to /abcd.
I cannot create or rename the directory to /boot since the file that now contains the boot filesystem currently has that name.
Deleting that 6MB boot file would delete the entire boot filesystem.
The command mount -o remount,rw /boot says can't find /boot in /proc/mounts
There is currently no /boot partition, just the file containing the filesystem, so I shouldn't reboot the system since there is no accessible bootloader.
I need to know the command to correctly mount the file as the /boot partition to the mount point /abcd, and then perhaps rename the mount point to /boot, or maybe rename the boot file to something else and then mount it to the /boot directory.
The mount command by itself would show how your /boot partition is currently mounted. and with what options -- maybe that would help recreate what mount command I should use to mount the boot file.
Thanks so much jc for your help in getting this fixed!
duh1 said:
I was reinstalling LuneOS and was in the process of making the /boot partition writable using the command....
mount -o remount,rw /boot
I had accidentally inserted a special character after /boot in the above command. This created two /boot entries as seen using the ls command.
One entry was /boot same as before, and a new entry shown as /boot? (the ? replaces the special character that cannot be displayed).
It seems I had created a second mount point with an undisplayable name.
I then issued an unmount command. to try to fix the issue...
umount /boot
This turned the /boot partition into a 6MB file named boot, and an empty directory named /boot? which I was able to rename to /abcd.
I cannot create or rename the directory to /boot since the file that now contains the boot filesystem currently has that name.
Deleting that 6MB boot file would delete the entire boot filesystem.
The command mount -o remount,rw /boot says can't find /boot in /proc/mounts
There is currently no /boot partition, just the file containing the filesystem, so I shouldn't reboot the system since there is no accessible bootloader.
I need to know the command to correctly mount the file as the /boot partition to the mount point /abcd, and then perhaps rename the mount point to /boot, or maybe rename the boot file to something else and then mount it to the /boot directory.
The mount command by itself would show how your /boot partition is currently mounted. and with what options -- maybe that would help recreate what mount command I should use to mount the boot file.
Thanks so much jc for your help in getting this fixed!
Click to expand...
Click to collapse
None of the commands you mention above would have created a FILE in / named boot.
If there is a FILE in / called boot, it is NOT your boot partition.
Also, the bootloader does not live in /boot.
Just reboot - nothing you mention above would prevent it from booting.
jcsullins said:
None of the commands you mention above would have created a FILE in / named boot.
If there is a FILE in / called boot, it is NOT your boot partition.
Also, the bootloader does not live in /boot.
Just reboot - nothing you mention above would prevent it from booting.
Click to expand...
Click to collapse
I no longer have access to moboot or the boot partition. If I reboot how can the system find the boot files?
Shouldn't I be able to see the boot partition it in fstab and remount the partition -- right now, it's not in there.
Can you test this on your own system, umount /boot then either see if you can regain access to it or reboot and see if there are no issues? Do you now have a file named boot in /?
duh1 said:
I no longer have access to moboot or the boot partition. If I reboot how can the system find the boot files?
Shouldn't I be able to see the boot partition it in fstab and remount the partition -- right now, it's not in there.
Can you test this on your own system, umount /boot then either see if you can regain access to it or reboot and see if there are no issues? Do you now have a file named boot in /?
Click to expand...
Click to collapse
I have absolutely no need at all to test it to know that it works.
If it's unable to boot, it's because of something other than what you mentioned above.
* Assuming you removed the /boot file and recreated the /boot dir. (i.e. "rm /boot ; mkdir /boot")
jcsullins said:
I have absolutely no need at all to test it to know that it works.
If it's unable to boot, it's because of something other than what you mentioned above.
* Assuming you removed the /boot file and recreated the /boot dir. (i.e. "rm /boot ; mkdir /boot")
Click to expand...
Click to collapse
Thanks jc and kudos -- you were right! The file named boot was an aberration, created by the badly formed mount command and a file I then copied to that location. I deleted the file and recreated the dir /boot.
I found the correct mount point /dev/root from another device, was able to mount /boot and device rebooted fine. Perhaps I didn't need to remount /boot before rebooting, but without some indication that it would be recreated, I didn't want to chance it.
Linux at times can be a painful learning experience, thanks for being here with the first aid, it's appreciated...
While I was trying to install the "GSAM Root Companion" app and having it fail, and I discovered that the problem was that /system is still mounted RO. No problem, says I, and fired up my terminal app, pop into a root prompt with su, and issue the old invocation:
Code:
#mount -o remount,rw /system
mount: Invalid argument
I did some googling, and tried various different ways of laying out the command that other people have had luck with. I didn't have any
Code:
# /system/bin/mount -o remount,rw /system
# /system/bin/mount -o remount,rw /system /system
# /system/bin/mount -o rw,remount,rw /system
# /system/bin/mount -o remount,rw /dev/block/platform/mtk-msdc.0/by-name/system
# /system/bin/mount -o remount,rw /dev/block/platform/mtk-msdc.0/by-name/system /system
..etc..
My device is properly rooted (typing 'su' in the terminal prompt gives me my '#' prompt), selinux is set to 'permissive' (per the output of 'getenforce'), but all of them just keep giving me "Invalid Argument". At this point, the only thing I can think of is that it's actually blocked in the kernel, but as I'm hardly an expert, I figured I should put it up here before I gave up for good.
Anyone have a line on this?
Solved (sort of)
When even TWRP wouldn't remount /system to RW, I figured it was just time to throw up my hands and reflash.
TL;DR
Reflash /system to stock using SPTool
Reflash TWRP using SPTool
Allow TWRP to change /system to RW
DO NOT allow TWRP to try to install SuperSu.
The Longer Process, for anyone interested in the details
Removed SD, SIM, and Battery
Used SPTool to flash BLU_V0030UU_V07_REPAIR shared by "William Smith", excluded "boot", "recovery", and "preloader"
SPTool: https://app.box.com/s/rhok6s65sfsmrkq9w6021dnqgj6l5120
Repair Rom: https://www.mediafire.com/folder/s7m0q284yuvd2/BLU#61m7ikt8k97j9
Install Battery, no SD or SIM, and boot into TWRP
Allowed TWRP to mount system as RW, wipe Dalvik, Cache, Data, and exit. Allowed root
Boot would not pass the white "BLU" screen.
Used SPTool to reflash the same image as in 3, but only "system"
Straight reboot - Passed white boot screen to colored logo.
It took awhile but eventually got to the setup wizard.
Booted into recovery. Got stock recovery (Overwritten by the stock recovery because I stopped TWRP from changing it, at a guess).
Removed Battery. Used SPTool to reinstall TWRP
http://forum.xda-developers.com/vivo-xl/development/recovery-t3311601
Replaced battery. Booted into recovery. Got TWRP
Allowed modifications to /system
Rebooted to system. Did NOT allow TWRP to install SuperSU. Phone booted
Before installing SD/SIM, went through setup process.
* Skipped adding SIM
* Added google account
Powered down phone, inserted SD card with SuperSU zip, installed from TWRP
* Wiped Dalvik, then rebooted into system
SuperSu: https://docs.google.com/uc?id=0B9srKhKuVIMna0xCdXlLS2dIYUU
Verified Root.
Rebooted into TWRP and installed Xposed. Rebooted. Lingered for awhile on white screen, but passed.
XPosed Framework and Installer thread: http://forum.xda-developers.com/showthread.php?t=3034811
Installed XPosed Installer
Used ES File Explorer to confirm /system was read/writable.
Hello there,
i try to remove all gapps from my G6. It's rooted, and i have twrp 3.2.1-r1 installed. In twrp i mount /system as rw and remove some files/folders with
adb shell rm -rf /system/sample_file, or directly in twrp terminal.....
When i do a "ls -l /system/sample_file" it isn't there, however, when i unmount and remount /system, the file exists again.
Is this a twrp-issue? Maybe somebody has an idea?
At the end i want to use stock-rom, but i want to remove all gapps. I found several script here in this forum, but they don't work because it seems that i cannot mount /system as read-write with twrp....