[PACK] Full ADB Pack + "ADB Manager" Batch - Android General

In case this doesn't already exists on XDA (I did not find a thing like this) I'm uploading it.
This pack contain everything useful about ADB:
-ADB Driver Installer, a mini software that install ADB drivers compatible with your device (needs Internet connection... I think?)
-adb.exe and fastboot.exe for command line mode (in case you don't trust my batch - The next element)
-And ADB Manager, a little batch I created that performs simple commands (with anti-misclick security on sensitive pre-programmed commands: download and bootloader) and also allows you to prompt your own commands that are not already programmed there.
Of course 100% virus free (scanned with Kaspersky Total Security) and my batch has been already tested out by myself and everything works fine.
License thing, blahblahblah...:
-I don't own adb.exe, fastboot.exe and ADB Driver Installer rights. I just keep the right to upload it.
-YOU are the only responsible of what you do using this pack.
-I put enough security on my batch (the only thing I own in this pack) to say that if you broke something using it, I got no responsabilities
That's all.

thank you
Atronid said:
In case this doesn't already exists on XDA (I did not find a thing like this) I'm uploading it.
This pack contain everything useful about ADB:
-ADB Driver Installer, a mini software that install ADB drivers compatible with your device (needs Internet connection... I think?)
-adb.exe and fastboot.exe for command line mode (in case you don't trust my batch - The next element)
-And ADB Manager, a little batch I created that performs simple commands (with anti-misclick security on sensitive pre-programmed commands: download and bootloader) and also allows you to prompt your own commands that are not already programmed there.
Of course 100% virus free (scanned with Kaspersky Total Security) and my batch has been already tested out by myself and everything works fine.
License thing, blahblahblah...:
-I don't own adb.exe, fastboot.exe and ADB Driver Installer rights. I just keep the right to upload it.
-YOU are the only responsible of what you do using this pack.
-I put enough security on my batch (the only thing I own in this pack) to say that if you broke something using it, I got no responsabilities
That's all.
Click to expand...
Click to collapse
ill keep this on a flash drive as a backup Thank you:good:

BananaTech said:
ill keep this on a flash drive as a backup Thank you:good:
Click to expand...
Click to collapse
You are welcome

Related

Root Nvidia Shield clarification

Hi after reading through the post on GitHub on how to simply root your shield I have a few questions that the tutorial doesn't make clear:
1)There are a ton of files at the top and not sure what to do with them...
2) There is a bit where it explains "On your computer, navigate into the directory containing this file and enter the following command:
fastboot boot zImage_dtb ramfs.img.gz"
But it doesn't say that after you open the directory what you do with it?
Do you keep the window open and that's fine?
Do you type in it's location into command prompt before you type in: fastboot boot zImage_dtb ramfs.img.gz?
Just a bit confused as to what all the files are and where I put them and how they have to be utilised etc
Just need clarification for peace of mind
wanted to post the link but forum won't let me yet
Root explanation
Hi here is the main walkthrough from github but as I said there are a few plot holes for people who are new.
If your SHIELD is already unlocked, you can skip this section.
SHIELD ships with an unlockable bootloader. The bootloader is locked by default, which prevents anyone (including yourself) from booting custom OSes and changing system partitions to potentially obtain extra privileges. This is a significant security feature: in the event that your device gets stolen, an attacker will not be able to retrieve your personal data or use your device if your lock screen has a password set.
By unlocking the bootloader, you allow anyone with physical access to your SHIELD to boot custom images and flash system partitions. This opens the way for an attacker to access your personal information or physically damage your device. For this reason, unlocking the bootloader will erase all your personal data like a factory reset does (so a potential thief cannot get it) and will also void your warranty.
If you know you really, really want to take these risks, here is how you unlock SHIELD's bootloader.
Switch your SHIELD off (long press the NVIDIA logo button and select Power off).
Power your SHIELD on while maintaining the back and home buttons pressed (these are the two buttons that lie under the big NVIDIA-logo button, on its left and right). Release them once you see the bootloader screen.
Connect your SHIELD to your computer using a USB cable.
On your computer, enter the following command:
fastboot oem unlock
This will display the unlock menu. Read the disclaimer and think one last time about what you are doing. This is your last chance to stop.
Use the back and home buttons to select your option. If you decide to continue, select Unlock and press the NVIDIA-logo button to validate. Your personal data will be erased and your device marked as warranty-void permanently.
Regardless of your choice, you will be back to the bootloader screen. Using the same buttons, navigate to Poweroff and select this to power your SHIELD off.
Rooting SHIELD
Now your bootloader is unlocked, but you still don't have root access. For this, we need to install SuperSU, and we will do so by booting a custom Linux image that will do this for us.
Power your SHIELD on while maintaining the back and home buttons pressed (these are the two buttons that lie under the big NVIDIA-logo button, on its left and right). Release them once you see the bootloader screen.
Connect your SHIELD to your computer using a USB cable
On your computer, navigate into the directory containing this file and enter the following command:
fastboot boot zImage_dtb ramfs.img.gz
The kernel and ramdisk will be downloaded and started. You will see 4 penguins on your screen, and the message ROOTING SHIELD will appear. Shortly after, your device will reboot. Congratulations, you are rooted!
For some unknown reason USB debugging in Developer options might become unchecked after rooting. You will need to re-check it if you want to use ADB.
It is safe to perform the rooting operation as many times as you want (e.g. after an OTA). Your user data will not be erased by rooting itself, it is the act of unlocking the bootloader that does.
Is there anyone who can add a little to this to make it more simple for a noob like me?
I understand there is a file set that is at the top of the page and I downloaded the files which include zImage_dtb ramfs.img.gz
but don't know how to utilise them etc
There are no videos on youtube of how to do it and if anyone can add just a few more steps so that I know where I'm going with this (don't want to brick my system).
I just want controller support installed like Tincore or gamekeyboard so I can unlock the potential of the games library on GooglePlay.
Thanks for reading.
you copy those two files "zImage_dtb" & "ramfs.img.gz" to the same directory your adb and fastboot executeables are (same directory you issued the oem unlock command from)
then navigate to the same directory you did the oem unlock from via command line then issue the command "fastboot boot zImage_dtb ramfs.img.gz"
it's pretty simple but I can run you through a simple example of what I did
1)download android sdk
2)copy platform tools folder to a directory on c drive (exp c:\tools\ )
3)copy the 2 files above to the same folder along with cwm recovery(optional)
4)boot shield into fastboot mode (home+back+power)
5)navigate to the folder with adb, fastboot, and the above files in it.
Code:
cd c:\tools
6)detect if fastboot driver is installed with "fastboot devices" if result, then continue, if no result, then check if correct driver and check connection
7)issue oem unlock command and follow the onscreen prompts
Code:
fastboot oem unlock
8)restart device, after a full boot cycle(wipes data), power back into fastboot
9)issue the "rooting image" command, device with automatically reboot
Code:
fastboot boot zImage_dtb ramfs.img.gz
*10) optionally reboot back into fastboot and install cwm recovery
Code:
fastboot flash recovery recovery.img
pretty simple
thanks for fast reply.
Ok so I have Two different versions of Android SDK (32 bit and 64 bit) which one do I use?
"copy platform tools to a directory on C drive (exp C:\TOOLS\)"
What are platform tools?
"copy the two files above to the same folder along with cwm recovery"
What two files? do you mean the zImage_dtb and ramfs.img.gz? Do they go into the C:\TOOLS\ folder?
"navigate to the folder with adb, fastboot, and the above files in it"
What do you mean by navigate? Do you simply mean open the folder or do I use a program to do this?
"Detect if fastboot driver is installed with "fastboot devices" if result, then continue, if no result, then check if correct driver and check connection"
What's fastboot devices? What does result and no result mean? What does Check driver and check connection mean? how dod I do that?
I'm confused by all the lingo, what applications I should be using and when exactly do I start using command lines etc
Thanks for help so far been great but I need step by step instructions eg
open folder, copy and paste file1 and file 2 to this folder
open application X
click import file 1 and file 2
type XXXXXX\root\cdrive into command
press enter
see?
I do not know what some of the words mean and how to do some of the stuff the tutorial says. It's jargon and I have all these files, in all these folders with no idea how to do this from start to finish.
Appreciate the help so far but you are dealing with a novice. I know the work won't take long but I need all the relevant info, in one list, with consistent language to ensure I do everything as it should be done.
Bless you sir and...
Good luck
If your confused by my instructions you need to wait for a "one click" installer, sorry.
gogul1 said:
Ok so I have Two different versions of Android SDK (32 bit and 64 bit) which one do I use?
"copy platform tools to a directory on C drive (exp C:\TOOLS\)"
What are platform tools?
"copy the two files above to the same folder along with cwm recovery"
What two files? do you mean the zImage_dtb and ramfs.img.gz? Do they go into the C:\TOOLS\ folder?
"navigate to the folder with adb, fastboot, and the above files in it"
What do you mean by navigate? Do you simply mean open the folder or do I use a program to do this?
"Detect if fastboot driver is installed with "fastboot devices" if result, then continue, if no result, then check if correct driver and check connection"
What's fastboot devices? What does result and no result mean? What does Check driver and check connection mean? how dod I do that?
I'm confused by all the lingo, what applications I should be using and when exactly do I start using command lines etc
Thanks for help so far been great but I need step by step instructions eg
open folder, copy and paste file1 and file 2 to this folder
open application X
click import file 1 and file 2
type XXXXXX\root\cdrive into command
press enter
see?
I do not know what some of the words mean and how to do some of the stuff the tutorial says. It's jargon and I have all these files, in all these folders with no idea how to do this from start to finish.
Appreciate the help so far but you are dealing with a novice. I know the work won't take long but I need all the relevant info, in one list, with consistent language to ensure I do everything as it should be done.
Bless you sir and...
Good luck
Click to expand...
Click to collapse
Step by step instructions like that would take quite a long time to write. Its basically assumed that navigate is a straight forward instruction, namely, open My Computer, click C:\, click something else, etc etc. 32 bit vs 64 bit, again, you should know what your computer is running and use the correct one respectively.
The reason they dont issue novice instructions is for 1 reason only. People who such as yourself claim to not understand the "jargon" are also those who are more likely to make a mistake when rooting. This can lead to a completely bricked device, ie one that will no longer turn on and load up android, totally dead device. As far as the manufacturer is concerned, a bricked device unless bricked by one of their own updates on a non rooted shield installed correctly, is not covered by warranty. This leads said novice to accuse the tutorial writer of having something wrong in the tutorial when in reality they have clicked the wrong thing etc.
Either way, end result: dead device.
Rooting is not aimed at the novice. It is aimed at the advanced user.
Thank you
I understand that and appreciate the explanation. I can work my laptop and I know that my laptop is 32bit or 64bit but it did not say at any point that it was referring to my computer. It just said download the 32 or 64 bit version. Well I have to make sure what they are talking about before I go and try to root my device as I like clarification on everything I do so that I get it right (and don't brick it). At the moment the explanations are all over the place, some info here, another bit there and was hoping somebody could link it all for me and make sense of the order in which I would do things. I have installed graphic cards in my laptop, put custom firmware on to ipods, psp's, computer etc but this is my first foray into android territory and would like to get it right. I am trying to follow a video tutorial but my computer's reaction to driver updates for the ADB/Fastboot drivers is telling me my drivers are up to date and I'm not getting the error message his is. This means I'm not sure where to go as the situation is diffferent s He is trying to get motochopper working for shield so it will root the device and hoped it would do the same for me.
Hopefully some clarification will come sooner rather than later but won't venture fourth until I'm absolutely sure of what needs to be done.
Again, thanks for the help it is appreciated.:laugh:
Sorry for being so abrupt, it wasn't my intension, you are trying to learn. I will not give a step by step which I feel would be the best, yet potentially more dangerous option for you though.
The parts written in the "code" blocks are what you copy and paste into the command line. When I say navigate I mean by changing directory via command line. You can copy files with a graphical file manager as it's quicker but navigate could also mean graphically.
Google search how to tell if you are running 32 or 64 bit windows, there are better guides and videos than I would be able to describe in a few lines. I was assuming you had already unlocked your bootloader as it is required before root, I covered it as point of reference only.
Platform tools is a folder in the SDK, if you install the SDK you will see that folder where you install it.
Fastboot is the utility also in the SDK that you run from command line that's in the code blocks I posted. If you run the command it will either give a result saying a device is detected or it won't show anything (no result) and you have an issue. If you have a driver issue then that's a whole other problem with a specific forum topic for, but I also assumed you unlocked your bootloader which would require you have fastboot and driver issue resolved.
Main cause of my snappiness is it says the requirement (first line of what you quoted) is unlocked bootloader and you are asking questions about rooting (step two after unlocking bootloader) didn't realize you were stuck in step 0, trying to figure out where to start.
gogul1 said:
I understand that and appreciate the explanation. I can work my laptop and I know that my laptop is 32bit or 64bit but it did not say at any point that it was referring to my computer. It just said download the 32 or 64 bit version. Well I have to make sure what they are talking about before I go and try to root my device as I like clarification on everything I do so that I get it right (and don't brick it). At the moment the explanations are all over the place, some info here, another bit there and was hoping somebody could link it all for me and make sense of the order in which I would do things. I have installed graphic cards in my laptop, put custom firmware on to ipods, psp's, computer etc but this is my first foray into android territory and would like to get it right. I am trying to follow a video tutorial but my computer's reaction to driver updates for the ADB/Fastboot drivers is telling me my drivers are up to date and I'm not getting the error message his is. This means I'm not sure where to go as the situation is diffferent s He is trying to get motochopper working for shield so it will root the device and hoped it would do the same for me.
Hopefully some clarification will come sooner rather than later but won't venture fourth until I'm absolutely sure of what needs to be done.
Again, thanks for the help it is appreciated.:laugh:
Click to expand...
Click to collapse
Download 64 bit software for 64 bit windows and 32 bit on 32 bit windows. Only notable exceptions are where a guide explicitly says to get 32 bit for some particular reason (in my case the only time I have come across this is MSI afterburners screen recording facilities only functioning on a 32 bit program for some reason, no 64 bit version) or if you are running 32 bit windows and physically cannot run 64 bit software even though a guide says "use 64 bit java etc etc".
rather interested in installing a graphics card in a laptop seeming as laptops use graphics cards that are soldered down to the motherboard not on a seperate removable card in all with very few (but existant) exceptions.... I think asus, dell and someone else did offer them at one point, its actually what the MXM connector was invented for (but its used for a few other things now instead).
Anyway. Its always good to have clarification. I think the post above me gives a few starting points and as always: google is your friend (so are bing and yahoo, but they are those friends where once you leave your job or school or whatever you probably wont ever see again).
boot achieved
I boot loaded the Shield through dab and boot loader.
Shield restarted once I chose to unlock the shield. I lost all my stuff (as expected) and it restarted. The drivers then reinstalled on my laptop.
I restarted my laptop and the shield again and tried to reinstall the drivers that were made for the ADB but sadly I get this message now...
"Windows has determined that your driver software is up to date MTP USB DEVICE"
So I restarted everything and the device is now showing up in the Andriod Device driver list.
I am using minimal adb and Fastboot application. It opens the command menu
I type in
adb reboot bootloader and I get the reply "error:device not found"
any ideas?
Sigh!
gogul1 said:
I boot loaded the Shield through dab and boot loader.
Shield restarted once I chose to unlock the shield. I lost all my stuff (as expected) and it restarted. The drivers then reinstalled on my laptop.
I restarted my laptop and the shield again and tried to reinstall the drivers that were made for the ADB but sadly I get this message now...
"Windows has determined that your driver software is up to date MTP USB DEVICE"
So the shield is now showing up in my computer manager under Portable Devices and not under the Android Devices like it did when I installed the custom drivers the first time.
Will this be an issue when I come to root?
Sigh!
Click to expand...
Click to collapse
the MTP driver is for plugging the shield in and viewing the file system. If the device isn't under android devices in device manager then you may need to reinstall the ADB drivers or just double check that the ADB can see the device (it may).
Open a command prompt. type "cd [path to the android sdk]\platform-tools"
Then type "adb devices".
It should list all the android devices it can make a debug connection to. If the Shield is in that list your good, otherwise don't proceed any further until you can rectify that.
The other solution is that you dont need ADB drivers on a linux system for some reason. Don't ask why. I havent a clue. But that would necessitate installing linux.
And something that is useful for finding the adb on the command line again in future for windows. You don't want to "cd" into the correct folder every time (the command line equivalent of opening folders). Sometimes you just want to be able to open the command prompt, type "adb devices" and it to just work. That's doable by altering your system PATH variable.
Open my computer. Right click > Properties, should open the System window.
Left side there should be a button saying "Advanced system settings".
It will open the "System Properties" window to the "Advanced" tab (if it isnt on that tab just switch).
Bottom of the window should be a button saying "Environment Variables...". Click it.
Now the window that appears will be split in 2. User variables and System variables. There is a PATH entry in both, it is best that you only change 1. If you are the only user or you only want your user to be able to access the adb, you can change the User variable. Otherwise you can change the system variable for the adb to work on all users. For me I had to add python to my path once but I wanted to do this for all users so I changed the system one, the PSP SDK I installed however altered the User variable by default. Make your choice and find the variable "PATH" in either one.
Click Edit. A window will appear with Variable name and Variable Value. At this point what I recommend doing is copying the entire contents of value into a notepad file and saving them as a backup. Then cancel and go back into it.
Code:
C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Lua\5.1;C:\Program Files (x86)\Lua\5.1\clibs;C:\Python27;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\
That is my Path variable.If you look the path variable is mostly a series of filepaths (or other variables too) which are seperated with ";". When you type a command such as "adb" into a command prompt what windows does is searches the current command prompt directory for a file it can execute which is called "adb" (it ignores extensions unless explicitly given one), if it doesnt find it in the current directory it searches each folder in the system path variable for the same executable (it ignores sub directories, it will only search the folders above on my system). So if we want to be able to type adb from any folder, we need the folder the adb is in to be added to the system path variable.
Simply add this to the end of it
Code:
;[whatever the path to the adb folder on your system is]
It will be whatever you had to add after "cd" to get to the adb earlier (must not leave out the C:\Users etc etc if its stored in your documents, cd will let you get away with ignoring that, the variable requires the FULL filepath).
Save the variable. Open a command prompt. Type adb, should work. If not, QUICKLY RESTORE THE BACKUP BEFORE WORKING OUT WHAT WENT WRONG. Should be safe with the broken variable to be fair, but you don't want to risk anything. If you dont think your going to use the adb often then simply dont bother updating the path variable rather than taking the (minimal) risk.
Wow my path variable is beginning to get a bit long now I only manually added python and lua to it. The rest will be the default entries and the SQL server stuff appears to be from installing visual studio. Yours probably wont match.
hehe you're going to hit me in a minute...
message deleted as I was being a moron....
ok I should be entirely clear as you guys are trying to help
ok I should be entirely clear as you guys are trying to help me so it's best i let you know what I have done up until this point.
Ok so I boot loader my shield.
I downloaded minimal ADB and Fastboot. I also downloaded the drivers you recommended in the forum.
I installed the drivers:
My shield showed up in the computer Manage list as a Portable device.
I chose to install the new drivers, it asked if I still wanted to go ahead as the drivers could not be verified and I said yes.
The drivers installed and the Shield changed from being in the portable list to showing up as an Android device.
Success I believe.
I then opened ADB BOOTLOADER and booted my Shield Manually.
I then typed in the relevant prompts in the command and a list of options showed up on the shield.
It showed my device number in the command prompt which was the one on my shield screen.
I then command the unlock function and the shield offered me the option to lock or unlock.
I chose Unlock and it then rebooted.
When it restarted, my computer reinstalled the device drivers and my shield had reset to factory settings (as it should).
I then looked in the Computer Manage list and my Shield had reverted back to being in the Portable Devices list.
I restarted both again and the Shield then showed up under Android Devices like it did when I installed the custom drivers the first time.
But the name of the device is Nvidia Shield - not Nvidia Shield ADB like in the tutorial video... not sure it that helps.
I enabled USB Debugging,
put the Superuser.apk and Su bin file into the minimal AADB and Bootloader folder.
I then put the Thor-insecure-boot.img in the Minimal ADB and Bootloader folder too.
I started up the command prompt from the minimal ADB and Bootloader.
I then saw this
C:\Program files <X86>\Minimal ADB and Fastboot>
I then typed in adb reboot boot loader and pressed enter
I got
error: device not found
So I decided to take the above advice and opened a command prompt
I typed in cd C:\tools\adt-bundle-windows-x86_64-20130729\sdk\platform-tools
and pressed enter:
It repeated what I typed and I then put in adb devices.
It then came back with:
List of Devices attached
but nothing was listed....
doh!
Progress!
Ok so I uninstalled my drivers to start again, plugged in the shield and it reinstalled my drivers and now under Android Devices it shows NVIDIA SHIELD ADB
Result!
Now I opened the dab cmd prompt
typed in
adb reboot fastboot
and it booted my shield! jolly good
But then I typed in
fastboot boot thor-insecure-boot.img
I then had
<waiting for device>
show up in the command window.
This is where it stayed.
On the screen of my shield I have options:
continue
restart bootloader
recovery mode
poweroff
Do I have to choose one of these in order for it to begin the thor img command?
C:\tools\adt-bundle-windows-x86_64-20130729\sdk\platform-tools Just incase you didnt get it earlier. That would be the path required for the variable change above. Just whack a ; on the end of the existing variable and throw that new path on the end and done.
But yes, adb devices not listing shield is not a good thing. Try reinstalling the ADB driver for the shield manually (you cant do it via device manager etc).
cool
I'm past that and now <waiting for device> problem to rectify. Am looking online now but there isn't much on there so far...
looking under device manager it shows up under Android Device as Nvidia Shield ADB but it also shows up under portable devices as SHIELD.
Whilst in boot mode the device only shows up in portable devices with a exclamation mark next to the device.
*UPDATE*
I uninstalled the portable device driver because I think it may have been causing confusion.
I then typed adb devices into CMD and a list of devices showed the serial number of the nvidia Shield.
I then typed in adb reboot bootloader in and it booted.
I then tried adb devices again and nothing showed up.
When I go into bootloader The Android Device: Nvidia Shield ADB driver disappears in manager once I go into bootloader mode. Is this normal?
Hmmmmmmm
definetly something to do with the drivers.
I'm on windows 7 64bit by the way.
Going back into device manager I noticed that there is another device under Other devices, upon looking at it it is Fastboot and has an exclamation mark in a yellow triangle next to it (Minimal dab and fast boot is open though).
Such a bummer as I'm so close yet so far
picture
ok so here is a pic of my devices list fastboot is there
before boot
This is the devices it can see before I put the shield in boot mode
devices seen after shielf in boot mode
the are the devices seen after I put the Shield in boot mode. It can't see any devices
waiting for devices
This is the screen on the shield in boot mode. The CMD screen says "Waiting for Devices"

Top cmds that you need to know

There are servel cmds which we can use
But I post only top 10 cmds to help that ones who need
###############
If I make a mistake so please reply with your suggestions
And if you want a cmd in the list .submit your reply with cmd and features ( full detail as you know.).
########cmds###########
For a lot of us, the fact that we can plug our Android phone or tablet into our computer and interact with it is a big plus. Besides the times when we've broken something and need to fix it, there are plenty of reasons why an advanced Android user would want to talk to his or her device. To do that, you need to have a few tools and know a few commands. That's what we're going to talk about today. Granted, this won't be the end-all be-all discussion of adb commands, but there are 10 basic commands everyone should know if they plan to get down and dirty with the command line.
The tools are easy. If you're a Mac or Linux user, you'll want to install the SDK as explained at the Android developers site. It's not hard, and you don't have the whole driver mess that Windows users do. Follow the directions and get things set up while I talk to the Windows using folks for a minute.
If you're using Windows, things are easier and harder at the same time. The tools themselves are the easy part. Download this file. Open the zip file and you'll see a folder named android-tools. Drag that folder somewhere easy to get to. Next, visit the manufacturers page for your device and install the adb and fastboot drivers for Windows. You'll need this so that your computer can talk to your Android device. If you hit a snag, visit the forums and somebody is bound to be able to help you through it.
Now that we're all on the same page, enable USB debugging on your device (see your devices manual if you need help finding it, and remember it was hidden in Android 4.2), and plug it in to your computer. Now skip past the break and let's begin!
1. The adb devices command
The adb devices command is the most important one of the bunch, as it's what is used to make sure your computer and Android device are communicating. That's why we're covering it first.
If you're a pro at the operating system on your computer, you'll want to add the directory with the Android tools to your path. If you're not, no worries. Just start up your terminal or command console and point it at the folder with the tools in it. This will be the file you downloaded earlier if you use Windows, or the platform-tools folder in the fully installed Android SDK. Windows users have another easy shortcut here, and can simply Shift + right click on the folder itself to open a console in the right spot. Mac and Linux users need to navigate there once the terminal is open, or install an extension for your file manager to do the same right click magic that's in Windows by default.
Once you're sure that you are in the right folder, type "adb devices" (without the quotes) at the command prompt. If you get a serial number, you're good to go! If you don't, make sure you're in the right folder and that you have the device driver installed correctly if you're using Windows. And be sure you have USB debugging turned on!
Now that we have everything set up, let's look at a few more commands.
2. The adb push command
If you want to move a file onto your Android device programmatically, you want to use the adb push command. You'll need to know a few parameters, namely the full path of the file you're pushing, and the full path to where you want to put it. Let's practice by placing a short video (in my case it's a poorly done cover of the Rick James tune Superfreak) into the Movies folder on your device storage.
I copied the superfreak.mp4 file into the android-tools folder so I didn't need to type out a long path to my desktop. I suggest you do the same. I jumped back to the command line and typed "adb push superfreak.mp4 /sdcard/Movies/" and the file copied itself to my Nexus 4, right in the Movies folder. If I hadn't dropped the file into my tools folder, I would have had to specify the full path to it -- something like C:\Users\Jerry\Desktop\superfreak.mp4. Either way works, but it's always easier to just drop the file into your tools folder and save the typing.
3. The adb pull command
If adb push sends files to your Android device, it stands to reason the adb pull command gets them out. That's exactly what it does, and it works the same way as the adb push command did. You need to know both the path of the file you want to pull off, as well as the path you want it placed into. You can leave the destination path blank and it will drop the file into your tools folder to make things easy.
In this example, I did it the hard way so you can see what it looks like. The path of the file on the device is "/sdcard/Movies/superfreak.mp4" and I put it on my Windows 8 desktop at "C:\Users\Jerry\Desktop". Again, the easy way it to just let it drop into your tools folder by not giving a destination, which would have been "adb pull /sdcard/Movies/superfreak.mp4". Remember your forwards slash for the Android side, and you'll have no problems here.
5. The adb reboot-bootloader and adb reboot recovery commands
Not only can you reboot your device, you can specify that it reboots to the bootloader. This is awfully handy, as sometimes those button combos are touchy, and if you have a lot of devices you can never remember them all. Some devices (the LG Optimus Black comes to mind) don't even a way to boot to the bootloader without this command. And once again, being able to use this command in a script is priceless. Doing it is easy, just type "adb reboot-bootloader" and hit the enter key.
Most devices can also boot to the recovery directly with the "adb reboot recovery" (note there is no hyphen in this one) and some can't. It won't hurt anything to try, and if yours can't nothing will happen.
6. The fastboot devices command
When you're working in the bootloader, adb no longer works. You're not yet booted into Android, and the debugging tools aren't active to communicate with. We use the fastboot command in it's place.
Fastboot is probably the most powerful tool available, and many devices don't have it enabled. If you're does, you need to be sure things are communicating. That's where the fastboot devices command comes into play. At the prompt, just type in "fastboot devices" and you should see a serial number, just like the adb devices command we looked at earlier.
If things aren't working and you are using Windows, you likely have a driver issue. Hit those forums for the answer.
7. The fastboot oem unlock command
The holy grail of Android commands, fastboot oem unlock does one thing, and one thing only -- unlocks your Nexus device (or an HTC device using their official tool). If you're using a phone from a different manufacturer, you have a different method of unlocking things -- maybe with ODIN or .sbf files -- and this won't apply to you. We're including it because even if you don't need it, it's an important part of Android's openness. Google doesn't care what we do with phones or tablets that we've bought, and include this easy way to crack them open. That's something you usually don't see from any tech company, and a big part of the reason why many of us choose Android.
Using it is easy enough. Once you've used fastboot devices to make sure everything is communicating, just type "fastboot oem unlock" at the prompt and hit enter. Look at your device, read carefully, and choose wisely.
Protip: Using "fastboot oem unlock" will erase everything on your device
8. The adb shell command
The adb shell command confuses a lot of folks. There are two ways to use it, one where you send a command to the device to run in its own command line shell, and one where you actually enter the device's command shell from your terminal. In the image above, I'm inside the device shell, listing the flies and folders on the device. Getting there is easy enough, just type "adb shell" and enter. Once inside, you can escalate yourself to root if you need to. I'll warn you, unless you're familiar with an ash or bash shell, you need to be careful here -- especially if you're root. Things can turn south quickly if you're not careful. If you're not familiar, ash and bash are command shells that a lot of folks use on their Linux or Mac computers. It's nothing like DOS.
The other method of using the adb shell command is in conjunction with one of those Ash commands your Android device can run. You'll often use it for more advanced tasks like changing permissions of files or folders, or running a script. Using it is easy -- "adb shell <command>". An example would be changing permissions on a file like so: "adb shell chmod 666 /data/somefile". As mentioned, be very careful running direct commands using these methods.
9. The adb install command
While adb push can copy files to our Android devices, adb install can actually install .apk files. Using it is similar to use the push command, because we need to provide the path to the file we're installing. That means it's always easier to just drop the app you're installing into your tools folder. Once you've got that path, you tell your device to sideload it like this: "adb install TheAppName.apk".
If you're updating an app, you use the -r switch: "adb install -r TheAppName.apk". There is also a -s switch which tries to install on the SD card if your ROM supports it, and the -l switch will forward lock the app (install it to /data/app-private). there are also some very advanced encryption switches, but those are best left for another article.
And finally, you can uninstall apps by their package name with "adb uninstall TheAppName.apk". Uninstall has a switch, too. The -k switch will uninstall the app but leave all the app data and cache in place.
10. The adb logcat command
The adb logcat command is one of the most useful commands for some folks, but just prints a bunch of gibberish unless you understand what you're seeing. It returns the events written to the various logs in the running Android system, providing invaluable information for app developers and system debuggers. Most of us will only run this one when asked by one of those developers, but it's very important that we know how to use it correctly.
To see the log output on your computer screen, just type "adb logcat" and hit enter. Things can scroll by pretty fast, and chances are you won't find what you're looking for. There are two ways to handle this one -- filters, or text output.
You also have to specify the cmds properly.
Hope it help you .
Like my work hit thanks button.
$$$$$$$$$$$$$$$$$$$$$$$$
Any suggestions most welcome.
$$$$$$$$$$$$$$$$$$$$$$$$$

Yet Another Universal ADB Driver Package and adbupdater for Windows

I made this installer as a kind of "update" the old driver package I had made for Ainol and Actions before.
While at it I added those two tools usually used, that is adb and fastboot.
Based on batch scripts, so it's open source.
Self Signed, not need to do annoying reboots and other tricks.
Tested working using VirtualBox, from XP to Win10, both 32 and 64 bit. Edit: Tested working on Win11.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(five seconds wasted)
Download: https://yadi.sk/d/Xwt9cfb73HFhgA
The Readme.txt included is below.
-------------------------------------------------------
Yet Another Universal ADB Driver Package (+adbupdate)
-------------------------------------------------------
By CXZ (Slatedroid,Freaktab) / CXZa (XDA,4pda)
http://cxzstuff.blogspot.com
DISCLAIMER: No guarantee of any kind. Use at your own risk!
-------------------------------------------------------
Yet Another Universal Android Debug Bridge USB Driver
-------------------------------------------------------
Uses universal adb trick used in some (unsigned) packages before.
It works but fails in inf2cat signability test. Maybe there are reasons for that?
Signability test failed. Errors:
All Universal Serial Bus (USB) devices must have VID and PID sections in the PnP Device ID string.
Third-party USB function drivers must not install through a compatible ID match.
The following formats are not acceptable:
USB\Class_ii, USB\Class_ii&SubClass_jj, USB\Class_ii&SubClass_jj&Prot_kk
Can be uninstalled through the Control Panel.
Other choices: https://www.google.com/search?q=adbdriver
-----------------------------------------------------------
Leave YAUADBdriver certificate to the cert stores
-----------------------------------------------------------
Instead of deleting the YAUADBdriver certificate after
installing the driver, it's left into the certificate stores.
This is maybe needed in the newer Win10 versions. --> http://
www.anandtech.com/show/10747/examining-win10au-driver-signing-policy
Should be safe as certificates cannot be used without the
private key and I deleted the self signed certificate used
immediately after signing the driver. Certificate will
be added to Root and TrustedPublisher stores having
"___YAUADB-driver" as its name so it's easy to find.
-----------------------------------------------------------
ADB-Prompt (bat), ADB (version 1.0.32) and Fastboot
-----------------------------------------------------------
Installer just extracts the files to the chosen folder
and creates shortcuts to the SendTo subfolder.
Read the Readme.txt in SendTo subfolder for more info.
To uninstall just delete the folder (and shortcuts created).
There are newer versions than 1.0.32, but it was selected
on purpose because it's the last version that remembers
the previous shell commands used.
If a newer is needed use my "Yet Another ADB + Fastboot Updater"
which is now included in the package. For more info --> https://
https://forum.xda-developers.com/an...er-package-t3595277/post74097138#post74097138
ADB-Prompt (bat) allows one to avoid typing that darn
"adb" before every single adb command...
-------------------------------------------------------
ADB Prompt - h=open adb help in notepad, q=quit, c=cmd /k
v=add vendor IDs to adb_usb.ini, r=root+remount
-------------------------------------------------------
Remove the old ADB OEM Driver installations
-------------------------------------------------------
Uninstalls all the oem*.inf ADB Driver installations
including the YAUADBdriver (if it's installed).
(use the Control Panel for uninstalling the YAUADBdriver)
-------------------------------------------------------
Remove the old ADB Driver registry entries
-------------------------------------------------------
Removes the old ADB Driver registry entries.
Reboot possibly needed before ADB can be used.
-------------------------------------------------------
Looking for adbupdater or adbupdate? See the eighth post.
https://forum.xda-developers.com/an...er-package-t3595277/post74097138#post74097138
Changed but not updated.
Just minor adjustment done so that the version number is the same everywhere.
So, no need to re-download.
Suddenly like a hundred downloads more at the Yandex.
Either this has been praised elsewhere by someone, or that
someone has problems downloading from the Yandex link.
That many download problems? Probably not - but
here is a local download link - just in case.
edit: This local package doesn't include Yet Another ADB + Fastboot Updater - yet.
You can download it from here: https://forum.xda-developers.com/an...er-package-t3595277/post74097203#post74097203
PS: Please, do NOT share this elsewhere (Yandex link or this ok).
I want to be able to update if necessary.
edit: attachment removed. Use Yandex link instead. A bit easier if less places.
Download: https://yadi.sk/d/Xwt9cfb73HFhgA
Over 300 downloads, but no comments (nor thanks) what so ever.
Did I manage to do it too good at the first time?
(AFAIK, this installer is the only one - at the moment - being truly universal and in the same time
correctly signed. Checked some like a year ago, but I don't think they have changed much.)
(snip)
Hi, just checked your tool... i m in bootloop of death, can your tools unlock my Bootloader in fastboot command ? i m not able to access Recovery (Stoct or TWRP) .. only fastboot i can access
vijaygogawale said:
Hi, just checked your tool... i m in bootloop of death, can your tools unlock my Bootloader in fastboot command ? i m not able to access Recovery (Stoct or TWRP) .. only fastboot i can access
Click to expand...
Click to collapse
I believe it depends on what kind of bootloader and tablet you have there.
I have fastboot in one MTK tablet only. I don't think its bootloader was locked.
And with it it's easier to use their flashing tool. So I haven't used fastboot much myself.
The adb (and also fastboot) in this installer is a bit older - on purpose.
I think that it might be better that you use the latest versions instead.
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
CXZa said:
Over 300 downloads, but no comments (nor thanks) what so ever.
Did I manage to do it too good at the first time?
(AFAIK, this installer is the only one - at the moment - being truly universal and in the same time
correctly signed. Checked some like a year ago, but I don't think they have changed much.)
(snip)
Click to expand...
Click to collapse
Thank you for "YAUADP" it worked flawless on my Windows 8.1 x64.
Don't worry about having huge download counts but no thanks or replys.
This forum has grown so big. There are alot of passive users. Who download but don't comment or click thanks.
Simply count your downloads as "thanks"
Yet Another ADB + Fastboot Updater
I was about to add this ADB + Fastboot Updater tool into the YAUADBdriver package,
but decided to publish it is as separate download instead.
Just put it to the ADB-Prompt folder and run to update the programs if needed.
This stand alone program can also be used without the YAUADBdriver .
Just put it any folder (preferably to an empty one) and run...
Download the exe: https://yadi.sk/d/UWsvoEsV3ReyeJ
Download zipped: https://yadi.sk/d/nZTi7Eqx3NcBwW
Tested working using Win7, Win8 and Win10.
DISCLAIMER: No guarantee of any kind. Use at your own risk!
The Readme included is below. (It, ini and bat files will be extracted on the first run.)
----------------------------------------------------------------------------
Yet Another ADB + Fastboot Updater
(companion for Yet Another Universal ADB Driver Package)
----------------------------------------------------------------------------
by cxz (slatedroid,freaktab) / cxza (4pda.ru,xda) /
http://cxzstuff.blogspot.com/
-------------------------------
Key names used in adbupdate.ini (extracted on the first run)
-------------------------------
adburl - from where to download the zip archive (platform-tools-latest-windows.zip)
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
http://dl-ssl.google.com/android/repository/platform-tools-latest-windows.zip
adbolddate - previous file time at the server.
adboldsize - previous file size at the server.
daysbetweenchecks - check updates every X days. if 0 (zero) startup check is not done.
to enable startup check, define the value and run the program once.
program's shortcut is then created to "Start Menu/Startup" folder.
to disable startup check, change value to 0 and run the program once.
lastcheck - when the latest check was done
adbupdateerror - if more than 0 and startup check is on, checking is done on the next startup.
startupdelayminutes - delay checking X minutes at the startup.
targetfolder - define where to extract ADB + Fastboot files. Run program as Admin and
use for example C:\windows as the target folder to run them system-wide.
addtothepath - if "a", add current exe dir or the target dir to the path and use adb system-wide.
removing: change to "r", and re-run to remove targetfolder/current dir from the path.
(do not change the targetfolder value if any, or removing it from the path will fail)
(value "ok" means that the folder is now in the path variable)
useragent - define the user-agent used. max 256 characters.
makebackups - backup the files to be replaced to the adbupdate.exe\~backup folder. 1=yes.
keepthezip - the platform-tools zip is saved to the adbupdate.exe\~platform-tools folder. 1=yes.
extractfile1 - files to be extracted. 1, 2, 3 and so on. Use full paths inside the zip.
the files are extracted to the targetfolder/adbupdate.exe folder
without using the paths inside the zip.
Both ADB and Fastboot are terminated if running before updating
(or installing if the ADB is not in the target folder).
Yet Another ADB + Fastboot Updater
Local copy. Removed. See the previous post.
Added it also to the Yet Another Universal ADB Driver Package zip but not into the installer yet.
PS: Please, do NOT share this elsewhere (Yandex link or this ok).
I want to be able to update if necessary.
Yet Another ADB + Fastboot Updater
Update. The download addresses are the same.
Now ADB + Fastboot are only terminated if they are updated/installed.
Also added a batch file for automatically checking updates and updating
ADB + Fastboot if they are installed system-wide (e.g. c:\windows folder,
keep adbupdate.exe in another folder so windows update doesn't remove it)
(if previously downloaded just the exe, delete the readme file to get its last version.)
edit:
adbupdate_scheduled-task batch file removed. It works, but I forgot that
(after xp?) windows does not allow user interface on system tasks. Sorry.
Yet Another ADB + Fastboot Updater
CXZa said:
adbupdate_scheduled-task batch file removed. It works, but...
Click to expand...
Click to collapse
A version in which above works, or a such that adds the target folder to the path
thus allowing system-wide usage might come some day in the near future.
In the meanwhile system-wide ADB can be updated "semi-automatically" like this .
Use two folders. One that checks updates, and another that has c:\windows as the target folder.
Then when a new update is found, let it update the first one and then run another as admin.
Disabled commenting at Yandex downloads.
Someone has been posting there a download link of a small
executable telling (in Russian) that it would be an updated version.
It is not. It could be a virus, so do NOT execute it!
Комментирование отключено в Яндекс.
Кто-то отправил ссылку, чтобы загрузить небольшую
исполняемый файл, говорящий, что это будет обновленная версия.
Не является. Это может быть вирус, поэтому НЕ запускайте его!
Hi, I wanted to try your installer but I got a little bit confused by all the packages and updates
Which one is the right one to install?
provolinoo said:
Hi, I wanted to try your installer but I got a little bit confused by all the packages and updates
Which one is the right one to install?
Click to expand...
Click to collapse
The one that is mentioned in the 1st post is always the latest.
This one: https://yadi.sk/d/Xwt9cfb73HFhgA
Now it has "Yet Another ADB + Fastboot Updater" included, but as separate installation - one doesn't have install it.
Latest "Yet Another ADB + Fastboot Updater" as separate installer program:
https://forum.xda-developers.com/an...er-package-t3595277/post74097138#post74097138
(the yadi.sk download addresses always stays the same )
provolinoo said:
Hi, I wanted to try your installer but I got a little bit confused by all the packages and updates
Which one is the right one to install?
Click to expand...
Click to collapse
So, what was the result? YAUADBdriver should work with any device.
Universal adb driver packages are a good option when one doesn't have
a driver package meant for your device. But obviously it's always best to
use a driver package by the manufacturer...
Yet Another ADB + Fastboot Updater
CXZa said:
A version in which above works, or a such that adds the target folder to the path
thus allowing system-wide usage might come some day in the near future.
Click to expand...
Click to collapse
Okay, I now updated the Yet Another ADB + Fastboot Updater.
It now has option to add target or the exe path to the path variable
thus enabling using adb system-wide without big windows updates
messing it by removing exe from the win subdirs.
(It wasn't really a big problem, easily fixed by re-running the program. Then again,
adding dir to the PATH has that advantage that admin rights aren't needed anymore
thus enabling that automatic adb update to work better when adb is used system-wide...)
Anyway, now are all the files at Yandex(yadi.sk) updated.
(The Yet Another Universal ADB Driver Package has still adbupdate as separate exe in its own folder.)
Here are the download links again for those lazy ones:
Yet Another Universal ADB Driver Package: https://yadi.sk/d/Xwt9cfb73HFhgA
Yet Another ADB + Fastboot Updater as exe: https://yadi.sk/d/UWsvoEsV3ReyeJ
Yet Another ADB + Fastboot Updater zip-file: https://yadi.sk/d/nZTi7Eqx3NcBwW
PS: If you have used an older adbupdate before, remove/rename the old ini and readme files in its folder
in order to get them updated as well.
Yet Another ADB + Fastboot Updater
Nice round number of downloads after this last update.
Altogether four and half thousand or more. That is if these two
program DLs are put together. Any feedback/suggestions of any kind?
There was some asking in "15 second installer" thread about device not showing.
The reason probably is that it, at least when I previously checked, uses Google's
vendor ID. If your device manufacturer use its own, you have to install driver
package provided by them, or use some universal one - like this YAUADBDriver...
CXZa said:
Nice round number of downloads after this last update.
Click to expand...
Click to collapse
Was 666. Not that round really. But now it is, the last update has exactly one
thousand downloads altogether...
To my knowledge these two packages of mine work as expected.
So they are not updated anymore - unless the users give some good reasons for it...
CXZa said:
To my knowledge these two packages of mine work as expected.
So they are not updated anymore - unless the users give some good reasons for it...
Click to expand...
Click to collapse
In another thread I came to think that some beautiful day the adbUpdater might not work anymore. But no worry, an update is coming soon before that. Then you can decide what files to extract, etc...
At the moment it doesn't extract for example the libwinpthread-1.dll as it was only used like one fastboot version. I don't know why it's still in the zip. Maybe it's used for something else?? Please tell if you know more, or if your device needs it, etc...
So, what to download from this a bit messy thread of mine? Here are the links again:
Yet Another Universal ADB Driver Package: https://yadi.sk/d/Xwt9cfb73HFhgA
Yet Another ADB + Fastboot Updater as exe: https://yadi.sk/d/UWsvoEsV3ReyeJ
Yet Another ADB + Fastboot Updater zip-file: https://yadi.sk/d/nZTi7Eqx3NcBwW
@kk131
There is one my friends again giving me thanks. Thanks buddy for your support!
(BTW, if you all would say something it would easier for me to thank you back... )

Debian/Ubuntu/Mint Linux and Moto X4

Personally, after Windows 8, followed by Windows 10, I started to seriously look into Linux (which is free) as my primary desktop. Today LibreOffice (which is free) has more features than Microsoft Office and can open, edit, and save all of Microsoft Office's documents. Thanks to Steam's new deployment, I can even now run my Windows-only games on Linux too. The one thing I found very hard to swallow was trying to get my Andriod device (which is technically Unix too) to actually connect to my computer and I imagine that is because the documentation (even via a Google search) to using ADB or Fast Boot with Linux seems to be hidden among pages upon pages of Windows users.
For simple ease of reference as I couldn't even find this here on XDA, allow me to correct the matter.
Type out (or copy and paste) the following commands to install ADB and Fastboot.
Code:
sudo apt-get install adb
sudo apt-get install fastboot
Now you have both adb and fastboot installed. Next, you'll need to enable adb.
Code:
sudo adb
Now boot your phone to your bootloader screen (you get there by pressing both your power and lower volume keys at the same time). Once there load TWRP with the following command.
Code:
sudo fastboot boot '/your_path_here/twrp-3.2.3-0-payton.img'
Your path will be wherever you happen to have downloaded your copy of TWRP. From there I was able to successfully mount my device within TWRP and upload my ROM zip file as needed.
You will upload files to your phone using the "ADB PUSH" command to your /sdcard/ directory (as admin in windows or root in Linux). For example:
Code:
adb push lineage-16.0-20180921-UNOFFICIAL-payton.zip /sdcard/
I hope this was helpful.
Note: Because you're doing this in Linux, the files you upload to your phone may not have the correct permission settings (chmod settings) after they are uploaded. This is very unlikely, but still technically possible.
Thankfully, the folks at TWRP have thought of this and in the 'Advanced' menu, you will find a file manager. From there select the file of your choice and click the chmod button that reads "chmod 0777". Don't forget to mount the DATA partition (before using the file manager) else you may not see the file you are looking for.
or just download the package from here
https://developer.android.com/studio/releases/platform-tools
unzip and have fun
munchy_cool said:
or just download the package from here
https://developer.android.com/studio/releases/platform-tools
unzip and have fun
Click to expand...
Click to collapse
This is helpful, but most newbies to Linux wouldn't even know how to execute those base files. lol But Windows users coming to Linux do know how to run command prompts (good old Microsoft kept the command prompt around long enough that folks moving to Linux just associate the terminal in the same light). Which is why I thought to have them install a preconfigured program would be easier.
But thanks for the source. It is still useful.
MotoX4 said:
This is helpful, but most newbies to Linux wouldn't even know how to execute those base files. lol But Windows users coming to Linux do know how to run command prompts (good old Microsoft kept the command prompt around long enough that folks moving to Linux just associate the terminal in the same light). Which is why I thought to have them install a preconfigured program would be easier.
But thanks for the source. It is still useful.
Click to expand...
Click to collapse
lol..i thought the first thing a Linux newbie would learn is command prompt.
you need to read about terminal before you decide using a Linux box.
munchy_cool said:
lol.. I thought the first thing a Linux newbie would learn is the command prompt.
you need to read about terminal before you decide using a Linux box.
Click to expand...
Click to collapse
:laugh: I agree. But there are a lot of folks who feel intimidated whenever learning something new. If I had started this thread with a full introduction to manually configuring and executing everything, most folks would have easily been discouraged. Especially the younger or older generations who fall somewhere between the line of "I don't got time for that" or "why so difficult". lol :laugh: Inoculating folks into using Linux I feel works best. Keep it simple and suggest that there are more in-depth ways of doing things to peak curiosity. -- Which is why I'm glad you pointed that out and why I'm loving writing this reply at the moment. :angel:

How To Guide How to extract boot.img from OnePlus 9 firmware packages to patch with Magisk & flash to your phone using Linux Mint 21.1

As a OnePlus 9 user who likes to root their phone mainly to allow Network Signal Guru to work (as well as a few other root things like AdAway) I had been trying to extract the boot.img the same way as I had done with a OnePlus 7T using Payload Dumper for Windows. However it looks like Payload Dumper has issues with extracting xx.img files (including boot.img) if the payload.bin file is bigger than 4.3 GB in size. So I've been looking to see if another method was possible that would work for our OnePlus 9 ROMs that are above this file size. As I use Linux Mint as my usual desktop OS & only fall back onto Windows for stuff that'll only run on that OS, I went to have a look to see if something could be done under Linux. Turns out there is an old thread elsewhere on XDA that almost nearly provides what is needed for this, and I thought I would gives details here that should work for the time of this post (March 2023).
This not only extracts the boot.img to patch in Magisk, but also extracts other xx.img files as well.
I'm using Linux Mint 21.1, but I'd assume that this will also work for similar Ubuntu builds or anything that is based on Debian.
Obligatory disclaimer: The following instructions I'm giving below have worked well for me several times in the past, however I am in no way responsible for screwing up or damaging your phone if you try and follow what I've written below. In extreme cases, a bad flash may require using the OnePlus MSM tool to completely reflash your phone. Back up anything important first before doing any of the following!​
1. You will need to ensure that you have downloaded packages to be able to do adb & fastboot from the command line. You can check by running the following commands - if it's already installed with the latest versions, the terminal interface will let you know...
Code:
sudo apt install adb
Code:
sudo apt install fastboot
2. You will need to go to your software manager in LM21.1 and install both Python 3 & the Python Protobuf compiler. Just search for "Python 3" & "Protobuf-compiler" in the software manager and the first option for each search is what you should need - if they are not installed, install them.
3. Create a read/writable directory that will hold your ROM that you've just downloaded & other files that I'll mention soon. I just use a folder calls "ROM" in my Downloads folder (e.g. /home/lawhec/Downloads/ROM ), but you can choose wherever you want that suits you.
4. If you have not done so already, make sure you have the FULL package of your OnePlus 9 ROM downloaded. As of right now (March 2023) it seems the best way is to download the package using the Oxygen Updater app which is available on Google Play - more info available at oxygenupdater.com - just download the ROM to your phone and transfer it on to your computer into the folder you've created for it.
5. Download and save the following two Python scripts/files ("Right click" & "Save Link As") into the folder you have just created for your ROM (all credit to Gregory Cyxx at github.com/cyxx )...
https://raw.githubusercontent.com/c...payload/master/extract_android_ota_payload.py
https://raw.githubusercontent.com/cyxx/extract_android_ota_payload/master/update_metadata_pb2.py
6. Make sure in your file browser (Nemo in my case as it is the default for LM21.1 Cinammon, yours may differ) the window is open in the ROM folder that contains the two Python scripts above that you've just downloaded as well as a ROM package (ZIP file) you've downloaded (in my case from Oxygen Updater mentioned in step 3). Create a new folder for the extracted images to be written to - in my case I just call the folder "output" which is located at "/home/lawhec/Downloads/ROM/output" but again you can call it what you wish.
7. After you've created your output folder, in your ROM directory in the file manager window right-click on your mouse in a white or free space and select "Open in Terminal" - a command terminal will pop up defaulting to your directory.
8. In the command terminal, type the following command and press enter/return...
Code:
sudo python3 extract_android_ota_payload.py <<Your ROM.zip>> <<Your Output Directory>>
...for example, in my case the command would be either...
Code:
sudo python3 extract_android_ota_payload.py LE2113_11_F-75.zip output
...or for handiness you can type "sudo python3 extract_android_ota_payload.py " (remember to leave a space) and simply drag the ROM zip file to the command terminal, press space and then drag the output foler to the terminal line, which will look like in my case...
Code:
sudo python3 extract_android_ota_payload.py '/home/lawhec/Downloads/ROM/LE2113_11_F-75.zip' '/home/lawhec/Downloads/ROM/output'
...this will now run the python script you downloaded earlier that will begin extracting the ROM you've specified and will output all relevant xx.img files into your output folder, including the one we want, "boot.img" - there is no need to extract paylod.bin beforehand, the script will automatically do this for you. Once all xx.img files have been extracted the script will stop, depending on your computer this will take anything from 1-5 minutes, maybe longer on some very old or low spec'd computers - but just let it run its course. Once it is done you can then close the terminal window.
9. Now with the boot.img we've extracted, transfer this file on to your phone (the Downloads folder is usually a good choice). Now open Magisk and patch the boot.img file - once this has been completed, it'll generate a patched boot.img file named something like "magisk_patched-25200_12345.img" - copy and paste this patched boot image back on to your computer (into the folder you've been using will be fine here).
10. If your OnePlus 9 phone is connected to your computer via USB cable, disconnect it now. Then shutdown your phone into a power-off state then reboot it into fastboot mode - this can be done by holding down the volume up & down buttons, then holding down the power button and keep holding down all three buttons until you feel a vibration from your phone. Your OnePlus 9 should then boot into fastboot mode.
11. Now reconnect your OnePlus 9 to your computer via the USB cable and then open up a new display terminal (preferably by right-clicking in the file window of the directory where you saved your Magisk patched boot.img file). Enter the following...
Code:
fastboot devices
...you should then get a line featuring a block of numbers that should match the serial number that is displayed on your phone's display, followed by "fastboot", for example...
Code:
85f53405 fastboot
...if you get anything else, double check your connections at try again - if more than one device is displayed, disconnect the and try again to make sure that only one device is listed. It might also be the case that you don't have the proper drivers installed on your computer for your phone though in my case LM21.1 automatically recognises my phone, so I'm not of any direct help here I'm afraid for this, sorry.
12. Now you will be flashing your patched boot.img to your phone - this is where things can be a little nervous though as long as you do everything right nothing should really go wrong. Type the following into the command terminal, assuming you did so by opening a command terminal from the folder your Magisk Patched boot.img file is located...
Code:
fastboot flash boot <<Magisk Patched boot.img>>
...for example in my case the command line would be...
Code:
fastboot flash boot magisk_patched-25200_12345.img
...otherwise you will need to provide the location of where your patched boot.img is, so in this case...
Code:
fastboot flash boot '/home/lawhec/Downloads/ROM/magisk_patched-25200_12345.img'
...either way, your phone will now be in the process of getting its boot image replaced with the one patched by Magisk. This should take no more than a few seconds and that should be it done! You can then close the terminal window again.
13. Once you've patched the boot image, disconnect the phone from the USB cable to the computer and make sure that the screen on your mobile says "START" in green at the top, if it doesn't, use the volume keys to change this. Then just simply press the power button and your phone will now reboot, this can take a little bit longer than before as your phone's firmware has changed so give it time - (however if it takes longer than 10 minutes or so you might have a problem here) - once your home screen becomes available, give it a few seconds once you've entered before selecting the Magisk app. Once you've done this, Magisk should say that it is installed however to double check, use an app that requires root permissions either to work (e.g. Network Signal Guru) or to do additional things, like a simple root checker app that you can download from wherever you download your apps. If everything is good, then you've rooted your OnePlus 9!
Notes: This process will probably work for other firmware packages for various phones where the boot.img can be extracted to be patched by Magisk and then flashed via fastboot (assuming the bootloader is unlocked) which includes the OnePlus 7T's stock firmware, but I can give no guarantees for this. Once again, try at your own risk.​
I would suggest to boot the magisk patched image and then doing a direct install from the app instead of flashing it directly. This way you can use the "Restore images" feature in the Magisk app that can be useful when doing incremental update.
Thank You for thinking of Us Linux Users !
Attempted to update to LOS 20 via ADB, and now my touch screen will not work. All the remedies here require a Windows system for the MSM tool, which I do not have...
barguybrady said:
Thank You for thinking of Us Linux Users !
Attempted to update to LOS 20 via ADB, and now my touch screen will not work. All the remedies here require a Windows system for the MSM tool, which I do not have...
Click to expand...
Click to collapse
You have a computer you can install windows on another partition it's not like you don't have the ability to use msm
stez827 said:
You have a computer you can install windows on another partition it's not like you don't have the ability to use msm
Click to expand...
Click to collapse
no comment
barguybrady said:
Yup.
Just gonna spend another 4 or 5 hours prepping a drive to somehow install windows just to fix a phone.
Maybe - No....
Click to expand...
Click to collapse
It does not take that long as a Linux user who has had to install for that exact reason it took maybe an hour or 2
lawhec said:
As a OnePlus 9 user who likes to root their phone mainly to allow Network Signal Guru to work (as well as a few other root things like AdAway) I had been trying to extract the boot.img the same way as I had done with a OnePlus 7T using Payload Dumper for Windows. However it looks like Payload Dumper has issues with extracting xx.img files (including boot.img) if the payload.bin file is bigger than 4.3 GB in size. So I've been looking to see if another method was possible that would work for our OnePlus 9 ROMs that are above this file size. As I use Linux Mint as my usual desktop OS & only fall back onto Windows for stuff that'll only run on that OS, I went to have a look to see if something could be done under Linux. Turns out there is an old thread elsewhere on XDA that almost nearly provides what is needed for this, and I thought I would gives details here that should work for the time of this post (March 2023).
This not only extracts the boot.img to patch in Magisk, but also extracts other xx.img files as well.
I'm using Linux Mint 21.1, but I'd assume that this will also work for similar Ubuntu builds or anything that is based on Debian.
Obligatory disclaimer: The following instructions I'm giving below have worked well for me several times in the past, however I am in no way responsible for screwing up or damaging your phone if you try and follow what I've written below. In extreme cases, a bad flash may require using the OnePlus MSM tool to completely reflash your phone. Back up anything important first before doing any of the following!​
1. You will need to ensure that you have downloaded packages to be able to do adb & fastboot from the command line. You can check by running the following commands - if it's already installed with the latest versions, the terminal interface will let you know...
Code:
sudo apt install adb
Code:
sudo apt install fastboot
2. You will need to go to your software manager in LM21.1 and install both Python 3 & the Python Protobuf compiler. Just search for "Python 3" & "Protobuf-compiler" in the software manager and the first option for each search is what you should need - if they are not installed, install them.
3. Create a read/writable directory that will hold your ROM that you've just downloaded & other files that I'll mention soon. I just use a folder calls "ROM" in my Downloads folder (e.g. /home/lawhec/Downloads/ROM ), but you can choose wherever you want that suits you.
4. If you have not done so already, make sure you have the FULL package of your OnePlus 9 ROM downloaded. As of right now (March 2023) it seems the best way is to download the package using the Oxygen Updater app which is available on Google Play - more info available at oxygenupdater.com - just download the ROM to your phone and transfer it on to your computer into the folder you've created for it.
5. Download and save the following two Python scripts/files ("Right click" & "Save Link As") into the folder you have just created for your ROM (all credit to Gregory Cyxx at github.com/cyxx )...
https://raw.githubusercontent.com/c...payload/master/extract_android_ota_payload.py
https://raw.githubusercontent.com/cyxx/extract_android_ota_payload/master/update_metadata_pb2.py
6. Make sure in your file browser (Nemo in my case as it is the default for LM21.1 Cinammon, yours may differ) the window is open in the ROM folder that contains the two Python scripts above that you've just downloaded as well as a ROM package (ZIP file) you've downloaded (in my case from Oxygen Updater mentioned in step 3). Create a new folder for the extracted images to be written to - in my case I just call the folder "output" which is located at "/home/lawhec/Downloads/ROM/output" but again you can call it what you wish.
7. After you've created your output folder, in your ROM directory in the file manager window right-click on your mouse in a white or free space and select "Open in Terminal" - a command terminal will pop up defaulting to your directory.
8. In the command terminal, type the following command and press enter/return...
Code:
sudo python3 extract_android_ota_payload.py <<Your ROM.zip>> <<Your Output Directory>>
...for example, in my case the command would be either...
Code:
sudo python3 extract_android_ota_payload.py LE2113_11_F-75.zip output
...or for handiness you can type "sudo python3 extract_android_ota_payload.py " (remember to leave a space) and simply drag the ROM zip file to the command terminal, press space and then drag the output foler to the terminal line, which will look like in my case...
Code:
sudo python3 extract_android_ota_payload.py '/home/lawhec/Downloads/ROM/LE2113_11_F-75.zip' '/home/lawhec/Downloads/ROM/output'
...this will now run the python script you downloaded earlier that will begin extracting the ROM you've specified and will output all relevant xx.img files into your output folder, including the one we want, "boot.img" - there is no need to extract paylod.bin beforehand, the script will automatically do this for you. Once all xx.img files have been extracted the script will stop, depending on your computer this will take anything from 1-5 minutes, maybe longer on some very old or low spec'd computers - but just let it run its course. Once it is done you can then close the terminal window.
9. Now with the boot.img we've extracted, transfer this file on to your phone (the Downloads folder is usually a good choice). Now open Magisk and patch the boot.img file - once this has been completed, it'll generate a patched boot.img file named something like "magisk_patched-25200_12345.img" - copy and paste this patched boot image back on to your computer (into the folder you've been using will be fine here).
10. If your OnePlus 9 phone is connected to your computer via USB cable, disconnect it now. Then shutdown your phone into a power-off state then reboot it into fastboot mode - this can be done by holding down the volume up & down buttons, then holding down the power button and keep holding down all three buttons until you feel a vibration from your phone. Your OnePlus 9 should then boot into fastboot mode.
11. Now reconnect your OnePlus 9 to your computer via the USB cable and then open up a new display terminal (preferably by right-clicking in the file window of the directory where you saved your Magisk patched boot.img file). Enter the following...
Code:
fastboot devices
...you should then get a line featuring a block of numbers that should match the serial number that is displayed on your phone's display, followed by "fastboot", for example...
Code:
85f53405 fastboot
...if you get anything else, double check your connections at try again - if more than one device is displayed, disconnect the and try again to make sure that only one device is listed. It might also be the case that you don't have the proper drivers installed on your computer for your phone though in my case LM21.1 automatically recognises my phone, so I'm not of any direct help here I'm afraid for this, sorry.
12. Now you will be flashing your patched boot.img to your phone - this is where things can be a little nervous though as long as you do everything right nothing should really go wrong. Type the following into the command terminal, assuming you did so by opening a command terminal from the folder your Magisk Patched boot.img file is located...
Code:
fastboot flash boot <<Magisk Patched boot.img>>
...for example in my case the command line would be...
Code:
fastboot flash boot magisk_patched-25200_12345.img
...otherwise you will need to provide the location of where your patched boot.img is, so in this case...
Code:
fastboot flash boot '/home/lawhec/Downloads/ROM/magisk_patched-25200_12345.img'
...either way, your phone will now be in the process of getting its boot image replaced with the one patched by Magisk. This should take no more than a few seconds and that should be it done! You can then close the terminal window again.
13. Once you've patched the boot image, disconnect the phone from the USB cable to the computer and make sure that the screen on your mobile says "START" in green at the top, if it doesn't, use the volume keys to change this. Then just simply press the power button and your phone will now reboot, this can take a little bit longer than before as your phone's firmware has changed so give it time - (however if it takes longer than 10 minutes or so you might have a problem here) - once your home screen becomes available, give it a few seconds once you've entered before selecting the Magisk app. Once you've done this, Magisk should say that it is installed however to double check, use an app that requires root permissions either to work (e.g. Network Signal Guru) or to do additional things, like a simple root checker app that you can download from wherever you download your apps. If everything is good, then you've rooted your OnePlus 9!
Notes: This process will probably work for other firmware packages for various phones where the boot.img can be extracted to be patched by Magisk and then flashed via fastboot (assuming the bootloader is unlocked) which includes the OnePlus 7T's stock firmware, but I can give no guarantees for this. Once again, try at your own risk.​
Click to expand...
Click to collapse
If Using the t-Mobile Variant - LE2117 - we are Unable to Install any OTA Updates with OxygenUpdater, and are promptly warned of this limitation upon install. Nevertheless, I forged ahead and,
Following this Method, I downloaded a LE2115_11_F.17.zip, and proceeded to use your helpful .py scripts to extract the boot.img file, and Flash it - promptly sending me to a Qualcomm CrashDump mode.
Having a chance to MSM back to "stock" LE2117 - 11.2.2.2 LE54CB, I am wondering if I should just let the t-Mobile Update, through "Settings >> System >> System update" to Update the Stock ( bloated !? ) OS with all that are available,
Then attempt to Extract a boot.img and Magisk patch it ?
Any Advice?
TIA

Categories

Resources