Why Do my changes to the system partition not work? - Moto Z4 Questions & Answers

WIll someone please help me? I had this same issue with the G7Play until I finally flashed a AOSP GSI an somehow that fixed it. I pulled the system.img file and mounted it to a folder on my laptop. I went in and modified prop files and added su binaries and took 'avb' outta the vendor/etc/fstab.qcom from my vendor img. I then used fastboot to flash it back to the phone but when I boot the phone none of the changes are there. So to make sure I wasnt trippen I went back and added a file with permisssions 777 on the root directory and named it THISMODWORKS and re-flashed the modifiied img to both partitions A and B. I boot the phone up and the file aint there? This is so damn aggravating? how the hell is the system partition not being modified when Im flashing the new image to both partitions? Please someone tell me why its doin this an how I can fix it?

Related

Adding new commands to init.rc

I wanted to add some extra steps to my init.rc file but was unsuccessful. I was hoping someone could explain what I'm doing wrong or advise if there is a better way to do this.
I started by creating a new backup image using clockworkmod and then copied the boot.img file over to my host. I then used the steps as described in the thread "HOWTO: Unpack, Edit, and Re-Pack Boot Images" to unpack the contents and get the init.rc file. After adding the additional steps at the end, I packaged the boot.img file back up using mkbootfs and mkbootimg and then pushed the file to my sdcard. However, when I try to use "flash_image" to flash the new boot.img, I always get the error "error scanning partition". I don't think the problem is with the new boot.img file because I get the same error if I try to flash the original boot.img or even some non-existing file.
I also tried to simply replace the original boot.img file in my clockworkmod back up directory and do a standard restore, but that doesn't get past the "Viewsonic" logo screen. I assume that is because of some checksum issue.
Can anyone see my error or suggest and alternate method?
Thanks in advance

[Q] Building a recovery.img from scratch

Here is the theory I want.
Given a mobile phone that has a lock on it wether pin code, pattern or password, If the mobile's bootloader was unlocked I can install a custom recovery and then boot to that recovery in which I can run the adb and have access to the data in the phone. If my hypothesis is correct then how I can build a recovery.img ??
I have been reading for the recover.img for 2 weeks and almost understood how it works and most of the files in it. However, I couldn't find a tutorial of how can I build my own recovery.img
What I decided to do it to modify on the CWM recovery.img.
So I downloaded the CWM and then I unpack it to see the kernel and the initrd. After decompressing the initrd, I found many files. I made a simple test which is to run a script from the init.rc. Inside the init.rc I added two lines. The first one to mount the /data partition and then I just echoed "test" to a file called text.txt then I rebooted my device to normal boot connected to adb and checked the /data partition, but unfortunately I didn't find anything.
I would like to know what I am missing and if my theory is correct or not and how can I build my OWN recovery and have something like adb running from the start.
Thank you

Root Remix OS for PC

This guide is to root Remix OS for PC
You will need Ubuntu for Rooting (You can download and run it in live CD)
If you are experienced with linux systems don't read whats written in bracket
1. Download and Extract RemixRoot.zip
2. Copy system.img from your pendrive or hdd wherever you have installed Remix Os to this folder (ie RemixRoot folder it should be alongside Readme.txt)
3. Open Terminal (Ctrl+Alt+T)
4. Type
Code:
sudo -i
5. Enter your password (If you are running in live cd then no password)
6. Change directory to RootRemix folder (Goto tmp folder, right click and goto properties and copy location, this is your <dir> replace it in command below )
Code:
cd <dir>
7. If you did it right next line of terminal will end with RemixRoot# followed by blinking cursor
8. Now run rootx.sh script by typing
Code:
sh rootx.sh
9. If everything goes right there wont be any error message and you will get a root.img in your RemixRoot folder
10. Rename it to system.img and copy to your pendrive/hdd replacing previous system.img
11. Reboot and go to RemixOS and update SuperSU binaries
12. That's it! you are now rooted
Thanks to Chainfire & hackarchive
I tried it but i got no system.img, i got r/w access to system (choosen by install) so i tried to symlink it to my system directory and commented out all image mounted related things from script and then tried it.
but after that i cannot boot android anymore, i think the problem is app_process linking to daemonsu, since i set back to original it boots like normal but no superuser access. SuperSU said theres is no superuser installed.
Any suggestion?
Silly question but will I lose root access if I update to the newest version by flashing the new image over the top?
Yes a silly question.... Deserves a silly answer. It will still be underneath, but good luck trying to retrace it!
any other method for rooting, without using ubuntu?
#tested with ubuntu live, and it works like a charms. Thank you..
Sent from my C46G using XDA Premium 4 mobile app
ninharp said:
I tried it but i got no system.img, i got r/w access to system (choosen by install) so i tried to symlink it to my system directory and commented out all image mounted related things from script and then tried it.
but after that i cannot boot android anymore, i think the problem is app_process linking to daemonsu, since i set back to original it boots like normal but no superuser access. SuperSU said theres is no superuser installed.
Any suggestion?
Click to expand...
Click to collapse
same problem here.
Hope same other method can solved
I modified the original script to work with the system folder installation and i removed all app_processX dependend things from script (dunno if it affects the root in any way, cannot find any issue by now) Read the Readme.txt for further installation instructions. The link you find on the reddit sub that GoPal has posted! I cannot post links right now.
Try this
kretex said:
Hope same other method can solved
Click to expand...
Click to collapse
ninharp said:
I tried it but i got no system.img, i got r/w access to system (choosen by install) so i tried to symlink it to my system directory and commented out all image mounted related things from script and then tried it.
but after that i cannot boot android anymore, i think the problem is app_process linking to daemonsu, since i set back to original it boots like normal but no superuser access. SuperSU said theres is no superuser installed.
Any suggestion?
Click to expand...
Click to collapse
You will get root.img file you will have to rename it to system.img
masdeco said:
same problem here.
Click to expand...
Click to collapse
Me too [emoji25]
Envoyé de mon E5333 en utilisant Tapatalk
I've just installed RemixOS 2.0 onto a partition on my Lenovo X200T. I followed the instructions and all was good until I tried to run SuperSU. When it tried to update via the normal method the install failed and asked for a reboot. Any suggestions.
ninharp said:
I modified the original script to work with the system folder installation and i removed all app_processX dependend things from script (dunno if it affects the root in any way, cannot find any issue by now) Read the Readme.txt for further installation instructions. The link you find on the reddit sub that GoPal has posted! I cannot post links right now.
Try this
Click to expand...
Click to collapse
the answer is replace the system folder. this is my methode :
1. copy the system img from the extracted remix iso to somewhere
2. then run the script
3. unpack the system img that already rooted and copy all the content to the system folder of the remix (replace)
4. done. Remix os rooted.
Guys, I installed Remix to ext4 partition (in order to use all free space), so there's no "system.img" on it (but there's "system" folder). How to modify the script or to root Remix other way?
masdeco, thanks for the idea! How do you unpack img file, btw?
4ezahernya said:
Guys, I installed Remix to ext4 partition (in order to use all free space), so there's no "system.img" on it (but there's "system" folder). How to modify the script or to root Remix other way?
masdeco, thanks for the idea! How do you unpack img file, btw?
Click to expand...
Click to collapse
after root the system img then mount it, copy all the content to the system folder of your remix.
since I am a linux user so I use this command :
mount -o loop system.img tmp
this is so cool cool
Works Lenovo Yoga 2 11
Installed to a partition on my HD:
Downloaded RemixOS iso
extracted contents of iso
created temp, data and system folders
ran this tool to root the system.img (now root.img)
renamed root.img back to system.img
mounted system.img to temp folder
copied contents of temp folder to system folder
added entry in grub
now I am triple booting Windows, Linux and RemixOS 2.0 Android with ROOT
Thank You!!!
here is a xdelta3 for patching system.img for those using Remix OS 2 from a USB stick and run windows
GizmoTheGreen said:
here is a xdelta3 for patching system.img for those using Remix OS 2 from a USB stick and run windows
Click to expand...
Click to collapse
can you please explain its usage?
the_poolee said:
can you please explain its usage?
Click to expand...
Click to collapse
me too!
Please
the_poolee said:
can you please explain its usage?
Click to expand...
Click to collapse
dariett said:
me too!
Please
Click to expand...
Click to collapse
it shouldn't be too hard to figure out, put the files in your folder of choice with the system.img from your usb stick, run the batfile. it should create a file named rooted system image, now just replace system.img on your usb stick with that and run...
ofcourse I am assuming your system.img is identical to the one I had, which it should be if it was the 2.0 dev preview which is the only thing you can get today, right?

f2fs system.img

Hello,
I've followed this tutorial (https://forum.xda-developers.com/t/...r-img-and-flashing-our-modifications.4196625/) to extract system.img from super.img and edit it. So far, I was able to extract system.img from super.img and mount it to a folder in fedora. The problem is I cannot modify the files, I tried all ways I could think about but had no luck as the source is write-protected, so it only mounted it as read-only. I tried to copy all the files to different folder using rsync, but the system.img file is getting bigger than original and when I make it to super.img with lpmake, the phone doesn't work and stuck in bootloop. Does anyone has any idea about this?
Thank you

Edit Build.prop with Carliv Kitchen??

hi all i have unpacked my boot.img with Carliv image kitchen. went to RamDisk folder and edited my build.prop.. repacked then flashed and rebooted phone.. but the changes dont seem to take affect..
i changed
ro.system.build.type=user to userdebug
ro.build.type=user to userdebug
ro.build.system_root_image=False to true
ro.secure=1 to 0
ro.adb.secure=1 to 0
ro.debuggable=0 to1
dont seem to do anything.. i went into the system with X-plorer and looked at build.prop and all is back to normal. so i unpack pulled the boot.img and and looked its the way i edited it.. i know im doing something wrong JUST learning.. thanks
AFAIK build.prop is housed in system.img and/or vendor.img or in both.
jwoegerbauer said:
AFAIK build.prop is housed in system.img and/or vendor.img or in both.
Click to expand...
Click to collapse
hmmm i will check that out thank you
this is whats in the main oem rom.
well i tried to open all the .img files with carliv but no luck says something about header 4.0 or higher not supported
ok booted into recovery and tried the option ( mount /system) .. says E:Couldn't access state file. what now

Categories

Resources