How To Guide OEM Incremental OTA update on converted TMO N200 - OnePlus Nord N200 5G

Thanks to some tips from @AndyYan, I managed to patch the images extracted from the Full OTA 11.0.2.0.DE17AA .bin (grab it directly from the OnePlus site) with the Incremental OTA 11.0.4.0.DE17AA .bin update (link courtesy of an xda blog post) using mrslezak's update_payload_extractor tool. You'll want to grab Ubuntu WSL if you're on Windows to have those lib64 executables to work. Install the required python dependencies in the README, and place the full OTA .bin in the folder `old/` and the incremental OTA .bin in the folder `output/`. The commands I used to get everything extracted and patched were:
Code:
LD_LIBRARY_PATH=./lib64/
./extract.py --output_dir old/ ./old/payload_full_11.0.2.0.DE17AA.bin
./extract.py --old_dir old/ --output_dir output/ ./output/payload_incremental_11.0.4.0.DE17AA.bin
cd output
rename 's/$/.img/' *
In the output folder, you'll find the standard list of image files you'd flash from fastbootd for the normal OEM 11.0.2.0 TMO conversion process, only these have been patched to the latest OTA update! After flashing and booting up, when you check for updates should come back with "no updates available" and that you're running the latest 11.0.4.0 build

Related

[GUIDE] [LINUX/UBUNTU] Extract/Modify/Rebuild Lollipop ROMs !

Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
NOTE:
The package contains OxygenOS SELinux file contexts in progs subfolder...
So, to modify CM ROMs you need to get file_contexts file from the zip of the ROM and replace the one found in progs subfolder
Credits:
@xpirt
Please mention​
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Nice guide
alquimista said:
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Click to expand...
Click to collapse
The dsixda kitchen had much more functions then this but you may cknsidet it as a temporary lollipop kitchen with not much extra functionality..
This was like a automation script for me and was a quick one so repo wasn't needed
I have used this script on Ubuntu 64bit and the only extra dependency apart from those included in package are installed by prereq.sh
Btw this is not just for oxygen os it can also be used for any cm or cm based rom here but.do read the note then
Yash98 said:
Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
Click to expand...
Click to collapse
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Me1256 said:
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Click to expand...
Click to collapse
You can make ROMs from prebuilt ROMs like OxygenOS or any other built ROM like Exodus, CM12, etc.
Basically modify ROMs without rebuilding from source (which takes a lot of time!)
Sir I downloaded your tool and followed ur guide....But after I run extract.sh there is no files/folders in output folder.Plz reply thankz in advancw
Thank you. I really wanted to extract .dat file..
Sent from my ONE A2003 using Tapatalk
This is a great tool but I wanted to know how to edit the system folder in ubuntu. Like using chmod and chown to pre-root and uninstall some other apps. Can somebody please direct me in that direction.
I go test...

Invalid Boot.img when trying to extract kernal and ramdisk.

A very warm Hi! to the XDA community
My phone, the Sony Xperia E4, does not have a recovery - so I am slowly learning how to develop one. It has an MT6582 chip.
In the process I have obtained the stock boot.img (via boot.sin) from the phone's stock .ftf firmaware file.
I wish to use MTK droid tools to create the recovery, however it first gave me the error that the boot.img file is not split. After some research I came to learn that such boot.img files need to be split into the kernal (Zimage i believe) and ramdisk.
After some further research I came across this seemingly helpful guide and tool on how to split the boot.img file on Windows (unfortunately I do not have Linux at my disposal atm).
Now to my issue: (referring to the aforementioned guide & tool) When running the command
Code:
bootimg.exe --unpack-bootimg boot.img
I get this error:
Code:
AssertionError: invald bootimg
Which leads me to believe the boot.img file I have extracted may be corrupt or extracted from the wrong .sin file.
If you are still with me, how can i confirm that the boot.img file from the stock rom is indeed "working" and contains ramdisk and kernal?
Some extra information:
This is the guide I used to initially extract the boot.img file from my phones stock firmware. They highlight that boot.img is extracted from the kernal.sin file. My firmware has no such file. Later in the comments it mentions that newer Sony phones have the boot.img file in the appropriately named "boot.sin" file. This is the file i used to extract my boot.img. Thus from here I cannot see why the boot.img file cannot be split.
The full command line and response is:
Code:
C:\Users\\Downloads\Cofface>bootimg.exe --unpack-bootimg boot.img
arguments: [bootimg file]
bootimg file: boot.img
output: kernel[.gz] ramdisk[.gz] second[.gz]
Traceback (most recent call last):
File "<string>", line 2213, in <module>
File "<string>", line 1424, in unpack_bootimg
File "<string>", line 151, in parse_bootimg
AssertionError: invald bootimg
Thanks very much in advance!

Plugin Descriptions (Donate Version)

Plugin Installation:
Open the Plugin Manager
Choose Install a Plugin
Choose the plugin you want to install
Choose Run a Plugin
Choose the Plugin you want to run
Enjoy!
NOTE: The usage instructions in each plugin description below assume you have already installed it. When the instructions end, that's when you run the plugin from the plugin manager.
SuperR's Kitchen Plugin Descriptions
SuperR Maintained Plugins:
add_placeholder
Only for system-as-root devices
Adds placeholder files to all empty directories in your project
add_remove_files
Add all apk files from a directory
Choose apk to import
Choose directory structure to import
Delete files from your ROM based on directory structure
NOTE: To use "Choose directory structure to import" and "Delete files from your ROM based on directory structure", your directory must be set up as the following example:
Code:
your_directory_name/system/anything_you_want
your_directory_name/vendor/anything_you_want
your_directory_name/cache/anything_you_want
your_directory_name/hidden/anything_you_want
your_directory_name/boot.img
The above is only an example. You can add anything you want as long as there is a "system" directory inside another directory. When choosing the directory, choose your_directory_name instead of system or it won't work. Think of the directory structure exactly like the kitchen project directory. When you import directory structure, your directory will be copied into your project directory and files will be overwritten if they already exist. When you remove a directory structure, you will choose your_directory_name again and the plugin will remove the same files it finds from your project directory.
amlogic_unpack
Unpack Amlogic firmware img
apktools
Choose an apk from your current rom directory.
Decompile the apk.
Build apk.
Sign apk with 3 options (use signapk.jar, copy original META-INF to new apk, or copy new classes.dex and resources.arsc to original apk).
Move apk back to where it came from.
Patch smali using .ptch files
Delete META-INF from all apk files
Delete SEC-INF from all apk files
Separate lib directory from all apk files
Zipalign apk files
aroma_install
Install Aroma in your existing ROM.
Create aroma-config using a menu.
Choose apk files to add to the option menu.
Usage:
Extract your ROM normally using ONLY set_metadata or set_perm.
autorom_config
Creates an AutoROM config file to automate the extraction process and many other tasks.
Currently supports perm type, vendor.img, rom name, custom signature, deodexing, root, su.d, and Busybox
buildprop_add
Adds lines from a file to build.prop.
concatimg
Combines partition_*.img files into a single img file
custom_zip
Create a flashable zip of one or more image files as long as you know the partition name where it should be flashed.
Create a flashable patch zip from directories that have matching fs_config and file_contexts3 files
Convert updater-script to update-binary script for use in the mods_install plugin
Usage:
Copy the partition images and/or directories you want in the zip into a new directory in your project.
In the kitchen main menu, choose Plugin Manager > Run a plugin > custom_zip
Choose the new directory from the list.
For img files in by-name devices, type the partition name from your device where it should be flashed (ex. aboot)
For img files in mmcblk devices, choose your block from the list (add it to the device superr_mmc file if needed first).
decrypt_htc
Decrypt ruu.exe and ruu.zip files stored in your current project directory.
Extract system.img & boot.img to the current project directory for extraction.
Usage:
Copy ruu.exe or ruu.zip to current project directory (ruu.zip must be named exactly ruu.zip).
gapps
Downloads and includes Open Gapps in your ROM.
Choice of aroma, super, stock, full, mini, micro, nano, or pico
Detects Android version and architecture from ROM to download the latest available version for your device.
If there is no ROM, it will allow you to choose Android version and architecture.
Remove gapps if it already exists.
gen_set_metadata
Generates set_metadata lines for every file in project directories that have matching fs_config and file_contexts3 files.
img_tools
Allows rebuilding ext4 img files that have been extracted by the kitchen even if there is not a complete ROM in the project.
Convert sparse img to raw img
Convert raw img to sparse img
Build super.img
Resize img
super.img Build Requirements:
All included img files must be built as sparse.
img file names must be either partition.img or partition_new.img.
super.img size must be in 00_project_files/srk.conf.
Example:
supersize=9437184000
The numeric value in the example above is the raw super.img file size in bytes.
The kitchen adds the super.img size when unpacking a super.img. If the kitchen did not unpack the super.img, you can enter the size in srk.conf manually.
Optional values metadata-size and metadata-slots can also be added to srk.conf. Defaults are listed below:
metadata-size=65536
metadata-slots=2
*This plugin will only work in v3.2.1.0 or higher*
lg_tools
Unpack LG kdz files
Removes rctd, ccmd, and triton from LG boot.img.
mods_install
Add any flashable zip to your ROM that uses an update-binary script instead of a updater-script
Remove mods
Shows the kitchen added mods you currently have installed
ozip_decrypt
Decrypt firmware.ozip files
payload_dump
Unpack payload.bin firmware
rockchip_unpack
Unpack Rockchip firmware img files
samsung_tools
Asks one-by-one if you want to add ro.config.tima=0, ro.config.knox=0, ro.securestorage.knox=false, ro.securestorage.support=false, ro.security.mdpp.ux=Disabled, and wlan.wfd.hdcp=disabled to ramdisk default.prop
Create tar.md5 from all img, mbn, ext4, and bin files in your ROM directory.
Create tar.md5 from all the above except system.img, system.img.ext4, boot.img, and recovery.img
Decode OMC/CSC
Deodex patch for Android 8.1+
Pack *_new.img files to lz4
sepolicy_injector
Converts sepolicy denials into allow rules, and optionally patches seplicy with the new rules.
Paste a denial
Read denials from 00_project_files/logcat.log
unsign_mtk_img
Removes MTK signature from img files
updateapp
Extract firmware.zip that contains UPDATE.APP
Extract img files from UPDATE.APP
Usage:
Place a firmware.zip or UPDATE.APP in your rom directory.
xiaomi_patch
Patches several things in Xiaomi firmware.
Usage:
Extract your firmware with the kitchen, then run the plugin.
xperia_unpack
Unpack Xperia firmware
Choose full firmware zip, an ftf file, or a sin file.
When choosing a sin file, all sin files in the project directory will be unpacked.
Respects the partition_extract_list variable from kitchen/tools/srk.conf
User Contributed Plugins:
None
Custom Plugins
The donate version has plugin support. This means you can integrate your own script into the kitchen. Each plugin must have its own directory inside the kitchen plugin directory, and it must be named the same as the plugin script.
Examples:
/kitchen/tools/plugins/example_bash/example_bash.sh (Linux, Mac)
/kitchen/tools/plugins/example_batch/example_batch.bat (Windows)
You can check the example plugins in the kitchen for more details and use them as templates for your own plugin.
There are 3 variables set in the example plugin to take note of:
bd = /path/to/kitchen
rd = /path/to/kitchen/superr_projectname
plugdir = /path/to/kitchen/tools/plugins/pluginname
NOTE: If you would like to contribute a plugin, please PM a link to the plugin for review.
This post contains the last working versions of all plugins that have lost native Windows support.
If you are running the kitchen in WSL, WSL2, Linux, or Mac you should use the kitchen plugin manager to get the latest versions of these plugins.

[TOOL] Deuces' & sixohtew's Bootloop-Recovery & Flashing Script [v4-Windows+Linux]

[TOOL] Deuces' & sixohtew's Bootloop-Recovery & Flashing Script [v4-Windows+Linux]
This script is for the UNLOCKED BOOTLOADER Pixel XL (MARLIN) and Pixel (SAILFISH), and will:
Unlock Bootloader and Critical
Fix Bootloops
Flash both Slots A and B
Work with any current 8.0 or 8.1 beta image
Detect bootloader and radio special *.img names automagically
(Optional): Format Userdata
(Optional): Re-Lock Bootloader and Critical
You MUST extract factory image zip file
(found here: https://developers.google.com/android/images#marlin for Pixel XL and https://developers.google.com/android/images#sailfish for Pixel)
You also MUST extract the included zip file
This will lead to ~21 .img files in the same folder, with the deuce-sixohtew-flash-all script in the same folder!
If you are having issues with this script:
Verify you are using the latest platform tools: ( https://developer.android.com/studio...orm-tools.html)
Verify you have the environment variable set for adb and fastboot: ( https://wiki.lineageos.org/adb_fastboot_guide.html)
Make sure you are using a USB 2.0 Port (not 3.0!)
Try a different cable
Format Userdata
*I did not create this script, I helped port it from the .bat windows script to the .sh linux script, then modded it to work for the og pixel & pixel xl
Download the script here: https://androidfilehost.com/?fid=745849072291691811

Share Your Boot Battery_scale

This is your battery view when your device is turned off and plugged in.
This thread is Made for the S5 specifically (though these images can be used if rescaled to the right size.
The file can be known as Battery_scale.PNG
The file can be Located at. /res/images/charger
The file is a Multi surface image. Basically a zip png
To extract All the ".PNG" files use. https://github.com/Aaahh/Battery-Images-Replacer
Thanks to @Aaahh for making this a lot easier
Originally posted by cunha17 @ https://forum.xda-developers.com/showthread.php?t=1609059&page=5
Battery-Images-Replacer (forums.oneplus.net/threads/battery-charging-image-replacer.186460) is a way to easily change the battery boot animation. You can use Aaahh provided images or change them and make your own flashable zip. There are 2 problems in that solution, first it is directed to a specific platform (oneplus) and second, it does not work in Marshmallow (CM13).
I figured out a way to make Battery-Images-Replacer to work in Android 6 (Marshmallow) and problably in 5 (Lollipop). Just stating that I'm using CM13 in a Galaxy S3 (i9300) phone, but the code is the same one Aaahh provided with two minor changes:
The battery_?.png and battery_charge files are deprecared in 6.0, and replaced by battery_scale.png (multi surface image) with mandatory 6 frames (hardcoded in Android). To make Battery-Images-Replacer work with previous Android versions, the deprecated files are kept; and
The block device in anykernel.sh file needs to be generalized to work in i9300 (my case) and maybe others, so it was replaced at line 9 with: block=`find /dev/block/platform -name BOOT`;
Warning: be shure to do the 2nd step above, or the flashing will not work, but also, you may brick your phone!!!
But the catch is the creation of the new battery_scale.png file. In this case, we have the 6 single surface images (battery_?.png files) and want to make a "Multi Surface Image" file compliant with Android 6.0.
I made the following script (create_multi_surface_image.sh) that convert multiple PNG to a single "Multi Surface Image", you just need to change the FILES and SCALEFILE variables if needed. This script uses ImageMagick, exiftool and pngcrush to do the job. Just run the script where the battery_?.png files are.
create_multi_surface_image.sh
Once the battery_scale.png is created, you need to copy it to the Battery-Images-Replacer-ak-opo-anykernel/charger/ directory if you didn't run the script there. Go to the base directory (Battery-Images-Replacer-ak-opo-anykernel) and run "zip -r ../Battery-Images-Replacer.zip ." and you should get the flashable zip file at the parent directory.
Now transfer the zip file to your phone (adb push, usb file transfer, etc) and make shure that the file is available to TWRP ou CWM. Boot into recovery and flash the zip file. Turn off the phone and start charging. Enjoy your new battery animation.
I will attach the battery_surface.png file if you just want the final result using the source files (battery_?.png) provided by Aaahh and available at github.com/Aaahh/Battery-Images-Replacer.
Thanks Aaahh for the great job!
And what you have waited for
(Please note this is from my device which is running RR9.0)
(Edit will upload via computer as labs doesn't let edit an add images)

Categories

Resources