[LINUX][GUIDE] ROM Payload Image Dump - OnePlus 8 Pro Guides, News, & Discussion

ROM PAYLOAD IMAGE DUMPER GUIDE - LINUX EDITION​
From Full OTA ROMs​
For those that don't have a windows machine for dumping the Image Files from the FULL ROM payload.bin files, this tutorial will show you how to do it on most Linux machines using a Ubuntu based OS.
*This method does not yet work on incremental updates -use Full ROMs Only!
1) Right-Click on each link below and 'Save-As' to the same directory as the 'ROM.ZIP' file you want extracted
https://raw.githubusercontent.com/cyxx/extract_android_ota_payload/master/extract_android_ota_payload.py<---All Credit Goes To Gregory cyxx from GitHub
https://raw.githubusercontent.com/cyxx/extract_android_ota_payload/master/update_metadata_pb2.py<---All Credit Goes To Gregory cyxx from GitHub
2) Open a Linux terminal session and install the 2 required files with the commands below:
Code:
sudo apt-get install python
sudo apt-get install python-protobuf
3) Change the terminal directory to the same directory as your 'ROM.zip' file that also contains your python files and enter the command:
COMMAND FORMAT: sudo python extract_android_ota_payload.py ROM.zip OUTPUTDIRECTORY
EXAMPLE:
Code:
sudo python extract_android_ota_payload.py OnePlus8ProOxygen_15.X.13_OTA_0130_all_2010200209_ 597442495fcc435a.zip /home/administrator/Downloads/
If successful, you will see the payload.bin extracted from the ZIP file and all ROM Images created right after in the output directory chosen.
Output Example:
Code:
[email protected]:~/Downloads$ sudo python extract_android_ota_payload.py OnePlus8ProOxygen_15.X.13_OTA_0130_all_2010200209_ 597442495fcc435a.zip /home/administrator/Downloads/
Extracting 'payload.bin' from OTA file...
Extracting 'abl.img'
Extracting 'boot.img'
Extracting 'dtbo.img'
Extracting 'logo.img'
Extracting 'odm.img'
Extracting 'product.img'
Extracting 'recovery.img'
Extracting 'system.img'
Extracting 'system_ext.img'
Extracting 'vbmeta.img'
Extracting 'vbmeta_system.img'
Extracting 'vendor.img'
Extracting 'aop.img'
Extracting 'bluetooth.img'
Extracting 'cmnlib64.img'
Extracting 'cmnlib.img'
Extracting 'devcfg.img'
Extracting 'dsp.img'
Extracting 'featenabler.img'
Extracting 'hyp.img'
Extracting 'imagefv.img'
Extracting 'keymaster.img'
Extracting 'modem.img'
Extracting 'multiimgoem.img'
Extracting 'qupfw.img'
Extracting 'storsec.img'
Extracting 'tz.img'
Extracting 'uefisecapp.img'
Extracting 'xbl_config.img'
Extracting 'xbl.img'
Extracting 'mdm_oem_stanvbk.img'
Extracting 'spunvm.img'
You now have the boot.img for creating a rooted boot.img using Magisk or you need to re-flash any of the factory partitions from Fasboot mode
./

Thank you!!!!

Great to see for Linux! kudos

Nice. :good:

Now we have dumpers for Win/Mac/Linux! Great!

Error in Ubuntu 20.04
Code:
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 13, in <module>
import update_metadata_pb2
File "/mnt/d/Downloads/Phone/update_metadata_pb2.py", line 7, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'

kevp75 said:
Error in Ubuntu 20.04
Code:
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 13, in <module>
import update_metadata_pb2
File "/mnt/d/Downloads/Phone/update_metadata_pb2.py", line 7, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'
Click to expand...
Click to collapse
To fix this issue on Ubuntu 20.04, run the following
Code:
sudo pip3 install --upgrade protobuf

Dispenses a lot of gibberish.
Code:
[email protected]:/media/russell/Windows/Users/Russell/Downloads/Android/Pixel$ sudo python extract_android_ota_payload.py lineage-17.1-20210327-nightly-bonito-signed.zip /media/russell/Windows/Users/Russell/Downloads/Android/Pixel
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 13, in <module>
import update_metadata_pb2
File "/media/russell/Windows/Users/Russell/Downloads/Android/Pixel/update_metadata_pb2.py", line 23, in <module>
rminor_version\x18\x0c \x01(\r:\x01\x30\x12;\n\npartitions\x18\r \x03(\x0b\x32\'.chromeos_update_engine.PartitionUpdate\x12\x15\n\rmax_timestamp\x18\x0e \x01(\x03\x12T\n\x1a\x64ynamic_partition_metadata\x18\x0f \x01(\x0b\x32\x30.chromeos_update_engine.DynamicPartitionMetadataB\x02H\x03')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
But this tutorial worked:
Extract Android OTA Payload.bin File using Payload Dumper Tool
Learn how to dump and extract Android OTA Payload.bin file to get the boot.img (for rooting with Magisk), vendor.img, and other other partition images.
www.thecustomdroid.com

Thank you so much!

Hello,
I get this error when trying to process the extraction:
~/Desktop$ sudo python extract_android_ota_payload.py OnePlus8TOxygen_15.O.30_OTA_0300_all_2112211344_d865f7d8ac014f65 /home/Desktop/OnePlus8T
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 144, in <module>
main(filename, output_dir)
File "extract_android_ota_payload.py", line 112, in main
payload_file = open(filename, 'rb')
IOError: [Errno 21] Is a directory: 'OnePlus8TOxygen_15.O.30_OTA_0300_all_2112211344_d865f7d8ac014f65'
Any help would be appreciated.
BIG EDIT: I'm an idiot. I didn't declare .zip at the end of the file name because I also have a directory the exact same name as the file. It worked.

hey bro, it do extract .img files , and works with hydragon11/oxygen11 , but when I tried to do so on android 12 ( Oxygen OS12 for global, and color os for china mainland models ) , it ( the system.img ) was neither raw nor spilit. but seems a apex_payload.img. I could not extract ant files as my zip tool tell me it's crc error. what u recommened me do next step.

Markpeng0315 said:
hey bro, it do extract .img files , and works with hydragon11/oxygen11 , but when I tried to do so on android 12 ( Oxygen OS12 for global, and color os for china mainland models ) , it ( the system.img ) was neither raw nor spilit. but seems a apex_payload.img. I could not extract ant files as my zip tool tell me it's crc error. what u recommened me do next step.
Click to expand...
Click to collapse
安卓12 apex解包? - ColorOS - 一加手机社区官方论坛 - 手机版
on hydragon os fourm, i built the apex extract tool,you needn‘t build full aosp now.

I spent 4 hrs losing brain cells trying to find out how to extract the boot.img from the phone without twrp to no avail. This was a lifesaver thank you.

Hello, thanks for this tool. I am getting this error and I could use some help understanding it.
[email protected]:~/Desktop/pixper$ sudo python extract_android_ota_payload.py PixelExperience_bonito-12.1-20220414-1502-OFFICIAL.zip .
[sudo] password for a:
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 13, in <module>
import update_metadata_pb2
File "/home/a/Desktop/pixper/update_metadata_pb2.py", line 23, in <module>
rminor_version\x18\x0c \x01(\r:\x01\x30\x12;\n\npartitions\x18\r \x03(\x0b\x32\'.chromeos_update_engine.PartitionUpdate\x12\x15\n\rmax_timestamp\x18\x0e \x01(\x03\x12T\n\x1a\x64ynamic_partition_metadata\x18\x0f \x01(\x0b\x32\x30.chromeos_update_engine.DynamicPartitionMetadataB\x02H\x03')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
[email protected]:~/Desktop/pixper$
Here is the contents of the folder
{
"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"
}

thanks it works in wsl2 !

Get following error:
sudo python extract_android_ota_payload.py OnePlusN10Oxygen_14.E30_OTA_0300_all_2106231157_09dc03f.zip
File "extract_android_ota_payload.py", line 1689
e: update_metadata.proto
^
SyntaxError: invalid syntax

I spent a few hours battling various python errors, some of which appeared in previous posts in this thread, and some of which didn't. The following generic fact/advice might help others with similar problems:
As (perhaps essential, perhaps irrelevant) background, I note that I don't really know python, and that I'm using arch linux. Note: arch linux natively uses pacman and not apt-get etc to install/uninstall/manage packages.
The root cause of the various "import" and "name" and "unknown location" and other python errors seems to me to be the following:
1. There might be some conflict between what happens when you install/uninstall/manage python modules using pacman vs. pip. To be specific, I don't know if a command such as
sudo pip install protobuf
does the same thing as
sudo pacman -S python-protobuf
2. In the end, python seems to me to be very bad at synchronizing different versions of different modules. In the end, what WORKED -- that is, what caused me to get ZERO errors and to extract all the .bin files as advertised, was that i made CERTAIN that protobuf was UNINSTALLED:
sudo pacman -R python-protobuf
sudo pip uninstall protobuf
(note, in my case, the pacman command sort of failed, because of the myriad dependencies on protobuf, but the pip command succeeded, because it gave me the choice to remove ALL dependencies).
And then I had to be certain to install an OLD version of protobuf:
sudo pip install protobuf==3.6
Once I did this, the commands at the start of this thread worked perfectly.

I want to replace an APK from the ROM I use and I want to unpack the payload.bin (done), mount the product partition (done), replace the APK (done) then repack the payload.bin with the updated image/s.
It's possible to do it?
Thanks

ssurell said:
Dispenses a lot of gibberish.
Code:
[email protected]:/media/russell/Windows/Users/Russell/Downloads/Android/Pixel$ sudo python extract_android_ota_payload.py lineage-17.1-20210327-nightly-bonito-signed.zip /media/russell/Windows/Users/Russell/Downloads/Android/Pixel
Traceback (most recent call last):
File "extract_android_ota_payload.py", line 13, in <module>
import update_metadata_pb2
File "/media/russell/Windows/Users/Russell/Downloads/Android/Pixel/update_metadata_pb2.py", line 23, in <module>
rminor_version\x18\x0c \x01(\r:\x01\x30\x12;\n\npartitions\x18\r \x03(\x0b\x32\'.chromeos_update_engine.PartitionUpdate\x12\x15\n\rmax_timestamp\x18\x0e \x01(\x03\x12T\n\x1a\x64ynamic_partition_metadata\x18\x0f \x01(\x0b\x32\x30.chromeos_update_engine.DynamicPartitionMetadataB\x02H\x03')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
But this tutorial worked:
Extract Android OTA Payload.bin File using Payload Dumper Tool
Learn how to dump and extract Android OTA Payload.bin file to get the boot.img (for rooting with Magisk), vendor.img, and other other partition images.
www.thecustomdroid.com
Click to expand...
Click to collapse
Old thread I know, but just wanted to record what finally worked for me:
my system had 'python' and 'python3'. Replacing 'python' with 'python3' in the original command-line entry fixed everything.

Related

[HOW TO] Change/Modify Secondary Splash Screen Initrd/logo.rle

{
"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"
}
I cant bellieve how hard it was to find any info on this topic
I was working on my rom and wanted to change the secondary splash screen image.
I searched around, asked devs and had no success finding a step by step tutorial on how to do this.
Finally after much research I did it! so here i bring you my experience.​
Click to expand...
Click to collapse
Boot order
​
1. To modify/change the first boot image go here:
http://forum.xda-developers.com/showthread.php?t=895089
2. To modify/change the bootanimation go here for some examples:
http://forum.xda-developers.com/showthread.php?t=1129705
Click to expand...
Click to collapse
First we need to establish where this splash image is located,
the image file is called logo.rle and is located here:
(i used 7-zip to view but don't use it to modify)
This is the file we need to change/modify, you can extract it with 7-zip.
Now we need to be able to convert this logo.rle to .png and back to a logo.rle
​
To do this go here:http://forum.xda-developers.com/showthread.php?t=1140406​
Code:
1.run command promt
a.browse to folder with those bat files
-type:cd \users\you\desktop(if located on desktop)
-copy logo.rle to this folder
b.to conver rle to png type: Convert_rle_to_image.bat logo.rle
c.to convert back to rle type: Convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
If you have your logo.rle ready now we need to replace the one that came in your initrd.gz
this is harder than i thought, because initrd.gz is a image file it cant be modified with 7-zip
first you will need to be running linux (im running ubuntu on a virtual machine)
once you get linux create a new folder on the desktop called "temp" copy
the initrd.gz to this folder, open applications/accesories/terminal
and browse to the temp folder with the initrd.gz file(mine is "cd /home/isidro/Desktop/temp)
now type
Code:
gunzip -c ./initrd.gz | cpio -i
now in the temp directory you have unpacked initrd.gz. Replace logo.rle then when you're done still in the temp directory type:
Code:
find ./ | cpio -H newc -o | gzip > ./initrd.gz
this will replace the initrd.gz with the modified logo.rle
​
Click to expand...
Click to collapse
Now just Copy/Replace the modified initrd.gz to your Rom's boot folder and Test!
This worked for me on the HD2 but I would assume it works on any android Rom. Keep in mind this is the best way I could do it, if you know of a better way please share.​
nice compilation...thanks bro
nice work bro
really
but I hope there i some easier way to do it
cuz this involves linux and virtual machines and I dont think many of us have this
Been looking for this for a while now, thank you very much !
very clear! i search for this a long time
THX bro
nice to see some dev sharing their knowledge ...thanks bro
If anybody cant get this to work at all!!!
send me your initrd.gz and your new image and ill give it a go.
thanks for taking so much time for making this excellent article. thanks added.
Excellent tutorial!! Very time consuming process for changing just one image but definitely easy when given step by step instructions.
Thank you for all your hard work and effort!
Ok, please tell me what am I doing wrong- I want to replace the logo.rle from one initrd.gz to another initrd.gz
I extract both with gunzip -c ./initrd.gz | cpio -i into their own separate folders
I copy the logo.rle I want over the logo.rle I want to replace
I do find ./ | cpio -H newc -o | gzip > ./initrd.gz after ensuring the old initrd is not there in the folder
I flash it on my phone, and it wont boot - if I flash same the initrd.gz without replacing the logo.rle, all is fine. I have tried this so many times
works perfect
10x
works nice. thanks.
you know what's nicer?
removing the logo.rle completely.
and what's even nicer than that?
finding the way to do it to clk boot.img
(how to patch it's initrd.gz or kernel)
then what you get is the First Boot Screen (HSPL) and then boot animation directly.
I can find a way to unpack the boot.img and repack it successfully.
If you find this out, that would be great.
Should be possible to do on linux, but I get a corrupted boot.img every time i try.
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
ellisbodds said:
Is there any way of changing this after the ROM is installed? Unfortunately the ROM I use requires that you flash a kernel .zip after installing it, which then resets the second splash screen.
Click to expand...
Click to collapse
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
There is guide for change it use Window OS:
http://forum.xda-developers.com/showthread.php?t=1140406
isidromxz said:
open the update_kernel.zip with 7zip
replace the initrd.gz with the one with the new image, now just flash
the kernel and that's it
Click to expand...
Click to collapse
Unfortunately though, that doesn't seem to work. It's got a boot.img, so I had to extract that first in Linux, then I replaced logo.rle and recompiled boot.img. I then replaced the old boot.img in the kernel zip file and attempted to flash it, and I can't remember what happened. Either I got a message about update-script being deprecated and was told that installation was aborted, it flashed fine but didn't work, or it stopped my phone working.
tl;dr: I've spent far too long trying to figure out that one little image and in the end decided to just change the first splash screen to match the second one that flashes with the kernel.
Sent from my HTC HD2
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
BoBaN75 said:
I've follow all your staff and when I repack the initrd.gz with ubuntu I get this message error ( in french the message error so I try to translate) : cpio : the file ./initrd.gz is bigger, 163840 new bytes does not have been copied
That is the problem
Click to expand...
Click to collapse
Yeah I know it says it's not copied but it is just test the initrd after that
I found a guide to do it on window.
I will check and post here if I can find it on my Laptop
Sent from my GT-I9100 using xda premium
I Have tried it and it didn't work. When I tried to flash my phone via clk via rebuild rom installion aborted. Can explain how to put back the moded file on the phone
Sent from my HTC HD2 using xda premium

[GUIDE]How to make a rooted flashable rom from ftf file[FOR ALL XPERIA PHONES]

Hi friends,
This Guide might be Helpful for all Xperia device Users/Developers
1.First you need to download these 4 files
a)FTF extractor
b)META-INF folder and ROOTING files
c)7zip
d)Notepad++(Optional)
2.Extract ftf extractor anywhere you like
3.Open the *FTF file with 7Zip
You'll see these files and folders
Code:
META-INF
adsp.sin
amss.sin
amss_fs_urushi.sin
apps_log.sin
cache.sin
fota0.sin
fota1.sin
kernel.sin
loader.sin
system.sin
userdata.sin
4.Extract system.sin to the folder where you extraxt ftf-extractor.
5.Press SHIFT+RIGHT CLICK on the empty space of the folder.You'll see a dialog like this
{
"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"
}
6.select OPEN COMMAND WINDOW HERE
7.Type
Code:
aIUP.exe system.sin 4096 system
8.If this not work for you use 2048 or 8192 instead of 4096:good:
9.You'll see
Code:
C:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
done.
C:\ftf_extractor>
Congratulation now you have extracted System from the ftf file
10.Now open the downloaded META-INF AND ROOT.zip
then,go to system and cut
Code:
app
xbin
bin
and pasteit in your extracted system folder (In step 9)
***Now your rom is rooted*****
OR
You can use Kitchen to ROOT YOUR ROM
11.Then Move your Rooted system folder to the META-INF ZIP
***Now you have made a flashable zip file****
13.(Optional)go to META-INF/com/google/android/updater-script and edit it with Notepad++
:fingers-crossed::fingers-crossed::fingers-crossed::fingers-crossed:Thats all:victory::victory::victory::victory::victory:
Lastly, Hit THANKS if you like it... and rate this thread 5-STAR
Knight47
Big thanks, very big thx
Very good method but (?) how do I flash a zip if i dont have cmw (recovery will not work without root and root wont work without recovery ) installed? how would i put that back in to phone (locked boot loader )
Thanks :good:
Command on Adb refuse- to not permitted
marcoplo said:
Big thanks, very big thx
Very good method but (?) how do I flash a zip if i dont have cmw (recovery will not work without root and root wont work without recovery ) installed? how would i put that back in to phone (locked boot loader )
Thanks :good:
Command on Adb refuse- to not permitted
Click to expand...
Click to collapse
Actually i think this guide is for those who want to make their rom. So these roms are only for rooted user.
Like CM7 for rooted devices, this guide is teaching how to make rooted cm7.
---------------------------------------------
If there's a method to make rooted ftf, then rooting problem solved.
zhuhang said:
Actually i think this guide is for those who want to make their rom. So these roms are only for rooted user.
Like CM7 for rooted devices, this guide is teaching how to make rooted cm7.
---------------------------------------------
If there's a method to make rooted ftf, then rooting problem solved.
Click to expand...
Click to collapse
so sorry my misreading so cancel that, it was late
Step 9, extracting the system.sin with aIUP.exe ist working fine BUT where can I find the extracted files? There is no new folder or files created.
skycamefalling said:
Step 9, extracting the system.sin with aIUP.exe ist working fine BUT where can I find the extracted files? There is no new folder or files created.
Click to expand...
Click to collapse
Is it extracting exactly? When I try it with any page size (512, 1024, 2048, 4096, 8192, 16384, 32768 etc) it types "error page size"
papacarla said:
Is it extracting exactly? When I try it with any page size (512, 1024, 2048, 4096, 8192, 16384, 32768 etc) it types "error page size"
Click to expand...
Click to collapse
It's extracting with 4096 and runs fine. After that the software shows "done" just like in the screenshot.
But then I cannot find the folder where the files are being extracted. I've searched the whole HDD but to no avail.
skycamefalling said:
It's extracting with 4096 and runs fine. After that the software shows "done" just like in the screenshot.
But then I cannot find the folder where the files are being extracted. I've searched the whole HDD but to no avail.
Click to expand...
Click to collapse
could you check again what does the software shows before done?
My one shows "done" too, but it shows "error page size" before "done"
papacarla said:
could you check again what does the software shows before done?
My one shows "done" too, but it shows "error page size" before "done"
Click to expand...
Click to collapse
Me TOO.
Microsoft Windows [版本 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
D:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 2048 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 8192 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>aIUP.exe system.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
D:\ftf_extractor>
ri7672 said:
Me TOO.
Click to expand...
Click to collapse
Same command execution. I've send same log to topic starter and here is his answer:
Knight47 said:
papacarla said:
Knight47 said:
papacarla said:
Hi, thank you for your guide.
I have some problem with ftf extractor
when I'm executing the step 7 of the guide I'm getting next:
HTML:
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 4096 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 2048 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>aIUP.exe sy
stem.sin 8192 system
UnPacking system.sin to system ...
Error: Page size parameter is wrong.
done.
C:\FTF_ROM_root\ftf_extractor>
So, How you could see I tried to change the page size but there is error anyway.
What I'm doing wrong?
Thank you
Click to expand...
Click to collapse
Use 2048 or 8192 instead odds 4096
Sent from my ST18i using Tapatalk 2
Click to expand...
Click to collapse
I'd did it already. you can see it on html code window
Click to expand...
Click to collapse
Then try 16384 ,(16384x2) ,(16384x4)
definitely There should be a compression value
for Xperia ray ,neo,neo v, arc,arc s - 4096
Xperia mini,mini-pro,live etc-2048
Take care,
Knight47
Click to expand...
Click to collapse
So, I tried until 524288 of page size :cyclops:. It does not work anyway.
This method only work for pre 2012 phones which use yaffs2
2012 phones use ext4. This method won't work anymore
Yeah the sin file EXT4, i just use the SIN viewer to find it out.
Just got my XAS yesterday.
Took me sometime to get this extracted, lol.
Anyways, Here:
(1)
My FTF test is the APAC LT26w_6.1.A.1.58
Using winrar on extracting the system.sin in the FTF
(does not really matter if you use 7zip or winzip, the FT is version 2.0, host to extract is DOS)
(2)
Use sin2raw.exe with 1gig argument since the ext4 and sin is 500mb plus (thats enough for me)
Code:
sin2raw system.sin system.ext4 1G
(3)
once you have your system.ext4, use the ext2explore.exe to save the files outside
This image shows only that it is EXT4, i did not use this tool to dump
nice guide. i was able to root and personalize my own stock rom. thanks.
This extraction method will not work on Xperias using ext4 (S, acro S, ion ... )
Since Xperia acro S is ext4, not yaffs, ur method will never work.
Use flashtool > sin editor > dump data (get a ext4 file)
Use ext2read to extract the system.ext4 file.
http://sourceforge.net/projects/ext2read/
I've posted this on XS thread.
Where's the META-INF zip mention in step 11?
zhuhang said:
This extraction method will not work on Xperias using ext4 (S, acro S, ion ... )
Since Xperia acro S is ext4, not yaffs, ur method will never work.
Use flashtool > sin editor > dump data (get a ext4 file)
Use ext2read to extract the system.ext4 file.
http://sourceforge.net/projects/ext2read/
I've posted this on XS thread.
Click to expand...
Click to collapse
Can you give me the full guide? Which files/folders that we should extract from system.ext4, how can we turn those files/folders into flashable ROM, I want this to try rooting the 2.55 firmware
Thanks in advance.
Thread temporary closed.

boot.img-ramdisk.gz: not in gzip format

Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
pepe471 said:
Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
Click to expand...
Click to collapse
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
ruscan.calin said:
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
I want to chage the boot logo and the g-sensor configuration.
I extract the boot.img-kernel and the boot.img-ramdisk.gz with split_bootimg.pl, but then I can't extract the files of boot.img-ramdisk.gz
Thank you
ruscan.calin said:
what do you want to do ? did you compile the kernel and now maybe you want to prepare boot.img ? or what
anyway there is a .perl script to split boot.img in zImage (kernel compiled) and ramdisk also this will extract ramdisk in "out" folder so work with this folder to change things to ramdisk
search for split_bootimg.pl and you get the answer !
I think here you have a complete reference http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
Click to expand...
Click to collapse
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Kaskade said:
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Click to expand...
Click to collapse
or if you are in linux.. since you are making kernel.. you will be..
anyway.. if you are getting this error.. just rename the file with .lzma extension..
then use archive manager or Xarchiver application in linux and extract it.. then extract the file obtained again... you will get all the files and folders inside ramdisk.. no need of any kitchen/anything.. as linux can handle lzma natively
Kaskade said:
Arrogant answer without any help. If you would care to read what people write you would have noticed that he wanted to unpack the boot.img-ramdisk.gz.
I'm trying the same with a ramdisk here but get the same error. And yeah, i did read the tutorial you've link + http://forum.xda-developers.com/showthread.php?t=1477845.
And both say nothing about how to handle the errors we got.
After some googling, and trying out two approaches, i finally found the solution.
The third one i came across worked, at least for me:
http://forum.xda-developers.com/showpost.php?p=31954123&postcount=913
The "boot.img-ramdisk.gz" was compressed in lzma format. So the correct command would be:
lzma -dc ../boot.img-ramdisk.gz | cpio -i
Ramdisk unpacked. Enjoy.
Click to expand...
Click to collapse
Hi,
I am on Linux.
I have installed lzma on the home dir.
I don't know why I am getting Decode error.
[email protected]:~/VIJAY/andriod/work3$ ls -lrt
total 239840
[SIZE="2][COLOR="DarkGreen"]drwxr-xr-x 3 vramaraj sw-team 4096 Oct 9 2011 data/
-rw-r--r-- 1 vramaraj sw-team 70 May 16 2012 installbusybox
drwxr-xr-x 4 vramaraj sw-team 4096 Oct 6 19:03 sdcard/
drwxr-xr-x 16 vramaraj sw-team 4096 Nov 28 22:14 system/
-rw-r--r-- 1 vramaraj sw-team 4073472 Dec 2 22:27 boot.img
-rw-r--r-- 1 vramaraj sw-team 302938 Dec 3 21:14 logo.bin
-rw-r--r-- 1 vramaraj sw-team 236601691 Jan 31 22:18 YONIP_MP_A919_v1.zip
-rwxr-xr-x 1 vramaraj sw-team 6773 Jan 31 22:18 split_bootimg.pl*
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 22:19 META-INF/
-rw-r--r-- 1 vramaraj sw-team 3477896 Jan 31 22:50 boot.img-kernel
-rw-r--r-- 1 vramaraj sw-team 591679 Jan 31 22:50 boot.img-ramdisk.gz
-rwxrwxrwx 1 vramaraj sw-team 229 Jan 31 22:55 extractboot*
drwxr-xr-x 3 vramaraj sw-team 4096 Jan 31 22:55 out/
drwxr-xr-x 2 vramaraj sw-team 4096 Jan 31 23:32 ramdisk/[/COLOR][/SIZE]
[email protected]:~/VIJAY/andriod/work3$
[email protected]:~/VIJAY/andriod/work3/out/ramdisk$ ~/lzma -dc ../../boot.img-ramdisk.gz | cpio -i
/users/home40/vramaraj/lzma: Decoder error
cpio: premature end of archive
[email protected]:~/VIJAY/andriod/work3/out/ramdisk$
Deadly said:
or if you are in linux.. since you are making kernel.. you will be..
anyway.. if you are getting this error.. just rename the file with .lzma extension..
then use archive manager or Xarchiver application in linux and extract it.. then extract the file obtained again... you will get all the files and folders inside ramdisk.. no need of any kitchen/anything.. as linux can handle lzma natively
Click to expand...
Click to collapse
Interesting!
I have a similar problem where gzip complained that my boot.img-ramdisk.gz is not in gzip format.
At the advice of this thread [and some others] I ran:
lzma -t boot.img-ramdisk.gz
xz -t boot.img-ramdisk.gz
Neither one worked, so at the advice of your post I copied the file to both a ".lzma" and a ".xz" extension.
Again, neither the lzma nor xz command-line tool worked, but again at the advice of your post I opened them in Ubuntu's Archive Manager and both view and extract just fine!
CORRECTION:
I was too optimistic: Archive Manager can view the file but cannot extract it.
I pulled my file from an official OEM update.zip file that I successfully updated from.
Maybe the file is really corrupt? (which is hard to believe since my update was successful)
Maybe split_bootimg.pl corrupted it?
What command-line do I need to extract these files from...well...the command-line?
Thanks!
Pv
---------- Post added at 07:22 PM ---------- Previous post was at 07:08 PM ----------
swooby said:
CORRECTION:
I was too optimistic: Archive Manager can view the file but cannot extract it.
I pulled my file from an official OEM update.zip file that I successfully updated from.
Maybe the file is really corrupt? (which is hard to believe since my update was successful)
Maybe split_bootimg.pl corrupted it?
Click to expand...
Click to collapse
Looks like it was user error...just not mine!
The update.zip file already has a "ramdisk.img" image in it.
That file binarily identical to the boot.img-ramdisk.gz file that is inside the update.zip's boot.img.
Someone messed up!
I think I've got it from here!
Thanks for a place to brainstorm!
Pv
pepe471 said:
Hello, I'm trying to modified the kernel of my phone, but I have one problem, when I try to decompile boot.img-ramdisk.gz (with ubuntu) it appear a message that put boot.img-ramdisk.gz: not in gzip format and I cant.
Regards
Click to expand...
Click to collapse
if you have a windows OS or Wine.. you can use my GZ fixer..
http://www.wcn.it/Fix-GZ-archives.exe
{
"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"
}
help
I use cygwin to unpack boot.img
Im using code gzip -dc ./boot.img-ramdisk.gz | cpio -i and get error
im success using code lzma -dc ./boot.img-ramdisk.gz | cpio -i
and now im not understand code to compile my ramdisk again...
can anyone help me ?
If you have this problem and above solutions don't work for you (like me), maybe it's compressed in another file format; for example my ramdisk was compressed using LZ4.. to know this under Linux you just use command file <your ramdisk> and it will output your ramdisk file info, after knowing the compression format just google how to decompress that format and you're done
where can download Fix-GZ-archives.exe

[Tutorial] How to change kernel logo (1st boot srceen) [COMPLETED]

We have 3 major works here... So I gonna to make it seperated
-1st post is HOW TO EXTRACT kernel.img (boot.img)
-2nd post is HOW TO CONVERT PICTURE FILE to BOOT.RLE
-3rd post is HOW TO REPACK THE KERNEL PAKAGE into boot.img
Requiredment
-Window machine
-installed cygwin
-the full boot.img/kernel (some kernel won't work because there is no full pakage/ i mean we can't)
-bootimg.zip (tool for UNPACK and REPACK kernel)
-boot_screen_logo_creation_package.rar
Thank and Credit
i- Credit to DooMLoRD Recognized Developer over most of XPERIA devices for his own tool and tutor that I learned before
ii- Credit to jimbo77 Senior Member for his tutorial that I used and learned and tool for unpack and repack
ii- Don't forget to give them a thanks meter
=============================================================================
Here we go
1-This section I will show u how to unpack and repack the boot.img
just see from original thread by jimbo77 from here and download the UNPACK and REPACK tool by him HERE
this is a fast guide from me:-
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
cd /boot
Click to expand...
Click to collapse
{
"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"
}
5-Now, unpack your boot.img by running the following command:
./extractboot boot.img
Click to expand...
Click to collapse
If your output looks like this, then the extraction has worked correctly! Note that the Command Line string has also been read from the source file, this will be used later when you go to re-pack your file.
Your script folder should now look like this:
boot.img-kernel is the compiled kernel blob that was inside the source boot.img, if you want to replace the kernel with another compiled kernel image, you can replace this file with another one (but leave the file name the same)
boot.img-ramdisk.gz is the gzipped ramdisk image which has been split from the boot.img, you should leave this file alone.
The “out” folder contains the EXTRACTED ramdisk, and this is where you should make your changes to the ramdisk.
Important Note!
Remember, when editing files in the ramdisk through Windows, such as init.rc, Windows notepad will not format the files correctly, making them almost impossible to read, wheras Wordpad will LOOK like it is formatting the files correctly, if you save one of these files from the Wordpad application it will BREAK the file and it will no longer be able to be read correctly by Android. To edit these files you MUST use an editor such as Notepad++ which you can download for free.
AGAIN...
Special thanks/credit to jimbo77 for his excellent guide
So.. NEXT step to change a kernel logo is here
Requiredment
1-a picture what are u like to look into the 1st boot screen (kernel logo) (make sure it size/resolution same your device resolution)
2-boot_screen_logo_creation_package.rar
3-some infos and knowledges here
4-window machine like i explained on 1st post
My quick guide
-extract the tool.rar
-move extracted files into new folder (name it 'rle' folder without quote)
-move into cygwin folder (to make it easy to follow my simple guide)
-copy your own logo.png (a picture u want to use on a kernel) into same rle folder
(for 4 steps above it shold look like tis)
-now launch cygwin.bat
cd /rle
Click to expand...
Click to collapse
./convert_image_to_rle.bat logo.png
Click to expand...
Click to collapse
Ah...my mistake..don't forget to move/copy/replace new logo.rle into
C/cygwin/boot/out/ramdisk/here
if you done good...follow next step on next post (to repack your moded kernel)
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
./packboot
Click to expand...
Click to collapse
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
I need this for an extra (extra thanks..)
(may U?)
I did all the steps as you did. Packed boot.img and flashed but i still see old boot logo. Device is Huawei u8650
at this step ı have this Screen
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Well I've been scratching my head about this and just can't work out what's going wrong - after I run the ./extractboot boot.img command I keep getting the message: './extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory'
I followed your instructions as below:
1-extract the bootimg-tools.zip into new folder (name it 'boot' folder)
2-move it into cygwin directory (cygwin/boot)
3- move your fav kernel into same directory
4-run cygwin.bat
When you say "move your fav kernel into same directory", what do you mean? Move it into the 'boot' folder? Or do you mean the 'cygwin' folder?
Any help you could give would be greatly appreciated - confused.com!
boot.img file problem
HTC ONE X beataudio
ENDEAVORU PVT SHIP S-ON RL
HBOOT-1.36.0000
CPLD-None
MICROP-None
RADIO-5.1204.162.29
eMMC-bootmode:disabled
CPU-bootmode: disabled
HW Secure boot:enabled
MODEM PATH : OFF
Nov 16 2012,18:32:39
cid: HTC__044
i install this ROM (cm-10.1-20130404-NIGHTLY-endeavoru.zip) file but can't boot.
boot problem how to fix pls i did flash boot.img file also but same problem.pls help
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
doesnt work on my innos d9 rom
sirhca said:
please re upload this file "boot_screen_logo_creation_package.rar" link is dead on mediafire
Click to expand...
Click to collapse
http://d-h.st/xwB
mesadbal said:
at this step ı have this Screen
Click to expand...
Click to collapse
Type this in your cygwin
Code:
chmod 777 extractboot
chmod 777 mkbootfs.exe
chmod 777 mkbootimg.exe
chmod 777 packboot
chmod 777 split_bootimg.pl
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Error when extracting
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
3X4MPL3 said:
Hey Guys,
If you get this error:
Code:
./extractboot: ./split_bootimg.pl: /usr/bin/perl: bad interpreter: Permission denied
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: No such file or directory
you need to install Perl & cpio packages. Just run the installation of cygwin again and choose them.
The problem is, now i get the following error:
Code:
./extractboot boot.img
Android Magic not found in ./boot.img. Giving up.
gzip: ../../boot.img-ramdisk.gz: No such file or directory
cpio: verfrühtes Ende des Archivs
Does anyone now how to fix that?
Click to expand...
Click to collapse
Same problem here Bro... So how did you manage to fix it ?
FinixZ said:
Same problem here Bro... So how did you manage to fix it ?
Click to expand...
Click to collapse
Not at all, I didn't changed it and waited for an other kernel
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Repack your moded kernel
One thing to note that people may mention in other guides, is that when packing boot.img files, you will usually have to declare a base address, and a command line to the packaging tool. This set of scripts reads the existing command line and base address from the boot.img file you originally provided at the time of repacking, so always make sure you leave your original source boot.img file in the folder and do not re-name it after extraction, your newly created boot.img file will be named boot_new.img and will NOT overwrite the original.
Done! If your screen looks like the image above, then you should now have a freshly created boot_new.img file, ready to be flashed to Android for testing, you can now go ahead and flash it through FASTBOOT one thing I'll recommend though is to first do
Click to expand...
Click to collapse
why i am getting this error?
any idea?
$ ./extractboot boot.img
Page size: 131072 (0x00020000)
Kernel size: 4584280 (0x0045f358)
Ramdisk size: 3831016 (0x003a74e8)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
./extractboot: line 17: cpio: command not found
gzip: ../../boot.img-ramdisk.gz: not in gzip format
Finally i manage to extract...
3X4MPL3 said:
Not at all, I didn't changed it and waited for an other kernel
Click to expand...
Click to collapse
Finally i manage to extract the boot image by using this script... :victory:
Thanks to the author "Beide" for his script :highfive:
Code:
#!/usr/bin/perl -W
use strict;
use bytes;
use File::Path;
die "did not specify boot img file\n" unless $ARGV[0];
my $bootimgfile = $ARGV[0];
my $slurpvar = $/;
undef $/;
open (BOOTIMGFILE, "$bootimgfile") or die "could not open boot img file: $bootimgfile\n";
my $bootimg = <BOOTIMGFILE>;
close BOOTIMGFILE;
$/ = $slurpvar;
# chop off the header
$bootimg = substr($bootimg,2048);
# we'll check how many ramdisks are embedded in this image
my $numfiles = 0;
# we look for the hex 00 00 00 00 1F 8B because we expect some trailing padding zeroes from the kernel or previous ramdisk, followed by 1F 8B (the gzip magic number)
while ($bootimg =~ m/\x00\x00\x00\x00\x1F\x8B/g) {
$numfiles++;
}
if ($numfiles == 0) {
die "Could not find any embedded ramdisk images. Are you sure this is a full boot image?\n";
} elsif ($numfiles > 1) {
die "Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.\n";
}
$bootimg =~ /(.*\x00\x00\x00\x00)(\x1F\x8B.*)/s;
my $kernel = $1;
my $ramdisk = $2;
open (KERNELFILE, ">$ARGV[0]-kernel.gz");
print KERNELFILE $kernel or die;
close KERNELFILE;
open (RAMDISKFILE, ">$ARGV[0]-ramdisk.cpio.gz");
print RAMDISKFILE $ramdisk or die;
close RAMDISKFILE;
print "\nkernel written to $ARGV[0]-kernel.gz\nramdisk written to $ARGV[0]-ramdisk.cpio.gz\n";
if (-e "$ARGV[0]-ramdisk") {
rmtree "$ARGV[0]-ramdisk";
print "\nremoved old directory $ARGV[0]-ramdisk\n";
}
mkdir "$ARGV[0]-ramdisk" or die;
chdir "$ARGV[0]-ramdisk" or die;
system ("gunzip -c ../$ARGV[0]-ramdisk.cpio.gz | cpio -i");
print "\nextracted ramdisk contents to directory $ARGV[0]-ramdisk/\n";
nelikp said:
Last step before you flash a new look kernel (boot.img) is
Click to expand...
Click to collapse
thank you for your n00b-friendly tut., but for some reason it already goes wrong in step 1, 'cause when I extract the kernel the folder out/ramdisk remains empty, so nothing to replace. Have I done something wrong or is my Arc S just not suitable for this sort of tinkering?
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
BordenG said:
I think you should install perl (for splitting bootimg) and cpio (to create ramdisk.gz ) packages from cygwin.
without this packages, extractboot script will just create an empty ramdisk folder.
Click to expand...
Click to collapse
ok, found "perl" but for "cpio" I searched and installed the 3 items that had "cpio" in 'em (on top of my head "default '& "items" and a third I can't remember).
If it works the OP should add that info to the tut.

Install official AOSP GSI using Odin

Hi,
I have the latest stock ROM (G960FXXSFFUB3) on my Galaxy S9 (SM-G960F, Exynos) and my goal is to install official AOSP Android 11 GSI using Odin. I pretty much succeed, but I got bootloop as a result. Can you please help me to resolve this problem?
Steps to reproduce:
1. OEM Unlock [source, by @georgeburduli ]
1.1. Connect your phone to the Internet
1.2. Navigate to "Settings" -> "General management" -> "Date and time"
1.3. Disable "Automatic date and time"
1.4. Click on "Set time"
1.5. Select any date from the previous month
1.6. Navigate to "About phone" -> "Software update"
1.7. Disable "Auto download over Wi-Fi"
1.8. Click on "Download and install"
1.9. Navigate to "About phone" -> "Software information"
1.7. Tap on "Build number" 7 times to activate "Developer options"
1.8. Navigate to "Settings" -> "Developer options"
1.9. Disable "Auto update system"
1.10. Enable "OEM Unlock". If there are no "OEM Unlock" option in "Developer options", then try to repeat steps 1.1 - 1.10.
2. Prepare building tools [source, by @kkoo ]
2.1. Install 7zip
2.2. Create a new folder "tools"
2.3. Create a new folder "tools\bin"
2.4. Download the following files
- coreutils-8.26-2.tar.xz
- cygwin-3.2.0-0.1.tar.xz
- libattr1-2.4.48-2.tar.xz
- libgcc1-9.3.0-2.tar.xz
- libiconv2-1.16-2.tar.xz
- libintl8-0.19.8.1-2.tar.xz
- tar-1.33-1.tar.xz
2.5. Using 7zip open each *.tar.xz file and extract the following files and place them inside "tools\bin":
- cygattr-1.dll
- cyggcc_s-seh-1.dll
- cygiconv-2.dll
- cygintl-8.dll
- cygwin1.dll
- ls.exe
- md5sum.exe
- mv.exe
- tar.exe
2.6. Create file "tools\batch.bat"
Spoiler: tools\batch.bat
Code:
@echo ---------------mkh.mourad batch script
rem Setup ENV
SETLOCAL ENABLEDELAYEDEXPANSION
rem // Delete Previous Folder
RMDIR /S /Q temp-folder
MKDIR temp-folder
call set curentDir="%cd%%"
FOR /f "delims=" %%G in ('DIR /S /A:-D /B *.lz4') do (
call cd %%~dpG
call !curentDir!\BIN\tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f %%~nG.tar %%~nxG
xcopy %%~nxG !curentDir!\temp-folder\
)
cd !curentDir!
rem Build the TAR File
cd temp-folder
call !curentDir!\BIN\ls *.lz4 > temp-file.txt
call !curentDir!\BIN\tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f AP_TAR_MD5_CUSTOM_FILE_ODIN.tar -T temp-file.txt
del /Q temp-file.txt
cd !curentDir!
rem Create the MD5 Final File:
FOR /f "delims=" %%G in ('DIR /S /A:-D /B *.tar') do (
call cd %%~dpG
call !curentDir!\BIN\md5sum -t %%~nxG >> %%~nxG
call !curentDir!\BIN\mv %%~nxG %%~nxG.md5
)
cd !curentDir!
rem Cleaning Files
FOR /f "delims=" %%G in ('DIR /S /A:-D /B *.lz4 *.md5 ^| FINDSTR /v /i "\AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5$"') do del /Q "%%G"
3. Build the AP file to use with Odin [source, by @kkoo ]
3.1. Download lz4_win64_v*_*_*.zip
3.2. Using 7zip extract lz4_win64_v*_*_*.zip to "lz4_win64_v1_9_3"
3.3. Download vbmeta.img
3.4. Place vbmeta.img into "lz4_win64_v1_9_3/bin" and run the following command:
Code:
lz4.exe -B6 --content-size vbmeta.img vbmeta.img.lz4
3.5. Download the latest aosp_arm64_ab ROM and using 7zip extract system.img, vendor.img and cache.img into "lz4_win64_v1_9_3/bin"
3.6. Run the following command:
Code:
lz4.exe -B6 --content-size system.img system.img.lz4
lz4.exe -B6 --content-size vendor.img vendor.img.lz4
lz4.exe -B6 --content-size cache.img cache.img.lz4
3.7. Download your phone latest Official Stock ROM (I got my using Samsung Smart Switch)
3.8. Extract the downloaded file (you'll have the BL, AP, CP, CSC, HOME_CSC .tar.md5 files)
3.9. Using 7zip extract the following files from AP_*.tar.md5 into the "tools" folder from step 2.2:
- boot.img.lz4
- dqmdbg.img.lz4
- recovery.img.lz4
- userdata.img.lz4
- vendor.img.lz4
3.10. Move vbmeta.img.lz4, system.img.lz4 and cache.img.lz4 from the "lz4_win64_v1_9_3/bin/" into the "tools" folder
3.11. Double click on the "tools/batch.bat" file
3.12. Once it finishes go to the "tools/temp-folder". Inside you will find the AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5
4. Flash the ROM
3.1. Install SAMSUNG_USB_Driver_for_Mobile_Phones.exe
3.2. Download Odin3-v3.14.1.zip
3.3. Extract the downloaded file
3.4. Run Odin3 v3.14.1.exe
3.5. Flash the BL, CP, HOME_CSC from your Stock ROM and AP (using AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5)
Result: Bootloop
{
"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"
}
I heard that many users have issue get GSI running in their S9. Endless Bootloops.
Don't users could fix it flashing stock firmware.
Others by doing a factory reset.
Others by flashing TWRP recovery:
[RECOVERY][OFFICIAL] TWRP for Galaxy S9 (Exynos)
Thread moved to https://forum.xda-developers.com/galaxy-s9/samsung-galaxy-s9--s9-cross-device-development/twrp-exynos-t3763464.
forum.xda-developers.com
Hope that your can find a way to get your device up and running again.
I got an s9 too, but it got stuck into a bootloop but I can't access anything and it won't allow me to completely power on the the device. It took to Samsung service centers and they get an error called "binary corrupted" the device was already setup with twrp but by the time it got in the loop a thief who had snatched it was trying to flash it after I locked it with my "Samsung find my device"

Categories

Resources