How to Install adb/fastboot on Android device (phone) to use to fix another phone - General Questions and Answers

A friend of mine has a Stylo 6 that says corrupted when it boots. It is however already set to USB debugging. However, I do not have access where I'm at to a PC or a Chromebook to install the dev tools. Is it possible even with third party paid software to install the dev environment on another Android phone and use it for fastboot etc?

You don't need to add ADB and/or Fastboot to any Android device. In common both ADB and Fastboot ( the latter only unless OEM decided to omit it ) are integral part of every Android release: ADB is housed in Android's user-space, Fastboot typically is part of device's bootloader unless Android has a Dynamic Partition layout, then Fastboot is also housed in Android's user space.

Ok, I guess what I need to know if I can install and use adb server on an Android device. I don't have access to a PC Mac or Chromebook to install the sdk tools. Can this be installed on my phone ( using a Linux or windows emulator maybe) to use to fix his phone?

ADB is nothing more than a tool that allows you to execute commands which would interact with Android shell. So you can install / open in Android a shell app ( e.g. Termux ) and run the commands ( Linux compliant ) therein. Will say you don't need a computer to operate on Android system of device,

Related

Platform-tools problems

can anyone help? I use platform-tools and it's not connecting I hope there is a solution here
The so-called Platform Tools contain among others the 2 programs/drivers ADB and Fastboot
Only to clarify things:
ADB
is a protocol that allows you to communicate with an Android device that got booted, means its main Android OS is running
At Windows command prompt you enter commands - one by one -
Code:
adb devices
adb <ANY_SUPPORTED_ADB_SUBCOMMAND>
FASTBOOT
is a program used to manipulate (list, install, erase) the non-volatile memory such as flash filesystem partitions on devices that adhere to the fastboot protocol, via a USB connection from a host computer. It requires that the device be started in a boot loader mode with the fastboot protocol enabled.
IMPORTANT: Fastboot will only work if the OEM/Carrier has included support for the Fastboot protocol.
At Windows command prompt you enter commands - one by one -
Code:
adb devices
adb reboot bootloader
fastboot devices
fastboot <ANY_SUPPORTED_FASTBOOT_SUBCOMMAND>
Andika_Achmad said:
can anyone help? I use platform-tools and it's not connecting I hope there is a solution here
Click to expand...
Click to collapse
Plateform-tools are command line tools coming with the android sdk. As the build-tools, plateform tools are command line tools, so to use them you shall first know how to use them.
Here's the usage of some command-line tool available in the Android Sdk:
Command-line tools | Android Studio | Android Developers
Find out about the most important command-line tools that are available, organized by the packages in which they're delivered.
developer.android.com
Here's the content of /plateform-tools:
adb
api (a folder)
dmtracedump
e2fsdroid
etc1tool
fastboot
lib64 (a folder)
hprof-conv
make_f2fs
make_f2fs_casefold
mke2fs
mke2fs.conf
NOTICE.txt
package.xml
sload_f2fs
source.properties
sqlite3
systrace (a folder)

[Question] can someone explain what that fastbootd is about?

pretty much the only thing ive seen about it is https://source.android.com/devices/bootloader/fastbootd?authuser=1
but im interested to know what its actual point is. since on my phone when i use adb/fastboot reboot fastboot it doesnt let me use no fastboot or adb commands and in its ui you cant do anything either, which left me quite confused as why it even exists. havent come across any proper documentation or tutorials of it either so it all has just left me very confused.
Typically both the adb and the fastboot are executables to be run on Windows / MacOS / Linux computers. Their counterparts on Android device are adbd and fastbootd. Both requires Android device and computer got connected via USB-cable - preferredly the one that came with Android device. Neither adb nor fastboot have an UI, they only have a CLI, what is run on computer's shell.
On Android-side both the adbd and fastbootd are started when Android boots up.
Of course you also can run both the adb and the fastboot from within one Android device connected to another Android device, but this requires to have Termux shell installed on the one Android device, AFAIK.

Using Android device to run adb and fastboot commands

To make this a short as possible I successfully unlocked my Motorola G7 power using an Android device rather than a PC I need help rooting my G7 power with magisk using my designated Android device rather than a PC
ADB⚡OTG - Android Debug Bridge - Apps on Google Play
⚡ Run ADB commands without a computer [No Need ROOT] ⚡
play.google.com
Thank you I appreciate your reply but I use another application for this purpose bugjaeger premium
@Sativa33
Either in magisk manager from device or you can also get the magisk module from Osm0sis' Odds and Ends- (multiple devices scripts) XDA thread. If you go there https://forum.xda-developers.com/t/...-and-ends-multiple-devices-platforms.2239421/
Scroll down halfway oe maybe 2/3 of fge way and click his "adb and fastboot " magisk module and install via magisk manager. Then use termux terminal and type "su" (enter) for root and place files you wish to install in ter
Termux's directory which it will show you after you tape sy and push enter on the screen in terminal just after you grant it root. Then you use an otg cable and connect two Android devices together throw files in Termux's directory and send fastboot and adb commands whenever. I've used this method on two phones so unlock my bootloader ad well. The only prerequisite being you need another (2nd) Android device that is bporloader unlocked and rooted so you can send commands to other device and an OTG cable which are $3-5 USD online. Sure does come in handy when you need it through. Like years ago when my laptop was stollen!! Life saver FR!!!
After reading it that sounds like a reasonable option. But wouldn't it be easier just to download the bugjaeger premium app on a second Android device. And that's basically all you need and a double ended USB c cord. No need for all this other programs or downloades . It's basically running fast boot commands it's purest form one Android device talking to the other using the same language no need to download packets drivers nothing because you're already in the Android shell talking to another Android

Op7pro not responding to fastboot commands

Hey, im having trouble finding working ways to root my op7pro GM1913 (OOS 11.0.4.1 GM21BA)
Ive been trying this https://www.xda-developers.com/unlock-bootloader-root-oneplus-7-pro/
Currently trying to unlock bootloader. (Step 2)
I can connect via adb but when i go to bootloader/fastboot i lose connection to the phone.
Ive tried regular adb command tools and "TOOL ALL IN ONE" When the phone is on it responds to adb commands but when i need fastboot commands its not working and i can see the device id dissapear from the all in one tool.
I have tried multiple usb ports (2.0 and 3.0) and multiple usb C cords (Op oem + Samsung) Tried removing Windows signature verification and installing oneplus usb drivers, but it gets stuck at "Execute the commands..." (99% or so) When i try again it finds some installation files. When im in bootloader, Windows device manager still shows a generic android phone. Oem unlocking and usb debugging is on, also set default usb configuration to file transfer. No help.
I want to keep Oxygen os, but i want to be rooted and have magisk, preferably TWRP too but im open to other ways.
Windows 10 20H2 if that matters. (Latest update for me)
Oneplus 7pro GM1913 (Eu nordic)
Oxygen os 11.0.4.1 GM21BA
Download a Linux distro and install adb and fastboot like this: https://forum.xda-developers.com/t/guide-unlock-flash-root-for-the-pixel-2-xl-taimen.3702418/
Just download adb and fastboot tools package from Google, extract it,open command prompt inside where you extract it and enter these in terminal:
sudo install adb dmtracedump e2fsdroid etc1tool fastboot hprof-conv make_f2fs mke2fs mke2fs.conf sload_f2fs sqlite3 /usr/local/bin
sudo mkdir -p /usr/local/lib64
sudo install lib64/libc++.so /usr/local/lib64
Then adb --version (enter) fastboot --version (enter) like Nathan says in guide. Super easy and I guarantee you if you go this route you won't have any hiccups. Sounds like stupid windblows driver issues or outdated adb/fastboot tools. One of the two. Are you flipping on dev options and check marking little box that pops up on your phone to allow it to communicate with PC? A simple : adb devices (enter) should make it appear on phone screen. You don't even have to install Linux, you can boot it off a live USB. Takes about one minute to make one. If you make one you can boot the live USB , download adb and fastboot, and install as Nathan's guide says then reboot when you are done and your back in windblows. IDK why anyone wouldn't want Linux installed though. Best decision I ever made was switching from windows to Linux about 9 years ago. It really makes anything you do to your devices MUCH easier to do!! This may sound stupid but have you rebooted your PC? Because you will definitely need to , probably more than once on windblows to get it to work.
Thank you for the reply. No stupid questions, yes i tried rebooting pc/phone. Ill try your way and report in a couple days.
Solution is simple. From Android 11 on, OnePlus (and Android phones in general) uses the universal drivers, you just need to install them in Windows in order to use fastboot commands. See my answer in this post.
There are a few things you can try if your OP7 Pro is not responding to fastboot commands:
1. Make sure you have the latest drivers installed for your phone.
2. Try using a different USB cable.
3. If you're using Windows, try running the fastboot commands from a command prompt with administrator privileges.
4. Try booting your phone into recovery mode and running the fastboot commands.

Save data from blocked Android

Hi,
A friend of mine want's to recover some pictures from an old phone of his, but he forgot the pattern to unlock the device...
* The phone is a CAT S41 stock android.
* The phone is in perfect conditions
* The USB debug option of the phone is disabled.
- Because of that, I've been unable to execute any adb commands on the device.
- When the phone is in Recovery Mode, the device is detected by adb, but unauthorized:
[email protected]:~$ adb devices
List of devices attached
S411931008366 unauthorized
[email protected]:~$ adb shell
adb: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
Click to expand...
Click to collapse
I've tried to set the $ADB_VENDOR_KEYS manually, with no success.
In this situation, I have some questions to ask:
1. Is there a known way of bypassing the pattern lock?
2. Is there a known way of dumping data to any other device, in order to retrieve the pictures
3. Can the debug options be activated somehow?
As a last resource, I'd be willing to open the phone and spend some bucks on whatever hardware is needed to dump the whole disk, if that is relatively feasible to do.
4. Could you give me any feedback/information on hardware methods of dumping the disk of the phone? 0 experience there.
I would greatly appreciate any input you could give me.
If more details of the system or the situation are needed, please ask.
Thank you kindly for your attention,
abocador
Can't offer a solution.
But, even if there is a way to dump the files - what requires phone's Android is got rooted and USB-Debugging is activated , IMO it makes no sense to waste more time in this because since Android 4 data are AES-128 encrypted ( FBE and/or FDE method ) and the encryption probably can't get cracked.
2. + 4. won't work because of encryption, but 1. + 3. is possible on that old android 7 mediatek device.
assuming device runs on FDE full-disk encryption, is encrypted with default_password, one can hack boot.img and authorize usb-debugging. because device decrypts itself on boot that's all you need to get access.
but first install VCOM preloader drivers and make a readback of device with WwrMTK v2.51 + SP Flash Tool (old method) or mtkclient (new method).
I will tell you how to patch and resign boot.img once you made the important backup step. most important partitions are userdata+metadata.
Btw there is maybe another (even more easier) method. Just port TWRP recovery for that device. Because of weak security implementation phone will boot into custom recovery on locked bootloader (I did on Cubot King Kong)
Hi,
Thank you a lot for your reply.
I've been trying to do the backup, but I wasn't able to even use the mtkclient
I think I will just forget about this.
you know device must powered off completely, and preloader only says 'Hello' to computer for ~ 1 second? Did you install VCOM preloader drivers during that second (device manager -> pick device -> Update Driver -> Browse my computer for driver software -> Let me pick from the list of device drivers on my computer -> Show all devices -> Have Disk) ?
Hello again!
Yes, I'm aware the device must be powered off.
I'm quite sure I have all the drivers I need. I'm working from a Debian system.
Some weeks ago, I posted the log I get when I try to connect mtkclient to the phone:
Error on sending data: DA hash mismatch · Issue #575 · bkerler/mtkclient
Hi! I'm trying to use this tool on a CAT S41 phone, but I'm unable to get any proper connection between the device and my computer. After initializing the GUI with_python mtk_gui_, I get the follow...
github.com
One more time, thanks for your help,
I think I'm going to park this project for a while.
Cheers,
abocador
okay, for linux no need for drivers looks good, have you tried some random cmd line usage just for fun?
Code:
python3 mtk printgpt
python3 mtk rl out
python3 mtk crash
python3 mtk --preloader printgpt
python3 mtk --preloader rl out

Categories

Resources