[Android Software/Hacking General [Developers Only]] barindra75@gmail.com:
Hello guys...

This is first tutorial post here for me....

Please give a feedback about how am I been able to help you....any suggestions are always welcome.

Today I am presenting an approach how to flash a fastboot from without a PC.

In this section I am providing an fastboot binary file which has prepared by KMyers in XDA.

What You need

1. One rooted android phone (say dev 1) with ARM processor only, instead of a PC.

additional features required in this phone is ES file explorer (or any other), .tgz extractor, terminal emulator (attached here).

2. fastboot rom fully downloaded.

3. another device (say devi 2)matching with downloaded fastboot rom (this device will be flashed).

3. Some files I attached in this thread.

4. USB data cable + USB OTG cable.

Steps

1. make the file system ready at dev 1 (rooted android which will be used instead of a PC)a. install es file, terminal emulator and allow root access. install 7zip extractor.

b. take the downloaded fastboot rom and extract it thru zip extractor, rename the extracted file as fastbootrom for easiness and put it at internal storage.

c. download the attached fastboot.zip, extract it. copy the fastboot binary file and paste it to /system/xbin or /system/bin. set permission to the file as -rwxrwxrwx. This file will be responsible for flashing the dev 2 device.

d. there are script files like flash_all.sh, flash_all_except_data-storage.sh etc which are self explanatory.

we will run this script file with su permission at terminal during flashing.

3. hardware connection

connect the OTG cable to dev1 , connect the usb data cable to dev 2. Now connect the usb data cable to OTG cable female part.

thats it. connection is ready.

4. edit the script file

If you want, you can edit the script file flash-all.sh in any text editor as per your choice, but be very carefull in this section. better leave it as it is. Personally what I do is, I replace the recovery.img in fastboot rom/images/ with twrp.img of the same device, and rename twrp.img as recovery.img.

Then at last line instead of fastboot reboot, I put fastboot $* boot `dirname $0`/images/recovery.img. This will reboot he device after flashing into twrp first time. Simply flash supersu etc from twrp then reboot the device in one shot directly rooted.

5. flash

a. open the terminal

type su and enter. allow root permission if required.

b. change the working directory to fastboot rom by

cd storage/emulated/0/fastbootrom/ this command is for my xiaomi redmi3sprime & MI4. change the path according to your device.

now choose the edited script file for flashing. say it is flash_all.sh ( I prefer flash_all_except_data_storage_.sh) remember dont take flash_all.bat file. That is for windows system. Now we will be flashing from android device and it is similer to linux platform.

c. start the dev 2 in fastboot mode, connect it to data cable. connect OTG cable to dev 1. connect OTG female part+data cable male part.

d. execute in terminal fastboot devices you will see the list of devices like 0e34cdf5 fastboot.

f. if the device is showing in fastboot mode then voila....you are mostly done. Before flashing ensure at least 50% battery in both device.

g. Now execute the script file by

sh flash_all_except_data_storage_.sh you will find the flashing details will be displayed in your android dev 1 terminal.

If flash is successful......reboot / root / do whatever you like.

remember first boot after flash takes long time may be 30 minutes or more...so be patient..better leave it in charging and rebooting for 1 hr.

Leave a comment if you do all things successfully....and rate me.

The resources used here are collected from different free sources like apkmirror.com. xda-developer.com.

I personally thanks to KMyers for making the fastboot binary for arm processor, full credit goes to him for that.

Thanks to chainfire for su binary.

BN P

Long live open source.

Love open source and Hate those, who hide their content.