[-]
Who's Online
There are currently 3466 online users. [Complete List]
» 5 Member(s) | 3461 Guest(s)
AvatarAvatarAvatarAvatar
Avatar

[-]
Latest Threads
K107-MB-V4.2
Last Post: Alby
2024-04-24 00:37
» Replies: 0
» Views: 180
[ROM] NEED ROM ZH960-MB-V5.0 MTK 6592
Last Post: sendycat2
2024-04-21 08:57
» Replies: 0
» Views: 144
ZH960 Tablet Bricked
Last Post: luis mar que
2024-03-20 19:52
» Replies: 14
» Views: 9776
Thanks, I've been looking for this for a...
Last Post: StevenRip
2024-02-25 05:00
» Replies: 0
» Views: 112
[SOLVED] Need ROM for ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:59
» Replies: 0
» Views: 214
NEED ROM ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:53
» Replies: 18
» Views: 13672
Budget phone choice help needed
Last Post: sabir7272
2024-02-10 06:52
» Replies: 4
» Views: 4249
ZH960-MB-V3.1 SOLVE
Last Post: Pranav1
2023-12-20 20:22
» Replies: 74
» Views: 33728
Need ROM for SONIM XP7S Android 5.1.1
Last Post: Alpa
2023-11-29 22:17
» Replies: 0
» Views: 137
Need rom for X101 Mt6592
Last Post: carencell
2023-11-24 21:30
» Replies: 3
» Views: 2117
Gizbeat 101: Get your MTK6589 MTK6577 MT...
Last Post: Alexia78
2023-11-13 11:28
» Replies: 8
» Views: 22295
Need rom for a tablet with board id "K10...
Last Post: oliver2
2023-10-24 20:23
» Replies: 6
» Views: 5361
How to Connect open public wifi
Last Post: oliverben45
2023-10-24 16:03
» Replies: 11
» Views: 8866
I NEED FILE FOR ITEL MOBILE PHONE AND TO...
Last Post: Meghnad45
2023-10-22 02:38
» Replies: 1
» Views: 1404
NEED Help Bricked my phone.
Last Post: Meghnad45
2023-10-22 02:36
» Replies: 4
» Views: 4821
Introduction
Last Post: ezrahidaya
2023-10-14 14:38
» Replies: 2
» Views: 1321
Needs help to root a china tablet brand ...
Last Post: ezrahidaya
2023-10-14 14:37
» Replies: 1
» Views: 201
Any tips to stay awake?
Last Post: ezrahidaya
2023-10-14 14:35
» Replies: 6
» Views: 5523
Need ROM for china TAb MT6797
Last Post: ezrahidaya
2023-10-14 14:34
» Replies: 1
» Views: 362
need this stock firmware for my tablet M...
Last Post: ramzii888
2023-10-14 02:20
» Replies: 4
» Views: 4541
Encryption Unsuccessful - Reset Android
Last Post: Aakriti
2023-10-13 16:51
» Replies: 3
» Views: 12404
betools
Last Post: egdeim
2023-09-21 12:41
» Replies: 4
» Views: 5035
[Movie Suggestion] Automata with Antonio...
Last Post: GottaGetX
2023-09-07 09:19
» Replies: 3
» Views: 4175





Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux and Windows adb recovery flasher
#1
This is a binary flasher I made to flash recoveries via adb, you need to have adb setup and working.

You need to set permissions to execute on flash_recovery, place flash_recovery in same folder as the recovery you want to flash, the recovery needs to be named recovery.img

you can flash your recovery.img just by clicking flash_recovery or you can open terminal and type ./flash_recovery

I have limited the size of the recovery that can be flashed, so TWRP can't be flashed via my flasher, I could remove the limit but due to recovery partition size on some phones, that would be dangerous to some phones, all phones can flash CWM recovery.

[Only registered and activated users can see links Click here to register]

If you run flash_recovery in terminal you will see below.

Code:
vampirefo@vampirefo-GA-MA78GM-US2H ~/Desktop/unpack_boot/rcf $ ./flash_recovery
adb recovery flasher by Vampirefo
5142 KB/s (6074368 bytes in 1.153s)
0+1 records in
0+1 records out
6074368 bytes transferred in 0.036 secs (168732444 bytes/sec)
vampirefo@vampirefo-GA-MA78GM-US2H ~/Desktop/unpack_boot/rcf $

This version should work for windows users, as they use .bat files rather than bash files.

Code:
@echo off
echo * adb recovery flasher by Vampirefo
echo.
echo * place this script and your recovery.img in the folder.
echo.
echo * Rename the recovery filename to recovery.img
echo.

if EXIST recovery.img (GOTO FOUND) else (GOTO END)

:FOUND
echo * recovery.img found.
echo.
adb\adb.exe shell "su -c 'mkdir /data/tmp/""
adb\adb.exe push recovery.img "/data/tmp/recovery.img"..
adb\adb.exe shell "su -c 'dd if=/data/local/recovery.img of=/dev/recovery bs=6291456 count=1'"
adb\adb.exe shell "su -c 'rm -r /data/tmp/'"
echo.
echo Done flashing. Restart in recovery mode to see if successful.

GOTO EXIT


:END
echo.
echo  !!ERROR: recovery.img not found!!
echo Make sure you renamed your desired recovery to recovery.img!
GOTO EXIT

:EXIT
echo.
echo Exiting script..
pause

also adb files needed for window users are included in zip

[Only registered and activated users can see links Click here to register]
GizBeat and aus9 like this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#2
Hi

Forgive me but I have an error or two

Code:
ls -al
total 5936
drwxr-xr-x 2 gordon gordon    4096 May 26 10:50 .
drwxr-xr-x 5 gordon gordon    4096 May 22 21:23 ..
-rwxrwxrwx 1 gordon gordon   11544 May 25 20:36 flash_recovery
-rw-r--r-- 1 gordon gordon    7622 Jan 30 10:53 MT6582_Android_scatter.txt
-rw-r--r-- 1 gordon gordon 6035456 Jan 30 15:17 recovery.img
gordon@box:/a/1ANDROID/1ROMS-STUFF/2-IO-CWM$ ls -alh recovery.img
-rw-r--r-- 1 gordon gordon 5.8M Jan 30 15:17 recovery.img
gordon@box:/a/1ANDROID/1ROMS-STUFF/2-IO-CWM$ adb kill-server
gordon@box:/a/1ANDROID/1ROMS-STUFF/2-IO-CWM$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
adb devices -l
List of devices attached
0123456789ABCDEF       device usb:5-7 product:A9CL model:iOCEAN_X7 device:A9CL

gordon@box:/a/1ANDROID/1ROMS-STUFF/2-IO-CWM$ ./flash_recovery
./flash_recovery: _rS�'P��Bd�x�

2) Is there a md5sum for your zip in case I have a download error?

3) What is the byte size limitation placed on running this cool executable pls?

4) on size limitations the issue for TWRP, not that one exists for my device is IMHO this
I add the skip position in decimal to the size in decimal
if it gives me the next position in the flash device, or over runs it, I am likely 2 brick

By using your hex2dec link I have this hidden txt file
Where I write sequential......that is the risk ....IMHO

bottom line is the size of target recovery image must be less than dumchar....yes?

Show Content

thanks in advance for any time you can share on my error
You like this post
Reply
#3
b27ecc422ede95dbf727d241da5b033a /home/vampirefo/Desktop/unpack_boot/rcf/flash_recovery

limit 6291456

Could be my version of c, to make it easier, I will put it into a bash script.


Code:
#!/bin/bash
file="./recovery.img"
if [ -f "$file" ]
then
echo "adb recovery flasher by Vampirefo"
adb shell su -c "mkdir /data/tmp/"
adb push ./recovery.img "/data/tmp/recovery.img"
adb shell su -c "dd if=/data/tmp/recovery.img of=/dev/recovery bs=6291456c count=1"
adb shell su -c "rm -r /data/tmp/"
else
    echo "$file not found."
fi
aus9 likes this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#4
Hi
Code:
$  md5sum flash_recovery
b27ecc422ede95dbf727d241da5b033a  flash_recovery

We have a match so my download was correct after all but
Quote:adb shell su -c "dd if=/data/tmp/recovery.img of=/dev/recovery bs=6291456c count=1"
You appear to have a c suffix at the end of the byte size?

2) Thankyou very much for personalizing your bs count to be my maximum

3) I had find how to get into iOcean rec mode=.connect data cable to PC....with phone off and hold power up button
I did not need to touch power button......there has to a way without PC surely.

4) modified script below works a treat.....as I wanted to see phone go directly into rec mode by adb command
Quote:#!/bin/bash
file="./recovery.img"
if [ -f "$file" ]
then
echo "adb recovery flasher by Vampirefo"
adb kill-server
adb start-server
adb shell su -c "mkdir /data/tmp/"
adb push ./recovery.img "/data/tmp/recovery.img"
adb shell su -c "dd if=/data/tmp/recovery.img of=/dev/recovery bs=6291456 count=1"
adb shell su -c "rm -r /data/tmp/"
adb reboot recovery
else
echo "$file not found."
fi

Woo Hoo

5) Me thinks Windows users could use your similar commands on their PC, as long as they have associated USB driver to Android device?

6) offtopic I know

Have you given any thought to using the same simple dd command for nvram?
Reply
#5
(2014-05-26, 17:18)aus9 Wrote: [Only registered and activated users can see links Click here to register]
You and aus9 like this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tutorial] BACKUP, CUSTOM RECOVERY AND ROOT FOR MT67xx SMARTPHONES djtetei 14 24,183 2020-04-11, 21:53
Last Post: romaneart
  [New flash method] MT6752 how to root & flash recovery MT67xx Ninja^F.U.B.A.R. 10 29,919 2018-02-15, 06:46
Last Post: milantic
  fly swift gts porting costum recovery and costum rom xcoder 0 1,645 2017-10-07, 04:36
Last Post: xcoder
  Windows 8/8.1 Incompatibility Issues (Drivers and Droid Tools) Athos 14 33,887 2017-08-18, 12:20
Last Post: dkmtaukhua123
  [Guide] Fix PC computer not detecting China phone Android USB adb device GizBeat 0 2,783 2016-10-07, 21:00
Last Post: GizBeat

Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Tech & Science
[Sci-Am] Energy Independence Is a Big Election Talking Point...
Last Post: Scientific American
Yesterday 16:42
» Replies: 0
» Views: 22
[Sci-Am] Rat Neurons Repair Mouse Brains That Lack a Sense o...
Last Post: Scientific American
Yesterday 02:49
» Replies: 0
» Views: 39
[Sci-Am] Corals Are Once Again Bleaching En Masse, but Their...
Last Post: Scientific American
2024-05-07 13:08
» Replies: 0
» Views: 41
[Sci-Am] People Keep Secrets Because They Overestimate Harsh...
Last Post: Scientific American
2024-05-06 23:09
» Replies: 0
» Views: 39
[Sci-Am] How Unhealthy Are Ultra-Processed Foods?
Last Post: Scientific American
2024-05-06 09:28
» Replies: 0
» Views: 42
[Sci-Am] Cicadas Are Basically Safe for You—And Your Dog—to ...
Last Post: Scientific American
2024-05-05 20:00
» Replies: 0
» Views: 33
[Sci-Am] The Threat of a Solar Superstorm Is Growing—And We’...
Last Post: Scientific American
2024-05-05 06:40
» Replies: 0
» Views: 23
[Sci-Am] New Pollution Regulations Could Largely Eliminate C...
Last Post: Scientific American
2024-05-04 16:11
» Replies: 0
» Views: 12
[Sci-Am] Extrovert or Introvert: Most People Are Actually Am...
Last Post: Scientific American
2024-05-04 02:50
» Replies: 0
» Views: 12
[Sci-Am] Lemon-Scented Marijuana Compound Reduces Weed’s ‘Pa...
Last Post: Scientific American
2024-05-03 13:20
» Replies: 0
» Views: 18
[Sci-Am] New Interactive Map Shows Where Extreme Heat Threat...
Last Post: macikus
2024-05-03 01:38
» Replies: 1
» Views: 48
[Sci-Am] How Ugandan Tobacco Farmers Inadvertently Spread Ba...
Last Post: Scientific American
2024-05-02 09:12
» Replies: 0
» Views: 27
[Sci-Am] Will the Amazon Rain Forest Help Save the Planet?
Last Post: Scientific American
2024-05-01 19:43
» Replies: 0
» Views: 30
[Sci-Am] The U.S. Spends a Fortune on Beach Sand That Storms...
Last Post: Scientific American
2024-05-01 06:15
» Replies: 0
» Views: 31
[Sci-Am] Could JWST Solve One of Cosmology's Greatest Myster...
Last Post: Scientific American
2024-04-30 03:14
» Replies: 0
» Views: 52
[Sci-Am] How to See the Lunar Far Side Right Here on Earth
Last Post: Scientific American
2024-04-29 13:40
» Replies: 0
» Views: 52
[Sci-Am] How Big a Threat Is Bird Flu?
Last Post: Scientific American
2024-04-29 00:05
» Replies: 0
» Views: 43
[Sci-Am] The Amazon's Record-Breaking Drought Is about More ...
Last Post: Tauma
2024-04-28 22:35
» Replies: 1
» Views: 46
[Sci-Am] FDA Recalls Heart Pumps Linked to Deaths and Injuri...
Last Post: Scientific American
2024-04-28 09:53
» Replies: 0
» Views: 20
[Sci-Am] Deadly African Heat Wave Would Not Have Been Possib...
Last Post: Scientific American
2024-04-27 20:10
» Replies: 0
» Views: 25
[Harvard] Getting ahead of dyslexia
Last Post: Harvard
2024-04-27 06:36
» Replies: 0
» Views: 37
[Sci-Am] Hollywood Should Give Brain Science a Star Turn
Last Post: Scientific American
2024-04-26 17:14
» Replies: 0
» Views: 44
[Sci-Am] Milky Way's 'Sleeping Giant' Black Hole Lurks Shock...
Last Post: Scientific American
2024-04-26 03:48
» Replies: 0
» Views: 56
[Harvard] Why AI fairness conversations must include disable...
Last Post: Harvard
2024-04-25 13:58
» Replies: 0
» Views: 66
[Sci-Am] How a New AI Model Helps Volcanic History Rise from...
Last Post: Scientific American
2024-04-24 23:17
» Replies: 0
» Views: 67
[Sci-Am] Everyone Will Have Fewer Relatives in the Future
Last Post: Scientific American
2024-04-24 09:25
» Replies: 0
» Views: 47
[Sci-Am] The Dark Side of Nostalgia for Wild, Untouched Plac...
Last Post: Scientific American
2024-04-23 19:59
» Replies: 0
» Views: 38
[Harvard] How did you get that frog to float?
Last Post: Harvard
2024-04-23 19:59
» Replies: 0
» Views: 53
[Sci-Am] In Matters of Scientific Debate, Follow the Houdini...
Last Post: Scientific American
2024-04-23 06:34
» Replies: 0
» Views: 38
[Harvard] Lifting a few with my chatbot
Last Post: Harvard
2024-04-23 06:34
» Replies: 0
» Views: 40
[Sci-Am] This Tiny Fish Makes an Ear-Blasting Screech for Lo...
Last Post: Scientific American
2024-04-22 17:01
» Replies: 0
» Views: 38
[Sci-Am] How Plant Intelligence Can Soothe Climate Anxiety
Last Post: Scientific American
2024-04-22 02:57
» Replies: 0
» Views: 58
[Sci-Am] Contributors to Scientific American’s May 2024 Issu...
Last Post: Scientific American
2024-04-21 13:36
» Replies: 0
» Views: 43
[Sci-Am] A ‘Computer’ Built from DNA Can Find Patterns in Ph...
Last Post: Scientific American
2024-04-20 23:27
» Replies: 0
» Views: 71
[Sci-Am] Unraveling the Secrets of This Weird Beetle’s 48-Ho...
Last Post: Scientific American
2024-04-20 09:17
» Replies: 0
» Views: 54
[Sci-Am] We Are Living in the Pyrocene, the Age of Fire that...
Last Post: Scientific American
2024-04-18 16:45
» Replies: 0
» Views: 102
[Harvard] Hate mosquitoes? Who doesn’t? But maybe we shouldn...
Last Post: Harvard
2024-04-18 03:05
» Replies: 0
» Views: 98