Comments (12)
Hi, thanks! It can be better done by implementing by rest of the device info xml file, can you post it?
from newflasher.
Hi, thanks! It can be better done by implementing by rest of the device info xml file, can you post it?
Where can I get that?
from newflasher.
When unpack firmware with xperifirm its I think inside boot folder e.g. boot_delivery.xml or similar xml file, just look for xml file which contain line e.g. LUN0_62480384_X-FLASH-ALL-A2CD and post that file so I can look
from newflasher.
Do you mean partition_delivery.xml
inside partition
directory? I got this from J9110's firmware:
<PARTITION_DELIVERY FORMAT="1">
<PARTITION_IMAGES>
<FILE PATH="partition-image-LUN0_124960768_X-FLASH-ALL-A2CD.sin"/>
<FILE PATH="partition-image-LUN0_62480384_X-FLASH-ALL-A2CD.sin"/>
<FILE PATH="partition-image-LUN1_4096_X-FLASH-ALL-A2CD.sin"/>
<FILE PATH="partition-image-LUN2_4096_X-FLASH-ALL-A2CD.sin"/>
</PARTITION_IMAGES>
</PARTITION_DELIVERY>
and boot_delivery.xml
:
<BOOT_DELIVERY FORMAT="3" PRODUCT="griffin" SPACE_ID="1315-2591" VERSION="1315-2591-X-BOOT-SM8150-LA1.0-P-39">
<CONFIGURATION NAME="DEVELOPMENT">
<BOOT_CONFIG>
<FILE PATH="Griffin_XBootConfig_MiscTA.ta"/>
</BOOT_CONFIG>
<BOOT_IMAGES>
<FILE PATH="bootloader_39_X-FLASH-ALL-0A82.sin"/>
</BOOT_IMAGES>
<ATTRIBUTES VALUE="DEFAULT_SECURITY="OFF""/>
<HWCONFIG CERTIFICATE="x_conf_hwconfig_b98a" REVISION="HWC_Kumano_001" VERSION="7"/>
<KEYSTORE CERTIFICATE="x_conf_keystore_b98a" REVISION="DKS_Kumano_Dev_002"/>
<SECURITY_PROPERTIES REVISION="SP_GenTEST_001"/>
<SECURITY_STATE VALUE="27ThDX1WjB+9xCxfO7+AxuVEleM9TYWCy/mcptzbHOM="/>
</CONFIGURATION>
<CONFIGURATION NAME="TEST_OEM0_000A50E1">
<BOOT_CONFIG>
<FILE PATH="Griffin_XBootConfig_MiscTA.ta"/>
</BOOT_CONFIG>
<BOOT_IMAGES>
<FILE PATH="bootloader_39_X-FLASH-ALL-0A82.sin"/>
</BOOT_IMAGES>
<ATTRIBUTES VALUE="PLATFORM_ID="000A50E1";PLF_ROOT_HASH="2D8FCA01F12A0E869F4ACE7AD8CFBA12660FB306B0BC19A25243949CEEF9078EE081E9B79B1C6266E0884E389B6A4C14""/>
<HWCONFIG CERTIFICATE="x_conf_hwconfig_b98a" REVISION="HWC_Kumano_001" VERSION="7"/>
<KEYSTORE CERTIFICATE="x_conf_keystore_b98a" REVISION="DKS_Kumano_Dev_002"/>
<SECURITY_PROPERTIES REVISION="SP_SDM855TEST_014"/>
<SECURITY_STATE VALUE="27ThDX1WjB+9xCxfO7+AxuVEleM9TYWCy/mcptzbHOM="/>
</CONFIGURATION>
<CONFIGURATION NAME="PRECOMMERCIAL_000A50E1">
<BOOT_CONFIG>
<FILE PATH="Griffin_XBootConfig_MiscTA.ta"/>
</BOOT_CONFIG>
<BOOT_IMAGES>
<FILE PATH="bootloader_X_BOOT_SM8150_LA1_0_P_39_X-FLASH-ALL-BC42.sin"/>
</BOOT_IMAGES>
<ATTRIBUTES VALUE="PLATFORM_ID="000A50E1";PLF_ROOT_HASH="697B076AD42E3775198144956DB7D1C9677786FD647AAE76A0C5DA123021600608E359AE4A1C1523F6EECEEBE7F16EE8""/>
<HWCONFIG CERTIFICATE="x_conf_hwconfig_b94e" REVISION="HWC_Kumano_001" VERSION="7"/>
<KEYSTORE CERTIFICATE="x_conf_keystore_b94e" REVISION="DKS_Kumano_Pcm_002"/>
<SECURITY_PROPERTIES REVISION="SP_SDM855_003"/>
<SECURITY_STATE VALUE="o+o2gbjAgNE3bKsTX1jRBKxxV5ULF79Re/FYtV+zzl4="/>
</CONFIGURATION>
<CONFIGURATION NAME="COMMERCIAL_000A50E1">
<BOOT_CONFIG>
<FILE PATH="Griffin_XBootConfig_MiscTA.ta"/>
</BOOT_CONFIG>
<BOOT_IMAGES>
<FILE PATH="bootloader_X_BOOT_SM8150_LA1_0_P_39_X-FLASH-ALL-A2CD.sin"/>
</BOOT_IMAGES>
<ATTRIBUTES VALUE="PLATFORM_ID="000A50E1";PLF_ROOT_HASH="6C8D8435187C0ED7160856812F66743E5632EEF38B1AC8D695A91F00D35E792864812D4C8D13E459AAC3381AE995680E""/>
<HWCONFIG CERTIFICATE="x_conf_hwconfig_b94e" REVISION="HWC_Kumano_001" VERSION="7"/>
<KEYSTORE CERTIFICATE="x_conf_keystore_b94e" REVISION="DKS_Kumano_Com_002"/>
<SECURITY_PROPERTIES REVISION="SP_SDM855_004"/>
<SECURITY_STATE VALUE="oDKCbTEsCrVnLDpC7EYggwb18sCWeUIjwGnfOdBhWtY="/>
</CONFIGURATION>
</BOOT_DELIVERY>
from newflasher.
Can't find anything indicating which partition table to use. We probably need to read UFS info from the device and choose partition table base on its flash size.
from newflasher.
Hm, probably there is some new "getvar" variable which need to be implemented to newflasher. I'm downloading right now X1 firmware, will try to investigate. Can you tell me, with patch you provided everything is right? No flashing problem? And what you getting about ufs info in newflasher log? e.g https://forum.xda-developers.com/showpost.php?p=72682620&postcount=203
from newflasher.
Can you try this -> 15693f4 ? Need to know if partition_delivery.xml parser is done right
Disabled partition flashing right now (in case partition_delivery.xml file exist in partition folder) so its safe right now for testing.
from newflasher.
This is list of commands I found in lilo bootloader
sub_11E10("version", sub_11F74);
sub_11E10("max-download-size", sub_11FC8);
sub_11E10("Version-sony", sub_12024);
sub_11E10("Loader-version", sub_12078);
sub_11E10("serialno", sub_120D8);
sub_11E10("version-bootloader", sub_120EC);
sub_11E10("version-baseband", sub_12100);
sub_11E10("product", sub_12114);
sub_11E10("Phone-id", sub_12128);
sub_11E10("Rooting-status", sub_12130);
sub_11E10("Has-been-unlocked", sub_12138);
sub_11E10("Device-id", sub_121F4);
sub_11E10("Platform-id", sub_12260);
sub_11E10("Frp-partition", sub_122CC);
sub_11E10("secure", sub_122F0);
sub_11E10("Sector-size", sub_122F8);
sub_11E10("Ufs-info", sub_123C0);
sub_11E10("Keystore-counter", sub_123C8);
sub_11E10("Keystore-xcs", sub_12464);
sub_11E10("Sake-root", sub_12518);
sub_11E10("Default-security", sub_125A4);
sub_11E10("S1-root", sub_125F0);
sub_11E10("Security-state", sub_1263C);
sub_11E10("USB-version", sub_12760);
sub_11E10("Battery", sub_12768);
sub_11E10("slot-count", sub_12770);
sub_11E10("current-slot", sub_1288C);
sub_11E10("slot-successful:a", sub_12928);
sub_11E10("slot-successful:b", sub_129E0);
sub_11E10("slot-unbootable:a", sub_12A98);
sub_11E10("slot-unbootable:b", sub_12B50);
sub_11E10("slot-retry-count:a", sub_12C08);
sub_11E10("slot-retry-count:b", sub_12CA8);
sub_11E10("Stored-security-state", sub_12D48);
sub_11E10("Rollback-index-count", sub_12DB0);
sub_11E10("X-conf", sub_12E1C);
sub_11E10("Soc-unique-id", sub_12F0C);
sub_11E10("SD-card-inserted", sub_12FE0);
Didn't found anything special related to ufs size. Have no idea right now how can we determine LUN0 size. Idea? It can be done by snifing whole usb packets using Device Monitorin Studio software in same time while flashing phone with Sony PC Companio software, that way I have done newflasher. Without device I'm unable to figure out things right now, need help from somebody who have device allready.
from newflasher.
Can you tell me, with patch you provided everything is right? No flashing problem?
I can confirm that the patch works for J9110 and J8110, except a user in the forum reported a problem:
Works great but causes bootloop if you want to keep user data.
And what you getting about ufs info in newflasher log?
newflasher just reported a part number of the chip: SAMSUNG,KLUDG4U1EA-B0C1,0500
I found that it should be viable to use Get-gpt-info
command to retrieve partition image from the device, and calculate the flash size base on the GPT header. I can't flash my phone again since I've already done setting up and I don't have a spare one by hand. But I'll look into that to see if I can provide you more details.
from newflasher.
I tried using Get-ufs-info
command to retrieve UFS descriptor from the device.
Get-ufs-info
command will cause the device to return a binary response, containing descriptors of the UFS chip. In case of J9110 with KLUDG4U1EA-B0C1, I get:
40 00 00 00 00 00 03 04 01 00 01 7F 00 01 04 00
02 10 02 19 00 01 02 03 01 CE 10 10 02 00 1D 01
01 20 00 00 20 00 00 00 00 00 04 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
23 02 00 01 00 00 00 00 00 00 0C 00 00 00 00 01
DC B0 00 00 00 00 01 03 00 00 00 00 01 DC B0 00
00 00 00 23 02 01 01 01 01 00 00 03 00 0C 00 00
00 00 00 00 04 00 00 00 00 01 03 00 00 00 00 00
00 04 00 00 00 00 23 02 02 01 02 01 00 00 03 00
0C 00 00 00 00 00 00 04 00 00 00 00 01 03 00 00
00 00 00 00 04 00 00 00 00
The response above consists of a 64 byte Device Descriptor and three 35 byte Logical Unit Descriptors corresponding to LUN0, LUN1 and LUN2.
Data starting from 23 02 00
is the descriptor for LUN0, and at offset 0x0B
is a 64-bit big-endian integer representing total logical block count of this unit, in my case it's 0x1DCB000 (31240192). Together with the logical block size returned by getvar:Sector-size
which is 4096 bytes, I can tell the size of the flash is 127959826432 bytes = 124960768 KB.
Logical block size is also described in the descriptor, but I'm not sure how is it interpreted. For more information, please refer the specification.
This should be much more reliable than the solution I mentioned in my previous comment. Hope this helps.
from newflasher.
Thanks, thats enought, great find! And here is implementation 7bc23e5 , hope working :)
from newflasher.
Done. Thanks for contribution!
from newflasher.
Related Issues (20)
- Hi, I have some problem when I flash my phone ,could you help me? HOT 2
- ERROR: Error CreateFile! failed with error code 5 as follows: HOT 1
- 'libusb.h' file not found (on M1 Macs) HOT 1
- Protocol error HOT 33
- Has chosen to skip userdata but userdata.sin is still flashed HOT 3
- Xperia 1 III(XQ-BC72) baseband lost HOT 1
- Support to switch between slots HOT 3
- libusb problems on M1 mac HOT 1
- pre-compiled arm builds does not flash on Raspberry Pi 4 HOT 4
- Can't flash a second hand xperia 10 iii HOT 4
- Add support for command line options HOT 1
- Xperia 1 III (XQ-BC72) flash failed HOT 3
- Newflasher stucks on MacOS Ventura with M1 HOT 1
- Flashing custom ROMs (or TWRP) HOT 1
- No usb device with vid:0x0fce pid:0xb00b tried bootloader,fastboot,recovery HOT 12
- Allow custom PID and VID HOT 1
- Can't compile into an exe using mingw HOT 2
- I/O issue when finishing flashing HOT 1
- Newflasher HOT 1
- Allow flashing global firmwares on Docomo model Xperias HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newflasher.