[suggestion] ADB+Fastboot module - Magisk

One day, I stumbled upon a Fastboot binary for Android. I tried it out, and my terminal actually let me type in "fastboot devices", resulting in an error due to an outdated binary.
If someone could make an OTA-resistant ADB+fastboot module for Magisk, that would be awesome. It'd be great to be able to use those advanced tools from within Android (on another phone, using OTG), without needing a windows laptop nearby for the command.

I believe there's one here (I have not tried it myself):
https://forum.xda-developers.com/showthread.php?t=2239421

Related

Free Screenshots using Dalvik - not rec my phone?

I tried to follow the steps from androidandme to set up my phone for screen shots. I got java, got the android sdk and unzipped everything (nothing was installed?), changed the path under advanced settings, dowloaded eclipse (why not) and all that jazz - full 9 yards.
However, when I run ddms.bat in the tools folder and Dalvik comes up it never recognizes my phone. I have tried with the g1 mounted, unmounted, usb debugging on/off (which I also do not know what this means).
Anyone have any thoughts? I did not get any prompts about drivers and I am mounted to my computer.
Read the guides on how to install ADB.
for some reason when i ever i use ddms to take screen shots, i can't just go to take a screenshot, i have to run a logcat first, it will bring up a popup that says "failed!" i then close that and it runs a logcat, after i do that, then i can use it to take a screen shot.
^^ not sure how that matters but I double clicked the adb.exe file, a dos prompt ran a lot of info and disappeared. Also, your signature has a link to SDK 1.5, not 1.6?
Tried DDMS again with no luck.
^ I tried to do a logcat, failed, SS with no luck... again though, the issue is that my phone is not being identified - it would make sense that it would not work if it doesnt even know my phone is hooked up.
Perhaps I will sleep on it as work is in a few hours. I would appreciate any help I can get.
s15274n said:
^^ not sure how that matters but I double clicked the adb.exe file, a dos prompt ran a lot of info and disappeared. Also, your signature has a link to SDK 1.5, not 1.6?
Tried DDMS again with no luck.
^ I tried to do a logcat, failed, SS with no luck... again though, the issue is that my phone is not being identified - it would make sense that it would not work if it doesnt even know my phone is hooked up.
Perhaps I will sleep on it as work is in a few hours. I would appreciate any help I can get.
Click to expand...
Click to collapse
Sorry if this is not relevant, but I had a ton of trouble until I had the newest jave runtime installed. I never had trouble, got a new laptop at work and had no clue why it would not run. the newest JRE fixed it right up. Maybe not your problem but...
Also I like the program "droid explorer". It has screenshot built in.
EDIT.
I have one more thought...I (always have one more thought) try starting your phone in fastboot (camera and power) then back button when the skaters come up) and see if it asks for drivers then.
s15274n said:
^^ not sure how that matters but I double clicked the adb.exe file, a dos prompt ran a lot of info and disappeared. Also, your signature has a link to SDK 1.5, not 1.6?
Tried DDMS again with no luck.
^ I tried to do a logcat, failed, SS with no luck... again though, the issue is that my phone is not being identified - it would make sense that it would not work if it doesnt even know my phone is hooked up.
Perhaps I will sleep on it as work is in a few hours. I would appreciate any help I can get.
Click to expand...
Click to collapse
adb.exe is a command line application, it doesn't have a GUI. To use an command line app you have to 'cd' to the directory where it's located and enter valid commands. I think you can type 'adb help' for a full list of commands.
Try reinstalling the drivers, it took me a few tries to get it working right on Vista (interestingly no drivers are needed for OS X )
Let me start very basic. Is there any "installing" of the SPK? Or, do I just extract the files? I extracted them and created a directory in PATH like the site said to do.
If there is no installation... are you saying for me to get in dos and just start keying commands, and not using any of the files from the zip?
There is no installation, but EVERYTHING for the sdk is ran in command prompt. Meaning click start, click run, type in cmd, then type cd path/to/your/toolsfolder/ then type adb remount see if it does, if not you NEED TO FOLLOW THE ADB INSTRUCTIONS FOR INSTALLING DRIVERS.

[Q] trouble installing Amon_Ra's recovery image

I've ran a search and wasn't able to find anything that specifically outlined my issue.
to preface, I have a t-mobile Nexus One, and my PC is running Windows 7 64-bit.
I'm running into a bunch of trouble trying to root my Nexus One and add Cyanogen's latest ROM. My first problem was trying to get Android SDK setup to use adb. the instructions on adding the path were unclear (still unsure if I did that right), and then I couldnt get my device to show up becuase the drivers wouldnt install. I used this link http://forum.xda-developers.com/showthread.php?t=613217 (the adb devices command now worked fine at this point) and that installed the drivers and I was able to successfully unlock the bootloader.
Now, i've downloaded Amon_Ra's recovery image, changed the file name and placed it on the root of my SD card. Phone is in debug mode, rebooted to the bootloader, and did the "fastboot flash recovery recovery.img" command, but i get 'error: cannot load 'recovery.img' "
as a test, i used the adb devices command again, and it does not work. to test if it was a drivers issue, I used the same process as the link above. this time the Nexus One does not show, but i DO see Android Phone > Android Composite ADB Interface.
in "Eviroment Variables" in "Path" I have added "tools/C:\android-sdk-windows\tools" and (from a different link I have seen) i added a Custom User Variable called adb with the variable value "C:\android-sdk-windows\tools"
So.. what am I doing wrong? Is there something I may have missed?
Recovery
If you type in the "adb devices" command and see your device listed, you have set up your SDK properly.
I usually put the recovery.img on my computer where its easy to find. Once youre in bootloader try the command "fastboot devices" and once again make sure your device is shown. Then "fastboot flash recovery C:\Wherever\recovery.img"
so THATS probably what I was doing wrong. I would type in literally "fastboot flash recovery recovery.img" (cause hey, thats what it said to type!). I ended up using the "easy" clockwork method, and used his recovery image instead. had a few more hiccups, but about 5 hours later, I'm all rooted and running CM6.
thanks!

[Q] HELP... Problem with ADB in C# Program.

ok, so i wrote a program in C# that will open a process CMD.exe and send adb Commands from a Working directory i setup previously that includes Adb and all the other goodies i need for automating the process of rooting and such.
here's my issue, the program will work perfectly in Win 7, but when i run in XP,
i run ADB shell reboot. the phone will reboot. but never reconnect until i end the my program process. ive tried adb kill-server. tried closing the process within my program. i do notice in XP adb will open two adb.exe processes. even when running outside of my program in the command prompt.
i am using a backgroundworker thread to send the commands.
any help is appreciated.
let me know if you want me to post some code. though i don't think its the programming.
Don't think its the programming either. XP has all sorts of weird bugs and why I jumped ship immediately when 7 came out and have been quite happy since. Don't know much about programming but I've read alot of issues with XP and adb. Stick with 7 if you can.
ok, so still haven't found out why adb doesn't like Win XP. the way i got around it was to drop C# for the ADB commands. i made a batch script to run my adb commands. and a C# console app to send the Serial Modem Commands(for PRL and NV item writing) that i call in my Batch file.
but if anyone has any tips to try ill for sure try them.
more detailed description.
i create a new thread that will create a Process of cmd.exe then do a process.StandardInput("ADB Commands");
the current running thread will finish before the next can be started so no prob with multiple threads running.
all my adb commands ie. adb push recovery.img /wherever/recovery.img
work just fine and does what its 'spose to.
until i get to adb shell reboot.
the phone will reboot but the adb driver is never reconnected after the reboot. like it normally would when running the command from the terminal.
i will have to close my C# program before it will connect and recognize the driver again.
again all this works just fine in Win 7.
i also tried to do a "Scan new Hardware" in device manager after reboot and both programs will just go unresponsive at that point.
next, i will attempt to make my own ADB in C#. if im not mistaken adb uses a TCP connection to communicate with the device. default port 5037 me thinks.
@TronofTroy
Hey do you mind sharing a couple of commands with me in C# on how to write the prl n nv items please.
Also I have been trying to send commands from a windows based form in C# but I can figure out how to do it properly.
Thank You very much!
I just use batch scripts and run them.
filmaker said:
I just use batch scripts and run them.
Click to expand...
Click to collapse
U mean u can write prl, nam, and Evdo with a batch script?
Slinged from my iPhone 4 On Straight Talk using Tapatalk

I'm stuck! Is a factory cable required?

I spent about 6 hours yesterday trying to root my Kindle Fire HD 7" tablet using various methods. I've searched numerous posts and tried several ways with no success.
I believe my ADB drivers are working properly because I am able to reboot the tablet from adb successfully. And in the Windows Device Manager it shows the "Android Composite ADB Interface" as my driver. But the command "adb reboot bootloader" just reboots back into the standard Home screen. And any fastboot command just gives me the "waiting for device" response.
I am on Version 7.4.8 of the firmware so I am trying to find a way to downgrade. I purchased it in November 2012 so it is the 2012 tablet. But every method I try just fails for one reason or another. So my question is, do I need a factory cable in order to get anywhere with this? Is it even doable with this version firmware?
Thank you in advance.
It is doable without a factory cable, the known rooting utilities people typically use are kindle fire first aid or binary's root. If you still can't get it to root, you can technically use a fastboot cable and kffa to restore it to a earlier is that os pre-rooted.
Sent from my Amazon Kindle Fire HD using Tapatalk
pastorbob62 said:
I spent about 6 hours yesterday trying to root my Kindle Fire HD 7" tablet using various methods. I've searched numerous posts and tried several ways with no success.
I believe my ADB drivers are working properly because I am able to reboot the tablet from adb successfully. And in the Windows Device Manager it shows the "Android Composite ADB Interface" as my driver. But the command "adb reboot bootloader" just reboots back into the standard Home screen. And any fastboot command just gives me the "waiting for device" response.
I am on Version 7.4.8 of the firmware so I am trying to find a way to downgrade. I purchased it in November 2012 so it is the 2012 tablet. But every method I try just fails for one reason or another. So my question is, do I need a factory cable in order to get anywhere with this? Is it even doable with this version firmware?
Thank you in advance.
Click to expand...
Click to collapse
First thing you need to do is download the SDK package and set the paths correctly. Here is a video guide https://www.youtube.com/watch?v=oaNM-lt_aHw
Once the paths are set then you go to where your tools folder is and hold shift and right click on your mouse and left click on "open command window here." Then type "adb devices" and enter. When you get a device number you will have proof your ADB is working correct. The fact you see it in your device manager is a pretty good sign though.
The command you are looking for is (must be rooted to use this command otherwise you do need a factory cord.)
adb shell su -c reboot bootloader
This is the command to check the whether fastboot is working
fastboot -i 0x1949 getvar product
This is the command to get you out of fastboot.
fastboot -i 0x1949 reboot
No fastboot commands will work until you download the SDK package and set the environment up. You should be able to get into the bootloader though.
LinearEquation said:
First thing you need to do is download the SDK package and set the paths correctly. Here is a video guide https://www.youtube.com/watch?v=oaNM-lt_aHw
Once the paths are set then you go to where your tools folder is and hold shift and right click on your mouse and left click on "open command window here." Then type "adb devices" and enter. When you get a device number you will have proof your ADB is working correct. The fact you see it in your device manager is a pretty good sign though.
The command you are looking for is (must be rooted to use this command otherwise you do need a factory cord.)
adb shell su -c reboot bootloader
This is the command to check the whether fastboot is working
fastboot -i 0x1949 getvar product
This is the command to get you out of fastboot.
fastboot -i 0x1949 reboot
No fastboot commands will work until you download the SDK package and set the environment up. You should be able to get into the bootloader though.
Click to expand...
Click to collapse
I appreciate your reply and information very much. However, I downloaded the SDK package and installed it over a year ago and have used Fastboot for three other devices numerous times. I used Fastboot with my Asus TF300T to flash recoveries, and return to Asus Stock on more occasions than I can count. I am currently running CROMBi-kk 20140323 on that same tablet. Just to be certain, I connected it just now as I am typing this and verified several Fastboot commands. I also have a Huawei U8800-51 and a Samsung S4 Mini Duo GT-I9192 and have used Fastboot commands with them as well.
So I don't think it is an issue with the driver not being installed correctly, or the SDK not being present unless it is a version specific issue. But the Samsung phone is much newer than the Kindle so I don't think it is that either.
So I guess that puts me at an impasse until I get a factory cable. Or I can just forget customizing the Kindle.
pastorbob62 said:
I appreciate your reply and information very much. However, I downloaded the SDK package and installed it over a year ago and have used Fastboot for three other devices numerous times. I used Fastboot with my Asus TF300T to flash recoveries, and return to Asus Stock on more occasions than I can count. I am currently running CROMBi-kk 20140323 on that same tablet. Just to be certain, I connected it just now as I am typing this and verified several Fastboot commands. I also have a Huawei U8800-51 and a Samsung S4 Mini Duo GT-I9192 and have used Fastboot commands with them as well.
So I don't think it is an issue with the driver not being installed correctly, or the SDK not being present unless it is a version specific issue. But the Samsung phone is much newer than the Kindle so I don't think it is that either.
So I guess that puts me at an impasse until I get a factory cable. Or I can just forget customizing the Kindle.
Click to expand...
Click to collapse
You said you were using simply adb reboot bootloader right? Did you try the command I suggested? "adb shell su -c reboot bootloader" because if everything is set up right then this should work. CD from the tools folder.
LinearEquation said:
You said you were using simply adb reboot bootloader right? Did you try the command I suggested? "adb shell su -c reboot bootloader" because if everything is set up right then this should work. CD from the tools folder.
Click to expand...
Click to collapse
Okay, got it working. Not sure what the problem was but I reinstalled SDK-Tools and Platform-Tools using the latest version of SDK. I was then able to use KFFA to root the Kindle and do a full backup. Not sure why it didn't work before the reinstall since I used ADB and Fastboot with my TF300T as recently as a week and a half ago while testing CROMBi-kk. Also verified they still worked with that tablet yesterday. Whatever the problem, it was specific to the Kindle.
One more question. Is it necessary to downgrade from 7.4.8 before installing a second bootloader and custom ROM? Or is that just a precautionary step because some people have had issues.
pastorbob62 said:
Okay, got it working. Not sure what the problem was but I reinstalled SDK-Tools and Platform-Tools using the latest version of SDK. I was then able to use KFFA to root the Kindle and do a full backup. Not sure why it didn't work before the reinstall since I used ADB and Fastboot with my TF300T as recently as a week and a half ago while testing CROMBi-kk. Also verified they still worked with that tablet yesterday. Whatever the problem, it was specific to the Kindle.
One more question. Is it necessary to downgrade from 7.4.8 before installing a second bootloader and custom ROM? Or is that just a precautionary step because some people have had issues.
Click to expand...
Click to collapse
Its kinda just a precautionary measure, to put it plainly, your kindle will bootloop into recovery if you do the process on 7.4.8, so unless you know how to use "Adb push" its suggested to put the rom and gapps onto the kindle ahead of time so it will be there when you start to bootloop into recovery. On another note, you do need to downgrade the bootloader though, if you use hashcodes method, please check the md5sum on the bootloader file before flashing it to avoid a hardbrick. If you used the fireflash method i wouldnt worry about it, just make sure you check off the downgrade bootloader button above or beside the red warning text.
I had these same issues. The device wouldn't boot into fastboot while it was <waiting for device>.
I did this.
1. Used Many Root Tool to gain root. http://forum.xda-developers.com/showthread.php?t=1886460
2. Placed the Rom and Gapps file on my sd card to be safe.
3. Used Anonymous.123's Tool up until the fastboot <waiting for device> malfunction. http://forum.xda-developers.com/showthread.php?t=2685414
4. Opened the Batch File for the Flasher Tool and copied and pasted the fastboot commands into a terminal with the Kindle in Fastboot. The only way I could get it in fastboot was "adb shell su -c reboot bootloader"
This will install the 4.2 bootloader so you don't have to flash back.
5. Profit 2nd Bootloader and TWRP
Good luck. You'll get it.
Sorry I Keep using the quote reply wrong. Havn't been on XDA in a while.
Okay, following Hashcode's procedure, I have successfully completed all steps up to flashing CM 10.2. TWRP works great and I made a backup from it. Not really necessary since I had backed up my Kindle three different ways and also copied all of my data to my PC as well.
But when I went to copy the TWRP backup to my PC for safekeeping I discovered that now I no longer have access to my Kindle from my PC's file explorer when I am booted into my Kindle. Prior to doing any of the steps here I could swap files back and forth without any problem. So how do I get that feature back??
I am running WIndows 8.1. This worked before I followed the procedures here. Also, when I pull files in adb where do they get stored??? Can't seem to find them.
Check the storage settings in CM you have to turn MTP storage in.
Sent from my Galaxy Nexus using xda app-developers app

ADB/Fastboot problems with Open Beta 5 (7.1.1)

I have had a very eventful few hours and I'll do my best to explain. Earlier this morning I was rooted, twrp installed and running FreedomOS. I had this bright idea of flashing a file I had downloaded from the OP3T website. It was a firmware file (either the first option, the option before OB5). Everything was running smoothly until I got home and tried using fastboot at which point it just sticks on waiting for device. All normal options are checked (adb files installed, debugging selected, the works), but now I can not use fastboot what so ever. I did at one point sideload an OTA using adb sideload (filename.zip). I have tried just about every adb option I can think of to include: 15 second ADB and minimal adb and fastboot. I even deleted the OP3T drivers from my computer, reinstalled those drivers. I followed an article through technobuzz: http://www.technobuzz.net/download-oneplus-3-usb-drivers/
http://www.technobuzz.net/setup-adb-fastboot-drivers-for-nexus-oneplus-samsung-or-any-android/
I have been using adb and fastboot with no issues up til Open Beta 5 and now my PC and another PC is giving me crap and it's iritating the %%%k out of me.
adb reboot recovery works, adb devices work - showing that the device is connected. I checked the device manager and only found the portable devices. It's like my computer somehow magically deleted the adb driver and will not allow me to install an adb driver. I have no logs to check out....15 second adb was suppose to place a log file on the desktop, but it doesnt....it wont install
Here's what Im on:
OB5 (7.1.1) with stock recovery. I can not use fastboot commands. Here are some pics
http://imgur.com/a/y7iFE
http://imgur.com/a/SVVMg You should see something that says, "Android Device or ADB", but nothing - just MTP
http://imgur.com/a/62msw
I'm using windows 10, device signature is off
Essentially I just want to be able to fastboot flash TWRP and gain root.
Has anyone else experienced any kind of issues with OB5 and adb/fastboot
Btw I had the entire Android SDK installed on another computer and that did not work either....Any assistance would be greatly appreciated. I'm talking about you @redpoint73, lol
Oh boy, I've been summoned! I have to say, I'm not anywhere near knowledgeable yet with the 3T as I was with my past devices. But I'll try.
I assume you are properly trying fastboot commands while in fastboot mode (not in OS or recovery)? I assume so, since you already said it worked fine before the update. But it never hurts to ask the obvious, as a lot of folks forget that adb and fastboot work a bit differently (fastboot only in fastboot mode, adb only in OS or recovery - debugging only needed for adb, not fastboot).
Do you have the OP3T drivers installed? These are the files that Windows always opens whenever I connect the phone (while booted into phone OS), select File Transfer, and it gives the option to open the folder. Although I don't think you even need the drivers for fastboot to work. I unlocked the bootloader and flashed TWRP before I ever installed the OnePlus drivers. The generic fastboot drivers worked fine. But it's worth a try, to install the OP drivers.
I don't even know where to begin or how to reply to what you just said @redpoint73. I haven't attempted to use adb/fastboot commands since yesterday, so i have no idea as to rather it will work or not. If you have teamviewer, I can give your access to a backdoor to show you as it's easier to show then explain. Have you ever noticed when you download a zip from here: http://downloads.oneplus.net/devices/oneplus-3t/#title-section
it never saves the file as Open Beta 3, 4, or etc. It saves the file as this long-named file.zip rather than being something easy to understand. Im able to understand it now, but a few moments ago I wasnt. I "have" downloaded the OP3T drivers on multiple occasions with no success to to fastboot only adb. My computer recognizes the device though. When I go into device manager checking things out. I will have an option that says, "portable devices". when you select that option you'll go across through some contextual menus where you wind up seeing MTP. You should see MTP if you successfully installed the OP3T devices, but at the same time you should be able to see an option that says something along the lines of ADB or Android Debug Bridge, vice versa. My computer does not say that and I have no idea where to go from here. I have no logs or anything helping me out, so it's like finding a needle in the haystack. I do know that I have all of the prereq's such as debugging selected from developers options within the phone, device signature turned off through Windows, adb/fastboot installed, OP3T drivers installed - you know the works you usually need in order to get everything working right. What I might end up doing is just reformatting my entire laptop, installing a fresh copy of windows, fresh copy of adb/fastboot and going from there. My bootloader is unlocked and has been since I've owned the device. As of right now I'm on OB5 with stock recovery. Yesterday I tried three times to sideload one of the downloads from this site: http://downloads.oneplus.net/devices/oneplus-3t/#title-section
. However, my phone would end up saying, "installation failed" when Im in sideload mode. I'm thinking that might have something to do with a botched download from the OP3T server.
Looks like you found your solution here: https://forum.xda-developers.com/showpost.php?p=72046709&postcount=20
Fastboot/adb is usually as simple as reinstalling drivers, etc. as opposed to reformat the PC as you were considering. Reinstalling adb/fastboot was a good idea also, as I don't think I would have thought of that (although it makes perfect sense). So good job working it out!

Categories

Resources