While Unbricking MiFlash Error - Xiaomi Mi 8 Questions & Answers

2 days ago i bought edl account from s-unlock web site. The guy wrote me from whatsapp and we started to unbrick process from teamviewer. He bounds the account for my pc but while flashing latest Chinese rom we got that error multiple times. He wastes 4 account for that process.
[16:53:17]:5 COM5 3,4904387s [16:53:17 COM5]:dump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Only nop and sig tag can be recevied before authentication." /></data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" rawmode="false" /></data>
What's that error points for?
P.S: After that i tried to sideload Miui 9.6.7 Global from XiaomiADB. It flashed succesfully but wont boot again. Also i tried to flash Chinese 9.6.7 from XiaomiADB it won't flash due to license etc. errors. It's too weird that i can sideload Global rom but i can't sideload Chinese rom for my Chinese device.

Xda is a dead community now. Thanks for no answer. While 2010s someone could make a jailbreak for our devices for unbricking.

OzanSRC said:
Xda is a dead community now. Thanks for no answer. While 2010s someone could make a jailbreak for our devices for unbricking.
Click to expand...
Click to collapse
Once upon a time...

Related

[Q] help me build cm-12.1 hammerheadcaf

I want to build 12.1 CAF
this way is right?
Code:
Checking out files: 100% (13/13), done.king out files: 30% (4/13)
Checking out files: 100% (168/168), done.
Syncing work tree: 100% (556/556), done.
[email protected] ~/cm12.1 $ . build/envsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
[email protected] ~/cm12.1 $ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng 54. cm_kltechnduo-userdebug
2. aosp_arm64-eng 55. cm_kltespr-userdebug
3. aosp_mips-eng 56. cm_l900-userdebug
4. aosp_mips64-eng 57. cm_m7-userdebug
5. aosp_x86-eng 58. cm_m7vzw-userdebug
6. aosp_x86_64-eng 59. cm_m8-userdebug
7. m_e_arm-userdebug 60. cm_mako-userdebug
8. mini_emulator_mips-userdebug 61. cm_manta-userdebug
9. mini_emulator_x86_64-userdebug 62. cm_maserati-userdebug
10. mini_emulator_arm64-userdebug 63. cm_mb886-userdebug
11. mini_emulator_x86-userdebug 64. cm_mondrianwifi-userdebug
12. cm_acclaim-userdebug 65. cm_n3-userdebug
13. cm_amami-userdebug 66. cm_n5100-userdebug
14. cm_bacon-userdebug 67. cm_n5110-userdebug
15. cm_castor-userdebug 68. cm_nicki-userdebug
16. cm_castor_windy-userdebug 69. cm_obake-userdebug
17. cm_condor-userdebug 70. cm_peregrine-userdebug
18. cm_d2att-userdebug 71. cm_picassowifi-userdebug
19. cm_d2spr-userdebug 72. cm_quark-userdebug
20. cm_d2tmo-userdebug 73. cm_scorpion-userdebug
21. cm_d2vzw-userdebug 74. cm_scorpion_windy-userdebug
22. cm_d850-userdebug 75. cm_serrano3gxx-userdebug
23. cm_d851-userdebug 76. cm_serranoltexx-userdebug
24. cm_d852-userdebug 77. cm_shamu-userdebug
25. cm_d855-userdebug 78. cm_sirius-userdebug
26. cm_deb-userdebug 79. cm_spyder-userdebug
27. cm_dlx-userdebug 80. cm_superior-userdebug
28. cm_e975-userdebug 81. cm_t0lte-userdebug
29. cm_e980-userdebug 82. cm_t6-userdebug
30. cm_evita-userdebug 83. cm_t6spr-userdebug
31. cm_falcon-userdebug 84. cm_t6vzw-userdebug
32. cm_find7-userdebug 85. cm_targa-userdebug
33. cm_find7s-userdebug 86. cm_tf300t-userdebug
34. cm_flo-userdebug 87. cm_thea-userdebug
35. cm_fugu-userdebug 88. cm_tilapia-userdebug
36. cm_ghost-userdebug 89. cm_titan-userdebug
37. cm_grouper-userdebug 90. cm_togari-userdebug
38. cm_hammerhead-userdebug 91. cm_togari_gpe-userdebug
39. cm_hammerheadcaf-userdebug 92. cm_trltetmo-userdebug
40. cm_hlte-userdebug 93. cm_trltexx-userdebug
41. cm_hltespr-userdebug 94. cm_umts_spyder-userdebug
42. cm_hltetmo-userdebug 95. cm_v410-userdebug
43. cm_i605-userdebug 96. cm_v500-userdebug
44. cm_i925-userdebug 97. cm_victara-userdebug
45. cm_honami-userdebug 98. cm_ville-userdebug
46. cm_jflteatt-userdebug 99. cm_vs985-userdebug
47. cm_jfltespr-userdebug 100. cm_xt897-userdebug
48. cm_jfltetmo-userdebug 101. cm_xt907-userdebug
49. cm_jfltevzw-userdebug 102. cm_xt925-userdebug
50. cm_jfltexx-userdebug 103. cm_xt926-userdebug
51. cm_klimtwifi-userdebug 104. cm_z3-userdebug
52. cm_klte-userdebug 105. cm_z3c-userdebug
53. cm_kltechn-userdebug
Which would you like? [aosp_arm-eng] 39
ls: невозможно получить доступ к device/*/hammerheadcaf/cm.mk: Нет такого файла или каталога
build/core/product_config.mk:234: *** Can not locate config makefile for product "cm_hammerheadcaf". Останов.
Device hammerheadcaf not found. Attempting to retrieve device repository from CyanogenMod Github ([url]http://github.com/CyanogenMod[/url]).
Found repository: android_device_lge_hammerheadcaf
Default revision: cm-12.1
Checking branch info
Adding dependency: CyanogenMod/android_device_lge_hammerheadcaf -> device/lge/hammerheadcaf
Using default branch for android_device_lge_hammerheadcaf
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_lge_hammerheadcaf
Fetching projects: 100% (1/1), done.
Repository synced!
Looking for dependencies
Adding dependencies to manifest
Adding dependency: CyanogenMod/android_kernel_lge_hammerhead -> kernel/lge/hammerhead
Adding dependency: CyanogenMod/android_device_qcom_common -> device/qcom/common
Using default branch for android_device_qcom_common
Syncing dependencies
Fetching project CyanogenMod/android_device_qcom_common
Fetching project CyanogenMod/android_kernel_lge_hammerhead
Fetching projects: 100% (2/2), done.
Checking out files: 100% (41719/41719), done.
Looking for dependencies
Dependencies file not found, bailing out.
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/lge/hammerheadcaf/cm.mk]]: "vendor/lge/hammerheadcaf/hammerheadcaf-vendor.mk" does not exist. Останов.
** Don't have a product spec for: 'cm_hammerheadcaf'
** Do you have the right repo manifest?
then open
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_lge_hammerheadcaf" path="device/lge/hammerheadcaf" remote="github" />
<project name="CyanogenMod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-12.1-caf" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
</manifest>
and add this
https://github.com/TheMuppets/proprietary_vendor_lge/tree/cm-12.1
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_lge_hammerheadcaf" path="device/lge/hammerheadcaf" remote="github" />
<project name="TheMuppets/proprietary_vendor_lge" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-12.1-caf" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
</manifest>
and again repo sync -j5
right ? or need something else to fix for a good build? if need,please show me example ...
thx.
I think so right
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_lge_hammerheadcaf" path="device/lge/hammerheadcaf" remote="github" />
<project name="CyanogenMod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-12.1-caf" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="myfluxi/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-12.1" />
</manifest>
not build
Code:
target SharedLib: libRSDriver (/home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/LINKED/libRSDriver.so)
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdAllocation.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdBcc.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdCore.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdElement.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdFrameBuffer.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdFrameBufferObj.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdGL.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdMesh.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdMeshObj.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdPath.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdProgram.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdProgramRaster.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdProgramStore.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdRuntimeStubs.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdSampler.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdScriptGroup.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdShader.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdShaderCache.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdType.o: file is empty
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/arm-linux-androideabi/bin/ld: error: /home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/driver/rsdVertexArray.o: file is empty
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/garynych/cm12.1/out/target/product/hammerheadcaf/obj/SHARED_LIBRARIES/libRSDriver_intermediates/LINKED/libRSDriver.so] Ошибка 1
make: *** Ожидание завершения заданий...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[email protected] ~/cm12.1 $
tell me what's wrong? how fix?
Delete the folder local_manifests in .repo and do the following:
$ . build/envsetup.sh
$ lunch -> and choose the number that matches with cm_hammerhead-userdebug
Wait for the roomservice.xml sync and when it's done open the file and add at the top: <project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-12.1" />
$ repo sync
and
$ brunch hammerhead
Your roomservice needs to look like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_device_lge_hammerhead" path="device/lge/hammerhead" remote="github" />
<project name="CyanogenMod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
</manifest>
Next time just do:
$ . build/envsetup.sh
$ breakfast hammerhead
$ brunch hammerhead
PS: WHIT THIS STEPS YOU'LL BUILD NON CAF. FOR CAF CHECK IN LUNCH MENU FOR IT
Be happy!
Cristiano Matos
how to build cm12.1 i`m know
me need build exactly CAF variant,but after 2h build is error
garynych said:
Cristiano Matos
how to build cm12.1 i`m know
me need build exactly CAF variant,but after 2h build is error
Click to expand...
Click to collapse
Which linux distro do you use?
garynych said:
Cristiano Matos
how to build cm12.1 i`m know
me need build exactly CAF variant,but after 2h build is error
Click to expand...
Click to collapse
You're a smart person may i presume. The answer lies in my post. Regards
Snoop05 said:
Which linux distro do you use?
Click to expand...
Click to collapse
mint 17.1 rebecca (x64)
Cristiano Matos said:
You're a smart person may i presume. The answer lies in my post. Regards
Click to expand...
Click to collapse
sorry,maybe that's the problem with online translator google
am try
1
Delete the folder local_manifests in .repo and do the following:
$ . build/envsetup.sh
$ lunch -> and choose the number that matches with cm_hammerhead-userdebug
Click to expand...
Click to collapse
yes
2
Wait for the roomservice.xml sync and when it's done open the file and add at the top: <project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-12.1" />
$ repo sync
Click to expand...
Click to collapse
yes
3
Next time just do:
$ . build/envsetup.sh
$ breakfast hammerhead
$ brunch hammerhead
Click to expand...
Click to collapse
$ . build/envsetup.sh
$ breakfast hammerheadcaf
$ brunch hammerheadcaf
no build
or
$ . build/envsetup.sh
$ lunch cm_hammerheadcaf-user
$ make -j3 otapackage
or
$ . build/envsetup.sh
$ lunch cm_hammerheadcaf-user
$ mka -j3 otapackage
no build
or
$ . build/envsetup.sh
$ lunch cm_hammerheadcaf-userdebug
$ mka -j3 otapackage
no build
all time ,this error
Which python version you use?
when my aosp buildbox is ready, i will try to build a cm12.1 caf... my build time is only 20min so that helps
Snoop05 said:
Which python version you use?
Click to expand...
Click to collapse
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
now I did so
make clobber
ccache -C
and start build
already it's been 3 hours,I think must collect
Try it like this:
. build/envsetup.sh
lunch
39
breakfast hammerheadcaf
brunch hammerheadcaf
because i followed what Cristiano Matos sed and it works for me...
build.sh
Code:
#!/bin/bash
make clobber
repo sync -j16
source build/envsetup.sh
breakfast hammerheadcaf
mka bacon
cd $OUT
.repo/local_manifests/roomservice.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_device_lge_hammerhead" path="device/lge/hammerhead" remote="github" />
<project name="CyanogenMod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-12.1-caf" />
<project name="CyanogenMod/android_device_lge_hammerheadcaf" path="device/lge/hammerheadcaf" remote="github" />
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-12.1"/>
</manifest>
This worked for me. If problem persist try to reinstall all dependencies (check cm build wiki), gcc, g++, python and openjdk
garynych said:
now I did so
make clobber
ccache -C
and start build
already it's been 3 hours,I think must collect
Click to expand...
Click to collapse
this help me
build completed successfully
to everyone who helped,thank you
I'm happy

Can't flashing image in MI flash tool, several error.

Hi guys, my MI A2 have a edl mode, and i need flash stock rom, but, i have the problems(log file):
[00:00:42]:0 COM9 5,0475537s [00:00:42 COM9]:dump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Only nop and sig tag can be recevied before authentication."/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data>
[00:25:03]:9 COM9 4,0064887s [00:25:03 COM9]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Only nop and sig tag can be recevied before authentication."/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data>
[00:26:1
PHP:
3]:9 COM9 74,0407942s Elemento raiz inexistente.
[00:29:02]:9 COM9 0,5908906s [00:29:02 COM9]:System.IO.IOException: Recurso solicitado em uso.
em System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
em System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
em System.IO.Ports.SerialPort.Open()
em XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)
em XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() em System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
em System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
em System.IO.Ports.SerialPort.Open()
em XiaoMiFlash.code.bl.SerialPortDevice.registerPort(SerialPort port)
em XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()
[00:30:56]:8 COM8 9,9252977s [00:30:56 COM8]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: SDCC Error 3 (3)"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Write Failed sector 512, size 97"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Failed to write 1 slot 0, partition 512, start_sector 97 num_sectors 0, error 3"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Finished programming start_sector 609 and TotalSectorsToProgram 97"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" rawmode="false" />
</data>
[00:34:39]:8 COM8 9,5074713s [00:34:39 COM8]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: SDCC Error 3 (3)"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Write Failed sector 512, size 97"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Failed to write 1 slot 0, partition 512, start_sector 97 num_sectors 0, error 3"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Finished programming start_sector 609 and TotalSectorsToProgram 97"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" rawmode="false" />
</data>
The main error is: SDCC error 3, failed to write. I did not understand it.
Download Different MI FLASH TOOL With Installation files which have all the drives
Hello! How did u solved this problems!?

[LineageOS 16.0][devs] Custom build FDE encryption help?

This is a question for those on the edge of ROM development (hoping to get in contact with sevenrock if they are still around there).
I have been trying for a while to work out a way to run LineageOS 16.0 with full disk encryption and adoptable storage rather than the funky FBE that this device ships with. I found this post by sevenrock with the patches to supposedly make that happen and compiled from scratch. I even build a rom using all of sevenrock's sources, since they appear to be more up to date. The build went fine and flashed it successfully, resized the filesystem as noted, but encryption fails. I set a PIN, tell it to encrypt, but the encryption screen never appears and the device reboots pretty quickly and then gets stuck in bootloop.
Oddly, I've found that if I encrypt with no PIN set, it will still boot, the device will say encrypted, and TWRP seems to indicate that it is actually encrypted somehow. But that's not very useful for me.
I've tried flashing different firmware, even tried going back to an old Pixel Experience rom with FDE enabled and it also failed to encrypt, but with some other errors. I tried manual vdc cryptfs enablecrypto and same results.
I'm not really sure what else to try. It seems like something must be setup up improperly somewhere but not sure where to look. I may try building 17.1 next, but I hear some reports of hardware problems and I don't want to give up LineageOS su. It seems like most people have moved on to it though.
sevenrock, if you are still around here, have you had success encrypting FDE with your sources lately?
Logcat items that may be relevant from the encryption attempt:
Code:
09-26 08:41:42.601 658 1867 D vold : fdeEnable(3, *, 0)
09-26 08:41:42.602 658 1867 D vold : !e4crypt_is_native, spawning fdeEnableInternal
09-26 08:41:42.608 658 4064 E Cryptfs : Bad magic for real block device /dev/block/bootdevice/by-name/userdata
09-26 08:41:42.614 658 4064 D Cryptfs : Just asked init to shut down class main
09-26 08:41:43.493 658 4064 I vold : List of Keymaster HALs found:
09-26 08:41:43.493 658 4064 I vold : Keymaster HAL #1: SoftwareWrappedKeymaster1Device from Google SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:43.493 658 4064 I vold : Using SoftwareWrappedKeymaster1Device from Google for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:43.500 658 4064 I vold : List of Keymaster HALs found:
09-26 08:41:43.500 658 4064 I vold : Keymaster HAL #1: SoftwareWrappedKeymaster1Device from Google SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:43.500 658 4064 I vold : Using SoftwareWrappedKeymaster1Device from Google for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:47.434 658 4064 I Cryptfs : Using scrypt with keymaster for cryptfs KDF
09-26 08:41:47.813 658 4064 I Cryptfs : Signing safely-padded object
09-26 08:41:47.817 658 4064 I vold : List of Keymaster HALs found:
09-26 08:41:47.817 658 4064 I vold : Keymaster HAL #1: SoftwareWrappedKeymaster1Device from Google SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:47.818 658 4064 I vold : Using SoftwareWrappedKeymaster1Device from Google for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:48.798 658 4064 I Cryptfs : Already have key
09-26 08:41:48.798 658 4064 I Cryptfs : Using scrypt with keymaster for cryptfs KDF
09-26 08:41:49.178 658 4064 I Cryptfs : Signing safely-padded object
09-26 08:41:49.181 658 4064 I vold : List of Keymaster HALs found:
09-26 08:41:49.182 658 4064 I vold : Keymaster HAL #1: SoftwareWrappedKeymaster1Device from Google SecurityLevel: TRUSTED_ENVIRONMENT HAL: [email protected]::IKeymasterDevice/default
09-26 08:41:49.182 658 4064 I vold : Using SoftwareWrappedKeymaster1Device from Google for encryption. Security level: TRUSTED_ENVIRONMENT, HAL: [email protected]::IKeymasterDevice/default
Full log attached.
Hi,
please post your local_manifest.xml.
Did you use any patches beyond the official sources and my repos?
sevenrock said:
please post your local_manifest.xml.
Did you use any patches beyond the official sources and my repos?
Click to expand...
Click to collapse
For 16.0:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_system_qcom" path="system/qcom" remote="github" revision="lineage-16.0" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="lineage-16.0" />
<project name="LineageOS/android_external_bson" path="external/bson" remote="github" revision="lineage-16.0" />
<project name="sevenrock/android_device_motorola_payton" path="device/motorola/payton" remote="github" revision="lineage-16.0" />
<project name="sevenrock/android_device_motorola_sdm660-common" path="device/motorola/sdm660-common" remote="github" revision="lineage-16.0" />
<project name="sevenrock/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="lineage-16.0" />
<project name="sevenrock/android_kernel_motorola_msm8998" path="kernel/motorola/msm8998" remote="github" revision="lineage-16.0" />
</manifest>
For 17.1:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="sevenrock/android_device_motorola_payton" path="device/motorola/payton" remote="github" revision="lineage-17.1" />
<project name="sevenrock/android_device_motorola_sdm660-common" path="device/motorola/sdm660-common" remote="github" revision="lineage-17.1" />
<project name="sevenrock/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="lineage-17.1" />
<project name="sevenrock/android_kernel_motorola_msm8998" path="kernel/motorola/msm8998" remote="github" revision="lineage-17.1" />
<project name="LineageOS/android_external_bson" path="external/bson" remote="github" revision="lineage-17.1" />
<project name="LineageOS/android_system_qcom" path="system/qcom" remote="github" revision="lineage-17.1" />
</manifest>
So far I only finished building 16.0. I built it using this docker image that patches it for microG. I don't think that would touch anything in this area, but I will build it (16.0) the standard way with no additions to see if that works.
Also, do you have a specific firmware version that you know works well? My phone came already upgraded past PPWS29.69-26-6 and unfortunately when I try to downgrade to versions lower than PPWS29.69-39-2-1 I lose modem and wifi function. Seems to have to do with persist but I don't really know why.
Thanks for your help!
htsmi said:
sevenrock, if you are still around here, have you had success encrypting FDE with your sources lately?
Click to expand...
Click to collapse
Hi,
yes, but with los-17.1. Your manifests look ok.
Maybe you need to manually resize your /data partition, for details see:
https://gitlab.com/LineageOS/issues/android/-/issues/1027
My personal twrp build has fixes for the partition size, maybe
that is the reason why encryption works for me out-of-the-box:
https://github.com/sevenrock/android_device_motorola_payton-twrp/commits/android-8.1
sevenrock said:
yes, but with los-17.1. Your manifests look ok.
Maybe you need to manually resize your /data partition, for details see:
https://gitlab.com/LineageOS/issues/android/-/issues/1027
My personal twrp build has fixes for the partition size, maybe
that is the reason why encryption works for me out-of-the-box:
https://github.com/sevenrock/android_device_motorola_payton-twrp/commits/android-8.1
Click to expand...
Click to collapse
I finished a build for 17.1 with microG patches today and unfortunately it had the same issue. Currently building one without microG. The phone seems to crash immediately after the funny robot screen shows up. Unfortunately logs don't really say anything useful. That 'bad magic' message seems to show up in people's successful logs as well.
I have resized (and formatted) the filesystem before the first boot using
Code:
mke2fs -t ext4 -b 4096 /dev/block/mmcblk0p67 5065715
or 5065719. If I forget this and leave the filesystem at full partition size, it fails cleanly and goes back to lock screen, but if the partition has space for the crypto footer, I think it gets a few steps further and that's where it crashes. Because it wrecks the filesystem, I can't recover any logs.
I read someone describing a similar issue on a different device (can't find the post now) where they said they solved it by flashing a different 'tz' image. I don't want to start blindly flashing stuff though.
I'm trying to build your version of TWRP currently so I'll try that next, I hope it works. If not, I think it may be related to persistent data on some other partition since it fails on every ROM. I don't even know where to start troubleshooting something like that.
Ok, I give up, how do I build TWRP? I tried minimal-manifest with the following roomservice.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="sevenrock/android_device_motorola_payton-twrp" path="device/motorola/payton" remote="github" revision="android-9.0" />
<project name="sevenrock/platform_device_qcom_common-twrp" path="device/qcom/common" remote="github" revision="master" />
<project name="sevenrock/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="lineage-16.0" />
</manifest>
then lunch omni_payton-eng and mka bootimage but I'll admit I was just guessing on the manifest. It builds without error but ends up missing pretty much all files in /sbin and /vendor/lib64.
Well I've gotten a little further -- I made an eng build of 17.1 so I could debug the boot process. It seems like it does actually encrypt properly, but the system fails to boot afterwards. The curious thing is everything works fine if I encrypt without a PIN/passcode set. The system boots and automatically decrypts using the trustzone.
After that, I can set a PIN and it gives me the option of using "secure boot". If I say no, it continues to be encrypted with just the trustzone-based key and boots properly, but is not really secure. If I say yes, it changes the key without error, but fails to boot next time. It shows the Lineage boot animation but adb never starts, so I can't really debug at that point.
So I may just go with the PIN-less encryption, but it would be nice to get this working fully and more securely. The next thing I would like to try is decrypting in TWRP, but that requires the custom FDE build and I still can't figure out what I'm missing there -- help please if you're still willing @sevenrock !
Update if anyone is concerned.
I finally built TWRP with sevenrock's patches. Was having issues due to some dumb mistakes but it's pretty straightforward just following minimal-manifest-twrp instructions.
I can say that my lineage-17.1 build based on sevenrock's repositories works properly until I try to boot with an encryption PIN set up. Just as I described it last time, except I now confirm that there is nothing wrong with the encrypted partition because it works in TWRP.
So the animation just spins forever, no logs because adb never starts... seems like I've tried all I can short of soldering to a serial interface.
I don't think I can change the title, but this is becoming more of a journal than support request. So feel free to read or ignore
I'll keep updating with my progress on this. If I find a solution I will share it as I can't be the only one frustrated by the lack of adoptable storage on this device.
It looks like the issue I am facing may be related to this bug which seems to affect a number of devices. It's the exact same outcome I am experiencing, though not caused by the same steps. But everything that I have read indicates that changing encryption type should be a simple switch, and the ability to decrypt FDE should be included in every build, so it seems like there is a bug somewhere.
If anyone out there wants to try the same thing, apply the following patch between `lunch` and `mka bacon` and let me know how it works out.
Hi,
please try this:
the 5 top-most commits should enable hw-based fde:
Commits · sevenrock/android_device_motorola_sdm660-common
Contribute to sevenrock/android_device_motorola_sdm660-common development by creating an account on GitHub.
github.com
together with
payton: Set BOARD_USERDATAIMAGE_PARTITION_SIZE to allow FDE encryption · sevenrock/[email protected]
Fixes E Cryptfs : Bad magic for real block device /dev/block/bootdevice/by-name/userdata E Cryptfs : Orig filesystem overlaps crypto footer region. Cannot encrypt in place. by freeing up 32K fo...
github.com
The 2 top-most commits in sdm660-common are new as of today thanks to support from Erfan.
Maybe the first boot after enabling encryption gets stuck on the bootlogo, but the next boot works for me.
Thanks, @sevenrock, I did build it and try it, and at least for me it still fails in the same way. I tried changing to secure startup with my existing userdata and also starting fresh, encrypting, and then enabling secure startup. It's the same as before, encryption works but it won't boot with secure startup enabled.
I have an eng build running right now so I'll see in a bit if I can get any sort of log over adb.
No need to sweat it too much just for my sake. I've kind of given up on being able to secure this phone the way I would like to.
Just received another hint for a fix:
Telegram
t.me
Please change vendor/motorola/payton/proprietary/vendor/etc/init/[email protected]
proprietary_vendor_motorola/[email protected] at lineage-17.1 · TheMuppets/proprietary_vendor_motorola
Contribute to TheMuppets/proprietary_vendor_motorola development by creating an account on GitHub.
github.com
according to
montana: Move fingerprint HAL to class hal · LineageOS/[email protected]
Signed-off-by: Jarl-Penguin <[email protected]> Change-Id: Ia259ec93a9e12b84e2f14ceb30157c5a3531d237
github.com
which means replace "late_start" with "hal"
HTH

Bricked phone after bootloop

I woke this morning to my Mi A2 unresponsive. Did a reset and phone went into bootloop. Did the same steps 3 weeks ago to flash the stock ROM:
1. Booted the phone in EDL mode
2. Flashed the most recent official ROM with most recent Mi Flash
3. Got this error:
Code:
[12:50:04]:5 COM5 10,4481946s resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: SDCC Error 29 (3)"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Write Failed sector 512, size 97"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Failed to write 1 slot 0, partition 512, start_sector 97 num_sectors 0, error 3"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Finished programming start_sector 609 and TotalSectorsToProgram 97"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" rawmode="false" />
</data>
What can i do? Thanks.

[GUIDE][QFIL][QDL][UNOFFICIAL][Lineage-18.1]FIRMWARE

YU Firmware + Lineage-18.1 Unofficial​No more Noughat!​Hello, Seems like you are about to flash this firmware, be sure that you have read instructions at xda by @pbteja.
This firmware was by manufacturer, which can be used to revive your dead Yureka Black, is modified to boot to unofficial-vanilla lineage-18.1 built directly from their sources available at github along with device sources, I don't own it.
Can also be used on Wiko U FEEL PRIME Or CECT DIGI U or other Yureka Black clones. NOT FOR ANY OTHER PHONE MODEL.
NO ASSURANCE FOR ANY MALFUNCTION, USE IT AT YOUR OWN RISK.
ON WINDOWS-​On Windows operating system you need QFIL or QPST software.
ON GNU/LINUX-​Install git libxml2-dev libudev-dev build-essentials make fastboot adb
On Debian/Ubuntu based operating systems the install command is:
sudo apt install fastboot libxml2-dev libudev-dev git build-essentials make
You can find the qdl source code at:
working/qualcomm/qdl.git - Read only mirror of https://github.com/andersson/qdl
git.linaro.org
Clone it to a folder with:
git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git --depth=1
In the qdl folder , open a terminal instance in this directory for flashing firmware, run:
make
This should output a qdl executable in the same folder.
Flashing FIRMWARE (on GNU/LINUX)-​Stop modem manager:
sudo systemctl stop ModemManager
or uninstall modem manager with:
sudo apt purge modemmanager
Put your phone in edl mode with:
adb reboot edl
(or)
Press power button and vol UP+ vol DWN+ at the same time when starting phone.
Leave power button when you see 'entering DLOAD mode' keep holding volume buttons for 8 seconds and connect to PC.
Command to flash is:
./qdl --debug --storage emmc --include /path/to/YU5040_FIRMWARE /path/to/YU5040_FIRMWARE/prog_firehose_ddr.elf /path/to/YU5040_FIRMWARE/rawprogram0_unparse0.xml /path/to/YU5040_FIRMWARE/patch0.xml
DO NOT disconnect the phone until the command has finished executing. If you face any error, ask in yureka black forum at xda.
The last lines you should see in command line must be like....
FIREHOSE READ: <?xml version="1.0" encoding="UTF-8" ?><data><log value="Set bootable drive to 0." /></data>
LOG: Set bootable drive to 0.
FIREHOSE READ: <?xml version="1.0" encoding="UTF-8" ?><data><response value="ACK" /></data>
partition 0 is now bootable
FIREHOSE WRITE: <?xml version="1.0"?>
<data><power value="reset"/></data>
FIREHOSE READ: <?xml version="1.0" encoding="UTF-8" ?><data><response value="ACK" /></data>
Agree to Factory reset. Format data in TWRP if it boots to recovery.
Have fun!
DOWNLOADS
Click HERE
Source code:
Kernel Source : Click Here
Device Tree : Click Here
LineageOS: https://github.com/lineageos
hello, maybe you can help me.
I'm a French user garlic clone
able to launch yu5040_sw_v12_hw_v1 and yu5040_sw_v17_hw_v1 firmwares, but not your custom version.
Qfil works great,
but impossible to boot system with this firmware.
You say Format data in TWRP if it boots to recovery, but no result
permissiver.zip don't change anything too
foxyone0809 said:
hello, maybe you can help me.
I'm a French user garlic clone
able to launch yu5040_sw_v12_hw_v1 and yu5040_sw_v17_hw_v1 firmwares, but not your custom version.
Qfil works great,
but impossible to boot system with this firmware.
You say Format data in TWRP if it boots to recovery, but no result
permissiver.zip don't change anything too
Click to expand...
Click to collapse
Do you get boot animation? The data format is required to userdata partition because partition is encrypted after qfil. This was automatically taken care by lineage recovery, but I have included twrp recovery instead because you cant flash zips with the lineage one, with twrp you have to do it manually. No other steps are needed at all. If you still have problem flash any treble rom, that should also work.

Categories

Resources