For Linux (and more precisely, debian flavors), here's how to add a "reboot-edl" command in "fastboot" command:
Code:mkdir /tmp/fastboot && cd /tmp/fastboot && apt-get source android-tools-fastboot </dev/null && cd android-tools-* cat <<EOF | patch -p1 --- a/core/fastboot/fastboot.c +++ b/core/fastboot/fastboot.c @@ -284,6 +284,7 @@ void usage(void) " continue continue with autoboot\n" " reboot reboot device normally\n" " reboot-bootloader reboot device into bootloader\n" + " reboot-edl reboot device into EDL (RedMi Note 3 Pro)\n" " help show this help message\n" "\n" "options:\n" @@ -803,6 +804,7 @@ int main(int argc, char **argv) int wants_wipe = 0; int wants_reboot = 0; int wants_reboot_bootloader = 0; + int wants_reboot_edl = 0; int erase_first = 1; void *data; unsigned sz; @@ -929,6 +931,9 @@ int main(int argc, char **argv) } else if(!strcmp(*argv, "reboot-bootloader")) { wants_reboot_bootloader = 1; skip(1); + } else if(!strcmp(*argv, "reboot-edl")) { + wants_reboot_edl = 1; + skip(1); } else if (!strcmp(*argv, "continue")) { fb_queue_command("continue", "resuming boot"); skip(1); @@ -1009,6 +1014,8 @@ int main(int argc, char **argv) fb_queue_reboot(); } else if (wants_reboot_bootloader) { fb_queue_command("reboot-bootloader", "rebooting into bootloader"); + } else if (wants_reboot_edl) { + fb_queue_command("reboot-edl", "rebooting into EDL mode"); } if (fb_queue_is_empty()) EOF apt-get build-dep android-tools-fastboot -y </dev/null dpkg-buildpackage -rfakeroot -b cd .. dpkg -i android-tools-fastboot*.deb
I have a blog post about this providing a few more information Here. Any comment is warmly encouraged and welcome.
Hi, thank you for your work
I'm on linux Mint 17 and 18 and I got a problem with your script:
When I try
Code:
apt-get source android-tools-fastboot
Code:
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
or:
Code:
Reading package lists... Done
E: Unable to find a source package for android-fastboot
This is weird to me cause normal installation is working:
Code:
sudo apt-get install android-tools-fastboot
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
android-libadb android-libbacktrace android-libbase android-libcutils
android-libext4-utils android-libf2fs-utils android-liblog
android-libselinux android-libsparse android-libunwind android-libutils
android-libziparchive fastboot libf2fs0 p7zip-full
Suggested packages:
p7zip-rar
The following NEW packages will be installed:
android-libadb android-libbacktrace android-libbase android-libcutils
android-libext4-utils android-libf2fs-utils android-liblog
android-libselinux android-libsparse android-libunwind android-libutils
android-libziparchive android-tools-fastboot fastboot libf2fs0 p7zip-full
0 upgraded, 16 newly installed, 0 to remove and 67 not upgraded.
Need to get 1 591 kB of archives.
After this operation, 6 102 kB of additional disk space will be used.
Do you want to continue? [Y/n]
What am I missing?
Edit: I update the terminal output to English language
Last edited: