[Q] Flash update.zip with fastboot or adb - Android Q&A, Help & Troubleshooting

I'm trying to flash something a update.zip package that contains su and busybox programs, and I know what you think, I'm rooting a device.
I've googled and there's the adb shell and fastboot programs that can help me but, how can flash it by commands?
Copy pasting the updater-script commands and the busybox installer too?
Please help me out! D:

Install su by using "fastboot flash update.zip" without recovery ROM (CWM or TWRP)?
Similar for me.
I'd like to install su and busybox as well on my Lenovo A8 (A5500-F, A8-50) tablet with Android KitKat (4.4.2).
However there's no CWM or TWRP for my device and I read other tools do not work.
But can I install a file called "update.zip", containing su, superuser and busybox (and installation script) using fastboot?
Like: "fastboot flash update.zip" ?
Using a file like this one:
http://forum.xda-developers.com/xperia-u/general/cwm-universal-busybox-su-flashable-zip-t1903752
Any ideas if this should work?
Rogier

No, that definitely wouldn't work. You have to have the bootloader unlocked and most likely if that was possible then there would already be a custom recovery for it...

Related

How to flash_image Amon RA's recovery

i have had problems with Rom manager not flashing recovery correct leaving me with no recovery. so i had to manually flash recovery following these steps exact. I have personally bricked 2 ERIS phones lucky me.The first i thoought it was just something i did, lucky i had another to replace it...(the second BRICK eris).
So here is a solution to keep from having a BRICK
USE Amon RA's Recovery PERIOD.
credit to northmendo @droidforums
1. download flash_image Here Updated Link 3/17/10
2. Open the terminal and copy and paste the following commands.
adb shell [hit enter]
su [hit enter]
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system [hit enter]
3. In a new terminal window (don't close the original one).
adb push flash_image /system/bin [hit enter]
exit [hit enter]
4. Now in the original terminal window
chmod 755 /system/bin/flash_image [hit enter]
5. Now exit all termainl windows and reboot your phone.
6. Download
Amon_RA's recovery Here.
7. Mount your phones sd card and drop recovery-RA-eris-v1.6.2.img on to it and eject
your phone.
8. Open the Terminal and copy and paste the following commands with the phone connected
to your computer.
8. adb shell [hit enter]
9. su [hit enter]
10. flash_image recovery /sdcard/recovery-RA-eris-v1.6.2.img
11. To get into recovery turn off you phone and hold the Volume Up + Power until it boots into recovery.
That's it.
ROM Manager and Clockwork recovery does not work for the Eris.
ROM Manager and Clockwork recovery does not work for the Eris (as far as I know).
Edit: Oops, sorry for the double post.
I currently have the clockwork recovery installed on my eris, can I just download amon's recovery image and install it to switch to it? Or do I have to uninstall clockwork recovery and then install amon's?
trishuhh said:
I currently have the clockwork recovery installed on my eris, can I just download amon's recovery image and install it to switch to it? Or do I have to uninstall clockwork recovery and then install amon's?
Click to expand...
Click to collapse
try to flash it from rom manager,(under other recoveries) if Rom manager has worked for you with no problems. if it doesnt work follow instructions as listed in 1st post
I wouldn't use clockwork recovery, it messed up my installation to the point i couldn't flash any rom or restore any nand. When i would try to flash anything it would fail, It failed when i tried to use the root rom....After I tried flashing root rom i had a nice looking brick on my desk....(I even changed back to RA but Clockwork had messed up my phone so bad that RA didn't even work either....
YOU HAVE BEEN WARNED!!!!!
Yeah, use Amon's. It does every job you need, and is 100% stable and reliable.
t2noob said:
I wouldn't use clockwork recovery, it messed up my installation to the point i couldn't flash any rom or restore any nand. When i would try to flash anything it would fail, It failed when i tried to use the root rom....After I tried flashing root rom i had a nice looking brick on my desk....(I even changed back to RA but Clockwork had messed up my phone so bad that RA didn't even work either....
YOU HAVE BEEN WARNED!!!!!
Click to expand...
Click to collapse
yea you beat me too it, , i only used it because i had it for my DROID and thought maybe devs would try to add it to the list on rom manager.
ok, obviously a bit of an amateur here, how do you know which recovery image you have, i installed amon's, but i'm not sure if clockwork made it to my phone somehow, thinking about unrooting soon, that's why i ask, thanks.
jrhoades858 said:
ok, obviously a bit of an amateur here, how do you know which recovery image you have, i installed amon's, but i'm not sure if clockwork made it to my phone somehow, thinking about unrooting soon, that's why i ask, thanks.
Click to expand...
Click to collapse
reboot into recovery and read the bottom
Ok Please help a newbie out here im losing my mind. I downloaded flash, plugged phone into mac and set phone to debugging and mounted. Opened terminal from utilities on Mac. When I enter adb shell it says "command not found" if I try using ./ before adb as suggested on another forum for macs when i enter su it asks for password? Any how please help a brother out. Thanks
I flashed amons ras recovery from my phone it was easier for me I didn't use rom manger or terminal emulater
Sent from my FroyoEris using XDA App
Can someone help me get rid of clockwork recovery it showed up after I flashed a rom. How do you flash Amons recovery?
tkryan said:
Can someone help me get rid of clockwork recovery it showed up after I flashed a rom. How do you flash Amons recovery?
Click to expand...
Click to collapse
You do exactly what the first post says
Sent from my Eris
ufccowboyfan said:
Ok Please help a newbie out here im losing my mind. I downloaded flash, plugged phone into mac and set phone to debugging and mounted. Opened terminal from utilities on Mac. When I enter adb shell it says "command not found" if I try using ./ before adb as suggested on another forum for macs when i enter su it asks for password? Any how please help a brother out. Thanks
Click to expand...
Click to collapse
When you are doing this, are you in the correct directory? For example, my SDK is installed in /android , so first I would:
cd /android/tools
then
./adb shell
could someone help me with this. i really need to get the stock recovery image on my eris and im alittle noobie at this stuff. if any one could help id be sooooo happy
I'm not sure how to flash amons on a mac. I know for windows you put the recovery.img in the sdk tools folder, boot into fastboot and type
Fastboot flash recovery recovery.img
To get stock recovery (I assume you want your phone back to stock) then flash the official ruu. Will return your phone to 100% stock. You can find it on a sticky in the Eris general forums I believe.
Sent from my Eris using XDA App
I'm not sure on a mac, but on Windows you put the img in the tools folder of your sdk, boot into fastboot and type in adb:
Fastboot flash recovery recovery.img
To get stock recovery back, simply flash the official ruu found on a sticky in the Eris general forums I believe. Flashing the ruu will unroot your phone.
Sent from my Eris using XDA App
I installed Amon Ra as part of the root for leakers instructions some time ago. -- Is there a new version out? (Search was surprisingly not helpful) And what is the best way to update recovery?
Slugdoc said:
I installed Amon Ra as part of the root for leakers instructions some time ago. -- Is there a new version out? (Search was surprisingly not helpful) And what is the best way to update recovery?
Click to expand...
Click to collapse
There is no new version out; the first version (v1.6.2) is the only one that Amon_RA published.
IF there was a new version, you could flash it by using adb with the existing Amon_RA. You don't even need to push a version of "flash_image" to the phone, because it is already in /sbin in Amon_RA recovery. Just get the recovery image to your SD card, start an interactive shell (adb shell), and then
flash_image recovery /sdcard/<wherever-you-put-it>/recovery-RA-eris-v1.6.2.img
Yes, you can "flash a recovery partition by using the recovery" - because when you are interacting with it (the recovery boot), it lives entirely in a ramdisk.
The second easiest way is to have the engineering bootloader (1.49.2000 S-OFF) installed on your phone, and flash it with fastboot from the PC, as in
fastboot flash recovery recovery-RA-eris-v1.6.2.img
Note that neither of these two methods perform any integrity checks on the recovery image file that the normal "Flash .zip from sdcard" ROM installation method does. Therefore, it is imperative that someone using these methods is extremely diligent in cross-checking image MD5 signatures after it has been transferred to the SD card. Amon_RA also has the "md5sum" utility built into it's shell, BTW.
I mention this last point as a warning to newbs - they seem to routinely corrupt files when they transfer them to the SD card. (I suppose they are not using the "safely remove hardware" controls correctly, or they are getting truncated downloads).
bftb0

Adb help please

ok guys this is not my first rodeo. I have hacked all my prior phones but I need some assistance here...
I have unlocked my bootloader, rooted and installed CWM. Now I am trying to install a system writable Kernel and modules so I can install a Rom. I am having a problem getting ADB to see my phone. When I do adb devices it comes up blank and will not push the modules to my phone. I have re-installed the HTC manager driver files and restarted my PC. Windows 7 64 bit.
Can someone give me some ideas on how to get adb to see my phone?
Also can someone give me some specific instructions with adb commands to install the kernel and modules and what exactly I need to have in my adb folder??
Any help is appreciated...
Memnoch73 said:
ok guys this is not my first rodeo. I have hacked all my prior phones but I need some assistance here...
I have unlocked my bootloader, rooted and installed CWM. Now I am trying to install a system writable Kernel and modules so I can install a Rom. I am having a problem getting ADB to see my phone. When I do adb devices it comes up blank and will not push the modules to my phone. I have re-installed the HTC manager driver files and restarted my PC. Windows 7 64 bit.
Can someone give me some ideas on how to get adb to see my phone?
Also can someone give me some specific instructions with adb commands to install the kernel and modules and what exactly I need to have in my adb folder??
Any help is appreciated...
Click to expand...
Click to collapse
As far as getting your phone to be recognized, try installing HTC Sync and then immediately uninstalling it, I have seen this fix many people's driver issues.
This is how I usually flash my kernels: Assuming you have fastboot in the same folder as adb, put the boot.img and the modules.zip in that same folder. Boot into recovery. In recovery do:
adb push modules.zip /sdcard/whatever (whatever folder you keep your flashables in)
Then hit install in recovery, find the file you just pushed and flash it. Then do:
adb reboot bootloader
Then while you are in bootloader (Should say "fastboot usb" in red) do this:
fastboot flash boot boot.img (replace boot.img if your file is named differently)
You should see it flash the file, and finally do:
fastboot reboot
Thanks man. I think I have it now. When I did fastboot devices it showed my phone. Also I was confused about the modules after more reading I just put them on my sd card and flashed them in recovery.
I have the stock system writable kernel installed and modules flashed. All looks good. Booted up and its says dsb's kernel in my about phone.
I think I'm off to flash a rom now.
Thanks

[Q] Dead Android : Multi-CSC

Hi,
I have a Samsung Galaxy S III (GT-19300 Intl), with Android 4.1.2. I recently rooted it and now I get this message with a 'dead Android' when I go into recovery:
# MANUAL MODE #
-- Applying Multi-CSC ...
Applied the CSC-code:BTU
Successfully applied multi-CSC.
Firstly, the device works fine, no problems. It's just when I go into recovery that I get this.
From a bit of research I understand the CSC is the country code. BTU = United Kingdom, where I live. My Android 'Build number' is I19300XXEMG4. XX I believe is the CSC, and so that no longer matches the built-in CSC, is that correct? Which, as a result, won't allow me to update the software... which is fine as I plan to flash a ROM update (no idea which yet)... but I'm new to this so I just wanted to check with you guys whether or not I need to do something about this before proceeding with a flash?
Many thanks.
Its normal. But you should flash a custom recovery like clockworkmod or TWRP before flash ROMs.
1) Download correct Clockworkmod (touch or regular as you wish) for your device from http://www.clockworkmod.com/rommanager
2) Place it at the root of your sdcard and rename it recovery.IMG
3) Download and install terminal emulator from the play store : https://play.google.com/store/apps/d...roidterm&hl=en
4) Run the terminal and
type: su (press enter)
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18 (press enter)
Don't mess up the command or you WILL brick your phone.
And you can now flash ROMs using a custom recovery
ipromeh said:
Its normal. But you should flash a custom recovery like clockworkmod or TWRP before flash ROMs.
1) Download correct Clockworkmod (touch or regular as you wish) for your device from http://www.clockworkmod.com/rommanager
2) Place it at the root of your sdcard and rename it recovery.IMG
3) Download and install terminal emulator from the play store : https://play.google.com/store/apps/d...roidterm&hl=en
4) Run the terminal and
type: su (press enter)
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18 (press enter)
Don't mess up the command or you WILL brick your phone.
And you can now flash ROMs using a custom recovery
Click to expand...
Click to collapse
Thanks. How about Recovery Tools or ROM Manager apps that do this automatically. Would you recommend I do that?
ChrisLozeau said:
Thanks. How about Recovery Tools or ROM Manager apps that do this automatically. Would you recommend I do that?
Click to expand...
Click to collapse
hmm.. I think there's recovery or kernel flash tool on playstore. But I'm not sure which as I don't own a s3, you can just follow the instruction properly by downloading the .img, flash it using terminal emulator and you're done
ipromeh said:
hmm.. I think there's recovery or kernel flash tool on playstore. But I'm not sure which as I don't own a s3, you can just follow the instruction properly by downloading the .img, flash it using terminal emulator and you're done
Click to expand...
Click to collapse
I used the Recovery Tools to flash CWM recovery. The S III also resets the recovery to default recovery upon restart, and the app had an option to ensure that doesn't happen. Easy as pie.
I then (for the first time) installed a ROM (S4 Revolution) using the recovery, and that was easy too.
Thanks.

How to use ramdisk extraction utility to flash TWRP

Hey guys,
I consider myself pretty switched on but I can't understand how exactly the " ramdisk extraction utility" is used to flash TWRP.
Correct me if I'm wrong but it is used to unpack a boot.img file into separate files, one of which is the recovery. It then repacks it and allows it to be flashed via "fastest flash boot boot.img"
Ive found tools that repack boot.img files but all appear to be for Linux.
Can someone assist me by guiding me to a tutorial or offer step by step instructions on flashing TWRP onto my z2?
Basically all I want to do is understand how to flash any recovery I want when running a custom rom.
P. S - can someone explain the concept of why it dosnt work when I try to install TWRP as described in their website with
*terminal emulator or in adb shell:
su
dd if=/sdcard/fotakernel.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
Thank you.
Nothing guys?
Im not sure how to help you
1. Install fastboot
2. Use fastboot to flash recovery
Fastboot flash recovery recovery.img
3. You need a custom kernel
4. Find a kernel that supports fotakernel(recovery partition fyi)

Stock Rom Backup before rooting

Hi there everyone, i want to know, how can i take a backup of stock rom of my device.
Do i need to root my device before taking a backup? If not then is there any other way to take backup of Stock Rom (i.e boot.img etc) with the help of PC (here Ubuntu Linux in my case) via using ADB, Fastboot and not using custom recoveries like TWRP, Orange Fox, SHRP.
Also do i have to root my device before installing any custom recovery in it?
I am very sorry for any inconveniences, as i am a newbie please accept my apologies.
as already mentioned in other thread one can't do anything on locked bootloader, therefore backup is impossible
https://forum.xda-developers.com/t/a-question-from-a-newbie.4407343
akram0010 said:
Hi there everyone, i want to know, how can i take a backup of stock rom of my device.
Do i need to root my device before taking a backup? If not then is there any other way to take backup of Stock Rom (i.e boot.img etc) with the help of PC (here Ubuntu Linux in my case) via using ADB, Fastboot and not using custom recoveries like TWRP, Orange Fox, SHRP.
Also do i have to root my device before installing any custom recovery in it?
I am very sorry for any inconveniences, as i am a newbie please accept my apologies.
Click to expand...
Click to collapse
Assuming that the bootloader is unlocked.
aIecxs said:
as already mentioned in other thread one can't do anything on locked bootloader, therefore backup is impossible
https://forum.xda-developers.com/t/a-question-from-a-newbie.4407343
Click to expand...
Click to collapse
Sorry i forgot to mention, but still unlocking bootloader doesn't root device.
I think the question is still valid
if your bootloader is unlocked just boot into TWRP and create backup, no root required
Code:
fastboot boot recovery.img
edit: or just download MIUI according to your current properties
Code:
adb shell getprop ro.build.fingerprint
the only other method would be MTK secure boot authentification exploit
https://github.com/francescotescari/XiaoMiToolV2
https://github.com/bkerler/mtkclient
https://forum.xda-developers.com/t/mod-dev-mediatek-mtk-auth-bypass-sla-daa-utility.4232377
aIecxs said:
if your bootloader is unlocked just boot into TWRP and create backup, no root required
Code:
fastboot boot recovery.img
edit: or just download MIUI according to your current properties
Code:
adb shell getprop ro.build.fingerprint
the only other method would be MTK secure boot authentification exploit
https://github.com/francescotescari/XiaoMiToolV2
https://github.com/bkerler/mtkclient
https://forum.xda-developers.com/t/mod-dev-mediatek-mtk-auth-bypass-sla-daa-utility.4232377
Click to expand...
Click to collapse
Is root needed
aIecxs said:
if your bootloader is unlocked just boot into TWRP and create backup, no root required
Code:
fastboot boot recovery.img
edit: or just download MIUI according to your current properties
Code:
adb shell getprop ro.build.fingerprint
the only other method would be MTK secure boot authentification exploit
https://github.com/francescotescari/XiaoMiToolV2
https://github.com/bkerler/mtkclient
https://forum.xda-developers.com/t/mod-dev-mediatek-mtk-auth-bypass-sla-daa-utility.4232377
Click to expand...
Click to collapse
Can you please tell me what is this recovery.img, and where would i get it (in Fastboot rom or recovery rom).
As i said earlier i am a newbie in this field and very much confused with these terms.
no root required click on the first link above and download TWRP for your device (TWRP-3.4.2.b_lancelot.zip)
I assume you are running windows?
extract zip file and place recovery.img on your PC in platform-tools directory. connect phone in fastboot mode, install android_winusb.inf "Android Bootloader Interface" drivers and from cmd.exe check fastboot devices
if you can see device serialno you are ready to boot TWRP from fastboot with above first command.
for linux just install android-tools-fastboot
As i am using Ubuntu i installed ADB, FASTBOOT using the APT :
Code:
sudo apt install android-tools-adb android-tools-fastboot
.
Therefore i don't have the platform-tools directory.
Also I am unable to quote reply, its showing error (Oops, we broke the Matrix, someone call Neo)
yes that's right. it doesn't matter which directory files are placed. that way you installed fastboot binary is already in PATH. linux is far more easier and doesn't require additional drivers. it might require additional udev rules to make fastboot work, but you can simply by-pass with sudo fastboot for now...

Categories

Resources