Boot.img modification is required for root ? - Android Q&A, Help & Troubleshooting

Hello,
I use the rooted system.img which is provided in
http://forum.xda-developers.com/wat...everything-urbane-root-how-tos-files-t3243975
But I then get error on doing su from "adb shell" :
Error: only position independent executables (PIE) are supported.
So, I wander if it's becuase I did not program boot.img too ?
On trying to flash boot.img (or recovery.img) both fail to start on my watch. Not sure yet why.
I should also mention that also with system.img I had to manipulate so that the same size of image will be left and I just replaced the files with rsync (not sure if it is the simplest way to do that, but it worked )
So, not the only problem is the error on doing su (from adb shell).
Can anyone help ?
Regards,
Ranchu

Related

[Q] Build system.img or Update.zip from OTA package

The situation:
System partition has been wiped, would like to restore it using OTA.zip available from OEM
What I have
Access to fastboot and adb sideload in stock recovery
OTA zip package from OEM
What I have tried and my background
I have been on the client side of mods\recoveries\dev for android platforms on various devices for 4-5 years. I'm capable with Linux, and self teach quickly, I know just enough to get myself into trouble at the moment(hence the trouble I'm in).
1. I have tried to convert the system data in the OEM package to a yaffs etx4 style .img and send via fastboot, but I get "Invalid sparse file format at header magi" this led down a road to a tool called sparse converter that compressed the img into smaller parts, but then I get a more generic error "FAILED (remote: flash_cmds error!) For giggles , even know I know this would have been useless even if it had worked I tried it with the stock SDK 4.4.2 system.img just to see if I could fastboot any system files, same result.
2. So then I thought perhaps I could go the ADB side-load approach, first I tried just sending over the provided OTA zip package, but I get an error on the device after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed" this led me to using a tool called "UpdatezipCreator" to generate a zip with the system files and sign the package, this also was a dead end.
So i'm turning to the wisdom and experience of XDA for some guidance, I'm willing to put in the leg work, I just need some direction.
TF103C Update
A couple of things. Im having the same issues with creating a yaffs ext4 .img and have the same error when i got to flash the image. Intel actually has a repo some place for bay trail (with bay lake included) device setup (https://01.org/android-ia). I did the same thing you did with AOSP and as expected it tries to boot but fails and boot loops.
I have however been able to flash the update.zip that is on the Asus website through recovery. First question did you unzip the the first zip file? The zip that is the link contains another zip which is the one you upload and update (sideload worked for me).
Im wondering if you can help me out too. I got an OTA about a day ago and hit the back button but it decided to update anyway. The tablet rebooted and just flashed a red bar at me then turned off. I can get to the droidboot to load images but I cant boot into recovery and im not sure why. Ive tried using the zenRoot recoveries that were used for rooting, but no luck. Booting to system or recovery produces a red bar and turns off. Do you by chance have a recovery I could try? Thanks.
Hope that was helpful.
Eclipse00 said:
The situation:
System partition has been wiped, would like to restore it using OTA.zip available from OEM
What I have
Access to fastboot and adb sideload in stock recovery
OTA zip package from OEM
What I have tried and my background
I have been on the client side of mods\recoveries\dev for android platforms on various devices for 4-5 years. I'm capable with Linux, and self teach quickly, I know just enough to get myself into trouble at the moment(hence the trouble I'm in).
1. I have tried to convert the system data in the OEM package to a yaffs etx4 style .img and send via fastboot, but I get "Invalid sparse file format at header magi" this led down a road to a tool called sparse converter that compressed the img into smaller parts, but then I get a more generic error "FAILED (remote: flash_cmds error!) For giggles , even know I know this would have been useless even if it had worked I tried it with the stock SDK 4.4.2 system.img just to see if I could fastboot any system files, same result.
2. So then I thought perhaps I could go the ADB side-load approach, first I tried just sending over the provided OTA zip package, but I get an error on the device after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed" this led me to using a tool called "UpdatezipCreator" to generate a zip with the system files and sign the package, this also was a dead end.
So i'm turning to the wisdom and experience of XDA for some guidance, I'm willing to put in the leg work, I just need some direction.
Click to expand...
Click to collapse
I have the same problem, keysersoza42. I did a "fastboot wipe system" and now I only have access to fastboot. Just need to find a way to put system back
keysersoza42 said:
I have however been able to flash the update.zip that is on the Asus website through recovery. First question did you unzip the the first zip file? The zip that is the link contains another zip which is the one you upload and update (sideload worked for me).
Click to expand...
Click to collapse
Can you please tell me the exact steps you used to get sideload to work? I have the same problem as Eclipse00 : "after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed""
Asus TF103C update.zip
UPDATE: Link to system.img
goo.gl/Oz2X7o
Honestly all i did was follow the normal steps to do a side load. One thing to make sure of is that you have the correct version of the firmware; BBY, WW, etc. When you first download it it is a Zip file in a zip file so the second one is the one you need to side load. To step this out:
1) Download from Asus the correct update. If you dont know which version you have you can boot into the bootloader and one of the versions will say BBY, WW, etc...
2) Unzip the contents of the download from Asus. This should be another zip file.
3) Boot into recovery. If you get the 'dead android' press and hold vol down for about 5 seconds then press vol up.
4) In recovery enter sideload mode
5) adb sideload innerUpdate.zip file (the zip file you unzipped from the downloaded file).
6) works???
This is what worked for me. The other option is to fastboot a system.img. This is hard b\c Asus doesnt release them and when i dd'ed a system image off of the partition it wouldn't load. I did however find a way to get a system image on there through fastboot. If it comes down to this let me know and ill post more on it. Good luck!
RaVe-N said:
Can you please tell me the exact steps you used to get sideload to work? I have the same problem as Eclipse00 : "after if finishes transferring "end of footer from /tmp/update.zip not 0xffff (file exists)" and "Signature verification failed""
Click to expand...
Click to collapse
---------- Post added at 08:55 PM ---------- Previous post was at 08:36 PM ----------
Sorry this is old, but just a couple of weeks ago i got the fastboot system.img to load. Here are the steps I did to produce this.
Some times its helpful to unpack a system image and/or repack to be flashed to an android device. For example the Asus tf103c required special compressing for parsing.
Tools you will need:
simg2img
make_ext4fs
Windows
SparseConverter_1.0.0.exe
Note: There were system.img files that were pulled directly from a rooted device using dd. These images would always give an error (flash_cmds_error!) while trying to write the image even if it had been compressed. The only way I got around this was to mount and unpack an image known to flash correctly (in my case the Intel BayTrail image from the intel android repo). The replace the contents with what every you wish to be in there (in my case the system folder from the Asus update.zip). The limitation here is you are limited to the size of the original flashable .img. Usually you can remove odex files to get around this and push those later if needed.
For the Asus images the NFC was removed from the list of features b\c it didnt have NFC which resulted in the settings app to crash during onCreate. These files were removed from the system directory.
/system/etc/permission/*.nfc*
Step-by-step guide
Steps 1-6 may be done in linux but step 7 and 11-15 must be done in windows.
In your workspace create a dir. mkdir sys
./simg2img system.img sys.raw
If you get : "Invalid sparse file format at header magi Failed to read sparse file"
You must decompress the image first with SparseConverter.
go to step 9 except replace 14 with this: SparseConverter.exe /decompress [.img to decompress] [.img to write to] then return to this step and continue.
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
sudo mount -t ext4 -o loop sys.raw sys/
sudo ./make_ext4fs -s -l 1638M -a system new.img sys/
Note: The size needs to change depending on how big of an im age it is.
You may try to push the image as is, but if you get a "Invalid Sparse File Format At Header Magi" you have a compression error in the system image and can not be separated properly.
In windows open a command prompt window
Navigate to the SparseConverter_1.0.0.exe
SparseConverter.exe /compress [.img to compress] [.img to write to] [size in MB]
SparseConverter.exe /compress D:\system.img E:\ 256MB
Good Luck!
AndroidDestoryer said:
I have the same problem, keysersoza42. I did a "fastboot wipe system" and now I only have access to fastboot. Just need to find a way to put system back
Click to expand...
Click to collapse
Thanks.
I think the reason sideload isn't working is that my OTA update version is higher than the version downloadable as a zip...
Those are the steps I followed but it just doesn't work.
What exactly is the system image file you have linked to? Has it already gone through all the steps mentioned below? Is it plain old AOSP?
Thanks for all the help.
keysersoza42 said:
UPDATE: Link to system.img
goo.gl/Oz2X7o
Honestly all i did was follow the normal steps to do a side load. One thing to make sure of is that you have the correct version of the firmware; BBY, WW, etc. When you first download it it is a Zip file in a zip file so the second one is the one you need to side load. To step this out:
1) Download from Asus the correct update. If you dont know which version you have you can boot into the bootloader and one of the versions will say BBY, WW, etc...
2) Unzip the contents of the download from Asus. This should be another zip file.
3) Boot into recovery. If you get the 'dead android' press and hold vol down for about 5 seconds then press vol up.
4) In recovery enter sideload mode
5) adb sideload innerUpdate.zip file (the zip file you unzipped from the downloaded file).
6) works???
This is what worked for me. The other option is to fastboot a system.img. This is hard b\c Asus doesnt release them and when i dd'ed a system image off of the partition it wouldn't load. I did however find a way to get a system image on there through fastboot. If it comes down to this let me know and ill post more on it. Good luck!
---------- Post added at 08:55 PM ---------- Previous post was at 08:36 PM ----------
Sorry this is old, but just a couple of weeks ago i got the fastboot system.img to load. Here are the steps I did to produce this.
Some times its helpful to unpack a system image and/or repack to be flashed to an android device. For example the Asus tf103c required special compressing for parsing.
Tools you will need:
simg2img
make_ext4fs
Windows
SparseConverter_1.0.0.exe
Note: There were system.img files that were pulled directly from a rooted device using dd. These images would always give an error (flash_cmds_error!) while trying to write the image even if it had been compressed. The only way I got around this was to mount and unpack an image known to flash correctly (in my case the Intel BayTrail image from the intel android repo). The replace the contents with what every you wish to be in there (in my case the system folder from the Asus update.zip). The limitation here is you are limited to the size of the original flashable .img. Usually you can remove odex files to get around this and push those later if needed.
For the Asus images the NFC was removed from the list of features b\c it didnt have NFC which resulted in the settings app to crash during onCreate. These files were removed from the system directory.
/system/etc/permission/*.nfc*
Step-by-step guide
Steps 1-6 may be done in linux but step 7 and 11-15 must be done in windows.
In your workspace create a dir. mkdir sys
./simg2img system.img sys.raw
If you get : "Invalid sparse file format at header magi Failed to read sparse file"
You must decompress the image first with SparseConverter.
go to step 9 except replace 14 with this: SparseConverter.exe /decompress [.img to decompress] [.img to write to] then return to this step and continue.
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
sudo mount -t ext4 -o loop sys.raw sys/
sudo ./make_ext4fs -s -l 1638M -a system new.img sys/
Note: The size needs to change depending on how big of an im age it is.
You may try to push the image as is, but if you get a "Invalid Sparse File Format At Header Magi" you have a compression error in the system image and can not be separated properly.
In windows open a command prompt window
Navigate to the SparseConverter_1.0.0.exe
SparseConverter.exe /compress [.img to compress] [.img to write to] [size in MB]
SparseConverter.exe /compress D:\system.img E:\ 256MB
Good Luck!
Click to expand...
Click to collapse
Versions and system.img
Oh yeah i forgot about that. If you are ahead of the update then it will reject the load. Last i checked there was an "2.0.33.80" and a "2.0.33.101" on the asus website. I think 101 is 4.4.4, but not 100% sure on that.
The system.img is a stock image of the ASUS TF103C. It has no NFC b\c the device does not have NFC and if you leave some of the files in there the settings app will crash b\c it thinks its a feature it should find. The version should be "80" or 4.4.2. This will load regardless of the version that is currently loaded since you are loading it through the bootloader. I have tried this on both the WW and BBY versions and it worked. It has already gone through the steps i listed below.
RaVe-N said:
Thanks.
I think the reason sideload isn't working is that my OTA update version is higher than the version downloadable as a zip...
Those are the steps I followed but it just doesn't work.
What exactly is the system image file you have linked to? Has it already gone through all the steps mentioned below? Is it plain old AOSP?
Thanks for all the help.
Click to expand...
Click to collapse
Thanks mate.
I'll give it a whirl tonight and see how it goes. I should just be able to use "fastboot flash system system.img" correct?
keysersoza42 said:
Oh yeah i forgot about that. If you are ahead of the update then it will reject the load. Last i checked there was an "2.0.33.80" and a "2.0.33.101" on the asus website. I think 101 is 4.4.4, but not 100% sure on that.
The system.img is a stock image of the ASUS TF103C. It has no NFC b\c the device does not have NFC and if you leave some of the files in there the settings app will crash b\c it thinks its a feature it should find. The version should be "80" or 4.4.2. This will load regardless of the version that is currently loaded since you are loading it through the bootloader. I have tried this on both the WW and BBY versions and it worked. It has already gone through the steps i listed below.
Click to expand...
Click to collapse
fastboot
Yes that is correct and in the bootloader.
Did you give this a try? Did it work?
RaVe-N said:
Thanks mate.
I'll give it a whirl tonight and see how it goes. I should just be able to use "fastboot flash system system.img" correct?
Click to expand...
Click to collapse
keysersoza42 said:
Yes that is correct and in the bootloader.
Did you give this a try? Did it work?
Click to expand...
Click to collapse
YES! Thanks so much! had to fastboot erase cache and data as well but it works!
Cheers!
keysersoza42 said:
Yes that is correct and in the bootloader.
Did you give this a try? Did it work?
Click to expand...
Click to collapse
Hi again.
So after a couple of days usage I've noticed a few things...
There appears to be no camera driver. The camera app just complains that you need to have a camera to use it...
Also some things that used to work don't anymore: So far I've noticed the Google Inbox app doesn't work, and any dosbox app doesn't work. They just FC.
Should I retry again, maybe redo the factory reset. Maybe wipe the data partition from fastboot?
Camera and other crashes
Ill have to take a look at it. I hadnt used any of those so ill have to checkout it out. Ill try to get some time this week.
RaVe-N said:
Hi again.
So after a couple of days usage I've noticed a few things...
There appears to be no camera driver. The camera app just complains that you need to have a camera to use it...
Also some things that used to work don't anymore: So far I've noticed the Google Inbox app doesn't work, and any dosbox app doesn't work. They just FC.
Should I retry again, maybe redo the factory reset. Maybe wipe the data partition from fastboot?
Click to expand...
Click to collapse
Same issue
Hi guys,
Just noticed this thread, and gave the uploaded system.img a try using fastboot command.
It gives me the error that the system img cannot exceed a certain amount of bytes (500 mb'ish)
any tips?
Brick3d said:
Hi guys,
Just noticed this thread, and gave the uploaded system.img a try using fastboot command.
It gives me the error that the system img cannot exceed a certain amount of bytes (500 mb'ish)
any tips?
Click to expand...
Click to collapse
Try this: http://forum.xda-developers.com/showpost.php?p=60638910&postcount=78
RaVe-N said:
Try this: http://forum.xda-developers.com/showpost.php?p=60638910&postcount=78
Click to expand...
Click to collapse
If you need to unbrick your tablet, have a look at my simple guide here!
http://forum.xda-developers.com/android/help/comprehensive-guide-unbricking-asus-t3106719
keysersoza42 said:
Asus TF103C update.zip
UPDATE: Link to system.img
goo.gl/Oz2X7o
Honestly all i did was follow the normal steps to do a side load. One thing to make sure of is that you have the correct version of the firmware; BBY, WW, etc. When you first download it it is a Zip file in a zip file so the second one is the one you need to side load. To step this out:
1) Download from Asus the correct update. If you dont know which version you have you can boot into the bootloader and one of the versions will say BBY, WW, etc...
2) Unzip the contents of the download from Asus. This should be another zip file.
3) Boot into recovery. If you get the 'dead android' press and hold vol down for about 5 seconds then press vol up.
4) In recovery enter sideload mode
5) adb sideload innerUpdate.zip file (the zip file you unzipped from the downloaded file).
6) works???
This is what worked for me. The other option is to fastboot a system.img. This is hard b\c Asus doesnt release them and when i dd'ed a system image off of the partition it wouldn't load. I did however find a way to get a system image on there through fastboot. If it comes down to this let me know and ill post more on it. Good luck!
---------- Post added at 08:55 PM ---------- Previous post was at 08:36 PM ----------
Sorry this is old, but just a couple of weeks ago i got the fastboot system.img to load. Here are the steps I did to produce this.
Some times its helpful to unpack a system image and/or repack to be flashed to an android device. For example the Asus tf103c required special compressing for parsing.
Tools you will need:
simg2img
make_ext4fs
Windows
SparseConverter_1.0.0.exe
Note: There were system.img files that were pulled directly from a rooted device using dd. These images would always give an error (flash_cmds_error!) while trying to write the image even if it had been compressed. The only way I got around this was to mount and unpack an image known to flash correctly (in my case the Intel BayTrail image from the intel android repo). The replace the contents with what every you wish to be in there (in my case the system folder from the Asus update.zip). The limitation here is you are limited to the size of the original flashable .img. Usually you can remove odex files to get around this and push those later if needed.
For the Asus images the NFC was removed from the list of features b\c it didnt have NFC which resulted in the settings app to crash during onCreate. These files were removed from the system directory.
/system/etc/permission/*.nfc*
Step-by-step guide
Steps 1-6 may be done in linux but step 7 and 11-15 must be done in windows.
In your workspace create a dir. mkdir sys
./simg2img system.img sys.raw
If you get : "Invalid sparse file format at header magi Failed to read sparse file"
You must decompress the image first with SparseConverter.
go to step 9 except replace 14 with this: SparseConverter.exe /decompress [.img to decompress] [.img to write to] then return to this step and continue.
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
sudo mount -t ext4 -o loop sys.raw sys/
sudo ./make_ext4fs -s -l 1638M -a system new.img sys/
Note: The size needs to change depending on how big of an im age it is.
You may try to push the image as is, but if you get a "Invalid Sparse File Format At Header Magi" you have a compression error in the system image and can not be separated properly.
In windows open a command prompt window
Navigate to the SparseConverter_1.0.0.exe
SparseConverter.exe /compress [.img to compress] [.img to write to] [size in MB]
SparseConverter.exe /compress D:\system.img E:\ 256MB
Good Luck!
Click to expand...
Click to collapse
the link to system.img is not working

[Q] ADB sideload how to install/update a specific file in a specific directory

Hello guys,
so i have messed up my ZenFone 5's booting configuration. good thing is, i know where i have messed up, unlike other noobs like myself. i have been modifying the adbon.sh file, where i added a conditional to check if a file(/dev/keycheck) exists and if it exists(will always return 'true'), to extract the contents of a recovery.tar(custom recovery). problem is, now i cannot boot normally into my device. if anyone can help me with three things, i'd be grateful.
1. How to modify the adbon.sh file using:
(a) preferred choice: using adb sideload <filename> ( i need to update THAT SPECIFIC FILE ONLY) ->(the file is in /system/bin/)
(b) secondary choice: using fastboot flash command. is it possible to update a single file using fastboot flash? (probably not, i think) should i have to flash the entire system partition with a stock/custom ROM? (i already know most about this, but a clear good guide can help me)(i know it will overwrite the total /system partition)
2. Give me a link to the original(stock) adbon.sh file if method 1(a) is possible.
3. Give me a compatible link to a CWM recovery for my device, ASUS_T00J (the recovery in my recovery.tar is a stock recovery, i got f**** fooled into downloading a stock one where i thought it was a custom CWM recovery)

C5 Ultra fastboot system image

Can this be done? fastboot flash system system.ext4 or system.sin? i have tried with numerous and upto date fastboot executables but always receive fail with error FAILED (remote: Unknown chunk type). I have created sparse image chunks and even those won't flash with same error about chunk type. Am i doing something wrong or is fastboot no longer a good way to flash system images on newer S1 bootloaders? I understand that i can do this via custom recovery but for a project of mine i need fastboot to work. Any ideas gentlemen?
While In TWRP recovery you could try adb shell > su then dd the system.ext4.img.
I am not 100% but I don't think the system.ext4 that is produced by FlashTool from the .sin is a sparsed .img but is a normal .img. I think fastboot may need sparse.img's
Backup as always of course
Example:
Code:
adb shell
Code:
su
(su Probably not needed in TWRP)
Code:
dd if=/sdcard/system.ext4.img of=/dev/block/platform/mtk-msdc.0/by-name/system
EDIT: Sorry should of read your post better that will teach me for speed reading :laugh:
Still think it requires a proper sparse .img not sure what method you used.
PS: I assume you tried to rename it with the ext4 removed eg: just system.img

Root Vivo Y51L using Magisk

Warning!!! I’m not responsible for anything (death, destruction, or nuclear war) which happens to you & your stuffs after following this guide.
Downloads :-
RR-Magisk-Root-vivo-Y51L.zip
TipsyOS Prerooted ROM
How to Install ?
1. Make sure you have RR rom installed(Get it Here) before flashing RR-Magisk-17.2-vivo-Y51L.zip
2. Reboot to TWRP recovery
3. Install RR-Magisk-17.2-vivo-Y51L.zip or TipsyOs-prerooted.zip, whatever your choice is.
4. Reboot to System.
5. If root worked, Come back and the hit the thanks button below!
:Video Tutorial on the same:
https://www.youtube.com/watch?v=omUggCUJGGk​
-:NOTES FOR VIVO Y51L DEVS:-​1. Played with Magisk once for around 3 hours
2. You wanna know ? Seriously ? Okay
3. Disable Selinux which isn't needed by root ! (Just for fun)
4. Downlad Magisk-latest.zip
5. Extract magiskinit from arm folder
6. Push magiskinit to /data/local/tmp
7. Run :
adb shell
cd data/local/tmp
chmod 755 magiskinit
./magiskinit -x magisk magisk
exit
adb pull /data/local/magiskinit​8. Now you will get an file with name magisk in the current dir
9. Place it in the /system/xbin/ folder of your rom
10. Place Magisk Manager apk in /sytem/app/Magisk
11. Now, boot.img part :
Following things to be done in boot.img :
Created /sbin/permissive.sh
Patched default.prop, fstab.qcom, init.environ.rc, init.rc, init.recovery.service.rc, init.root.rc, init.superuser.rc (create one if..), sepolicy, service_contexts
If you wanna know the stuff i added in these files, just search 'Naveen' in all those files (Yeah, i reckon that, i'm Superlazy to find & write those here even though i can write 55wpm)​12. What about how to patch sepolicy ? Uh, I used supolicy by @Chainfire (Thanks man....)
13. How to find selinux denies ? Install audit2allow in your linux system & :
adb shell dmesg | audit2allow -p (your sepolicy here, use 'adb pull /sys/fs/selinux/policy') > selinux.error
Now push supolicy to phone (Download SuperSU.zip)
adb push ./ /data/local/tmp/tony/
adb shell
cd /data/local/tmp/tony/
chmod 755 *
./supolicy --live "error here"
./supolicy --save /data/local/tmp/tony/new_sepolicy
exit
adb pull /data/local/tmp/tony/new_sepolicy
Rename new_sepolicy to sepolicy & replace your original one in boot.img
Repack your boot.img​13. This won't work with stock rom since we get operation not permitted errors while trying to exec su, i think it's Linux Capabilities (Read more about that here : http://man7.org/linux/man-pages/man7/capabilities.7.html) Don't ask me why it works in cm roms if kernel is the problem
14. Whatever you wanna ask me, reply here please (I'm don't check private messages anymore)
Official Telegram Group for Vivo Y51L/Y21L : https://t.me/vivodevelopment
Fix for bugs
Please fix the bugs asap....i am facing audio and video playback problems
#ask
are you facing mic and call problem?
use y51l kernal
bro.
can you use y51l kernal to patch file?
so that y51l may get rooted with no bugs
Bugs are there
*Front camera not working
*Flash light not working
*Magisk not installing
y51 kernal source restore
can you make tutorial to restore y51 kernal source .also there a wifi bug wont turn on
device stuck at app starting up....pls hlp
installed the miui root boot.img and twrp.img but after rebooting the device was stuck
Can't root
How to download
Magisk cannot run in third-party ROM
It's a pity that my favorite ROM cannot be ROOT. It's not that the installation fails, but it always stops working.
I have a more useful method for rooting vivo y51L
Requirements:-
OTG
Data cable
A second phone
Bootloader unlock
Bugjaeger application
Root checker application
Your custom ROM or stock ROM zip file
Firstly we have to unzip our stock or custom ROM zip file, after unzipping file we have to move out boot.img file and save it in our internal storage . After that we have to flash the boot.img file in magisk and after flashing we will get a magisk patch in our download folder . We have to send that patch to our second phone and save it in it's internal storage .after that we have to boot our phone in fastboot mode and for that we have to power off our device and press volume down and power button .After booting the device in fastboot mode you have to connect otg in your second device and data cable in fastboot device . After that connect data cable and otg , after connecting the Bugjaeger application will open automatically . after that find an icon which looks like lightning in app and click that , after that you will find a blue dot at the bottom of the screen . Click that button and you will get inside command section after that type the first command :- Fastboot devices and click the play button at the right side. After that you will see a serial number which means you are connected. After that write the second command :- Fastboot flash boot , after writing it we will find a paper clip type button at the top right corner , just click that and attach the magisk patch which we sent to our second device and tap the play button at the right side . After the command has succeeded we have have to reboot our fastboot phone after removing data cable and otg . After rebooting just open root checker application and keep internet on , Click on verify root. Your phone is rooted now.
Now do whatever you want to do
Fun fact :- this method works on every phone
Those who want to say me thanks for this method please reply me

Flash boot.img using TWRP openrecoveryscript

Hey,
is there a simple way to flash a new kernel / boot.img using TWRP by script / openrecoveryscript? I can select "Install Image" in the UI and flash the boot.img just fine, but I want to script that so I can flash devices easily or even remotely just by uploading the openrecoveryscript and the image to flash.
The documentation at https://twrp.me/faq/openrecoveryscript.html is pretty useless, it doesn't even mention that '/cache/recovery/openrecoveryscript' will be executed by TWRP.
The install command expects a zip file, the restore command a TWRP backup.
Any ideas? Thx
TWRP's OpenRecoveryScript ( read: command line ) support is great.
It's source code here:
Team-Win-Recovery-Project/openrecoveryscript.cpp at android-5.0 · TeamWin/Team-Win-Recovery-Project
Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/ - Team-Win-Recovery-Project/openrecoverysc...
github.com
IMO the mentioned TWRP recovery command line guide isn't useless as you claim.
Using a simple text file, saved in the /cache/recovery/ directory with the name openrecoveryscript, the TWRP recovery can be instructed to execute the described set of commands during the startup, e.g. the installation of a ZIP archive such as a ROM, or the deletion of a partition.
@jwoegerbauer I think you want to refer to https://github.com/TeamWin/android_bootable_recovery/blob/android-10.0/openrecoveryscript.cpp instead, as https://github.com/TeamWin/Team-Win-Recovery-Project ist not maintained if I understand it correctly.
However, I don't want to read the source to find out how to (not) flash a boot.img using TWRP without the UI.
If I understand the docs correctly, TWRP does not support flashing images. It supports restoring backups and installing zips.
I've also tried to find out if there is an easy way to convert the boot.img to an installable zip or TWRP recovery, but so far I've not succeeded.
Do you know an answer to this?
Use Fastboot to flash boot.img
I can't use fastboot as the device (Samsung) does not support it and it would also require physical access.
So far my workflow is to flash the image to a device I have by hand (manually), create a backup of the boot partition with TWRP (manually), download it and then deploy the backup to remote devices via adb and restore them on reboot via the openrecoveryscript.
My workflow would be simplified if could remove the need for the manual process that creates an image/backup that can be flashed remotely.
Well, I found a simpler way to flash the kernel / boot.img directly within the os. I can simply overwrite the partition:
adb push boot.img /sdcard/boot.img
adb shell su -c "dd if=/sdcard/boot.img of=/dev/block/mmcblk0p14"
Don't even have to reboot the device...
For those wondering from where to get the block-device... See ls -l /dev/block/platform/msm_sdcc.1/by-name/ ("msm_sdcc.1" part may be different)

Categories

Resources