update ota with twrp - Fire TV Q&A, Help & Troubleshooting

Hi,
I have twrp and stock rom on my Fire TV Stick 2 (tank). I get notification that there is an update, but whenever I try press install Unothing happens. I also tried to manually update, but it says "update failed".
Is there any way to install the latest OTA?

lars1384 said:
Hi,
I have twrp and stock rom on my Fire TV Stick 2 (tank). I get notification that there is an update, but whenever I try press install Unothing happens. I also tried to manually update, but it says "update failed".
Is there any way to install the latest OTA?
Click to expand...
Click to collapse
That is easy. Download the ota file with the settings (check update), then reboot to TWRP.
The update *.bin file is probably stored at:
Code:
/sdcard/Android/data/com.amazon.device.software.ota/files/
Check the size of the file (don't flash partial updates), a full update bin should take about 500mb. You have to rename the file from bin to zip, then flash it with twrp.

Sus_i said:
That is easy. Download the ota file with the settings (check update), then reboot to TWRP.
The update *.bin file is probably stored at:
Code:
/sdcard/Android/data/com.amazon.device.software.ota/files/
Check the size of the file (don't flash partial updates), a full update bin should take about 500mb. You have to rename the file from bin to zip, then flash it with twrp.
Click to expand...
Click to collapse
Thanks a lot.
It worked

For some reason, I can't find the new OTA in this folder anymore:
/sdcard/Android/data/com.amazon.device.software.ota/files/
Does anyone know, where the new path is?

In case the download is complete, it should be in that folder...
However, the .bin file could be also placed in /cache
Don't forget to rename the file to .zip, or twrp install won't show/find the file.

Related

[Q] Help restoring Kindle Fire (sending it back to Amazon)

So I followed the steps in this thread (http://forum.xda-developers.com/showthread.php?t=1638452) in the second post. I downloaded the update and renamed it update.zip and proceeded to do the factory reset. After this I went to install the update and was unable to locate it. So I went back to my computer and actually converted the file into a zip folder and copied it onto my kindle. This time it showed up but when I went to install it almost immediately came up with an error message ( Error flashing zip '/sdcard/update.zip' ).
I'm not sure if I was supposed to follow the steps in the first part of the post mainly because I have no idea what this means (adb uninstall com.noshufou.android.su) and because I've seen similar steps on other sites without the first half of that post.
Appreciate any help that can be provided.
You are supposed to rename the update.bin to update.zip, not zip up the original update.bin
soupmagnet said:
You are supposed to rename the update.bin to update.zip, not zip up the original update.bin
Click to expand...
Click to collapse
When I did that I was unable to even locate the file.
I'm not sure if this makes a difference or not (in fact I'm pretty sure it doesn't) but the icon next to it is the VLC icon.
I've also tried using the kindle update utility to download the latest stock update zip. Nothing. I see my update.zip when I go into the file explorer under advanced or if I mount my usb to my computer but as soon as I go to install it's not showing up
hahaha I feel so dumb right now. I found it on the file explorer and it was named update.zip.bin. I then renamed it while in twrp and was able to find and install it. For whatever reason when I renamed it on my computer it would always end up as update.zip.bin
Download the update-kindle-6.3.1.bin from the Amazon website.
Rename the update-kindle-6.3.1.bin to update-kindle-6.3.1.zip.
Transfer the update-kindle-6.3.1.zip to the sdcard.
After wiping system and factory reset in TWRP, use the navigation window in the install menu of TWRP to navigate to your sdcard.
Flash the update-kindle-6.3.1.zip

[File request] debuggerd from KRT16S for LTE version

Nexus 7 2013 LTE
I found one already here:
http://forum.xda-developers.com/showpost.php?p=47642071&postcount=10
But it seems to me that it's for the Wi-Fi version.
So if anybody could please provide the LTE version I could update from 4.4 to 4.4.2.
Thank you very much in advance!
curiousde2002 said:
Nexus 7 2013 LTE
I found one already here:
http://forum.xda-developers.com/showpost.php?p=47642071&postcount=10
But it seems to me that it's for the Wi-Fi version.
So if anybody could please provide the LTE version I could update from 4.4 to 4.4.2.
Thank you very much in advance!
Click to expand...
Click to collapse
debuggerd from KRT16S (deb/LTE).
gtj0 said:
debuggerd from KRT16S (deb/LTE).
Click to expand...
Click to collapse
Thank you very much!
But how do I replace it, as I saw that the mentioned Wi-Fi version came in a flashable zip file?
Or can I just overwrite it with a file explorer like any other file?
curiousde2002 said:
Thank you very much!
But how do I replace it, as I saw that the mentioned Wi-Fi version came in a flashable zip file?
Or can I just overwrite it with a file explorer like any other file?
Click to expand...
Click to collapse
If you are rooted, then yes you can remount /system read-write and just overwrite the file with a file explorer or with adb push. If not, I can create a flashable zip for you. Let me know.
EDIT:
Attached the flashable...
gtj0 said:
If you are rooted, then yes you can remount /system read-write and just overwrite the file with a file explorer or with adb push. If not, I can create a flashable zip for you. Let me know.
EDIT:
Attached the flashable...
Click to expand...
Click to collapse
I tried to install the flashable zip with TWRP but it failed.
Then I pushed the unzipped file you uploaded first via ADB.
The process was finished without error but the timestamp of the file remained the same, 08dec, while yours is 10dec.
Nevertheless I tried the update to 4.4.2 via sideload again, and it failed again with the same error message, something like "system/bin/debuggerd has unexpected content".
Could you update to 4.4.2 with your debuggerd file?
curiousde2002 said:
I tried to install the flashable zip with TWRP but it failed.
Then I pushed the unzipped file you uploaded first via ADB.
The process was finished without error but the timestamp of the file remained the same, 08dec, while yours is 10dec.
Nevertheless I tried the update to 4.4.2 via sideload again, and it failed again with the same error message, something like "system/bin/debuggerd has unexpected content".
Could you update to 4.4.2 with your debuggerd file?
Click to expand...
Click to collapse
Was the device in recovery mode or booted normally when you tried the adb push? If in recovery, was /system mounted? What was the failure in TWRP with the debuggerd flashable file and what's the exact filename of the 4.4.2 update file you're using? That'll tell me the exact version of debuggerd you'll need to pass the checksum validation.
gtj0 said:
Was the device in recovery mode or booted normally when you tried the adb push? If in recovery, was /system mounted? What was the failure in TWRP with the debuggerd flashable file and what's the exact filename of the 4.4.2 update file you're using? That'll tell me the exact version of debuggerd you'll need to pass the checksum validation.
Click to expand...
Click to collapse
I did all this with the Nexus Root Toolkit made by Wugfresh.
The device booted normally when the adb push took place.
I added two screenshots, one of the zip install and the other one of the update.
The 4.4.2 update file is from the also failed OTA update which I found in the cache folder and then saved.
The filename:
f221553ab745f4671e2c2f6a2cb0e4bf857886ea.signed-razorg-KOT49H-from-KRT16S.f221553a.zip
curiousde2002 said:
I did all this with the Nexus Root Toolkit made by Wugfresh.
The device booted normally when the adb push took place.
I added two screenshots, one of the zip install and the other one of the update.
The 4.4.2 update file is from the also failed OTA update which I found in the cache folder and then saved.
The filename:
f221553ab745f4671e2c2f6a2cb0e4bf857886ea.signed-razorg-KOT49H-from-KRT16S.f221553a.zip
Click to expand...
Click to collapse
Ahhhh. I had a typo in the updater script. Try this one. I tested it this time.
gtj0 said:
Ahhhh. I had a typo in the updater script. Try this one. I tested it this time.
Click to expand...
Click to collapse
SUCCESS!!!
Everything worked perfectly, installation of the zip file took about one second, the sideload update a little bit longer
Thank you very much again for your help !!!

[Guide] Root Oppo F1s(A1601) + SuperSU without custom recovery or unlocked bootloader

EDIT: This root method has been outdated, see the newer guide instead https://forum.xda-developers.com/android/general/tutorial-root-oppo-f1s-flashtool-6-0-t3651220
Why I made this tutorial:
Recently some members claimed that KingRoot is not working for Oppo F1s(A1601) anymore, I assume it's because Kingroot uses cloud based root method, means Kingroot downloads root package and command from cloud and execute on your phone. Maybe the problem was caused by the change of their server, some configuration has been replaced? At this time, I still have a working root method working now, so I would like to share it with everyone Also, you can follow this guide to get rid of the superuser App from those android root exploit app and use SuperSU.
In short, this tutorial tells:
1.How to Root Oppo F1s(A1601) with KingoRoot.(Though cloud based root App Kingroot is not working at this period but KingoRoot the offline one is still working)
2.Though KingoRoot prevent you to switch to other superuser App, we can still replace it with SuperSU with few steps, no custom recovery needed.
****NOTE****
There're various version of KingoRoot apk over the Internet, use the APK version I provided at attachment can guarantee there're no unexpected errors.
The script to replace kingo root was based on the one here but with a little modification, I've added a infinite loop for the script because KingoRoot cause a force reboot(soft reset) right after you delete root from the app, I assume its because KingoRoot want to prevent you to replace it. A infinite loop can make sure the file copying action has been done before your phone reboot.
Steps to Root F1s and Install SuperSU:
1.Install android terminal from Google Play: https://play.google.com/store/apps/details?id=jackpal.androidterm
2.Download the attachment, extract the zip archive, you get an APK "KingoRoot.apk" and a folder "rmkingo", copy the APK and the folder to your Internal storge(Sdcard)
3.Use any file management App to open KingoRoot.apk and install KingoRoot.apk
4.Open KingoRoot and click "one click root" then wait it to obtain root
5.After root succeeded, Open previous installed "Terminal Emulator for Android" and type
Code:
su
. Now KingoRoot's Superuser should pop up and ask you if you want to grant root access, allow it.
6.Now change terminal directory to the script folder, terminal type
Code:
cd /sdcard/rmkingo
7.Now execute the first script, terminal type
Code:
sh step0.sh
8.If there's no error on the previous action, Now proceed to execute the second script which is an infinite loop, you might see infinite error message after you executed it, terminal type
Code:
sh step1.sh
9.Now make sure the Terminal emulator is still open and the script is still running in background, just open SuperUser(installed by KingoRoot), find and click "Remove root" in the option of the App.
10.Your phone should be forced reboot now, after reboot, install SuperSU from google play: https://play.google.com/store/apps/details?id=eu.chainfire.supersu&hl=zh_TW
11.Open SuperSU and update su binary file with normal mode and wait, it should finish in 2-3 minutes.
12.Hit thanks(My pleasure)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
above method has been confirmed working with the latest rom from my region,(date 2017/02/12 still working)
Rom: A1601_TW_11_A.17_161003
I am on build a1601ex_11_a27_170111
its currently letest update in india
sagargjasani264 said:
I am on build a1601ex_11_a27_170111
its currently letest update in india
Click to expand...
Click to collapse
Wow, Taiwan haven't receive any update since October........Looks like the rom of our region is terribly outdated,lol
A lot of people complaint on oppo forum of our region why there're no updates........
Is it method work for the rom from india?
evilhawk00 said:
wow, taiwan haven't receive any update since october........looks like the rom of our region is terribly outdated,lol
a lot of people complaint on oppo forum of our region why there're no updates........
Is it method work for the rom from india?
Click to expand...
Click to collapse
kingoroot is on 90% since last 20min
---------- Post added at 12:22 PM ---------- Previous post was at 12:10 PM ----------
sorry bro but kingoroot faild...
Sorry kingoroot failed error code : 0x196514
Lyes2 said:
Sorry kingoroot failed error code : 0x196514
Click to expand...
Click to collapse
Hi, I assume you have to downgrade your rom. Find a older version of your rom, flash it via OPPO stock recovery and this method will work.
In my region, Taiwan's newest rom date is 2016 October, so this method work. OPPO might fixed this CVE exploit in their new rom.
The rom I currently use can be downloaded from OPPO Taiwan website, however I'm not sure if it can work on your device, so you might need to find an older version of your region
You can try to get root with older firmware, flash twrp recovery with root app, such as rashr,then once you have twrp recovery, you can flash the new OTA update package, but be sure to modify the update package so you will not loose root after update. However, I think just stick with older firmware will be easier
Failed
Directory not found bro
evilhawk00 said:
Hi, I assume you have to downgrade your rom. Find a older version of your rom, flash it via OPPO stock recovery and this method will work.
In my region, Taiwan's newest rom date is 2016 October, so this method work. OPPO might fixed this CVE exploit in their new rom.
The rom I currently use can be downloaded from OPPO Taiwan website, however I'm not sure if it can work on your device, so you might need to find an older version of your region
You can try to get root with older firmware, flash twrp recovery with root app, such as rashr,then once you have twrp recovery, you can flash the new OTA update package, but be sure to modify the update package so you will not loose root after update. However, I think just stick with older firmware will be easier
Click to expand...
Click to collapse
what kind of modification do you exactly need to do to the update package to not loose root after update?
ngoralph said:
what kind of modification do you exactly need to do to the update package to not loose root after update?
Click to expand...
Click to collapse
I made one and got root with A27 , all you need is a twrp and a twrp flashable firmware zip.
Here's what I did,first I found that the TWRP by @BouyaPK did not have the same device model settings in comparison with the stock recovery, so I made a little modification to his TWRP image, now the offical firmware zip can pass Device detection test.
!!Before doing it , make sure you have flashed the modified recovery(the one from attachment) to your phone, official firmware is only flashable via this modified recovery and stock recovery
Download here
View attachment OPPO_F1s_twrp3.0_modified_devicemodel.zip
this is the example with the ota update package (A19 to A27 upgrade package around 150mb via coloros update manager app)
Now lets start to modify official firmware, follow my steps:
1.extract the newest official firmware zip.
2.now open the extracted folder, navigate to \META-INF\com\google\android\
3.find the file updater-script and open it with text editor( I suggest NotePad++)
4.you'll find a lot of lines start with apply_patch(xxxxx), remove the one with this file "/system/recovery-from-boot.p"
5.(if needed) also remove boot image sha1 check, in my case I have magisk installed, my boot image do not have the same sha1 value with stock boot image, so I found the line that checkes boot.img and remove it
6.done the file edit and save the file
7.repack it back to a zip file and sign the package with test keys
How to sign?
1.Download the sign package from attachment
2.have Java installed on your PC
3.Open a terminal at the same location with the keys and signapk.jar
4.terminal type
Code:
java -jar signapk.jar -w platform.x509.pem platform.pk8 my_modified_firmware.zip my_modified_firmware-signed.zip
8.install with twrp and you still have twrp exist, flash supersu zip or magisk zip
above is the way to modify a PATCH zip ota file, if you are modifying a full package, which may be easier,
the full package's update script write full image to phone instead, so you just need to modify the image in the ota package.
all you just have to make sure the new firmware do not replace twrp with stock recovery, so
1.try to extract the image in the package and modify the image file, remove files such as "recovery-from-boot.p" from the image then rebuild the image and calculate the new sha1 value of the new image(CarlivImageKitchen is a good tool to rebuild image)
2.replace the old sha1 hash in updater-script, repack and sign the zip.
3.flash with twrp
4.flash superSu zip or magisk zip after the firmware flash with twrp can get root.
evilhawk00 said:
I made one and got root with A27 , all you need is a twrp and a twrp flashable firmware zip.
Here's what I did,first I found that the TWRP by @BouyaPK did not have the same device model settings in comparison with the stock recovery, so I made a little modification to his TWRP image, now the offical firmware zip can pass Device detection test.
!!Before doing it , make sure you have flashed the modified recovery(the one from attachment) to your phone, official firmware is only flashable via this modified recovery and stock recovery
Download here
this is the example with the ota update package (A19 to A27 upgrade package around 150mb via coloros update manager app)
Now lets start to modify official firmware, follow my steps:
1.extract the newest official firmware zip.
2.now open the extracted folder, navigate to \META-INF\com\google\android\
3.find the file updater-script and open it with text editor( I suggest NotePad++)
4.you'll find a lot of lines start with apply_patch(xxxxx), remove the one with this file "/system/recovery-from-boot.p"
5.(if needed) also remove boot image sha1 check, in my case I have magisk installed, my boot image do not have the same sha1 value with stock boot image, so I found the line that checkes boot.img and remove it
6.done the file edit and save the file
7.repack it back to a zip file and sign the package with test keys
How to sign?
1.Download the sign package from attachment
2.have Java installed on your PC
3.Open a terminal at the same location with the keys and signapk.jar
4.terminal type
8.install with twrp and you still have twrp exist, flash supersu zip or magisk zip
above is the way to modify a PATCH zip ota file, if you are modifying a full package, which may be easier,
the full package's update script write full image to phone instead, so you just need to modify the image in the ota package.
all you just have to make sure the new firmware do not replace twrp with stock recovery, so
1.try to extract the image in the package and modify the image file, remove files such as "recovery-from-boot.p" from the image then rebuild the image and calculate the new sha1 value of the new image(CarlivImageKitchen is a good tool to rebuild image)
2.replace the old sha1 hash in updater-script, repack and sign the zip.
3.flash with twrp
4.flash superSu zip or magisk zip after the firmware flash with twrp can get root.
Click to expand...
Click to collapse
Can you send me a stock recovery for Oppo F1s or Color Os 3.0 version
[email protected]
I want ask to my friend to build the custom rom with latest version of TWRP.
Ananaqil12 said:
Can you send me a stock recovery for Oppo F1s or Color Os 3.0 version
[email protected]
I want ask to my friend to build the custom rom with latest version of TWRP.
Click to expand...
Click to collapse
If you want stock recovery image, check my reply here https://forum.xda-developers.com/showpost.php?p=71006625&postcount=26
evilhawk00 said:
I made one and got root with A27 , all you need is a twrp and a twrp flashable firmware zip.
Here's what I did,first I found that the TWRP by @BouyaPK did not have the same device model settings in comparison with the stock recovery, so I made a little modification to his TWRP image, now the offical firmware zip can pass Device detection test.
!!Before doing it , make sure you have flashed the modified recovery(the one from attachment) to your phone, official firmware is only flashable via this modified recovery and stock recovery
Download here
View attachment 4137856
this is the example with the ota update package (A19 to A27 upgrade package around 150mb via coloros update manager app)
Now lets start to modify official firmware, follow my steps:
1.extract the newest official firmware zip.
2.now open the extracted folder, navigate to \META-INF\com\google\android\
3.find the file updater-script and open it with text editor( I suggest NotePad++)
4.you'll find a lot of lines start with apply_patch(xxxxx), remove the one with this file "/system/recovery-from-boot.p"
5.(if needed) also remove boot image sha1 check, in my case I have magisk installed, my boot image do not have the same sha1 value with stock boot image, so I found the line that checkes boot.img and remove it
6.done the file edit and save the file
7.repack it back to a zip file and sign the package with test keys
How to sign?
1.Download the sign package from attachment
2.have Java installed on your PC
3.Open a terminal at the same location with the keys and signapk.jar
4.terminal type
Code:
java -jar signapk.jar -w platform.x509.pem platform.pk8 my_modified_firmware.zip my_modified_firmware-signed.zip
8.install with twrp and you still have twrp exist, flash supersu zip or magisk zip
View attachment 4137905
above is the way to modify a PATCH zip ota file, if you are modifying a full package, which may be easier,
the full package's update script write full image to phone instead, so you just need to modify the image in the ota package.
all you just have to make sure the new firmware do not replace twrp with stock recovery, so
1.try to extract the image in the package and modify the image file, remove files such as "recovery-from-boot.p" from the image then rebuild the image and calculate the new sha1 value of the new image(CarlivImageKitchen is a good tool to rebuild image)
2.replace the old sha1 hash in updater-script, repack and sign the zip.
3.flash with twrp
4.flash superSu zip or magisk zip after the firmware flash with twrp can get root.
Click to expand...
Click to collapse
There are no lines that say apply patch
diosdetiempo said:
[/HIDE]
There are no lines that say apply patch
Click to expand...
Click to collapse
As I mentioned, only the small OTA Update package(smaller than 300MB) extracted from Built in update manager App has the line apply patch.
You are using a full package which is another situation.
If you have the full ota firmware downloaded from official website, you can try the follow steps
1.first make a nandroid backup of the old 5.1, make sure you can always restore your phone with backup
2.flash the official firmware zip with the twrp I attach( if any error occurred,do not reboot ,restore your phone with nandroid backup, also write down the error, and see which image file does not have the match SHA1, calculate and modify the sha1 of that line)
3.if step 2 succed ,do not reboot flash superSU zip file
4reboot, you may have superSU and your twrp may be replaced by stock recovery, use rashr flash twrp back again since you have root
evilhawk00 said:
As I mentioned, only the small OTA Update package(smaller than 300MB) extracted from Built in update manager App has the line apply patch.
You are using a full package which is another situation.
If you have the full ota firmware downloaded from official website, you can try the follow steps
1.first make a nandroid backup of the old 5.1, make sure you can always restore your phone with backup
2.flash the official firmware zip with the twrp I attach( if any error occurred,do not reboot ,restore your phone with nandroid backup, also write down the error, and see which image file does not have the match SHA1, calculate and modify the sha1 of that line)
3.if step 2 succed ,do not reboot flash superSU zip file
4reboot, you may have superSU and your twrp may be replaced by stock recovery, use rashr flash twrp back again since you have root
Click to expand...
Click to collapse
It worked!
Here's a little guide
1) Put your TWRP, SuperSU and Android 6.0 Oppo F1S ROM onto SD card
2) Use Flashify to flash TWRP
3) Reboot into TWRP recovery
4) Flash Android 6.0 F1S ROM
5) Flash SuperSU
6) Reboot phone and you should be good to go
evilhawk00 said:
As I mentioned, only the small OTA Update package(smaller than 300MB) extracted from Built in update manager App has the line apply patch.
You are using a full package which is another situation.
If you have the full ota firmware downloaded from official website, you can try the follow steps
1.first make a nandroid backup of the old 5.1, make sure you can always restore your phone with backup
2.flash the official firmware zip with the twrp I attach( if any error occurred,do not reboot ,restore your phone with nandroid backup, also write down the error, and see which image file does not have the match SHA1, calculate and modify the sha1 of that line)
3.if step 2 succed ,do not reboot flash superSU zip file
4reboot, you may have superSU and your twrp may be replaced by stock recovery, use rashr flash twrp back again since you have root
Click to expand...
Click to collapse
update: the only issue i find is that SIM card isn't recognized
diosdetiempo said:
update: the only issue i find is that SIM card isn't recognized
Click to expand...
Click to collapse
sim card not recognized!? Sorry I can't really understand the reason of that because I don't have this problem.
Just a thought, maybe you lost baseband? Can you see your phone's IMEI number in settings? If you found null IMEI, that means you have lost your baseband, otherwise that's just something else maybe a small unknown issue, may also be the access point and protocol was not included in the 6.0 rom
If you lost your IMEI, I assume you already did the nandroid backup before, in twrp backup of NVRAM is the IMEI part, you should be able to recover your IMEI with that nvram backup
evilhawk00 said:
sim card not recognized!? Sorry I can't really understand the reason of that because I don't have this problem.
Just a thought, maybe you lost baseband? Can you see your phone's IMEI number in settings? If you found null IMEI, that means you have lost your baseband, otherwise that's just something else maybe a small unknown issue, may also be the access point and protocol was not included in the 6.0 rom
If you lost your IMEI, I assume you already did the nandroid backup before, in twrp backup of NVRAM is the IMEI part, you should be able to recover your IMEI with that nvram backup
Click to expand...
Click to collapse
have you tested with 6.0?
evilhawk00 said:
I made one and got root with A27 , all you need is a twrp and a twrp flashable firmware zip.
Here's what I did,first I found that the TWRP by @BouyaPK did not have the same device model settings in comparison with the stock recovery, so I made a little modification to his TWRP image, now the offical firmware zip can pass Device detection test.
!!Before doing it , make sure you have flashed the modified recovery(the one from attachment) to your phone, official firmware is only flashable via this modified recovery and stock recovery
Download here
View attachment 4137856
this is the example with the ota update package (A19 to A27 upgrade package around 150mb via coloros update manager app)
Now lets start to modify official firmware, follow my steps:
1.extract the newest official firmware zip.
2.now open the extracted folder, navigate to \META-INF\com\google\android\
3.find the file updater-script and open it with text editor( I suggest NotePad++)
4.you'll find a lot of lines start with apply_patch(xxxxx), remove the one with this file "/system/recovery-from-boot.p"
5.(if needed) also remove boot image sha1 check, in my case I have magisk installed, my boot image do not have the same sha1 value with stock boot image, so I found the line that checkes boot.img and remove it
6.done the file edit and save the file
7.repack it back to a zip file and sign the package with test keys
How to sign?
1.Download the sign package from attachment
2.have Java installed on your PC
3.Open a terminal at the same location with the keys and signapk.jar
4.terminal type
Code:
java -jar signapk.jar -w platform.x509.pem platform.pk8 my_modified_firmware.zip my_modified_firmware-signed.zip
8.install with twrp and you still have twrp exist, flash supersu zip or magisk zip
View attachment 4137905
above is the way to modify a PATCH zip ota file, if you are modifying a full package, which may be easier,
the full package's update script write full image to phone instead, so you just need to modify the image in the ota package.
all you just have to make sure the new firmware do not replace twrp with stock recovery, so
1.try to extract the image in the package and modify the image file, remove files such as "recovery-from-boot.p" from the image then rebuild the image and calculate the new sha1 value of the new image(CarlivImageKitchen is a good tool to rebuild image)
2.replace the old sha1 hash in updater-script, repack and sign the zip.
3.flash with twrp
4.flash superSu zip or magisk zip after the firmware flash with twrp can get root.
Click to expand...
Click to collapse
ok got it to work for a full firmware package here's what i did
1 . downloaded a27 (still 5.1 since 6.0 is not stable according to some)
2. using the twrp above flashed a27
3. flashed magisk
4. flash the twrp image again to make sure that incase it was overwritten by the update
NOTE: i did get an error like unable to mount dev/block/platform/...... it was fine for me
ngoralph said:
ok got it to work for a full firmware package here's what i did
1 . downloaded a27 (still 5.1 since 6.0 is not stable according to some)
2. using the twrp above flashed a27
3. flashed magisk
4. flash the twrp image again to make sure that incase it was overwritten by the update
NOTE: i did get an error like unable to mount dev/block/platform/...... it was fine for me
Click to expand...
Click to collapse
6.0 would work if the sim card issue could be fixed. i can't work it out :/
diosdetiempo said:
6.0 would work if the sim card issue could be fixed. i can't work it out :/
Click to expand...
Click to collapse
did you try restoring the nvram using twrp as stated before?
and did you wipe your data before flashing?? i think the transition from 5.1 to 6.0 may have broke some things read about it somewhere that wiping was necessary for LP to MM

How To Guide How to extract image collection from rom releases (and root the boot image and apply root to the phone)

1. To extract the image collection from your downloaded rom :
Download Payload Dumper from here (It's a zip file but it's not flashable) to your computer
Extract the zip file to a folder, make it a folder you can use regularly because this is the default tool you would use from now on
Download the rom version you want to root
Unzip the rom to a folder, you will find a file within it called payload.bin
Copy and paste that file into the "payload_input" folder within the Payload Dumper folder you created
Execute the payload_dumper.exe file within Payload Dumper folder, you will not have to specify any options as it always extracts from any payload.bin file in payload_input and outputs the image files to payload_output.
Leave the extraction to be completed, the program will automatically close itself once it's completed
Your extracted .img files will be shown within the payload_output folder
2. If you need to root the boot image you extracted :
Copy the boot.img file from the payload_output folder to a folder on your phone storage (Best to name it appropriately if you will be doing this regularly)
Download and Install the latest Magisk apk from the release site (Accept any prompt to allow install from external source)
Launch the app and then choose Install under the top "Magisk" section
Choose Select and Patch a File then browse to where you copied the boot.img on your storage
Magisk will then apply root to the boot image you specified, Your rooted image file will be output to your phone's Download folder : /sdcard/Download
You don't need to keep the default filename of the rooted image file so you can rename it appropriately for the rom version after you copy it to your computer, just ensure to keep the .img file extension
If you rename the rooted boot image, try not to use spaces in the filename, rather use _ or - as spaces make it more difficult to use in a command window although when you start typing the filename you can use TAB to autocomplete it, always ensure the filename shows .img as the extension and at the end of any commandline
3. If you need to use your rooted boot image to apply root to your phone :
Install the drivers from the mounted drive you should get when connecting the phone to your computer
On Windows you should then have a folder in C:\Program Files (x86)\OnePlus USB Drivers\Android with the platform tools (ADB.exe and Fastboot.exe) you will need, you can obviously copy the content from that folder somewhere else if you wish.
Connect your phone to your computer
Copy your rooted boot image to the folder that has adb.exe and fastboot.exe
Open a command window on your computer by right clicking in that folder and choosing Open command window here
In the command window, Type or copy/paste the command ADB devices and press enter
If you see a prompt on your phone to allow the computer connection then accept it, better still, tell it to allow from now on also.
You should see a string of characters shown in the command window, if you don't see that, then try another cable or re-install your drivers and reboot the computer.
Reboot your phone into Fastboot either by using ADB on your computer ( ADB Reboot Fastboot ) or by enabling Advanced reboot in your developer options in settings and then hold down the power button and use the 3 dot menu on the top right and choosing "Bootloader"
In the command window type Fastboot Boot <filename.img> i.e. Fastboot Boot rooted_boot.img and press enter
You should see a couple of lines in the command window telling you it's copying over to the phone, don't worry it's not being flashed or replacing your existing installed boot image
The phone should then restart and boot using the image from your computer, it will be a slightly slower boot than usual, your existing unlock method should still work
Launch the Magisk app, it should already have root access because the boot image you've used is already rooted
Go to Install under the top Magisk section
Choose Direct Install (Recommended)
Magisk will then apply root access to the boot image on the actual phone
You will be prompted to reboot the phone on the bottom right, do this to complete the process
You don't need the phone connected to your computer anymore as the installed boot image on the phone should now have root access
You can check for root either using any app which requires root or by using an app like Root Checker
Remember to empty the contents of payload_input and payload_output once you have finished, leaving them ready for any future rom versions
4. To retain root access after ROM/OTA update :
Install the update either from Oxygen Updater or from Settings > System > System updates
DO NOT REBOOT when prompted
Go to the Magisk app
Go to Install under the top Magisk section
Choose Install to Inactive Slot (After OTA)
Magisk will apply root to the newly installed boot image for the next version
Reboot when prompted by the Magisk app
The phone should reboot into the updated version with root already applied
Very nice write up! Hopefully many will read this and follow instructions. Too many threads being created with issues because they never bother to read.
Quick question as this is my first OnePlus device.
Will I lose root after a system update and will have to it all over again?
Levi4cyber said:
Quick question as this is my first OnePlus device.
Will I lose root after a system update and will have to it all over again?
Click to expand...
Click to collapse
Just added a new section to my original post for this.
Does flashing magisk change anything in encryption?
Does it wipe anything?
How do I get my ROM to extract the boot img?
Levi4cyber said:
Does flashing magisk change anything in encryption?
Does it wipe anything?
Click to expand...
Click to collapse
No and No
Levi4cyber said:
How do I get my ROM to extract the boot img?
Click to expand...
Click to collapse
Read the first post.
djsubterrain said:
Read the first post.
Click to expand...
Click to collapse
I'm asking where to get my ROM file, in order I should be able to extract the boot img?
A link? Somewhere on my phone?
Levi4cyber said:
I'm asking where to get my ROM file, in order I should be able to extract the boot img?
A link? Somewhere on my phone?
Click to expand...
Click to collapse
It's pinned at the top of the entire forum :
[OnePlus 9 Pro][ROM][OTA][Oxygen OS] Repo of Oxygen OS Builds
As OnePlus doesn't always provide download links for all of their OxygenOS ROMs & OTA update zips, we've created an index to put the links in one post so that they're easy to find. Note: This is not a support thread for issues you may have with...
forum.xda-developers.com
They're also posted on OnePlus's site (eventually) :
Software Upgrade - OnePlus.com
Get the latest OxygenOS updates for your device.OxygenOS is always evolving. Learn about the latest features and improvements, and get even more out of your device.
www.oneplus.com
Make sure the version matches the one you're using
I updated to latest version 11.2.4.4.LE15AA
Since there's nowhere to download the OTA package and extract the boot img, can I use the boot img of a lower version - 11.2.2.2 ?
Levi4cyber said:
I updated to latest version 11.2.4.4.LE15AA
Since there's nowhere to download the OTA package and extract the boot img, can I use the boot img of a lower version - 11.2.2.2 ?
Click to expand...
Click to collapse
No, definitely not.
Try Oxygen Updater in advanced mode, it should let you download the full rom.
If you were already rooted though, you should've been able to retain it by following the last section in my original post.
If not, then follow the first 2 sections
djsubterrain said:
No, definitely not.
Try Oxygen Updater in advanced mode, it should let you download the full rom
Click to expand...
Click to collapse
Since I'm completely new to OP, is Oxygen updater an app (if yes, is it this; https://play.google.com/store/apps/details?id=com.arjanvlek.oxygenupdater)? Or is it built into the phone?
Levi4cyber said:
Since I'm completely new to OP, is Oxygen updater an app (if yes, is it this; https://play.google.com/store/apps/details?id=com.arjanvlek.oxygenupdater)? Or is it built into the phone?
Click to expand...
Click to collapse
I've linked it, it's not a default app
djsubterrain said:
No, definitely not.
Try Oxygen Updater in advanced mode, it should let you download the full rom.
If you were already rooted though, you should've been able to retain it by following the last section in my original post.
If not, then follow the first 2 sections
Click to expand...
Click to collapse
In the oxygen updater app, if I select "full update" in update method it only gives me version 11.2.2.2., if I select "incremental update", it lets me download 11.2.4.4, and when I unzipped it I have a file payload.bin (it's only 105MB).
Should I use that? Or do I need a full OTA package to extract the boot IMG?
Levi4cyber said:
In the oxygen updater app, if I select "full update" in update method it only gives me version 11.2.2.2., if I select "incremental update", it lets me download 11.2.4.4, and when I unzipped it I have a file payload.bin (it's only 105MB).
Should I use that? Or do I need a full OTA package to extract the boot IMG?
Click to expand...
Click to collapse
Are you choosing the correct OnePlus 9 Pro? It'll show you different variants under the model lookup.
To be honest, If I get the update pushed via OnePlus I always copy/paste it somewhere else cos I think it gets deleted once the upgrade is done.
If you extract the payload.bin and it shows a boot.img then that should suffice. I think it should be around 105MB (I'm on my work PC at the moment so can't check)
Thanks. I'm on the T-Mobile version of the OnePlus 9 Pro, technically my phone is currently on "11.2.2.2.LE5ACB" and the one on OnePlus's support site is "11.2.2.2.LE15AA". I'm not sure the difference but I assume T-Mobile bloatware. Hopefully they didn't do anything else to make the phone work "slightly better" on their network.
I'm not sure if the boot.img I extracted from 11.2.2.2.LE15AA will work with my currently-installed "11.2.2.2.LE5ACB"; any ideas?
Might be better to create a boot.img from my existing version and patch that. Do you know the dd command for me to just create the boot.img from my existing partition? In the past with other phones I've done something like "dd if=/dev/block/mmcblk0 of=/storage/sdcard1/boot.img bs=4096 count=4096 skip=7552" or "dd if=/dev/block/bootdevice/by-name/boot of=boot.img" but I don't know which partition on the OnePlus 9 Pro to image. Any ideas?
--- Update 1 ---
Code:
OnePlus9ProTMO:/ $ ls -l /dev/block/bootdevice/by-name/*boot*
lrwxrwxrwx 1 root root 16 1970-01-20 02:38 /dev/block/bootdevice/by-name/boot_a -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-01-20 02:38 /dev/block/bootdevice/by-name/boot_b -> /dev/block/sde43
lrwxrwxrwx 1 root root 16 1970-01-20 02:38 /dev/block/bootdevice/by-name/vendor_boot_a -> /dev/block/sde28
lrwxrwxrwx 1 root root 16 1970-01-20 02:38 /dev/block/bootdevice/by-name/vendor_boot_b -> /dev/block/sde55
lrwxrwxrwx 1 root root 16 1970-01-20 02:38 /dev/block/bootdevice/by-name/vm-bootsys_a -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 1970-01-20 02:38 /dev/block/bootdevice/by-name/vm-bootsys_b -> /dev/block/sde51
Then looking at my active mounts I saw this:
Code:
OnePlus9ProTMO:/ $ mount | egrep "sde16|sde43|sde28|sde55|sde24|sde51"
/dev/block/sde51 on /vendor/vm-system type ext4 (ro,seclabel,nosuid,nodev,relatime)
Which indicates that I'm on the "b" side. So I would want to create a boot.img from `/dev/block/bootdevice/by-name/vendor_boot_b` potentially. So this command "should" work, right?
Code:
dd if=/dev/block/bootdevice/by-name/vendor_boot_b of=/sdcard/Download/stock_boot.img
I might try that instead of the boot.img I extracted from 11.2.2.2.LE5ACB since it doesn't technically line up with the T-Mobile supplied ROM version.
--- Update 2 ---
Yeah, that didn't work.Turns out dd needs to be elevated to do its thing. Got a "Permission denied" when i tried to create the image. So yeah, ironically I need root to run said command and that's why I was trying to run the command, to get the boot.img to root. lol. oh well.
Thank you very detailed.
When I click on the payload_pumper.exe file, the cmd window flashes and nothing else happens.
glitchsys said:
Turns out dd needs to be elevated to do its thing.
Click to expand...
Click to collapse
Try watching this, man, I think this is exactly what you are missing:
Code:
https://www.youtube.com/watch?v=DyUainEJwLM

Can't seem to patch stock rom using magisk v23, do I have the right file? What am I doing wrong?

I'm new to rooting and I'm trying to root a Pixel 3a XL I've just inherited. Following steps from a tutorial, I've unlocked the bootloader and installed Magisk v23.0 on the phone, and I copied on the internal storage all the files from the zip file I downloaded from Google that are supposed to be the stock ROM for my build #. There are 2 .img files in there: bootloader-bonito-b4s4-0.3-7062600.img and radio-bonito-g670-00105-210113-b-7078968.img (there are a few scripts and another zip file in there too). The first one seems to be the boot file (Ramdisk is YES in Magisk), but when I try patching it (Magisk Install > Select and Patch a File > I choose the file via my file manager), I get the following error messages: 'Unsupported/Unknown image format' 'Installation failed'. The same thing happens if I try the other image file.
I obviously don't want to trial and error too much patching a rom that I'm going to flash my phone with. Any idea what I'm doing wrong there? Thank you!
EDIT: I had also done a checksum of the archive I downloaded from Google and it all lined up, so that shouldn't be the issue.
you need to patch the kernel. inside the zip is a second zip. in there is a file boot.img. that is the kernel. extract and copy it to your phone, then you can patch it, copy it back to your fastboot capable machine, and flash
ei: boot.img within a .zip within a .zip
hp420 said:
you need to patch the kernel. inside the zip is a second zip. in there is a file boot.img. that is the kernel. extract and copy it to your phone, then you can patch it, copy it back to your fastboot capable machine, and flash
ei: boot.img within a .zip within a .zip
Click to expand...
Click to collapse
It worked, thank you so much!

Categories

Resources