I try to mount system and vendor partitions by using command below
Code:
sudo mount -o loop -t ext4 vendor.img vendor
got this error message
Code:
mount: xxx/xxx/vendor: wrong fs type, bad option, bad superblock on /dev/loop20, missing codepage or helper program, or other error
This command use to work on system image on different phone with same android version.
But I'm able to mount as RO using achieve mounter on Ubuntu.
Is there any way that I can mount those image as RW then edit some file in there?
OOS locks the system partition. No way in as of yet.
BeardKing said:
OOS locks the system partition. No way in as of yet.
Click to expand...
Click to collapse
Thank you
Related
I really need help please please:
I succeed creating an 500 meg file ext2.img on Sd card and formated as ext2 with linux dd and mke2fs.
I succeed too mounting this volume on linux but I am stuck trying to mount it on Android.........
I tried this and that doesn't work:
mkdir ext2dir
mount -o -rw loop /sdcard/ext2.img ext2dir
What am I missing?
Thank you very much
usually you need to specify the filesystem type such as
mount -o loop -w -t ext2 /sdcard/ext2.img ext2dir
and also are you sure your kernel supports loop back filesystems?
if /dev/block/loop0 exists then it does
rattking said:
and also are you sure your kernel supports loop back filesystems?
if /dev/block/loop0 exists then it does
Click to expand...
Click to collapse
No such dir /dev/block/loop0 and getting "ioctl LOOP_SET_FD failed: Device or resource busy"
Is the loop mandatory?
Just want to mount and bind to other directory
Thanks
it might be included as a module try
modprobe loop
and try again
otherwise you may need to find a kernel that includes it for your device
yes you will need loop to mount an image with -o loop
rattking said:
it might be included as a module try
modprobe loop
and try again
otherwise you may need to find a kernel that includes it for your device
yes you will need loop to mount an image with -o loop
Click to expand...
Click to collapse
I run modprobe loop and return "modprobe not found"
I have been trying to mount an image file on my device with no success. The image was created on a linux PC with dd and formated with a DOS partition table and a single ext2 partition. All three devices I have tried this on do not find the partition (should be /dev/block/loop5p1 according to fdisk on the android device).
Code:
busybox losetup /dev/block/loop5 /sdcard/m.img
busybox mount -t ext2 /dev/block/loop5 /sdcard/mnt
This returns invalid argument, probably because it is not a partition.
Code:
busybox losetup /dev/block/loop5 /sdcard/m.img
busybox mount -t ext2 /dev/block/loop5p1
This returns device not found because android will not find the partitions.
Is there a way to make this image mount or could I create a file system on the image without a partition table (mkfs.ext2 /dev/block/loop5) and try to mount it?
I have got the image to mount on one device by making a filesystem on the image without a partition table
Code:
mkfs.ext3 /dev/loop0
and mounted it successfully on the device by using
Code:
busybox mount /dev/block/loop0 /sdcard/mnt/
however on one of the other devices the same thing results in only the cd and ls commands being able to see the mounted files (not chroot or other android apps).
Is there anything I'm doing wrong or is it just the device?
Back in 5.1.1, I was able to mount the system partition.
Now in 7.0, I couldn't mount it anymore without making my phone crash
I've tried different methods...
Code:
mount -o rw,remount -t ext4 /system
This crashes my phone
Code:
mount -o rw,remount,rw -t ext4 /system
This reports back "...Device or Resource busy"
So then I was thinking that something might be using that directory so I tried to make a system mount point in /mnt, thinking as processes depend on /system, I must make another mount point
So I did, this time, "mount" says system is mounted with "ro,seclabel,relatime,norecovery" as it's option. so when I changed it to "rw,seclabel,relatime,norecovery", it doesn't mount, with no errors
So I tried, with system mounted on /mnt/system,
Code:
# mount -o rw,remount -t ext4 /dev/block/sda18 /mnt/system
(don't worry I know you can do ".../platform/xxxxxxxx.ufs/by-name")
This ALSO crashes my phone
So I pretty much gave up, and looked online, and all I found was the same process, but nothing on "this crashes my phone" or any other.
Agreed
I had the same problem. Hard lock up of phone.
how did u get root via adb??
DDwhite said:
how did u get root via adb??
Click to expand...
Click to collapse
https://forum.xda-developers.com/verizon-galaxy-s6/general/unlock-bootloader-t3688594
Whatever i tried to flash are phhuson's AOSP Squeak GSI, Lineage 19.1 GSI, and LeOSS GSI on specifically only the system image, but that error message isn't disappearing at all
Another error message also never disappears ...
Code:
E: unable to open or mount /system_root, /vendor, /odm, or /product (Block devices required)
Device: Samsung A125F; TWRP 3.6.11-Edward0181-DEV-RC4
But when trying to mount manuallly with mount -o rw,remount /system_root, it still reports ...
Code:
mount: '/system_root' not in /proc/mounts
Code:
E: error creating fstab
Then recreating dirs like /system_root, /system_image, /vendor, /odm, /product
Afterwards also running mount -o rw /system_root and mount -o rw system /system_image both reports ...
Code:
mount: 'system'->'/system_root': No such file or directory
mount: 'system'->'/system_image': No such file or directory
mount: 'vendor'->'/vendor': No such file or directory
mount: 'odm'->'/odm': No such file or directory
mount: 'product'->'/product': No such file or directory
Really everything missing? I'm quite unsure why it reports like those
Also, in Mount menu i'm also unable to remount System partition at all somewhy
Finally, mounting on /vendor, /odm, and /product also reports "no such files or directories"
symlinks missing - claim it to the maintainer (or fix fstab yourself)
https://github.com/edward0181/android_device_samsung_a12/tree/twrp-11.0/recovery/root/system/etc
Solved by last version of twrp.
https://github.com/edward0181/android_device_samsung_a12/releases
I tried
mount -o rw,remount /system/
But
mount: '/system/' not in /proc/mounts
system-as-root = system is mounted as /, not /system
Permissions are fine.
DavidxxxD said:
system-as-root = system is mounted as /, not /system
Permissions are fine.
Click to expand...
Click to collapse
I can't write to / still
Are you root?
What is output of
Bash:
id
Bash:
su -c mount -o remount,rw /
Also try this to find out more
Bash:
mount | grep "/ "
DavidxxxD said:
Are you root?
What is output of
Bash:
id
Bash:
su -c mount -o remount,rw /
Also try this to find out more
Bash:
mount | grep "/ "
Click to expand...
Click to collapse
Bash:
berlna:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012 context=u:r:shell:s0
Bash:
berlna:/ $ su -c mount -o remount,rw /
'/dev/block/dm-8' is read-only
Bash:
berlna:/ $ mount | grep "/ "
/dev/block/dm-8 on / type ext4 (ro,seclabel,relatime,discard)
And yes I have root
I've never seen this output from trying to remount. Could be a permanent read-only attribute somewhere. /dev/block/dm-8 looks like your system is on an encrypted partition, this could have something to do with the error. You can try using the busybox version of mount command. Also, does your device have a super partition? That could explain it.
DavidxxxD said:
I've never seen this output from trying to remount. Could be a permanent read-only attribute somewhere. /dev/block/dm-8 looks like your system is on an encrypted partition, this could have something to do with the error. You can try using the busybox version of mount command. Also, does your device have a super partition? That could explain it.
Click to expand...
Click to collapse
This is the same error i also face in oneplus os12 and yes my dev dm-x also is ro even after root
Its super.img and also i try with busybox
But useless
The only way now i can see is unpack backup super
Unpack edit repack and flash back
But its not possible for me
Rewriting the super partition every time, seems to be the only way in your case.
The lpflash tools are used to work with super partitions.
I've attatched a statically linked 64-bit ARM version that can run on the device, built from this source.
Extract the system image using
Bash:
./lpunpack -p system super.img
Note: This can also be run directly on the block device, it only reads.
From there, you can modify the system and add it to a super image (the firmware usually has sparse ones that need to be decompressed first). You could also flash the new system image directly via fastbootd mode.
Note: Ignore any "invaild sparse header" messages from fastboot.
Don't flash unsparse images on Samsung devices! They will not like it!
Hope this is helpful.
DavidxxxD said:
Rewriting the super partition every time, seems to be the only way in your case.
The lpflash tools are used to work with super partitions.
I've attatched a statically linked 64-bit ARM version that can run on the device, built from this source.
Extract the system image using
Bash:
./lpunpack -p system super.img
Note: This can also be run directly on the block device, it only reads.
From there, you can modify the system and add it to a super image (the firmware usually has sparse ones that need to be decompressed first). You could also flash the new system image directly via fastbootd mode.
Note: Ignore any "invaild sparse header" messages from fastboot.
Don't flash unsparse images on Samsung devices! They will not like it!
Hope this is helpful.
Click to expand...
Click to collapse
Its a super.img thx