DISCONTINUED [Recovery][Root] TWRP (Command line only for now) - Sony Xperia M4 Aqua

Discontinued, please use this instead ​
TWRP Recovery for M4 Aqua (No gui, command line only)
This is for E2303 I didn't test on other models, feel free to do so but I take no responsibility whatsoever if anything happens
This will disable OTA updates, if you want them back you can flash the FOTA kernel with FlashTool​
Confrmed to be working on those variants:
E2303, E2306, E2333, E2353, E2363
Ok here it is thanks to @jeffreyvh kernel we can finally flash zips however we have 3 catches:
1. No GUI (Sony's fault until they provide full sources for our phones, we're stuck here)
2. You have to mount /system, /data and /cache manually (Working on it)
3. No external SD card support (working on it)
No problem? Cool..
Ok here's how to do it:
0. You need unlocked bootloader <-- Click here to see how
1. Download the recovery.img
2. Flash the recovery file with fastboot
Code:
fastboot flash recovery recovery.img
3. Pull the cable turning off your phone.
4. Press the power button + volume down, when the phone vibrates, press the volume down button repetedly.
5. The Sony logo will disappear and you'll get a black screen (It's okay, congrats you've now booted twrp)
Now for the magic:
Connect your cable, make sure you have ADB and drivers installed.
In your terminal or dos window type:
Code:
adb shell
you'll get a prompt like ~ #
type these three commands:
Code:
mount -w /dev/block/platform/7824900.sdhci/by-name/system /system
mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache
Now that you have the partition mounted you can flash your zip files:
We don't have external SD card support so for now we're going to stick with sideload
type:
Code:
twrp sideload
adb shell will exit, it's okay now we can install the zip file like this:
Code:
adb sideload <path_to_zip>
path to zip on your computer without the < >
so if you downloaded superSU on CownloadsSuperSU.zip
you type
Code:
adb sideload C:DownloadsSuperSU.zip
when you're done type:
Code:
adb reboot
and pull the cable
For Rooting:
Download SuperSU flashable zip from here https://download.chainfire.eu/696/SuperSU
and flash it like explained before
good luck
Special Thanks:
@jeffreyvh
@alby_var
@Hnk1
@zw3n
@S7relok
@dexter93
@babydolll
@Sam205
The TWRP team and everyone who made this possible
Download Links:
http://d-h.st/wuGD
XDA:DevDB Information
M4 Aqua TWRP, Tool/Utility for the Sony Xperia M4 Aqua
Contributors
husam666
Version Information
Status: Testing
Created 2015-09-11
Last Updated 2015-11-24

Help & Troubleshooting
If you get errors with sideload, try copying su.zip to your internal storage, then instead of twrp sideload type:
Code:
twrp install /data/media/0/su.zip
__________________________________________________
If you get ADB out of date error, use this tool to fix it http://visualgdb.com/adbfix/
__________________________________________________
veryclever1980 said:
At first, I should thank "husam666" for this great guide.
Secondly, I want to mention some points to help anyone who wants to do this procedure:
1. If you're on windows 8 or 8.1, please make sure that you've disabled "Driver Signature Verification". After doing this, install "Flashmode Drivers" and "Fastboot Drivers" by clicking on "Flashtool Drivers" from "drivers" folder of "FlashTool". (As default, you can find "Flashtool" folder on your "C" drive, after installing it on your computer)
*At the end of installation process, pay attention to the displayed result of it. If it won't go well, you will encounter so many errors later.
2. Download and keep "Universal ADB Drivers" and "Google USB Drivers for MTP/PC etc". Maybe you won't need them but I advise you to have them just in case. You can find them here on the third post of this great guide:
http://forum.xda-developers.com/m4-aqua/general/guide-t3130092
3. If you're stuck in "Flahmode" process, e.g. can't see your "Device Code", it's probably because of drivers. When your phone is in "Flahmode", open your "Device Manager" and look for your android device. If you see a warning sign behind it, then reinstall "Flashmode Drivers". For me, the problem was due to "Driver Signature Verification" of Windows 8.1. In that case, the drivers couldn't be installed properly.
4. If you have problems with "Fastboot", e.g. "Device "null" not found" or "adb server is out of date. killing...", it might be because of two main reasons:
A) Improper Driver Installation: When your phone is in "Fastboot Mode", check your "Device Manager". If you see a warning sign, you can reinstall the driver using "Flashtool Drivers" or"Universal ADB Drivers". If these two won't work, try install the driver manually by updating it in "Device Manager" and addressing it to the folder where you kept "Google USB Drivers for MTP/PC etc" in it.
B) Fastboot Bugs: It happens, so don't freak out. If you check everything and find no problem, just power off your phone, and close "cmd" in windows. Then restart your phone and put it in "Fastboot Mode", then run "cmd" again as administrator. This worked for me.
------------------------------------------------------------------------------------------------
I hope my points will be beneficial for you.
Good luck with your root.
Click to expand...
Click to collapse

reserved because I'm cool like that

Here we go, testing this !
Thanks to everybody who searched and make that possible.

Thnks a lot! Great job. Only a question, Do you need unlocked bootloader?
El vive en la piña debajo del mar

rascayus said:
Thnks a lot! Great job. Only a question, Do you need unlocked bootloader?
El vive en la piña debajo del mar
Click to expand...
Click to collapse
I think so, my bootloader is unlocked, if you have it locked try and see if it works

3. No external SD card support (working on it)
meens this after rooting the phone don't support an sd-card any more?

PrinzDarknis said:
3. No external SD card support (working on it)
meens this after rooting the phone don't support an sd-card any more?
Click to expand...
Click to collapse
No, only in recovery, if you have a zip file or want to backup you data to sdcard it's not possible atm

PrinzDarknis said:
3. No external SD card support (working on it)
meens this after rooting the phone don't support an sd-card any more?
Click to expand...
Click to collapse
I think it's the support inside recovery

Is it possible to flash the stock rom (if this exist) if the phone is in briek?
sorry for my bad english.

husam666 said:
Code:
mount -w /system /dev/block/platform/7824900.sdhci/by-name/system
mount -w /data /dev/block/platform/7824900.sdhci/by-name/userdata
mount -w /cache /dev/block/platform/7824900.sdhci/by-name/cache
Click to expand...
Click to collapse
Change order of device and folder to mount:
Code:
mount -w /dev/block/platform/7824900.sdhci/by-name/system /system
mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache
Thanks!

PrinzDarknis said:
Is it possible to flash the stock rom (if this exist) if the phone is in briek?
sorry for my bad english.
Click to expand...
Click to collapse
yes, no reason not to, this will only disable OTA updates since the recovery on sony devices is the FOTA kernel

so it means if there is a newer software update i cannot install it ???????? is that it ?? even with sony pc companion ??

zw3n said:
Change order of device and folder to mount:
Code:
mount -w /dev/block/platform/7824900.sdhci/by-name/system /system
mount -w /dev/block/platform/7824900.sdhci/by-name/userdata /data
mount -w /dev/block/platform/7824900.sdhci/by-name/cache /cache
Thanks!
Click to expand...
Click to collapse
Done, thanks for pointing that out
kpbs92 said:
so it means if there is a newer software update i cannot install it ???????? is that it ?? even with sony pc companion ??
Click to expand...
Click to collapse
I think it can work with the PC companion, you can also reflash the FOTA kernel with FlashTool, and you also can flash the whole new firmware with FlashTool

husam666 said:
Done, thanks for pointing that out
I think it can work with the PC companion, you can also reflash the FOTA kernel with FlashTool, and you also can flash the whole new firmware with FlashTool
Click to expand...
Click to collapse
So this can be applied with any firmware 2.99 and before.. ?? And also should my phone bootloader unlocked before doing this ??

kpbs92 said:
So this can be applied with any firmware 2.99 and before.. ?? And also should my phone bootloader unlocked before doing this ??
Click to expand...
Click to collapse
it should

husam666 said:
it should
Click to expand...
Click to collapse
And what about bootloader ??? unlocked before doing this ??

In the recovery.zip, is there a kernel compilated for you? or is only a recovery.
Because if is only a recovery that work with any kernel, maybe we can make a prerooted firm.

Flamenawer said:
In the recovery.zip, is there a kernel compilated for you? or is only a recovery.
Because if is only a recovery that work with any kernel, maybe we can make a prerooted firm.
Click to expand...
Click to collapse
There is a kernel, that's not fully complete, that's why we don't have screen support, I tried it with stock kernel but didn't work, you can make a prerooted firmware I believe I just don't have time to try it

What is GUI ? ?
Envoyé de mon E2333 en utilisant Tapatalk

Related

[ROM][7.0] Maze Alpha V05_20170816 [STOCK]

Maze has finally published the Alpha Stock-Rom.
Download Link: https://goo.gl/9kCJiv :fingers-crossed:
The system.img file is incorrectly downloaded as a system 002.img file. It must be renamed. And then copy it to the folder "3. Maze_Alpha_V05_20170816 Official ROM".
Thanks!
Hope anyone can root this phone.
Hi!
I am in need of a new phone, and this one looks quite good at the price.. But what do you think can i expect from custom ROM scene here for it? I am a Xiaomi Fan, and my Mi4 was and is one of the best supported phones still. Do you think there will be a subforum for this device, custom ROMs (preferreable Lineage OS, or other close to AOSP ROMs? OFC nobody can know now, i understand, but what tells your experience of other new phones from new companys? It has created quite a buzz, so i think there will be a demand for sure..
Just am 2 afraid to get a phone without good custom ROM. Never had an Android in last 5 years with stock ROM. Total nightmare for me now to have to go back.
Root + TWRP 3.2.1
3 Methods to root MAZE Alpha
Note: Method II is the most universal and must works with almost any official ROM
I- Method 1 : flashing modified Magisk boot.img
1. make sure to have already installed the version 20170816
2. reboot the phone in fastboot mode (phone off -> Vol Up + Power or "adb reboot bootloader")
3. unlock the bootloader if not already done : fastboot flashing unlock (if not works, in android development setting set the unlock bootloader and then retry)
4. unzip and then flash the attached boot image : fastboot flash boot new-boot.img
5. reboot your phone: fastboot reboot
6. install the MagiskManager apk v14
7. Voila
I have used this Magisk guide to create it
I used old manual guide :
Code:
adb shell "rm -rf /data/local/tmp/*"
adb push META-INF/com/google/android/update-binary common magisk_inject boot.img /data/local/tmp
adb shell "cd /data/local/tmp/magisk_inject; mv ../common/* .; chmod 755 *; sh ../update-binary indep boot_patch.sh ../boot.img; mv ../bin/busybox busybox"
adb pull /data/local/tmp/magisk_inject/new-boot.img
adb shell "rm -rf /data/local/tmp/*"
II- Method 2 : using TWRP and Magisk.zip (External SDCARD or USB OTG cable needed)
1. reboot int bootloader mode : adb reboot bootloader
2. unzip and flash the the attached TWRP recovery : fastboot flash recovery recovery_maze_alpha_4G_twrp-321.img
3. In TWRP choose first "change language" then press the "cancel" button while asking you for decryption password for data
4. In your PC download the Magisk-v15.3.zip and put it in a USB key, or an SDCARD
5. Use an usb otg cable to connect the USB key to your phone running TWRP and install the Magisk-v14.zip from Usb-otg (or SDCARD)
6. bonus: do a complete backup of your phone : all partitions except cache and data to your Usb-otg (or SDCARD)
7. reboot and install the MagiskManager apk v14
III- Method 3 : using the phhusson modified boot image
1- flash the attached boot image, using fasboot (fastboot flash boot boot-super-bootimg-output-su-eng-r318.img) or SPFlashTools using the attached scatter, if you do not want to unlock your bootloader
2- reboot to Android then install from google play the phhsusson superuser
3- Voila
Important Notes:
1- In all case you can use SPFlashTools to flash boot image without unlocking bootloader.
2- windows SPFlashTools users : phone off, press VOL+ and connect it to your PC (running SPFlashTool and waiting for phone connetion)
3- linux SPFlashTools users : phone off and connected to PC , press VOL+ and POWER while your PC is running SPFlashTool (with sudo) and waiting for phone connetion.
Some useful tips
1- manual install of busybox :
a- root you phone with method II if not already done
b- stay in TWRP (or boot TWRP as in method II) then in advance->sideload slide the slider to confirm and after cancel that (we will not sideloading any thing, just to activate adb)
c- unzip and copy the attached busybox : adb push busybox /external_sd/
d- mount the system partition with the TWRP mount button
e- copy the busybox binary to /system/xbin : adb shell --> cp /external_sd/busybox /system/xbin/
f- make executable busybox and create links (the point at the end is a part of the command) : cd /system/xbin/; chmod 755 busybox; ./busybox --install -s .
g- umount the system partition in TWRP and reboot
2- manually install the OTA update.zip :
a- Google and download those 3 tools BlockImageUpdate, simg2img and img2simg.
b- In a terminal of your Linux PC do :
Code:
simg2img system.img system.raw.img # convert the sparse image to a normal raw (ext4) image
BlockImageUpdate system.raw.img system.transfer.list system.new.dat system.patch.dat # patch the newly created raw image
img2simg system.raw.img system.img # convert the patched raw image to a flashable sparse image
- system.img: you old system image (from 20170816 official rom)
- system.transfer.list, system.new.dat and system.patch.dat : inside the OTA update.zip
c- After that the original system.img will be patched and you will have an updated system.img.
d- Flash this patched system.img and also all .bin and .img files inside the update.zip (just replace old ones in the original 20170816 rom by those) and you will have the new official rom
3- Using supersu as root manager :
The last update at this time of supersu zip (2.82 SR5) works well, even it cannot update the su binary.
Credits to Magisk Devs, Phhusson and Jemmini
dreambo said:
Here how to root this phone.
1. make sure to have already installed the version 20170816
2. reboot the phone in fastboot mode (phone off -> Vol Up + Power or "adb reboot bootloader")
3. unlock the bootloader if not already done : fastboot flashing unlock (if not works, in android development setting set the unlock bootloader and then retry)
4. unzip and then flash the attached boot image : fastboot flash boot new-boot.img
5. reboot your phone: fastboot reboot
6. install the MagiskManager apk v13.6
7. Voila
I have used this Magisk guide to create it
Credits to Magisk Devs.
Click to expand...
Click to collapse
If I root my phone with this method, will I get further OTA Updates from Maze?
Following to see where this goes.
Cheers
CrashCrash123 said:
If I root my phone with this method, will I get further OTA Updates from Maze?
Click to expand...
Click to collapse
Yes.
You will only lost the root.
If the new update have the same kernel, the same methode with the same boot image can be used to root it again, othewise, we can follow the Magisk guide to create a new one.
I have tried this method. But it only works until the reboot. Then the root access is gone again.
SomeOneX said:
I have tried this method. But it only works until the reboot. Then the root access is gone again.
Click to expand...
Click to collapse
The root is permanent.
If you lost it, perhaps the first time we unlock the bootloader, the phone do a reset, and we lost the root (I suppose).
Just re-flash the new boot again, and it will be permanent : fastboot flash boot new-boot.img
Hi . I have locked the OEM lock but I can not install it through fastboot (remote: not allowed in lock state)
can we expect VOLTE on this device ?
and is there any chance of custom rom development for this device?
alfymon22 said:
can we expect VOLTE on this device ?
and is there any chance of custom rom development for this device?
Click to expand...
Click to collapse
It seems (take with a pinch of salt) that VoLTE is supported, but then most sites that announce that also make mistakes on other specs, so...)
As for custom ROMs, so far the square root of bugger all, but the consumer phones are just filtering in, so give it time.
dreambo said:
Here how to root this phone.
1. make sure to have already installed the version 20170816
2. reboot the phone in fastboot mode (phone off -> Vol Up + Power or "adb reboot bootloader")
3. unlock the bootloader if not already done : fastboot flashing unlock (if not works, in android development setting set the unlock bootloader and then retry)
4. unzip and then flash the attached boot image : fastboot flash boot new-boot.img
5. reboot your phone: fastboot reboot
6. install the MagiskManager apk v13.6
7. Voila
I have used this Magisk guide to create it
Credits to Magisk Devs.
Click to expand...
Click to collapse
it worked, but i have cts fail on safetynet check. how you fixed this?
PrimateaEu said:
it worked, but i have cts fail on safetynet check. how you fixed this?
Click to expand...
Click to collapse
install the universal safety net fix
Hey guys, does this root method wipe the data partition?
KilljoyTDA said:
Hey guys, does this root method wipe the data partition?
Click to expand...
Click to collapse
The flash of the boot image does not wipe the data, but unlocking the bootloader reset the phone and wipe the data.
If you phone is already unlocked, you will not loss the data, otherwise do a backup before.
Well, I don't remember unlocking it, unless Kingo's windows app does it without telling even when rooting fails, so I guess I'd better back up.
Thanks for the info
KilljoyTDA said:
Well, I don't remember unlocking it, unless Kingo's windows app does it without telling even when rooting fails, so I guess I'd better back up.
Thanks for the info
Click to expand...
Click to collapse
It is easy to know if your phone is locked or not : enter fastboot mode and then do : "fastboot getvar all".
Read the last lines of the output and you will know.
Thank you @dreambo for this method, but for me "fastboot flashing unlock" not work, "fastboot oem unlock" working for me, all ok
ps:excusez moi pour mon anglais
dreambo said:
It is easy to know if your phone is locked or not : enter fastboot mode and then do : "fastboot getvar all".
Read the last lines of the output and you will know.
Click to expand...
Click to collapse
Well I failed to back up for some reason anyways, so since I had almost nothing vital on the internal memory, I rooted (sucessfully) and now I'm reinstalling/reconfiguring my apps. Thanks anyways

[vince] problems while moving from china stable to any rom

I wanted to get rid of the Chinese bloatware that came with the phone and decided to install the xiaomi.eu rom.
This is what I did;
unlock the bootloader
downloaded TWRP from official website (3.2.1-0)
installed TWRP with adb, reboot into TWRP with VolUp+Power buttons combination
factory reset and clean data partition
reboot
PROBLEM 1: stuck at MI logo... I said "whataver" and reboot into TWRP
plugged into PC, and transferred rom into internal memory manually
PROBLEM 2: I couldn't push with adb because the device is not recognised in fastboot
in TWRP press install, try to install rom zip
PROBLEM 3: get error 7 message "This package is for device gemini.."
I say "whatever" and download global stable rom from MIUI
did another system data cache clean, tried to install rom
PROBLEM 4: "unmount of /firmware failed: no such volume" "mount:failed to mount /dev/block/bootdevice/by-name/sec at /firmware: invalid argument"
It says "scripting succeeded: result was [1.000000] Updating partition details...done", but when I reboot I'm stuck at the MI logo again!
Any help is very appreciated!
tryhardernow said:
I wanted to get rid of the Chinese bloatware that came with the phone and decided to install the xiaomi.eu rom.
This is what I did;
unlock the bootloader
downloaded TWRP from official website (3.2.1-0)
installed TWRP with adb, reboot into TWRP with VolUp+Power buttons combination
factory reset and clean data partition
reboot
PROBLEM 1: stuck at MI logo... I said "whataver" and reboot into TWRP
plugged into PC, and transferred rom into internal memory manually
PROBLEM 2: I couldn't push with adb because the device is not recognised in fastboot
in TWRP press install, try to install rom zip
PROBLEM 3: get error 7 message "This package is for device gemini.."
I say "whatever" and download global stable rom from MIUI
did another system data cache clean, tried to install rom
PROBLEM 4: "unmount of /firmware failed: no such volume" "mount:failed to mount /dev/block/bootdevice/by-name/sec at /firmware: invalid argument"
It says "scripting succeeded: result was [1.000000] Updating partition details...done", but when I reboot I'm stuck at the MI logo again!
Any help is very appreciated!
Click to expand...
Click to collapse
Well, you need here some corrections to do things in the right way.
In the 3rd step you say that installed twrp through adb but twrp can´t be installed through adb; maybe you wanted to mean fastboot that is other thing.
In the 4th step most important is at first reboot to twrp swipe to allow modifications and then you have to perform "format data" to can reboot normally to system although some times is required no-verity zip for R5P vince (just Google) some users refer that is needed despite I never did.
In the 8th step; fastboot mode can´t work simultaneously meanwhile are you using adb so you don´t need it when you are using adb although this you can´t transfer a file from pc to your device using simply adb; you need to enable first in advanced options from twrp the feature adb sideload then placing the file that you want to transfer from pc to device in the same adb folder you have to type in a terminal with admin rights adb sideload nameoffile.zip but this is not to transfer a file only but to transfer it and flash it onto device.
In the 10th step first open the zip file of the rom with notepad++, go to META-INF/com/google/android/updater-script and check what device is it made for and additional you can browse to system/build.prop and similarly open it and check ro.product/model cause gemini is other variant.
So I think that you flashed firstly a rom for other device and maybe you need to restore some partitions to correct this using MiFlash tool.
But first to this if most of all partitions are working and not damaged you can flash almost any partition through fastboot mode, unzip the rom in the same adb folder and type every file for every partition one by one but maybe you need only system, boot and userdata partitions so try first these three, I hope that you know syntax of fastboot commands.

[Moto G6 Plus] 3: How to install Root (aka Magisk)

THIS GUIDE IS FOR THE MOTO G6 PLUS ONLY
3: Root (aka Magisk)
What is Root? The easiest way to explain it is that root gives you elevated permissions allowing you to modify system files that are not possible to be modified with out elevated permissions. This process requires you to use a PC and assumes you are running the stock firmware.
READ FIRST
Before we proceed you need to download some files on your PC.
*ADB and Fastboot Installer for Windows - (Download) - When prompted to install a driver type the number 0 and hit enter. This will install the latest version of adb and fastboot where it is system-wide. This eliminates the need for adb.exe or fastboot.exe to be in the same folder as the files you will be working with. NOTE: Windows will flag this as a virus! The installer is open source and made by a Moderator here on XDA. It is a False Positive. You can view a VirusTotal report (https://www.virustotal.com/en/file/25dc5dca2494d1b1d93832b37ba9852b4f076bba86cf5029b4c944a28a1a01a1/analysis/]HERE[/url]). 26 out of 67 virus scanners report it as a virus. If your Anti-Virus is one of the ones that flag it as a virus, I would suggest you explore other Anti-Virus software, but that’s not what this guide is about.
* TWRP - (Download) - This is a modified Recovery Software allowing you to flash files that will allow you to fipe your device and install custom roms and other various things. Thanks to XDA Member @khode_Erfan who has ported it to our device.
*Magisk - (Download) - Download the Stable version here. While not required, I do suggest you download the Latest Uninstaller and Latest Magisk Manager as well.
With ADB, Fastboot, and TWRP and Magisk on your pc get ready to root your device!
On your Phone
3A: Enable developer settings by going to Settings->System->About->Tap "Build Number" 5-7 times. You will see notification at the bottom of the screen stating that Developer Options have been Enabled.
3B: Tap the back button to go back to the System screen.
3C: Now tap on Developer Options.
3D: Find the setting that says "Android Debugging" and tap on it to enable adb to work on your device. You should get a prompt on your phone about a host key. Accept it.
On your PC:
3E: Place the file Magisk-v*.zip (*=version number, so for example version 17.1 would be Magisk-v17.1.zip) on your SD Card.
3F: Use Windows Explorer to navigate to the place you downloaded the file twrp-3.2.1-37-evert.img
3G: Hold the Shift Key on your Keyboard. While holding Shift, Right Click in the window(not on the file). Depending on your windows version you should see either "Open PowerShell Window here" or "Open Command Window here." Select which ever one applies.
3H: Now type, or copy and paste, the following commands one at a time and press enter to execute it:
Code:
adb reboot bootloader
fastboot boot twrp-3.2.3-42-evert.img
3I: In TWRP, first tap Backup -> Select Storage -> Micro SD Card - > OK
3J: You will see a section that says "Select Partitions to Backup." Make sure to select all of these boxes.
3K: At the bottom of the screen Swipe the Blue Button where it says Swipe to Backup.
3L: When this is done, tap the Home button.
3M: Tap "Install."
3N: Now tap on "Select Storage"
3O: Tap Micro SD Card
3P: Tap OK
3Q: Navigate to the location of the Magisk.zip file you placed on you sd card earlier and tap on it.
3R: At the bottom of the screen use the "Swipe to confirm Flash" function to flash Magisk.
3S: When it's done tap the button that says Reboot System at the bottom right corner of the screen.
If your device reboots to android, then you have done everything right! If not here are some possible fixes. Make sure the phone is in the bootloader and connected to the PC.
Troubleshooting:
If you are stuck in a bootloop something went wrong but we can fix it pretty easy. Magisk modifies your boot partition when it is flashed. Flashing the boot.img file from the stock firmware should fix this:
boot.img: (Download)
MD5: bd305bc3bc8c591ee7ebba8f5026bb06
Use the command:
Code:
fastboot flash boot boot.img
If you you have an error such as "Can't Load Android System" or "Startup Failed" your partition table is probably corrupt. You can try fixing it by flashing gpt.bin from the stock firmware.
gpt.bin: (Download)
MD5: 631af2ecab87fe627ab00e61b07ac964
Code:
fastboot flash gpt.bin
At the moment of writing, the Magisk link directs also to twrp download. Fixed.
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
I have a problem with the G6 Plus Dual sim model XT 1926-7 (bootloader unlocked).
When I type the command "fastboot boot twrp.img" (so I called the file) it tells me in CMD:
Fastboot: Unknown error: downloading 'boot.img' ... OKAY [0.555s] booting ... FAILED (remote: unknown command) finished. Total time: 0.569s
I tried to reinstall the drivers, changed "minimal adb" to "platform tools" and remains the same.
Any idea how to fix it?
weazie said:
At the moment of writing, the Magisk link directs also to twrp download.
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Click to expand...
Click to collapse
Fixed. Thanks for pointing that out!
Alexx_lml said:
I have a problem with the G6 Plus Dual sim model XT 1926-7 (bootloader unlocked).
When I type the command "fastboot boot twrp.img" (so I called the file) it tells me in CMD:
Fastboot: Unknown error: downloading 'boot.img' ... OKAY [0.555s] booting ... FAILED (remote: unknown command) finished. Total time: 0.569s
I tried to reinstall the drivers, changed "minimal adb" to "platform tools" and remains the same.
Any idea how to fix it?
Click to expand...
Click to collapse
Have you tried disconnecting the phone from the pc and reconnect it then try again.
Sent from my Moto G6 Plus using XDA Labs
Xplorer4x4 said:
Have you tried disconnecting the phone from the pc and reconnect it then try again.
Click to expand...
Click to collapse
Yes, i tried but not working, and on other PC have same problem
Alexx_lml said:
Yes, i tried but not working, and on other PC have same problem
Click to expand...
Click to collapse
Try using different usb cable and different usb slot (usb 2.0 is better for fastboot).
rafikowy said:
Try using different usb cable and different usb slot (usb 2.0 is better for fastboot).
Click to expand...
Click to collapse
I have not tried with another cable or another port, just with another pc, the weird thing is that I have unlocked the bootloader without problem, but I can not start TWRP.
(deleted)
OTA updates for unlocked, rooted Moto G6 Plus
My Moto G6 Plus is unlocked and rooted after following this guide. Today I got a notification of an update from Motorola, but the OTA update fails. Is there a way to get this update?
Relative newbie so excuse me if answer is obvious.
helzayyat said:
My Moto G6 Plus is unlocked and rooted after following this guide. Today I got a notification of an update from Motorola, but the OTA update fails. Is there a way to get this update?
Relative newbie so excuse me if answer is obvious.
Click to expand...
Click to collapse
Well, you cannot do OTA directly on a rooted device. You have basically two options:
1) unroot, lock bootloader, take OTA, unlock bootloader, root.
2) find images of this new update, flash them, profit.
x) take my advice with a grain of salt. that's how it used to be on older devices, I haven't tried it myself. Research, research, research before you actually try any of this.
weazie said:
Well, you cannot do OTA directly on a rooted device. You have basically two options:
1) unroot, lock bootloader, take OTA, unlock bootloader, root.
2) find images of this new update, flash them, profit.
x) take my advice with a grain of salt. that's how it used to be on older devices, I haven't tried it myself. Research, research, research before you actually try any of this.
Click to expand...
Click to collapse
Thanks for that information. As it seems to be a relatively minor update (OPWS27.113-89-2 to OPWS27.113-89-5) I think I will wait for now.
I am running stock ROM unrooted and updated to 9.0, will this still work?
Alexx_lml said:
I have a problem with the G6 Plus Dual sim model XT 1926-7 (bootloader unlocked).
When I type the command "fastboot boot twrp.img" (so I called the file) it tells me in CMD:
Fastboot: Unknown error: downloading 'boot.img' ... OKAY [0.555s] booting ... FAILED (remote: unknown command) finished. Total time: 0.569s
I tried to reinstall the drivers, changed "minimal adb" to "platform tools" and remains the same.
Any idea how to fix it?
Click to expand...
Click to collapse
Do you have problems with sim signals, IMEI or something when unlocked the BL?
Managed to boot into TWRP but when backing up I get error 255. I have attached the twrp log file.
Swizzy88 said:
Managed to boot into TWRP but when backing up I get error 255. I have attached the twrp log file.
Click to expand...
Click to collapse
Decryption is broken in TWRP, therefore TWRP back ups are useless. Use Titanium Backup or Migrate.
Sent from my Phh-Treble vanilla using Tapatalk
Alexx_lml said:
I have a problem with the G6 Plus Dual sim model XT 1926-7 (bootloader unlocked).
When I type the command "fastboot boot twrp.img" (so I called the file) it tells me in CMD:
Fastboot: Unknown error: downloading 'boot.img' ... OKAY [0.555s] booting ... FAILED (remote: unknown command) finished. Total time: 0.569s
I tried to reinstall the drivers, changed "minimal adb" to "platform tools" and remains the same.
Any idea how to fix it?
Click to expand...
Click to collapse
I had the same problem. Fixed itself when I went onto a new (my old) laptop. I guess it's something to do with drivers.
Swizzy88 said:
I am running stock ROM unrooted and updated to 9.0, will this still work?
Click to expand...
Click to collapse
Same situation here, i try and boot twrp, but everything was encrypted... stuck in this step...
Xplorer4x4 said:
3J: You will see a section that says "Select Partitions to Backup." Make sure to select all of these boxes.
Click to expand...
Click to collapse
In TWRP do I really need to back up every single partition I have or just the ones that get changed by Magisk? They won't all fit on the sd card I currently have, but one or two will fit.
f1r3br4nd said:
In TWRP do I really need to back up every single partition I have or just the ones that get changed by Magisk? They won't all fit on the sd card I currently have, but one or two will fit.
Click to expand...
Click to collapse
No. Backup efs and the rest you don't need to worry about. Besides, it's pointless to backup data right now. We can't decrypt data in twrp so the restore will always fail on restore or boot up.
Sent from my Moto G6 Plus using XDA Labs
XT1926-7 root
Xplorer4x4 said:
...
Click to expand...
Click to collapse
Has anyone successfully rooted XT1926-7?
It's intended for non-US markets and sold on Amazon

[ROOT] How to flash recovery within Android with terminal / adb shell

Hi,
this is a small tutorial to show you how to flash the recovery, also eRecovery, via command line / adb shell within Android.
Flashify and other apps never worked for me, so I used commands to flash it without the need of fastboot.
It's a small tutorial for those who never worked with commands like this.
Please notify me if something went wrong or if you found any other issues.
I wanted to make a small script but I stopped it because of the lack of available commands in Android.
DISCLAIMER:
Read this tutorial first.
Never flash custom recovery to eRecovery.
Never flash recoveries from different devices.
Don't try to flash other partitions with this commands if you don't want to risk a brick.
Requirements:
- Oreo / EMUI 8 installed, Nougat hast other partition names. Pie isn't supported by me until final release.
- working root access
- terminal emulator app (I recommend Termius, it's easy to use and has nice features, it's free to use)
> or a PC, and USB cable and working ADB, also USB Debugging enabled in developer settings
- recovery img files on your phone, I recommend it to put them into your user root /data/media/0/ (internal memory)
NOTE: All commands are case sensitive!
Now open your terminal app or open the adb shell.
Type following command to enable root access:
Code:
su
SuperSU will ask you for root access, grant it.
Following command is needed to figure out, which type of memory your phone has:
Code:
ls /dev/block/platform
There are two possible outputs:
If you've a device with the faster UFS memory, it's ff3b0000.ufs, if eMMC it's hi_mci.0.
From now I'll write MEMORY instead of ff3b0000.ufs or hi_mci.0.
For flashing the recovery fire up following command:
Code:
dd if=/PATH/TO/YOUR/RECOVERY.IMG of=/dev/block/platform/MEMORY/by-name/recovery_ramdisk_a
Example: dd if=/data/media/0/twrp_3.2.1.img of=/dev/block/platform/ff3b0000.ufs/by-name/recovery_ramdisk_a
The output should look like this:
Code:
65536+0 records in
65536+0 records out
33554432 bytes transferred in 0.247 secs (135847902 bytes/sec)
If not, check your command and file paths.
For flashin the eRecovery fire up following command:
Code:
dd if=/PATH/TO/YOUR/ERECOVERY.IMG of=/dev/block/platform/MEMORY/by-name/erecovery_ramdisk_a
Example: dd if=/data/media/0/ERECOVERY_RAMDI.IMG of=/dev/block/platform/ff3b0000.ufs/by-name/erecovery_ramdisk_a
IMPORTANT NOTE: DO NOT INSTALL TWRP IN THIS! Flash only stock eRecovery!
The dd command won't give you any progress output, so be a bit patient. It should be done in a few second, but don't close the terminal app or connection before you got any output.
Unix systems like Android will give an output if something went wrong, always.
I use this to flash new TWRP versions or to flash stock recovery before I update.
If you recently updated your phone, you still need to flash via fastboot, because you lost root during the update.
The dd commands also work with fastboot. Mostly you'll use "fastboot flash recovery_ramdisk", but if you need to flash eRecovery, you can use the dd command.
23. February 2019:
Pie should also work, but you have to remove the "_a" after the partition name.
Example:
dd if=/data/media/0/twrp_3.2.1.img of=/dev/block/platform/ff3b0000.ufs/by-name/recovery_ramdisk
Please report if it's working or not.
How to know the path to the recovery_ramdisk?? Is all devices the same?? I didn't get it right the 1st time .. it shows path is invalid
Sent from my VTR-L29 using Tapatalk
fr3ker said:
How to know the path to the recovery_ramdisk?? Is all devices the same?? I didn't get it right the 1st time .. it shows path is invalid
Sent from my VTR-L29 using Tapatalk
Click to expand...
Click to collapse
Should be the same on every device. Remember, case sensitive and use _ and not -.
Maybe it's different on non UFS devices, which one do you have?
Are you able to post a screenshot of your command and output?
Jannomag said:
Should be the same on every device. Remember, case sensitive and use _ and not -.
Maybe it's different on non UFS devices, which one do you have?
Are you able to post a screenshot of your command and output?
Click to expand...
Click to collapse
Maybe @fr3ker is not on Oreo? The recovery_ramdisk partition is only for Oreo. In Nougat it is just called recovery. I don't know how the Pie partitions are called.
M1chiel said:
Maybe @fr3ker is not on Oreo? The recovery_ramdisk partition is only for Oreo. In Nougat it is just called recovery. I don't know how the Pie partitions are called.
Click to expand...
Click to collapse
Also my thought, I wanted to add this to the requirements when I created this post but apparently I forgot this. Now it's added as first point.
Hi.
I have a hard bricked p10. When I connect to laptop it's says USB SER. It doesn't not turn on I can't access recovery with power + vol. I can't get into fastboot. Anyway I can access fastboot to flash kernel and erecovery?
Jannomag said:
I use this to flash new TWRP versions or to flash stock recovery before I update.
Click to expand...
Click to collapse
Is it mandatory to flash stock recovery before update? Is it applies only to ota update or ff method?
Yes, FF or OTA are using stock recovery to flash the update. With TWRP it won't work.
Updated?
@ Jannomag:
Have you checked this for Pie meanwhile?
I currently have the problem, not being able to enter fastboot with:
Code:
sudo adb reboot bootloader
Additionally, there's something I do not understand. For the dd-command for flashing, why is the input-file (if=) the file in "/dev/block/platform/..." and the output on the sd-card? Wouldn't mean flashing an img to the device, that if= on the sd (or connected PC) and of= the path to the device (phone)?
Blümchen Blau said:
@ Jannomag:
Have you checked this for Pie meanwhile?
I currently have the problem, not being able to enter fastboot with:
Code:
sudo adb reboot bootloader
Additionally, there's something I do not understand. For the dd-command for flashing, why is the input-file (if=) the file in "/dev/block/platform/..." and the output on the sd-card? Wouldn't mean flashing an img to the device, that if= on the sd (or connected PC) and of= the path to the device (phone)?
Click to expand...
Click to collapse
WTF....Why didn't I notice this terrible mistake! Thank you for reading my post completely, you're 100% correct, I'll correct this directly after I submit this post.
Huawei did also a small change at naming the recovery partition, which I'll update, too.
I had also the problem that I wasn't able to boot into fastboot by command before I fried my phone - I couldn't figure out the reason for this.
Again, thank you!
Jannomag said:
Again, thank you!
Click to expand...
Click to collapse
Your'e welcome! I did update now, but didn't need your (correct ) way to fastboot, because the method described by borgerapper did the trick for me to get into fastboot and flash the needed original recovery.
Thanks anyway!

How To Guide [TUTORIAL] ULTIMATE How to flash GSI Trebble AND ROM and root on Xiaomi device on Windows (files needed included)

Hi, first of all, I'm not a dev or else just user who had difficulties to flash GSI on my phone... Was 7 years with a samsung galaxy Note 3, with twrp....So easy to flash....
with the help of @gr0ndpa, thanks to him.....
FLASH GSI​
Now I will explain how to flash easily with files attached
1/ first of all you need a phone and drivers installed, use xiaomi pc suite, unzip and install it
2/ you need to activate USB debug in dev options.
3/ dl adb folder unzip it and put in C
4/ run command and type
Code:
cd /adb
5/ then
Code:
adb devices
to check if phone recognised
6/
Code:
adb reboot bootloader
once in fast boot
7/
Code:
fastboot flash vbmeta vbmeta.img
wait finished type to enter in fastbootD
8/
Code:
fastboot reboot fastboot
9/
Code:
fastboot flash system
LiR 313.XXX.img
you will have a system error, but wait the flash begin in few seconds
at the end wait ok then
10/
Code:
fastboot reboot recovery
on stock recover
11/ wipe data and reboot with +/- and PWR
and you're done...
In case you want to flash custom kernel or patched boot image to root with magisk, you have to
12/
Code:
adb reboot bootloader
Copy kernel boot image to C drive and rename kernel boot image to boot.img.
13/
Code:
fastboot flash boot c:\boot.img
14/
Code:
fastboot reboot
In case you want to flash twrp put the file to adb folder and type in fastboot
15/
Code:
fastboot boot twrp.img
Downloads for : Xiaomi Mi 11 Lite 5G | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
androidfilehost.com
You can check what I ve done on tuto ss...
if you have some comments, don't hesitate...
I flashed LiR 18.1 rom and very happy with it.....
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++==================================================================================================================================================================================================================++
Flash ROM​
This now how to flash ROM on your device, it's convenient for all roms like LOS, corvus, awaken...
First you need all the proper drivers installed and unlocked bootloader, USB debugging all of that stuff.
Now open up a cmd/terminal , and put the files i sent and the ROM file in the folder from where you're opening the cmd/terminal and connect the phone (you may need to put ./ as an suffix for all the commands if you're on linux)
Type
Code:
adb reboot bootloader
Then type
Code:
fastboot devices
to see if everything is ok
Then type
Code:
fastboot flash boot_ab boot.img
(you can drag and drop the file instead of typing it)
After that's done type
Code:
fastboot flash vendor_boot_ab vendor_boot.img
(you can drag and drop this too if you want)
Code:
fastboot flash dtbo dtbo.img
(you can drag and drop this too if you want)
After that's done type
Code:
fastboot reboot recovery
This will boot you into a recovery and now you need to go to wipe and format data
After that go to apply update then adb sideload then
In the cmd type
Code:
adb sideload rom.zip
for example (you put the ROM zip here you can drag and drop it)
Wait for that to finish it will go to 47% and on the phone it will show step 1/2 then step 2/2
and when it's done it's gonna show an error
adb: failed to read command: No error
Then you can reboot to system
Hello thank your for the short HowTo. Unfortunately im stuck on invalid sparse error. Could you pls post a fix to solve this? Would appreciate your help.
hardshell said:
Hello thank your for the short HowTo. Unfortunately im stuck on invalid sparse error. Could you pls post a fix to solve this? Would appreciate your help.
Click to expand...
Click to collapse
You have to wait at least 30 sec after the error appear...
Are you sure you are on fastbootD???
tuto modified and completed to also root device with magisk and patch boot.img
when i restart into fastboot, it is frozen.
dy2592 said:
when i restart into fastboot, it is frozen.
Click to expand...
Click to collapse
normal, nothing happens on fastboot....when you flash, only thing is on your computer, not on screen..
cant seem to get this installed =(
rayman95 said:
8/
Code:
fastboot reboot fastboot
Click to expand...
Click to collapse
After I enter this, it just stays on waiting for any device.
Update: I was able to figure it out. My device had no drivers so I went search through updates on windows and installed a LeMobile Android driver os it shows up properly in device manager.
How does one install gapps?
dy2592 said:
After I enter this, it just stays on waiting for any device.
View attachment 5419437
Update: I was able to figure it out. My device had no drivers so I went search through updates on windows and installed a LeMobile Android driver os it shows up properly in device manager.
Click to expand...
Click to collapse
because you don't have xiaomi drivers installed...install xiaomi pc suite and you will have drivers installed...
duplicate
rayman95 said:
In step 14, I encountered the error "fastboot: error: ANDROID_PRODUCT_OUT not set" after executing the fastboot flash system command. what do I need to do?
Click to expand...
Click to collapse
Did you insert the img at the end?
Fastboot flash system LIRxxxxxxxxxxxx.img
you have to put your rom to adb folder and dont forget to add .img at the end
rayman95 said:
you have to put your rom to adb folder and dont forget to add .img at the end
Click to expand...
Click to collapse
1.img is your rom Is there anything else missing?
dy2592 said:
Did you insert the img at the end?
Fastboot flash system LIRxxxxxxxxxxxx.img
Click to expand...
Click to collapse
yaha your right thank you so much
rayman95 said:
you have to put your rom to adb folder and dont forget to add .img at the end
Click to expand...
Click to collapse
thank I solved my problem. Now I have another problem, how to install GAPPs
Patrick Star_ said:
thank I solved my problem. Now I have another problem, how to install GAPPs
Click to expand...
Click to collapse
run twrp, it's explain in 1st post or maybe try with magisk...I can install minimicroG nogoolag with it..
rayman95 said:
run twrp, it's explain in 1st post or maybe try with magisk...I can install minimicroG nogoolag with it..
Click to expand...
Click to collapse
I tried to use twrp to brush into GAPP, but the error is 70. How can I solve it? I don't know if there is a problem with my twrp. Can you send a tutorial on xiaomi11 Lite 5g installing twrp? Thank you very much
Patrick Star_ said:
I tried to use twrp to brush into GAPP, but the error is 70. How can I solve it? I don't know if there is a problem with my twrp. Can you send a tutorial on xiaomi11 Lite 5g installing twrp? Thank you very much
Click to expand...
Click to collapse
In case you want to flash twrp put the file to adb folder and type in fastboot
15/
Code:
fastboot boot twrp.img
And twrp link is in post 1..maybe you choose bad gapps variant

Categories

Resources