[DISCUSSION] Unbrick using OMAP flasher - Galaxy Tab 2 General

Ever since I saw this thread, I was curious about OMAP flasher. Could it be ported as a way to unbrick some of the people with tabs that show, "no driver found for OMA4430" on USB connection? Last night, I finally found a working link to OMAPFlash in post 46 of this thread. I tried to create a new config for the p5113, but I'm not sure it will work. Could someone with a hard-bricked p5xxx please try it on his or her device? Here are the instructions:
go to the directory of the downloaded files.
shift-right-click and choose open command window here
go into device manager and right-click on OMAP4430. Click choose a file on the disk, and go to the OMAPFlash Recovery p5113/usb_drv_windows.
once the driver is installed, go to the command prompt and type
Code:
OMAPFlash.exe -v fastboot flash recovery recovery.img
copy the text from the command prompt and put it on this thread.
Here's the OMAPFlash download:
V1 NOT WORKING https://www.dropbox.com/s/hg1qauhhl73qiyx/OMAPFlash recovery p5113.zip
V2: for p5100 ONLY

I hope someone donating me a hard bricked P31xx or P51xx Thinking about flashing standard OMAP4 x-loader and u-boot. Booting standard Ubuntu Desktop from Linaro project will be super cool

MultipleMonomials, i have bricked p5100. Just checked, following your instructions. Couldn't repair:
Code:
C:\OMAPFlash recovery p5113>OMAPFlash.exe fastboot flash recovery recovery.img
п OMAPFlash v4.15 (Aug 12 2011)
п Waiting for device (omap usb) - [COLOR="Red"]MY COMMENT: here is nothing happens until i connect device. When I connected device - see next log:[/COLOR]
п Waiting for device (fastboot)In Fastboot Mode..
п Sending 'recovery' (5680 KB)
п Operation FAILED ()
п Elapsed time: 0:11.109

I think I know what the problem is. Unfortunately, I have to wait for the stock ROM to download. In the meantime, does anyone know if all the tabs use the same bootloader?
Posted from my Galaxy Tab 2 with CM10.1

Also, is your tab 8gb or 16gb?
Posted from my Galaxy Tab 2 with CM10.1

MultipleMonomials said:
Also, is your tab 8gb or 16gb?
Click to expand...
Click to collapse
I have Galaxy Tab 2 10.1 16GB (GT-P5100)

MultipleMonomials said:
I think I know what the problem is. Unfortunately, I have to wait for the stock ROM to download. In the meantime, does anyone know if all the tabs use the same bootloader?
Posted from my Galaxy Tab 2 with CM10.1
Click to expand...
Click to collapse
From Samsung x-loader source, all Tab 2 using the same config file. I build the bootloader but the resulted MLO file much smaller than the stock MLO and too scare to trying it on my device.

I'm not sure what problem you are trying to solve. but I can't see how this would have any effect on the EMMC brick bug

What emmc brick bug? This is for people with a messed up bootloader.
Posted from my Galaxy Tab 2 with CM10.1

DigitalMD said:
I'm not sure what problem you are trying to solve. but I can't see how this would have any effect on the EMMC brick bug
Click to expand...
Click to collapse
I have corrupted bootloader on my Galaxy Tab 2, not eMMC bug

OK, try it now.

Nothing, it is same as previous time:
Code:
C:\OMAPFlash recovery p5113>OMAPFlash.exe -v fastboot flash recovery recovery.img
п OMAPFlash v4.15 (Aug 12 2011)
п -v
п fastboot
п flash recovery recovery.img
п Waiting for device (omap usb)
п Waiting for device (fastboot)In Fastboot Mode..
п Sending 'recovery' (5680 KB)
п Operation FAILED ()
п Elapsed time: 0:11.094

Sorry, I renamed one file but forgot to rename another. Redownload and try again.

MultipleMonomials, same result. Check your PM for details

Try the commands
Code:
OMAPFlash chip_download [email protected] Targets\Projects\p5113\MLO_4430_HS
and
Code:
OMAPFlash chip_download [email protected] Targets\Projects\p5113\Sbl.bin

MultipleMonomials said:
Try the commands
Code:
OMAPFlash chip_download [email protected] Targets\Projects\p5113\MLO_4430_HS
and
Code:
OMAPFlash chip_download [email protected] Targets\Projects\p5113\Sbl.bin
Click to expand...
Click to collapse
Code:
E:\OMAPFlash recovery p5113>OMAPFlash chip_download [email protected] Targets\Projects\
p5113\MLO_4430_HS
» OMAPFlash v4.15 (Aug 12 2011)
» Waiting for device (omap usb)
» Looking for a driver for 'EMMC'
» Error no driver found in board configuration for 'EMMC'
» Downloading
Code:
E:\OMAPFlash recovery p5113>OMAPFlash chip_download [email protected] Targets\Projects\
p5113\Sbl.bin
» OMAPFlash v4.15 (Aug 12 2011)
» Waiting for device (omap usb)
» Looking for a driver for 'EMMC'
» Error no driver found in board configuration for 'EMMC'
» Downloading
Each time when "Downloading" line appears in log - application craches (OMAPFlash.exe has stopped working - Windows message) or "Operation FAILED" appears in log:
Code:
E:\OMAPFlash recovery p5113>OMAPFlash chip_download [email protected] Targets\Projects\
p5113\MLO_4430_HS
» OMAPFlash v4.15 (Aug 12 2011)
» Waiting for device (omap usb)
» Found device (omap usb)
» Looking for a driver for 'EMMC'
» Error no driver found in board configuration for 'EMMC'
» Downloading
» Operation FAILED (Unknown status message '??;?')
» Elapsed time: -23:-1.-677

OK, I figured out why it's not working. I'm using the wrong device/USB ID in the config file so when OMAPFlash tries to download the bootloader, it uses a config file that doesn't specify the EMMC driver. What I need is the "id number provided by the OMAP device during perfipheral boot over UART or USB along with the <omap version> number". It should look similar to "443007". Go to the properties of OMAP4430 in Device Manager and see if you can find a number that looks similar. Thanks.

MultipleMonomials, no similar information in Windows Device Manager...
but when i played with OMAPFlash with pre-builded configurations for other platforms i seen massages like this:
Code:
Searching 2nd for: OMAP4430_1GHZ_8G_HS 443007 04 HS
and
Code:
Error no 2nd for: OMAP4460_TUNA_8G_HS_PRO 443007 04 HS
I'm sure that 443007 - this value read from device because here was other value for other devices but same configuration files when i testing it.
Also when i run OMAPFlash without any configuration files (all configs with OMAP string and 443007 deleted) it is displays same value for my P5100 too:
Code:
C:\OMAPFlash recovery p5113>OMAPFlash -t 36000 -2
п OMAPFlash v4.15 (Aug 12 2011)
п Looking for device (omap usb)
п Please turn on device
п Waiting for device (omap usb)
п Found device (omap usb)
п Requesting ASIC id
п Searching 2nd for: (null) 443007 04 HS
п Error no 2nd for: (null) 443007 04 HS
---------- Post added at 01:27 AM ---------- Previous post was at 01:20 AM ----------
Maybe this log will helpfully for you too, i have tried to repair P5100 with other pre-builded .bat file - but unsuccessful
Code:
C:\1\omap4430hs_espresso>"omap4430hs_espresso.bat"
п OMAPFlash v4.15 (Aug 12 2011)
п -v
п Entering parameter file:Targets\Projects\espresso\omap4430hs_1000MHZ.txt at li
ne: 1
п -omap 4
п -t 36000
п -p OMAP4430_1GHZ_8G_HS
п -2
п chip_download EMMC Targets\Projects\espresso\MLO
п chip_download EMMC Targets\Projects\espresso\Sbl.bin
п command cold_sw_reset
п Leaving parameter file:Targets\Projects\espresso\omap4430hs_1000MHZ.txt
п @Targets\Projects\espresso\omap4430hs_1000MHZ.txt
п Looking for device (omap usb)
п Please turn on device
п Waiting for device (omap usb) [COLOR="Red"] # HERE OMAPFLASH WAITING FOR DEVICE CONNECTED + POWER BUTTON[/COLOR]
п Found device (omap usb)
п Requesting ASIC id
п AsicId items 05
п AsicId id 01 05 01 44 30 07 04
п AsicId secure_mode 13 02 01 00
п AsicId public_id 12 15 01 F2 8C F5 50 1D C8 E6 8D BA F0 DD CB 95 CA 73
75 54 92 D2 71
п AsicId root_key_hash 14 21 01 B5 85 AC F1 DD 15 B0 6A 74 81 3B FD DD 6E CD
64 22 7C E4 C9 06 58 C6 5B 4C 53 AC 22 9B 4C 6D C0
п AsicId checksum 15 09 01 9C 66 9A D9 68 2A DC CF
п Searching 2nd for: OMAP4430_1GHZ_8G_HS 443007 04 HS
п Loading second file Targets\2nd-Downloaders\dnld_startup_omap4_hs_4g_es2.s2.si
gned.2nd.hs.1GHZ
п Entering parameter file:omapflash2nd.txt at line: 46
п -pheriphalboot_reopen
п Reading board configuration file Targets\Configurations\configuration_omap4430
_8g_ver416.txt
п Reading definition file .\Targets\Definitions\definitions_omap4.txt
п -board_config Targets\Configurations\configuration_omap4430_8g_ver416.txt
п Leaving parameter file:omapflash2nd.txt
п Sending size of second file (0x000079B0 bytes)
п Transferring second file to target (0x79B0 bytes)
п Closing boot connection [COLOR="Red"] # HERE IS DEVICE TURNED OFF[/COLOR]
п Waiting for device (omap usb) [COLOR="Red"] # HERE IS OMAPFLASH WAITING AGAIN FOR POWER BUTTON PRESSED[/COLOR]
п Found device (omap usb)
п Waiting for 2nd
п Unknown status message 'h????????' during peripheral boot (waiting for 2nd)

Can you link me to this script?

yes, it is one of this
https://hotfile.com/dl/159235713/7a3bfe8/OMAPFlash_1229_2ndlastt.rar.html
https://www.dropbox.com/s/y0aouzpuppdnivo/OMAPFlash_tuna.zip

Related

Help. Xperia x10i will not boot (Bricked) after DECRYPTED X10 ROM UPDATE

Hello Everyone,
Recently I tried to update my xperia x10 from WWE_R1FA016 to WWE_R1FB001.
After I ran the script the phone proceeded to reboot in a (Recovery Mode) with the yellow triangle and explanation point. I am able to boot the phone into flash mode. Although When I try to recover the firmware with SE Updater, PC Companion, And Omnious They all 3 have issue restoring the firmware. I have confirmed that the SEMC Flash Driver Driver is in fact installed.
A green light appears on the device. The USB driver registers to the phone. But I am unable to restore the firmware from any SE application nor Ominous.
Here is Debug output from omnius when the restoration failed.
Code:
Action journal
20:12:10 Gesture lock reset
20:12:10 Removes the gesture lock.
20:12:10 Operating system: Microsoft Windows 7 Professional Edition (build 7600), 64-bit
20:12:10 Application version: 0.04.2151 (beta)
20:12:10 . The action name is 'Gesture lock reset'
20:12:10 Selected phone type: Xperia™ X10
20:12:10 Selected connection method: USB EROM
20:12:10 i Instructions
20:12:10 i 1. Make sure the phone battery is charged to at least 50%.
20:12:10 i 2. Switch off the phone!
20:12:10 i 3. Remove the phone battery and wait at least 5 seconds before reinserting it!
20:12:10 i 4. Press and hold the return back button, then connect the cable to the phone!
20:12:10 . The action started waiting for the user
20:12:29 . The action finished waiting for the user
20:12:29 Connecting via SEMC USB Flash Device (USB2)...
20:12:29 Device driver version: 2.2.0.5
20:12:29 Detected chipset: QSD8250
20:12:29 Boot mode: EROM
20:12:29 IMEI: 3594190XXXXXXXXXX
20:12:29 Minimum loader AID: 0001
20:12:29 Sending loader...
20:12:30 Waiting for loader response...
20:12:31 e Check server settings or smartcard presence.
20:12:31 e Failed!
20:12:31 . The action entered shutdown phase
20:12:31 . The action reported failure
Error code
# 30A4A2B10AD134F3
Error details
---
19 1B 81 B0 DF 0B 0F B4 83 80 3B CC 37 1E 59 A3
4D 87 FD 41 21 5A 3F 36 3F 1A 9D 76 29 9F D7 34
05 E8 7D 90 2F EA 91 2C DD 52 CB 55 29 CE F9 2A
B5 8B 4D 80 7F 7A 97 83 23 92 CB 08 27 CC 37 14
9B 02 1B CC 54 08
---
Can someone please help me?
Try it with X10flash please:
Download X10flash here:
http://rapidshare.com/files/391404674/X10flash.zip.html
and get another Firmware from jerepeleas DECRYPTING thread (Download right version X10i oder X10a)
Then use X10flash to flash again.
Regards
Bin4ry
Mod. edit: not dev related, moved to general
gl
do you Unzip the firmware files and move the tools and firmware into the same folder?
Just out of interest have you registered at Omnius and have a live internet connection?
Also with Omnius you select phone.zip as the 1st file and the x10i generic...zip as the 2nd file. DO NOT UNZIP
This should work!
Thank you.
I will try this.
It works. Thank you very much for you help.
MarylandCookie said:
Just out of interest have you registered at Omnius and have a live internet connection?
Also with Omnius you select phone.zip as the 1st file and the x10i generic...zip as the 2nd file. DO NOT UNZIP
This should work!
Click to expand...
Click to collapse
its work man big thx from casa now witing for root
Im losing it here!!! I bricked my phone while trying to root as an x10a I reached step 5 now i have the exclamation mark of death. In ominus which files should i download to flash this bloody thing excuse my ranting jus upset thats all

[Q] ppp widget not working

Dear friends,
I have rooted nexus 7 2012, and installed PPP widget. I have configured the APN. It says "connected", but the internet is not working. Here is the PPP widget log, please help me:
PPP Widget version 1.3.3
USB_ModeSwitch log from Mon Dec 23 15:00:41 IST 2013
Raw args from udev: 2-1/2-1:1.0
Using top device dir /sys/bus/usb/devices/2-1
----------------
USB values from sysfs:
manufacturer USB Modem
product USB Modem
serial 1234567890ABCDEF
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /data/data/de.draisberghof.pppwidget/app_tmp/1c9e.f000
! matched. Reading config data
devList 1:
config: TargetVendor set to 1c9e
config: TargetProductList set to 9000,9603,9605,9607
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 2 -g 2 -v 1c9e -p f000 -f $cB
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
Reading long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.7 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1c9e
DefaultProduct= 0xf000
TargetVendor= 0x1c9e
TargetProduct= not set
TargetClass= not set
TargetProductList="9000,9603,9605,9607"
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
QuantaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
BlackberryMode=0
PantechMode=0
MessageEndpoint= not set
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 002/002 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 1c9e:f000
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using interface number 0
Using endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: USB Modem
Product: USB Modem
Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
OK, driver found; name unknown, limitation of libusb1
OK, driver "unkown" detached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
Bus/dev search active, referring success check to wrapper. Bye.
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 20 seconds ...
Reading attributes ...
Reading attributes ...
Mode switch has completed
Mode switching was successful, found 1c9e:9605 (USB Modem: USB Modem)
Device class of first interface is ff
Now checking for bound driver ...
Driver has bound, device is known
All done, exiting

Linux, Xubuntu, Lollipop 5.1.1 FOG6, fastboot waiting for device

I'm trying to solve a battery usage problem that requires me to root my phone to get more info. I'm trying to follow various instructions for rooting my T-Mobile S5 with current baseband version ...FOG6. I'm stuck at the step of getting the TWRP (or any other) recovery installed so that I can flash unofficial images.
I've gotten adb working, so I can get into bootloader mode by either powering up the phone while holding voldown+home OR I can do `adb reboot bootloader` from my computer while the phone is in usb debugging mode. However, once it's booted into bootloader/fastboot mode and I'm looking at the "Downloading... Do not turn off target!!" screen on the phone, I can't get the fastboot tool to talk to the phone, it just gets stuck at "< waiting for device >".
Here's some potentially relevant info:
syslog entries when performing `adb reboot bootloader` (device 7 was the phone in normal usb debugging mode):
Code:
Nov 16 12:05:24 daphne-xubuntu kernel: [ 379.270044] usb 1-1.2: USB disconnect, device number 7
Nov 16 12:05:24 daphne-xubuntu kernel: [ 379.272847] cdc_acm 1-1.2:1.1: failed to set dtr/rts
Nov 16 12:05:24 daphne-xubuntu ModemManager[723]: <info> (tty/ttyACM2): released by modem /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2
Nov 16 12:05:24 daphne-xubuntu NetworkManager[738]: <info> (ttyACM2): device state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
Nov 16 12:05:27 daphne-xubuntu kernel: [ 382.540941] usb 1-1.2: new high-speed USB device number 8 using ehci-pci
Nov 16 12:05:27 daphne-xubuntu kernel: [ 382.634182] usb 1-1.2: New USB device found, idVendor=04e8, idProduct=685d
Nov 16 12:05:27 daphne-xubuntu kernel: [ 382.634190] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 16 12:05:27 daphne-xubuntu kernel: [ 382.634195] usb 1-1.2: Product: MSM8960
Nov 16 12:05:27 daphne-xubuntu kernel: [ 382.634199] usb 1-1.2: Manufacturer: Sasmsung
Nov 16 12:05:27 daphne-xubuntu kernel: [ 382.635509] cdc_acm 1-1.2:1.0: ttyACM3: USB ACM device
Nov 16 12:05:27 daphne-xubuntu mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2"
Nov 16 12:05:27 daphne-xubuntu mtp-probe: bus: 1, device: 8 was not an MTP device
Nov 16 12:05:47 daphne-xubuntu ModemManager[723]: <info> Creating modem with plugin 'Generic' and '1' ports
Nov 16 12:05:47 daphne-xubuntu ModemManager[723]: <warn> Could not grab port (tty/ttyACM3): 'Cannot add port 'tty/ttyACM3', unhandled serial type'
Nov 16 12:05:47 daphne-xubuntu ModemManager[723]: <warn> Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2': Failed to find primary AT port
various command outputs after doing so:
Code:
$ lsusb | grep Samsung
Bus 001 Device 008: ID 04e8:685d Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II] (Download mode)
$ ls -la /dev/bus/usb/001/008
crw-rw-rw- 1 root root 189, 7 Nov 16 12:05 /dev/bus/usb/001/008
$ hexdump -C /dev/bus/usb/001/008
00000000 12 01 00 02 02 02 00 40 e8 04 5d 68 00 01 01 02 |[email protected]]h....|
00000010 00 01 09 02 43 00 02 01 00 c0 19 09 04 00 00 01 |....C...........|
00000020 02 02 01 03 05 24 00 10 01 05 24 01 00 01 04 24 |.....$....$....$|
00000030 02 0f 05 24 06 00 01 07 05 82 03 10 00 09 09 04 |...$............|
00000040 01 00 02 0a 00 00 00 07 05 81 02 00 02 00 07 05 |................|
00000050 01 02 00 02 00 |.....|
00000055
What else can I try?
Waiting for device means the machine can not see the phone, likely drivers
Use a Windows PC
It turns out that I have to use ODIN/Heimdall instead of Fastboot to talk to Samsung phones.
Looking at their site, it doesn't mention the S5 being supported, just a heads up
GT-I9000
GT-I9100[T]
GT-I9300
GT-I9505
SGH-I727
SGH-I777
SGH-I927
SGH-I797

[TOOL] Newflasher (xperia command line flasher)

Disclaimer:
newflasher tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using newflasher, you must agree that you using newflasher on your own risk, I am not responsible if you brick your device or anything else!
How to use:
OPTIONAL STEP 1:
- if you have missing flash driver just double click exe and confirm driver extraction, an exe will become available, run it and install driver.
OPTIONAL STEP 2:
- this step is optional, this step dump trim area, you can do this and keep those file somewhere on your pc in case you hard brick your device so give it to servicians to repair your phone.
STEP 1:
- Download right firmware for your device using XperiFirm tool, put newflasher.exe into firmware dir created by XperiFirm tool. Before you double click newflasher.exe do in mind something, newflasher tool is programed to flash everything found in the same dir!!! So tool flash all .ta files, all .sin files, boot delivery (whole boot folder), partition.zip, in short all files found in dir! If you no want to flash something just move file which you no want to flash OUT OF FOLDER! Partition.zip .sin files can be flashed only if you extract partition.zip into newly created folder called partition!
STEP 2:
- To start flashing phone put your phone into flash mode, double click newflasher.exe and wait wait wait until your device gets flashed, thats it. Look into log to see if something goes wrong! If all right you are done. If not post your log so I can look!
SOME MORE THINGS:
"You do not need to unlock bootloader or to root the phone if you want to flash a stock firmware from XperiFirm.
There are no files in the stock firmware that need to be deleted. Prompts will ask you to skip some files.
Feel free to press N to every prompt since:
- TA dumping it's not related with DRM keys.
- Flash persist_* files only if you know what you are doing, since you will lose your attest keys. Backup persist partition.
If you need the firmware on both A and B slot use fastboot commands to choose the inactive partion and re-flash."
Happy flashing!
Supported platforms:
- Newflasher is working on Windows, Linux, Android and Darwin, just chose right newflasher binary. With Android version you can flash phone by using another phone!
Changelog:
- version 1: Sorry a lot of work is done in pre pre alpha version and I can't count every changes, just folow development process about version 1, a lot of work is done before it started working. One esential change was done to tool improvement and it is described in one of the my posts related to moving function "erase:" to the section before function "flash:", it is realy improvement and more safer than in time when it was at the start of flashing routine.
- version v2 (15.Aug.2017)
Implemented free disk space safety check, it was missing and danger in case flashing process gets interupted because of the lack of the free disk space needed for sin extractions and temporary files. I have also include GordonGate flash driver prompt so in case somebody have missing flash drivers, simple need to double click exe and folow drivers archive extraction procedure, later need to install these drivers trought Windos device mannager. Also I have implemented an realy pre pre alpha version of the maybe non working trim (why maybe? Because I don't own xzp so can't test) area dump routine, in case it is working we can dump some esentials trim area units from device (probably not a full dump as like it was on every oldest xperia models - no permissions for dumping drm key unit)
- version v3 (23.09.2017)
Some more security checks, it's now a bit safer than v2
- version v4 (21.10.2017)
Updated trim area dumper, now it stores log to the trimarea.log but dump is now in .ta format and writen to the 01.ta and 02.ta
- version v5 (22.10.2017)
Updated trim area dumper, add progress meter, fix y-n prompt (thanks @pbarrette)
- version v6 (22.10.2017)
Updated trim area dumper
- version v7 (23.10.2017)
Updated trim area dumper, newflasher redesigned a bit, fix new partitioning for Oreo
- version v8 (24.10.2017)
Fix trim area dumper
- version v9 & v10 (25.10.2017)
Workaorunds on trim area dumper
- version v11 (07.04.2018)
Support for 2018 devices
- version v12 (29.04.2018)
Try fix doublefree bug/crash (most noticed on Linux 64 bit binary)
- version v13 (01.05.2018)
Fix doublefree bug/crash by removing dynamic allocation from function get_reply
- version v14 & v15 (12.06.2019)
Sony XPeria 1 support added.
- version v16 (16.06.2019)
LUN0 detection optimized.
- version v17 (24.06.2019)
LUN0 detection bug fixed.
- version v18 (10.08.2019)
Untested fix for https://forum.xda-developers.com/cr...wflasher-xperia-command-line-t3619426/page105
Using builtin mkdir instead of calling it trought system call
- version v19 (08.10.2019)
Implemented prompt for flashing persist partition; print skipped .sin files
- version v20 (13.12.2019)
implemented prompt for flashing bootloader,bluetooth,dsp,modem,rdimage to booth a,b slots
- version v21 (29.06.2020)
implemented battery level status check before flashing, flashing bootloader,bluetooth,dsp,modem,rdimage to booth a,b slots is mandatory now and is flashed by default right now, more info, try fix previously reported isue on sync and powerdown command reported 2-3 years ago so I have disabled it and now enabled for test, implemented Macos support (curently need to be tested! If you have plan to test please flash only cache.sin DO NOT flash the rest because of safety for your device!)
- version v22 (30.06.2020)
trying to fix battery capacity retrieval
- version v23 (04.07.2020)
removed battery capacity retrieval (not going to work that way), fix trim area dump file name, new gordongate drivers
- version v24 (04.07.2020)
new feature - now you can run newflasher from script or console with your own command, e.g. newflasher getvar:Emmc-info , I didn't tested all the list of commands, if you do it share them with us!
- version v25 (09.07.2020)
New trim area dump tool, with this change trim area dump is created in 3 secconds. Do in mind this not dump protected units like drm key...etc! Some changes in scripting feature from v24
- version v26 (10.07.2020)
Added 4 diferent reboot modes, reboot to android, reboot to fastboot, reboot to bootloader, power off
- version v27 (11.07.2020) (not yet released)
Workaround in mac libusb
- version v28 (12.07.2020)
Workaround to sync response bug; Fully implemented support for Mac. I'm tested myself on mac 10.14 but confirmed working on mac 10.15 too
- version v29 (12.07.2020)
Mac proper libusb deinitialisation
- version v30 (13.07.2020)
Preparation for Debian packaging; I'm noticed that hex modified arm64 fake pie binary is not working so its now compiled with ndk and its true pie binary now
- version v31 (14.07.2020)
Fix cosmetic bug https://forum.xda-developers.com/showpost.php?p=83056693&postcount=1212 which might confuse somebody
- version 32, not yet released
- version 33 (30.07.2020)
Allow bootloader unlocking with newflasher; Try fix sync response bug for win and darwin too
- version 34 (08.08.2020)
Added support for 32bit sized trim area units (as trim area api changed in xperia mark 2 line) (not yet released because of bug)
- version 35 (08.08.2020)
Updated support for 32bit sized trim area units (as trim area api changed in xperia mark 2 line); Move trim area dumps out of root folder so it not get acidentaly flashed, dumps is now inside folder tadump
- version 36 (27.08.2020)
Some improvements and and possible bug fixes
- version 37 (09.12.2020)
Added support for Xperia 5 II with emmc instead of ufs (not working)
- version 38 (10.12.2020)
Fixed impropper implementation from v37
- version 39 (13.12.2020)
Since mark 2 devices protocol is changed a bit and on some devices OKAY reply is not in separated usb poacket, instead it is merged with data packet, added support for it
- version 40 (03.01.2021)
Temporary solution for determining partition 0 sin file caused by two diferent emmc csd info we found recently on mark 2 devices
- version 41 (03.01.2021)
Removed temporary solution from version 41 so right lun0 sin file get flashed and seccond lun0 get skipped or booth skipped if lun0 sin file do not match device storage size
- version 42 (11.03.2021)
Fix bug in flashing booth slots when current slot is A, thanks to @chrisrg for discovering bug!
- version 43 (12.06.2021)
Support for Mark 3 devices
- version 44 (19.06.2021)
Fully Mark III device implementation
- version 45 (20.06.2021)
Implemented battery level check and prompt user to take a risk and continue flashing or stop flasing if battery level is less than 15 percent
- version 46 (08.07.2021)
Fix problem with filenames which contain "_other", it need to be always flashed to the diferent slot
- version 47 (15.07.2021)
Removed prompt for persist.sin flashing, now its by default skip. Implemented bootloader log retrieval at the end of flashing for better understanding when something goes wrong. Implemented firmware log history retrieval for those who want to know history of the flashed firmwares
- version 48 (19.07.2021)
Flash bootloader,bluetooth,dsp,modem,rdimage to booth slots only on a,b devices
- version 49 (31.07.2021)
Support for XQ-BT41
- version 50 (12.08.2021)
Workin progress on asynchronous usb to make it more like synchronous, added progress bar during send-receive usb packets and more logging. Increased usb timeout to 2 minute. Trying fix sync command at the end of flashing as reported here -> https://github.com/munjeni/newflasher/issues/42
- version 51 (12.08.2021)
Fix empry line printed while receiving usb packets, thanks @elukyan
- version 52 (01.10.2021)
Implemented userprompt for keeping userdata, thanks @OhayouBaka for figuring out! Removed bootloader log retrieval
- version 53, 54, 55 (20.0822022)
Fix trimarea dumper crash on big endian machines, update building makefiles
Credits:
- without @tanipat and his pc companion debug logs this tool will never be possible! Thank you a lot for your time providing me logs! (by the influence of others, He was disappointed me with last post, but I still appreciate his help and can't forget it)
- without @thrash001 who helped testing our tool I never be continue building our tool since I don't have device for testing, thanks mate!
- didn't forgot @beenoliu, thanks mate for testing!
- thanks to @porphyry for testing linux version!
- thanks to @Snow_Basinger for providing sniff log from 2018 device and for testing on his 2018 device
- thanks to @frantisheq for testing newflasher on his 2018 device and for notify about doublefree bug
- thanks to @serajr for providing me some logs which helped me to figure out some things related to 2018 devices
- thanks to @noelex for helping in Xperia 1 implementation
- thanks to @Meloferz for testing on his xperia 1 mark II
- thanks to github contributors, testers and reporters: vog, noelex, TheSaltedFish, solarxraft, pbarrette, MartinX3, kholk
- thanks to Chirayu Desai for tracking addition to Debian and thanks to vog for initiating all that
- thanks to @elukyan for testing and providing me usb sniff logs for mark 3 devices imlementation, thank you so much
Common errors and how to solve:
https://forum.xda-developers.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-72610228
Source code:
https://github.com/munjeni/newflasher
let me start for you and report
here my log..
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
ERROR: TIMEOUT: failed with error code 997 as follows:
▄berlappender E/A-Vorgang wird verarbeitet.
- Error writing command!
Drücken Sie eine beliebige Taste . . .
Common errors and what you need to do:
ERROR: TIMEOUT: failed with error code 997 as follows:
Overlapped I/O operation is in progress.
FIX --------> https://forum.xda-developers.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84603931
Error, didn't got signature OKAY reply! Got reply: FAILFailed to verify cms
FIX---------> Make sure to flash right rom model e.g. if your device is SO-01L you need to flash rom model SO-01L or e.g. your phone is H8314 you need to flash rom H8314 ... etc, otherwise you might hardbrick your phone!
Bootloop caused by rooback protection e.g. by flashing an OLD rom over NEWER one e.g. you have android 11 and want back to android 10 that will bootloop your phone if your phone have rollback protection
https://forum.xda-developers.com/t/...-xq-at51-with-flashtool.4119707/post-84509417
in short explanation your bootloader need to be unlocked. Than by relocking bootloader rollback index (rollback protection) is reset to zero. Than you can flash oldest rom because index in that case is zero so you won't get bootloop related to rollback protection.
It was confirmed working:
https://forum.xda-developers.com/t/...-xq-at51-with-flashtool.4119707/post-84637803
https://forum.xda-developers.com/t/...-xq-at51-with-flashtool.4119707/post-84673613
If neither help you to solve problem you should read boot log to get idea, use this command line option for newflasher:
newflasher Read-TA:2:2050
what I got
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#6&3a757eec&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: Universal Serial Bus controllers
Device Instance Id: USB\VID_0FCE&PID_B00B\6&3A757EEC&0&1
ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:
A device attached to the system is not functioning.
- Error reaply! Device didn't replied with OKAY or DATA
Press any key to continue . . .
wait for others to report
Hm, you successfully wrote command but error on reaply Lets see new version is out
Today I have free time for development, I don't know when I will get free time again, so guys if you hurry to have flasher I am here and waiting. I do not have 2017 device model so I can't test, so can't continue development without your tests
Driver is the right.
here the next:
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
ERROR: TIMEOUT: failed with error code 997 as follows:
▄berlappender E/A-Vorgang wird verarbeitet.
- Successfully write 0x0 bytes to handle.
- Error writing command!
Drücken Sie eine beliebige Taste . . .
Strange! Maybe run as admin is need?
It would be great if tanipat debug newflasher with monitoring studio so I can compare whats going on? New version is out again.
Edit:
Curent version is safe so you no need to care for brick! Tool currently nothing write to internal mem! I will tell when it is ready for flashing! Now its just pre pre alpha version, only read from phone
in the windows devicemanager is it correct as "SOMC Flash Device"
the next one:
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
ERROR: TIMEOUT: failed with error code 997 as follows:
▄berlappender E/A-Vorgang wird verarbeitet.
- Error write! Need nBytes: 0x18 but done: 0x0
- Error writing command!
Drücken Sie eine beliebige Taste . . .
Can you right click on .exe and run as admin?
the same
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
ERROR: TIMEOUT: failed with error code 997 as follows:
▄berlappender E/A-Vorgang wird verarbeitet.
- Error write! Need nBytes: 0x18 but done: 0x0
- Error writing command!
Drücken Sie eine beliebige Taste . . .
---------- Post added at 08:42 PM ---------- Previous post was at 08:41 PM ----------
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
- Successfully write 0x18 bytes to handle.
- Successfully read 0xd bytes from handle.
Raw input [0xD]:
00000000 4F 4B 41 59 31 30 34 38 35 37 36 30 30 OKAY104857600
get_reaply:[0xD]:
00000000 4F 4B 41 59 31 30 34 38 35 37 36 30 30 OKAY104857600
- Successfully write 0xe bytes to handle.
- Successfully read 0x9 bytes from handle.
Raw input [0x9]:
00000000 4F 4B 41 59 47 38 31 34 31 OKAYG8141
get_reaply:[0x9]:
00000000 4F 4B 41 59 47 38 31 34 31 OKAYG8141
- Successfully write 0xe bytes to handle.
ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:
Ein an das System angeschlossenes Gerõt funktioniert nicht.
- Successfully read 0x0 bytes from handle.
Raw input [0x0]:
- Error reaply: less than 4!
Drücken Sie eine beliebige Taste . . .
Sorry, i must disconnect the device for the next start
Thanks a lot! Seems some good progress here! I had set timeout to 60 secconds, seems it was not enought and caused timeout, now I have set to 120 secconds and donesome small modification, hope we get luck now, new version is out
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
- Successfully write 0x18 bytes to handle.
- Successfully read 0xd bytes from handle.
Raw input [0xD]:
00000000 4F 4B 41 59 31 30 34 38 35 37 36 30 30 OKAY104857600
- Successfully write 0xe bytes to handle.
- Successfully read 0x9 bytes from handle.
Raw input [0x9]:
00000000 4F 4B 41 59 47 38 31 34 31 OKAYG8141
- Successfully write 0xe bytes to handle.
ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:
Ein an das System angeschlossenes Gerõt funktioniert nicht.
- Error reaply: less than 4!
Drücken Sie eine beliebige Taste . . .
and this, without disconect a view seconds later again start the exe
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
- Successfully write 0x18 bytes to handle.
ERROR: TIMEOUT: failed with error code 997 as follows:
▄berlappender E/A-Vorgang wird verarbeitet.
- Error reaply: less than 4!
Drücken Sie eine beliebige Taste . . .
Hmm strange realy. See https://www.lifewire.com/how-to-fix-code-31-errors-2623184 its seems your driver is not working propertly, maybe you have old flashtool driver and not one for newer device (which can be installed by installing sony pc companion software), I have no idea by now, unable to figure out why that happens Did you flashed by sony pc companion your device allready and you are sure it is working, can you confirm? Probably if you allready installed flashtool driver you will need to uninstall and reinstall pc companion, have no idea by now what might be a problem
so, i have erase the driver. restart windows, install the flashtool driver. start the exe:
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
- Successfully write 0x18 bytes to handle.
- Successfully read 0xd bytes from handle.
Raw input [0xD]:
00000000 4F 4B 41 59 31 30 34 38 35 37 36 30 30 OKAY104857600
- Successfully write 0xe bytes to handle.
- Successfully read 0x9 bytes from handle.
Raw input [0x9]:
00000000 4F 4B 41 59 47 38 31 34 31 OKAYG8141
- Successfully write 0xe bytes to handle.
ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:
Ein an das System angeschlossenes Gerõt funktioniert nicht.
- Error reaply: less than 4!
Drücken Sie eine beliebige Taste . . .
now i erase the driver, restart windows and let windows install the driver over windows.
(i hope you can undersood my english)
Many thanks! Yes I understand you. I must go now, hope somebody figure out if driver is problem or bug in my tool, see you guys tommorow
New version is out, let me know please! I have researched a bit, seems get overlapped result caused some problems and returns imediatelly before thing complete, I have set to "wait complete" hope it is ok now
good morning, so i have reinstall sony companion and start the repair, the new driver is isntall but:
Code:
--------------------------------------------------------
newflasher.exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&15c311e1&0&2#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&15C311E1&0&2
- Successfully write 0x18 bytes to handle.
- Successfully read 0xd bytes from handle.
Raw input [0xD]:
00000000 4F 4B 41 59 31 30 34 38 35 37 36 30 30 OKAY104857600
- Successfully write 0xe bytes to handle.
- Successfully read 0x9 bytes from handle.
Raw input [0x9]:
00000000 4F 4B 41 59 47 38 31 34 31 OKAYG8141
- Successfully write 0xe bytes to handle.
ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:
Ein an das System angeschlossenes Gerõt funktioniert nicht.
- Error reaply: less than 4!
Raw input [0x0]:
Drücken Sie eine beliebige Taste . . .
---------- Post added at 10:27 AM ---------- Previous post was at 10:18 AM ----------
and this is from my windows7 32bit pc, only sony companion is install.
Code:
--------------------------------------------------------
newflasher (2).exe by Munjeni @ 2017
--------------------------------------------------------
Device path: \\?\usb#vid_0fce&pid_b00b#5&448f588&0&1#{a5dcbf10-6530-11d2-901f-00
c04fb951ed}
Class Description: USB-Controller
Device Instance Id: USB\VID_0FCE&PID_B00B\5&448F588&0&1
- Successfully write 0x18 bytes to handle.
- Successfully read 0xd bytes from handle.
Raw input [0xD]:
00000000 4F 4B 41 59 31 30 34 38 35 37 36 30 30 OKAY104857600
- Successfully write 0xe bytes to handle.
- Successfully read 0x9 bytes from handle.
Raw input [0x9]:
00000000 4F 4B 41 59 47 38 31 34 31 OKAYG8141
- Successfully write 0xe bytes to handle.
ERROR: GetOverlapped_in_Result: failed with error code 31 as follows:
Ein an das System angeschlossenes Gerõt funktioniert nicht.
- Error reaply: less than 4!
Raw input [0x0]:
Drücken Sie eine beliebige Taste . . .

TWRP-3.4.0.0 : Recovery Is Not Seandroid Enforcing / Heimdall problems

I decided to flash TWRP-3.4.0.0 on my S7 Edge from TWRP itself (3.3.1.0), no rebooting I get the "Recovery is not SEAndroid Enforcing" error.
First thought was ok lets get into Download and use Heimdall to flash TWRP-3.3.1.0.
Phone is connected and detected but I can not print-pit nor flash anything...
Code:
# dmesg
....
[ 1985.434778] usb 1-3.3: new high-speed USB device number 11 using xhci_hcd
[ 1985.511501] usb 1-3.3: New USB device found, idVendor=04e8, idProduct=685d, bcdDevice= 2.1b
[ 1985.511502] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1985.511503] usb 1-3.3: Product: Gadget Serial
[ 1985.511504] usb 1-3.3: Manufacturer: SAMSUNG
# heimdall detect --verbose
Device detected
# heimdall print-pit --verbose
Heimdall v1.4.2
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "Gadget Serial"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 021B
iMan:iProd:iSer: 1:2:0
nb confs: 1
interface[0].altsetting[0]: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint[0].address: 83
max packet size: 0010
polling interval: 09
interface[1].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint[0].address: 81
max packet size: 0200
polling interval: 00
endpoint[1].address: 02
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...
Initialising protocol...
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!
Releasing device interface...
Kind of frustrating! Any thoughts on what to try next would be appreciated.
EDIT : Rescued this myself by pinching my wife's Windows laptop and flashing TWRP-3.3.1.0 from Odin. In no rush to re-flash 3.4.0.0!
When i have flash twrp 3.4.0.0 i just reboot and my phone goes into downloading mode
But i didn't face any eror like
"Recovery is not SEandroid enfrorcing
Forgot say my phone is s7 flat
What i have done
1st back up my current recovery
Than i flash a new recovery image
Than most important clear cache and dalvik cache
And than reboot into recovery now again clear cache and dalvik cache and reboot to system
Its work for me
With latest recovery 3.4.0.0

Categories

Resources