Trying to flash an insecure boot.img, no luck. - Transformer TF300T Q&A, Help & Troubleshooting

I am desperately trying flash an insecure boot image on my TF300T, and I am just about at my wit's end. I have gone through the following process. (this is on a .29 TF300T btw)
Unlocked my TF300T with the ASUS tool, and then flashed CWM and got root using this guide.
Obtained .29 US firmware zip from the ASUS website.
Unzipped the "blob" file and then extracted all of the firmware components from it using BlobTools.
Renamed blob.LNX (one of the extracted files which is apparently the boot image) to boot.img for convenience.
Split boot.img into kernel and ramdisk using this set of scripts made for that purpose.
Changed the ro.secure=1 line in default.prop to ro.secure=0.
Packed everything back up again using that set of scripts.
flashed my new boot.img using the line fastboot -i 0x0B05 flash boot boot_new.img (boot_new.img is generated upon repacking)
and finally, I run fastboot -i 0x0B05 reboot only to find upon booting that absolutely nothing has changed! adbshell getprop ro.secure still gives a 1! I'm almost positive that I've done this all correctly, as I was able to get an insecure boot image onto a kindle fire just a few days ago. Could anyone tell me if I'm doing something wrong? Please
One thing to note, for some reason I could not run fastboot -i 0x0B05 boot boot_new.img to try out the new boot image as it would cause fastboot to give me an error and a red line of text to appear on the TF300T's screen detailing something about it being unable to find the command. Perhaps that is related to my problem?

I'd try taking the 'boot.img' file and putting back to simply 'blob' with no extension, then flashing via ADB or terminal emulator with root.
Code:
adb push blob /sdcard/ (Just place on root of Internal Storage if using term emulator or have easy MTP access. )
adb shell (Don't need if using emulator)
su (Give ROOT permission)
dd if=/sdcard/blob of=/dev/block/mmcblk0p4
reboot
See if that'll flash it for you.
"dd if=/sdcard/blob of=/dev/block/mmcblk0p4" This part I am NOT 100% sure about, you'll need the TF300's partition table, I know mmcblk0p4 is the Staging partition on the TF101, but not sure if it's the same on the TF300, just replace mmcblk0p4 with the STAGING partition label
Hope it helped.
Needs Root and BusyBox installed.

Related

[Q] <HELP> deleted framework-res.apk [WiFi model]

Call me what ever you want, but it's too late...
I have a US WiFi Zoom and I accidentally deleted the "framework-res.apk" in /system/framework/, but I do have a backup in /mnt/sdcard/
Fastboot is still working, but I can no longer boot in recovery (I have/had CWM installed).
The normal startup get stuck on the boot screen.
As far as I understand you cannot flash a file directly from fastboot, but need a .zip file made in Linux for this purpose.
As I do not have skills, nor a Linux OS to build this, I would very much appreciate if someone could help out here, or direct me how to flash a file directly from fastboot.
Thanks in advance,
arc
Get wifi system image and fastboot flash system system.img
Or if you have USB debugging enabled, just use adb to copy the framework-res
Thanks, sangreal06,
I believe the USB debugging is only getting me into the /mnt/ folder.
But, if I understand you right, I can grab roebeet's root-prepped and updated HRI66 system.img here:
http://forum.xda-developers.com/showthread.php?t=995785
and flash it by:
Code:
fastboot flash system system.hri66.rootprepped.img
fastboot reboot
After the device reboot, you will need adb to fix su permissions:
Code:
adb remount
adb shell chmod 6755 /system/bin/su
is this correct?
Yes, but that file is for 3G. It is not compatible with wifi model
Thanks, sangreal06, for catching that one, it probably saved me a lot of grief. I guess the one to use will be Scourge1024's:
Stock MZ604 (Xoom Wi-Fi) recovery.img
or, am I better way of waiting for the stock SBF, announced to arrive within short?
Also, will this require that I re-root?
Thanks in advance,
arc
Boot into clockworkmod and flash the zip below.
How to get back into recovery: http://forum.xda-developers.com/showthread.php?t=1041192
File: http://dl.dropbox.com/u/18315605/XDA/Framework.zip
Thanks so much bwcorvus,
I'll d/l the recovery.img at [RECOVERY] ClockworkMod Recovery v3.0.2.5
and....
It worked perfectly, I'm back! I guess that's a mistake I wont do again. I really owe you one, put it on my tab.
arc

[Resolved] [Q] Get right boot.img from Nexus 4 with CWM recovery?

Hi, I hope I'm posting this in the right forum...
tl;dr: How do I get the right boot.img from a device which has CWM recovery installed?
I am trying to replace the kernel on my Nexus 4. I managed to built the kernel (zImage), and wanted to integrate it into my boot.img to try it out with fastboot.
I fetched the boot.img with:
[email protected]:/ # dd if=/dev/block/mmcblk0p7 of=/sdcard/boot.from_n4.img
$ adb pull /sdcard/boot.from_n4.img
And then replaced the kernel with abootimg:
$ cp boot.from_n4.img myboot.img
$ abootimg -i myboot.img
(is ok)
$ abootimg -u myboot.img -k ~/android/kernel/msm/arch/arm/boot/
And booted it:
$ adb boot myboot.img
To my astonishment, it didn't boot Android, but ClockworkMod Recovery. I must have grabbed the wrong partition with dd, I think. How do I get a nice boot.img from my phone, with the real Android OS and not CWM, that I can modify and fastboot?
I've looked around a bit but couldn't find an answer... (Or maybe I'm doing something completey wrong and my boot.img is fine?!) Thanks a lot!
Solved, its mmcblk0p6
OK, solved it myself by trial and error. The boot partition on a Nexus 4 is /dev/block/mmcblk0p6 . mmcblk0p7 is always the recovery partition, whether or not your using CWM recovery.

[HOWTO] Unlocking i9505G bootloader

This will Wipe every thing on the internal storage SO BACKUP your stuff on the SD card and maybe the onto computer too
This is for the Google edition of the Galaxy S4
Go To setting / about phone /
Tap "Build Number" 7 times
Go back to Main Settings Menu and under now shown "Developer Options" enable "USB debugging"
Download this
http://developer.android.com/sdk/index.html#download
extract to the C drive in the folder adb (you can move it anywhere just adjust the path)
run "SDK Manager.exe"
in the extras select "Google USB Drivers"
click "Install 1 package" and accept license / Install
now go into the device manager on you PC and change the "Samsung ADB driver" to the
"Android Composite ADB Interface" located in this folder
C:\adb\sdk\extras\google\usb_driver
you will have to force that driver to install by selecting it
let it finish installing the drivers
then
unplug and then plug in the USB on the phone
your phone will ask you about "Allow USB debugging?"
check the box "always allow from this computer"
click OK on your phone
If this doesn't work the some thing is wrong with the drivers and reinstall the drivers make sure you select "Android Composite ADB Interface" and not "Android ADB Interface"
Now open up a command prompt (I did this as "run as administrator")
type "cd C:\adb\sdk\platform-tools" (or what ever the directory you extract your files)
enter this command
adb reboot bootloader <enter>
Once in bootloader,
In the command prompt type:
fastboot oem unlock <enter>
It will ask you to unlock you phone and this may void you warranty
Use the volume buttons to change to yes and the power button as enter
At this point everything gets wiped on your phone
The phone rebooted back into bootloader and it now said "bootloader=unlocked" and the bottom left of the screen
Reboot the phone and the unlock icon will appear on the 1st Google screen.
the phone will boot into android like it was new
I have not done any ODIN on my phone so i don't know how this affect it
I am trying to avoid ODIN and get the phone rooted and have a custom recovery on it.
I just did this on my phone and typed this up i think everything is accurate let me know if i need to adjust anything.
fyi the command "fastboot flash recovery recovery.img" don't work because the system is still secure boot enable.
Thanks and Questions
Thanks. Could you please tell where you found this info?
Also, I'm not that experienced and don't understand why this is necessary. Don't our GT-i9505G phones come with unlocked boot loader?
bsam55 said:
Thanks. Could you please tell where you found this info?
Also, I'm not that experienced and don't understand why this is necessary. Don't our GT-i9505G phones come with unlocked boot loader?
Click to expand...
Click to collapse
It still needs to perform fastboot oem unlock just like nexus device does
Sent using GT-i9505~
This is what i did on my galaxy nexus device (nexus 3) and my friend nexus one
I made this from my notes of the old devices
my experience is that i could mess up my phone and lock me out of it it, so i wanted to be sure i could fix it, that is why i did this
I did not try to use fastboot beforehand, so it could work.
but i have a feeling that the ODIN flash changed the bootloader (probably not)
but i have been screwed buy a odin flash messing with the bootloader on the vibrant( but for some reason there looked to be 3 bootloader on that device)
if some one want to try it
just put the ClockworkMod 6.0.3.3 recovery file the
C:\adb\sdk\platform-tools
adb reboot bootloader
fastboot boot recovery.img
this dose take 1 minute after the file is sent to reboot and load
I have tried TWRP but it don't load past the first screen.
This just boots into the file and doesn't change anything
access to the sd cards don't work
I am tempted to flash ClockworkMod but i would like to pull a copy of the recovery first.
BTW after paying $700 for a phone i want to be sure to be able to reinstall the OS, like on a PC.
warwolfx0 said:
This is what i did on my galaxy nexus device (nexus 3) and my friend nexus one
I made this from my notes of the old devices
my experience is that i could mess up my phone and lock me out of it it, so i wanted to be sure i could fix it, that is why i did this
I did not try to use fastboot beforehand, so it could work.
but i have a feeling that the ODIN flash changed the bootloader (probably not)
but i have been screwed buy a odin flash messing with the bootloader on the vibrant( but for some reason there looked to be 3 bootloader on that device)
if some one want to try it
just put the ClockworkMod 6.0.3.3 recovery file the
C:\adb\sdk\platform-tools
adb reboot bootloader
fastboot boot recovery.img
this dose take 1 minute after the file is sent to reboot and load
I have tried TWRP but it don't load past the first screen.
This just boots into the file and doesn't change anything
access to the sd cards don't work
I am tempted to flash ClockworkMod but i would like to pull a copy of the recovery first.
BTW after paying $700 for a phone i want to be sure to be able to reinstall the OS, like on a PC.
Click to expand...
Click to collapse
Maybe you can do a full dump for the community.
before you install custom recovery, I'd like to ask if you could do complete system dump of your device, including stock recovery (recovery.img), stock bootloader (boot.img) and system.img . It would be a big help to the community. You can do it simple after rooting with for example Motochopper exploit (described here http://whatswithtech.com/how-to-root-samsung-galaxy-s4/ )
Then something like this:
Code:
for gaining root access type: su
then:
copy BOOT -> dd if=/dev/block/mmcblk0p20 of=/sdcard/boot.img bs=4096
copy HIDDEN -> dd if=/dev/block/mmcblk0p27 of=/sdcard/hidden.img bs=4096
copy PARAM -> dd if=/dev/block/mmcblk0p19 of=/sdcard/param.bin bs=4096
copy RECOVERY -> dd if=/dev/block/mmcblk0p21 of=/sdcard/recovery.img bs=4096
copy SYSTEM -> dd if=/dev/block/mmcblk0p16 of=/sdcard/system.img bs=4096
Thanks a lot!
System Dump
Plus One on the system dump. There are a lot of knowledgeable people waiting to help as soon as they have this. I don't know enough to do it and did try CWM (which doesn't work, by the way.)
Hope you are able to help. Thanks
bmbm said:
before you install custom recovery, I'd like to ask if you could do complete system dump of your device, including stock recovery (recovery.img), stock bootloader (boot.img) and system.img . It would be a big help to the community. You can do it simple after rooting with for example Motochopper exploit (described here http://whatswithtech.com/how-to-root-samsung-galaxy-s4/ )
Then something like this:
Code:
for gaining root access type: su
then:
copy BOOT -> dd if=/dev/block/mmcblk0p20 of=/sdcard/boot.img bs=4096
copy HIDDEN -> dd if=/dev/block/mmcblk0p27 of=/sdcard/hidden.img bs=4096
copy PARAM -> dd if=/dev/block/mmcblk0p19 of=/sdcard/param.bin bs=4096
copy RECOVERY -> dd if=/dev/block/mmcblk0p21 of=/sdcard/recovery.img bs=4096
copy SYSTEM -> dd if=/dev/block/mmcblk0p16 of=/sdcard/system.img bs=4096
Thanks a lot!
Click to expand...
Click to collapse
cool thank i was looking for that info
Just i couldn't get su to work in adb
I have been able to get Supersu (also tried superuser) on the phone but it complains about the su binaries (busybox in superuser) not being installed i have tried to install it using the market app (which said i am rooted) but i get no popup on the system.
i might try a wipe to see if that fixed it. (i did flash root to the system so it should still be there after a wipe)
first root, then system dump
unless someone knows how to do a system dump without root? or temp root solution.
I will look into the motochopper later today
you don't need "su" to work in adb shell, if you run "adb root" and "adb remount" with a modified adbd binary (inside CWM for example) you will have root access.
pls try out this root zip I just made, maybe it will work
warwolfx0 said:
QUOTE]
DELETed
Click to expand...
Click to collapse
I have root
Thanks broodplank1337
download the root that "broodplank1337" made
and put it in "C:\adb\sdk\platform-tools" (this is my adb.exe folder)
Download ClockworkMod 6.0.3.3 NORMAL from below
http://forum.xda-developers.com/showthread.php?t=2359132&highlight=recovery
aka Miustone_CWM_flash-NORMAL.zip
extract the recovery.img to the folder "C:\adb\sdk\platform-tools"
Now open up a command prompt (I did this as "run as administrator")
type "cd C:\adb\sdk\platform-tools" (or what ever the directory you extract your files)
enter this command
adb reboot bootloader <enter>
Once in bootloader,
In the command prompt type:
fastboot boot recovery.img (this takes 1min to load after the file is sent)
This will boot into ClockworkMod
goto "install zip"
goto "install zip from sideload"
in the cmd type
adb sideload root.zip
This sends to the phone and write to the phones Rom.
Now reboot and we have root without ODIN on a I9505G
BTW my file was missing busybox in the xbin i was playing around with "CWM-SuperSU.zip" as a base
It is kind of late so i may have missed some things in this write up.
Now off to the system dump.
I will repost this later as a new post to keep this clean.
ok i had some issues with viewing the files on the phone
i moved them to the sdcard and then pulled them off the card on my pc using a "sd to usb"
dd if=/dev/block/mmcblk0p20 of=/storage/extSdCard/dump/boot.img bs=4096
dd if=/dev/block/mmcblk0p27 of=/storage/extSdCard/dump/hidden.img bs=4096
dd if=/dev/block/mmcblk0p19 of=/storage/extSdCard/dump/param.bin bs=4096
dd if=/dev/block/mmcblk0p21 of=/storage/extSdCard/dump/recovery.img bs=4096
dd if=/dev/block/mmcblk0p16 of=/storage/extSdCard/dump/system.img bs=4096
Is there any other mmcblk0p i should backup
and is there any issues with posting this info on this forum
so far this only has root
i did notice that clockworkmod did give me access to root but i couldn't find the sd card while fastbooting it.
I don't think that the whole bootloader is part of what i backup, I thought there was a sbl.bin that i need too.
warwolfx0 said:
ok i had some issues with viewing the files on the phone
i moved them to the sdcard and then pulled them off the card on my pc using a "sd to usb"
dd if=/dev/block/mmcblk0p20 of=/storage/extSdCard/dump/boot.img bs=4096
dd if=/dev/block/mmcblk0p27 of=/storage/extSdCard/dump/hidden.img bs=4096
dd if=/dev/block/mmcblk0p19 of=/storage/extSdCard/dump/param.bin bs=4096
dd if=/dev/block/mmcblk0p21 of=/storage/extSdCard/dump/recovery.img bs=4096
dd if=/dev/block/mmcblk0p16 of=/storage/extSdCard/dump/system.img bs=4096
Is there any other mmcblk0p i should backup
and is there any issues with posting this info on this forum
so far this only has root
i did notice that clockworkmod did give me access to root but i couldn't find the sd card while fastbooting it.
I don't think that the whole bootloader is part of what i backup, I thought there was a sbl.bin that i need too.
Click to expand...
Click to collapse
can you please upload your system dump , thank you mate
warwolfx0 said:
Thanks broodplank1337
download the root that "broodplank1337" made
and put it in "C:\adb\sdk\platform-tools" (this is my adb.exe folder)
Download ClockworkMod 6.0.3.3 NORMAL from below
http://forum.xda-developers.com/showthread.php?t=2359132&highlight=recovery
aka Miustone_CWM_flash-NORMAL.zip
extract the recovery.img to the folder "C:\adb\sdk\platform-tools"
Now open up a command prompt (I did this as "run as administrator")
type "cd C:\adb\sdk\platform-tools" (or what ever the directory you extract your files)
enter this command
adb reboot bootloader <enter>
Once in bootloader,
In the command prompt type:
fastboot boot recovery.img (this takes 1min to load after the file is sent)
This will boot into ClockworkMod
goto "install zip"
goto "install zip from sideload"
in the cmd type
adb sideload root.zip
This sends to the phone and write to the phones Rom.
Now reboot and we have root without ODIN on a I9505G
BTW my file was missing busybox in the xbin i was playing around with "CWM-SuperSU.zip" as a base
It is kind of late so i may have missed some things in this write up.
Now off to the system dump.
I will repost this later as a new post to keep this clean.
Click to expand...
Click to collapse
I maybe wrong in this, but I have played with fastboot on my ex HTC device. the proper command to flash recovery is
Code:
fastboot flash recovery recovery.img
the proper command to flash kernel is
Code:
fastboot flash boot boot.img
with
Code:
fastboot boot recovery.img
, the recovery isn't permanent. it will be only be there for the current session. after rebooting, the stock recovery will overwrite the custom recovery. the same goes to kernel.
Sent from my GT-I9505 using Tapatalk 2
warwolfx0 said:
ok i had some issues with viewing the files on the phone
i moved them to the sdcard and then pulled them off the card on my pc using a "sd to usb"
dd if=/dev/block/mmcblk0p20 of=/storage/extSdCard/dump/boot.img bs=4096
dd if=/dev/block/mmcblk0p27 of=/storage/extSdCard/dump/hidden.img bs=4096
dd if=/dev/block/mmcblk0p19 of=/storage/extSdCard/dump/param.bin bs=4096
dd if=/dev/block/mmcblk0p21 of=/storage/extSdCard/dump/recovery.img bs=4096
dd if=/dev/block/mmcblk0p16 of=/storage/extSdCard/dump/system.img bs=4096
Is there any other mmcblk0p i should backup
and is there any issues with posting this info on this forum
so far this only has root
i did notice that clockworkmod did give me access to root but i couldn't find the sd card while fastbooting it.
I don't think that the whole bootloader is part of what i backup, I thought there was a sbl.bin that i need too.
Click to expand...
Click to collapse
NONE of this would pull anything of relation from the I9505G (except System - mmcblk0p16) as our partitions layout is completely different. And more so, it would softbrick your 9505 if you tried flashing.
Check out here - http://forum.xda-developers.com/showthread.php?t=2360346 - for a system dump from the i9505G. It has SYSTEM/BOOT/RECOVERY. Param and Hidden are both empty on our phones. This has already been used a couple times to cook roms for other S4 devices.
donovanbrock said:
NONE of this would pull anything of relation from the I9505G (except System - mmcblk0p16) as our partitions layout is completely different. And more so, it would softbrick your 9505 if you tried flashing.
Check out here - http://forum.xda-developers.com/showthread.php?t=2360346 - for a system dump from the i9505G. It has SYSTEM/BOOT/RECOVERY. Param and Hidden are both empty on our phones. This has already been used a couple times to cook roms for other S4 devices.
Click to expand...
Click to collapse
Since my backup might mess people up i am not going to post it.
but as a backup i will make a full backup of all the mmcblk0pxx file
dd if=/dev/block/mmcblk0pxx of=/storage/extSdCard/dump/mmcblk0pxx.img bs=4096
i think there is like 20 files
Those with a real I9505G google edition samsung, do u have an option in settings to always have the lightkeys light up when screen is on? The menu and the back key, that light up.
hmmm followed step bye step but phones boot loader is still locked
i do have Super User access tho
edit: fail on my part. everything worked smoothly! thanks man!
Hello. Please help me. Can I flash stock ROM GT-I9005 on my Google Edition phone GT-I9005G? Thank for answer
SnegovikRZN said:
Hello. Please help me. Can I flash stock ROM GT-I9005 on my Google Edition phone GT-I9005G? Thank for answer
Click to expand...
Click to collapse
no

Returning to stock, where can I find the stock image?

I need to warranty a phone but I need to turn it back to stock. I am using an older version of TWRP, I am guessing here but do I just download the factory image and flash it and I am done? It seems like everything I get when searching is geared towards the Pixel XL and using ADB rather than TWRP.
Thanks in advance.
Beacuse I part time as an internet troll, I have to chastise you for not reading threw this forum, because well that's why it's there, but hey we all can't use our Brian's all the time, but yes download the factory image for your phone Marlin for Pixel XL and Sailfish for Pixel unzip the file, make sure you have lastest usb drivers installed and click the flash all.bat.
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
jerryhou85 said:
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
Click to expand...
Click to collapse
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I'm not a good developer so I cannot answer you that question, but on Google official page, it is recommended to use fastboot or adb to flash factory images...
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
Because recovery and boot are sort of intermingled now. You would be writing over twrp at the same time you are trying to use it to flash.
Use the flashall bat file. If you want to save data edit out the -w from the bat file.
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I am on linux let me just get that out of the way.
So I used adb to fastboot the factory image but nothing happens
the file is in downloads and in the fastboot file. So I type cd Downloads, cd fastboot, fastboot sailfish-nmf260 it all looks good and you can tell adm is working but nothing happens on the phone.
I am current only able to get the phone into fastboot mode I dont know what I messed up but I can no longer even boot into TWRP.
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
twilk73 said:
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
Click to expand...
Click to collapse
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
robocuff said:
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
Click to expand...
Click to collapse
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
Click to expand...
Click to collapse
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
twilk73 said:
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
Click to expand...
Click to collapse
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Sgace said:
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Click to expand...
Click to collapse
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
I don't think you can flash it with fastboot. In Windows, at the command prompt, you just type flash-all.bat and the batch file will run. It contains all the necessary fastboot commands. Perhaps that's where you're going wrong. Try just typing flash-all.sh. Leave the fastboot out.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
piperx said:
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
Click to expand...
Click to collapse
Sorry I wish I could try this. I had access to a windows computer at work and I was able to get everything done. After doing it at work I have a feeling I wasnt placing the files in the correct folder together to get it to start the update. It can be hard doing this on something other than windows for a dummy like me because most of the tutorials for things like this seem to be windows oriented. Regardless its done. I couldnt lock the boot loader on the windows computer though oddly but no big deal because I can do it on my laptop.
Thanks for all the help guys.

How to extract recovery.img from the ASUS firmware? [7.0/8.0] [ZE552KL/ZE520KL]

Hello guys, some time ago this device had more support from developers, someone could extract the recovery.img in order to keep it updated.
I wonder if anyone would know what the procedure is for extracting.
My device is the ZE552KL (Z012D).
I followed the steps in this tutorial, however, I did not succeed: https://tinyurl.com/yd3w4pxa
I followed all the steps and tried to extract recovery.img from the Zenfone 3 ZE552KL (Z012D) Asus firmware, however, there was a problem after applying the applypatch directive.
Error: patch boot.img: Only patches to EMMC targets are supported.
And I can not solve it.
install-recovery.sh (original extraction): https://hastebin.com/lupoqovila.bash
install-recovery.sh (change): https://hastebin.com/ofuqofezat.bash
Apllypatch directive used at the prompt: applypatch -b recovery-resource.dat boot.img recovery.img 28e9d4088f51c9dafb9189eb15f061c78be55a57 18791676 4a9f7c48e01aed3a46ac8d06618239dff9834caf: recovery-from-boot.p
Error:
https://imgur.com/a/JWfyr
I also asked for help at Zentalk, but so far no one has spoken.
https://www.asus.com/zentalk/tw/thread-147621-2-1.html
Please, I'll be grateful if anyone can help.
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
wang1chung said:
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
Click to expand...
Click to collapse
Thanks for taking note of my question, but what I really need to know is about recovery stock. It would not be logical for my use to perform custom recovery extraction, since it is already found in the .img format from the developer's available links (TWRP).
Following the tutorial steps of the links I indicated it is possible to make a kind of compilation using the official OTA file, processing on the device itself to generate the file recovery.img stock.
Again thank you for trying to help, any and all help is very welcome.
+1
Can someone post here stock recovery.img for ze520kl newest oreo firmware?
I'd like to know how to do this as well. I went through a lot of trouble to get Oreo installed after rooting and installing TWRP on my phone running Nougat, ended up having to go back to stock and install updates incrementally. As you noted, root is required to save the stock recovery.img, but since my device is not rooted now I can't root without installing TWRP first. That would put me in the same situation as the OP. The google translate of the link posted by the OP is a bit hard to understand, can someone else give an english explanation of how to extract recovery.img from firmware zip?
TIA
Update: I managed to follow the instructions in the OP's link, ended up with a similar applypatch command as he did and also encountered the same error with running the command over adb. I'm not sure if those instructions are for all asus devices, the one in the link is Asus P028 (Zenpad 10)
applypatch -b recovery-resource.dat boot.img recovery.img f448eeec56d4d87173858cd7aec25c36a7dfaaa7 18736380 9ebabd3eb6a59cfcaf0f4f048e2d8d6d870d7924:recovery-from-boot.p
ktl20 said:
Can someone post here stock recovery.img for ze520kl newest oreo firmware?
Click to expand...
Click to collapse
Here
Error
I keep getting
/sbin/sh: f448eeec56d4d87173858cd7aec25c36a7dfaaa7: not found
whenever i go through this. what am i doing wrong? T_T
wang1chung said:
The recovery partition is #59, therefore to back it up you can use terminal emulator and type;
Su
dd if=/dev/block/mmcblk0p59 of=/sdcard/recovery.img
To flash, go to fastboot and type
Fastboot flash recovery recovery.img
Fastboot reboot
You need root for all this. You can convert the recovery image to be flashable via recovery but it only works with twrp, not stock.
Click to expand...
Click to collapse
when I type su and enter, on adb shell show error "/system/bin/sh: su: not found". my device is unrooted. I did this for boot and recovery backup before rooting. I'm using Zenfone x00rd (Live L1)

Categories

Resources