Hey,
My setup:
Android-x86_9.0-r2_(x8) running on Proxmox (using QEMU and qcow2 formatted image)
GRUB, GBT installed, and I selected install with write permissions at the android installation
I tried to install magisk using the following guide: https://forum.xda-developers.com/android/general/guide-android-x86-rooted-magisk-t4077477
I successfully patched the boot.img and got the new kernel and ramdisk.img file. However, I wanted to replace them now, but I get the following error when I want to modify something in the folder where the old kernel and ramdisk.img is located:
Code:
Read-only file system
I connected to android using ADB (but also tried the terminal emulator on android itself). I already tried adb remount and other mounting options, but nothing works. Android runs as root.
The folder where the ramdisk.img and boot is located: /mnt/media_rw/Android-x86_9.0-r2_(x86)/
When running
Code:
mount | grep mnt
I receive the following (which means the folder Android-x86_9.0-r2_(x86) where the ramdisk.img etc. is stored is read-only:
Code:
/dev/block/vold/public:11,0 on /mnt/media_rw/Android-x86_9.0-r2_(x86) type iso9660 (ro,dirsync,nosuid,nodev,noexec,relatime,nojoliet,utf8,check=s,map=n,blocksize=2048,uid=1023,gid=1023)
When I try to mount it to rw using:
Code:
mount -o remount,rw /dev/block/vold/public:11,0 /mnt/media_rw/Andro*
I get:
Code:
'/dev/block/vold/public:11,0' is read-only
What can I do to change the ramdisk.img and kernel so I can install magisk?
Thank you very much!
Related
Hi, I open this thread because I mounted system.img (unpack it), maque some changes and repack it. Does not work, but the concept do (the rmxroot script I found in the web use this concept)
To do that I follow these steps:
1) Copy system.img to a folder in my ubuntu partition.
2) Make a backup.
3) Mount the system.img with:
sudo chmod 0644 system.img (giving permisions)
and
sudo mount -o loop,rw -t ext4 system.img tmp/
4) Make than changes (the rmxroot copi the su binaries and do other stuff)
The changes and adds can be made it graphically with nautilus.
5) Repack the system.img again with:
umount tmp
Please, if someone do something like that coment, so all can learn about.
Hi, I'd like to ask a general question about device boot. I've made some changes in init.rc and I packed again boot.img. In particular, I've added a .sh script to ramdisk root directory.
The script is named mount_partitions.sh and it does just this task. However, boot.img needs a shell to execute it, but /system is not mounted yet, at that point. So, I need to add a shell to to ramdisk root directory so that init executable can run the .sh script.
Exactly, how I could add shell support in boot.img without mounting the system partition? Any ideas?
Solved
I've found a way to use a shell before mounting system partition. Essentially, it's possible to place a busybox binary (i.e. taken from /system/xbin directory located in another android phone with installed busybox) into ramdisk root directory of boot.img, giving it execute permission in init.rc by chmod command, after remounted ramdisk root directory in read-write mode (by mount command put always in init.rc). It could be also be needed to give execute permission to the shell script (always by chmod command).
Then, it's needed run the shell script by busybox ash command, putting it into init.rc. The line looks like as following:
Code:
exec /busybox ash /myscript.sh
Don't forget to put also a line for remounting ramdisk root directory in read-only mode, after ash shell finished to execute the script (always using mount command in init.rc).
Remember to use the following shebang at the beginning of the shell script:
Code:
#!/busybox sh
shouldn't the shebang end with "ash" instead of just "sh"?
it's just a sh script but it could be true.
Hello
I am working with a Nanopi Fire3 board. I need to change the boot logo and boot animation.
With this Android Lollipop :
112.124.9.243/dvdfiles/S5P6818/images-for-eflasher/android-lollipop-images.tgz
Click to expand...
Click to collapse
If I unpack with the following method, the new image has a completely different size and does not boot.
Code:
apt install android-tools-fsutils
simg2img rootfs.img r.img
mount -t ext4 -o loop r.img /mnt
… To Change Something …
umount /mnt
img2simg r.img rootfs.img
I have tried to root the device, no tool found online works.
I have tried to unpack/repack, no tool found online works.
Tools like mkbootimg just copies the img file (it doesn't extract anything)
I am also trying to compile android completely, and it fails in the middle of the build process.
Would you have any advice please? I have run out of options
Thank you :good:
Hi!
This phone has separate system and vendor partitions which are verified with dm-verity. I want to add Polish strings to apks/framework.
So I tried to disable veryfying of vendor and system partition (by editing fstab in boot.img), but there's only fstab.enableswap file available, which doesn't contain system/vendor mountpoints.
Later I found fstab.mt6739 on the vendor image, in /etc, and it had the desirable mounts. But after removing 'verify' flag, the phone still keeps restarting on android logo (only if system was modified).
I've also noticed, that changing anything in vendor image doesn't take effect (tried removing vodafone apps, changing strings in an apk). Is it possible that vendor partition is somehow bypassed? Is there an other way to disable dm-verity?
PS I'm flashing the firmware using NCK box.
Hi
flash the stock Boot.img ,flash it to the recovery partition. using SP flash tools
It allows to boot to the system os with recovery editing permissions
Boot into recovery mode
Hold power + volume up on boot
Adb push fstab.mt6739 /sdcard/
adb Shell
su
mount -o rw,remount /system
mount -o rw,remount /vendor
cp /sdcard/fstab.mt6739 /vendor/etc/
chmod 644 /vendor/etc/fstab.mt6739
Flash back the stock recovery when your finished
Hey everyone,
I have pulled a block of encrypted userdata partition ".img" and trying to mount it on unecnrypted device (same device with encryption set to off). My device is rooted
I have tried these steps
1. Pulled the block on local system using adb pull - userdata_block.img
2. mounted the block on an unencrypted device over CIFS using busybox mount command - userdata_block is virtually present on /sdcard/temp/userdata_block.img
3. Want to mount this img file on device to check the directory status on Android 11 if all the directories are encrypted or not.
/system/bin/losetup /dev/block/loop2 /sdcard/temp/userdata_block.img
/system/bin/mount -o ro /dev/block/loop2 /sdcard/dummy
Getting below error on Android 11, same command works fine on Android 10.
mount: /dev/block/loop2: need -t
Does anyone has any idea how to fix this?