[Universal] [Flashable] [Logcat] [Guide] So your test ROM build didn't boot - XDA-University

Hello all,
I've noticed the lack of a guide for pulling ADB logs for developers. Being a developer, I wanted a quick link to send people to, rather than reexplaining.
If you are looking for a GENERAL explanation on how to get a logcat, or setup your computer for pulling a logcat, look at this amazing guide here:
http://forum.xda-developers.com/showthread.php?t=2274119
Consider this guide an extension for the above thread, making an easy how-to for developers to point people to.
What this guide is NOT:
- A guide on how to pull a logcat in general
- A guide on how to setup adb on a computer
This guide is/will:
-Assume you know how to connect via adb
-Assume you have installed drivers and adb
-A way to show common users to get the logs the developers need
So I personally build for devices I don't own. A LOT. So, should it bootloop(specifically this) or not boot at all, I NEED these logs to help fix the problem. Most users are willing to do so..... as long as you teach them. So this is my one-size-fits-all guide to this.
Note: Later, I will do a write-up on how to pull kernel logs as an extension to this in the second post
To pull a logcat during a bootloop, you need to have adb permissive. This can be done several ways. I have added to the build.prop manually before but that was in TWRP and is a pain to guide users on. It's SUPPOSED to be done with the ramdisk, but I can't ask users to pull their ramdisk and edit it and reflash. So I have made a flashable zip to extract ramdisk and add a permissive adb property to default.prop
The zip will be in the downloads below, all you need to do is flash it when you see a ROM is bootlooping.
Note: Some kernels may not work with this, and it's based off of Anykernel. If the zip fails, don't worry, it has a fallback that it will add same thing to build.prop, and that should usually work.
After flashing, hook the phone/tablet up to your computer and run this in your Terminal:
On Linux:
Code:
adb logcat > ~/log.txt
That will store logcat into your home folder.
On Windows:
Code:
adb logcat > %UserProfile%/Desktop/log.txt
That will store logcat on your Desktop.
How do I stop logging?
You can either stop logging by hitting [CTRL] + C in the terminal or by unplugging device.
How do I know when to stop logging?
Usually, you can safely stop logging after about one minute for MOST problems, BUT I believe 5 minutes of logging would be the best bet to stop logging, so all the errors are caught.
How do I get the log to the developer?
You can get a log to a developer by Dropbox, Google Drive, or a file sharing site, but personally I like pasting sites like hastebin.com, pastebin.com, or paste.ubuntu.com. This is a developers/users personal preference though. Personally, I really, really like hastebin. For a pasting site, just open it in your browser and open the log with notepad or equivalent, and do [CTRL] + A and [CTRL] + C to copy the whole log, then paste onto the site. Then share the link the site gives you with the developer.
How do I get the log, when I didn't even get to the boot animation?
Usually, this is a kernel problem, and is almost deserving of it's own write-up, and instructions will be available in the second post.
Thank you all, and should you see a problem, or need more questions answered, please tell me so in replies.
Keep it cool,
Jacob(USA-RedDragon)

So your kernel didn't boot. Well dang. This can be one of the worst problems. So, I'm going to HOPE you have TWRP, since CWM is pretty much dead.
This is more advanced, because you have to use Terminal command in TWRP.
Now, don't be daunted by this, since it's terminal commands, it's quite easy.
As a general rule of thumb(there are different devices with different kernel logs, though), 3.10 kernels(pretty much anything in the last 2 years) have a log in /sys/fs/pstore/console-ramoops and 3.4 and prior kernels have /proc/last_kmsg.
You can see kernel version in Settings -> About Phone
So to pull these logs, you need to be in TWRP DIRECTLY after a failed boot.
Go to Advanced->Terminal Command and type these commands in. One will fail the other will work. Should both of them fail, restart and try to boot again, then go back to TWRP.
Code:
cp /proc/last_kmsg /sdcard/kernellog.txt
Code:
cp /sys/fs/pstore/console-ramoops /sdcard/kernellog.txt
Now you can restore your backup and boot normally. Once you've booted up, you can either share the files with Google Drive or Dropbox or whatever in Android, or you can pull them to your computer with these Terminal commands:
On Linux:
Code:
adb pull /sdcard/kernellog.txt ~/kernellog.txt
That will store log into your home folder.
On Windows:
Code:
adb pull /sdcard/kernellog.txt %UserProfile%/Desktop/kernellog.txt
That will store log onto your Desktop.
Then share log like you would in the above post

FAQs:
None at this time

when I execute the command, it says waiting for device.
I have a galaxy s5
and the monitor, my device is offline

@Gayos24 what command did you type??? OP and 2ND post show numerous commands. Nobody can help if you don't give details.
The monitor says device offline...is the screen turned on??

HasH_BrowN said:
@Gayos24 what command did you type??? OP and 2ND post show numerous commands. Nobody can help if you don't give details.
The monitor says device offline...is the screen turned on??
Click to expand...
Click to collapse
i type this command adb logcat > %UserProfile%/Desktop/log.txt
yes the screen turning on.

@Gayos24 you use that AFTER you run a logcat, there is a link in the OP on how to do that.

HasH_BrowN said:
@Gayos24 you use that AFTER you run a logcat, there is a link in the OP on how to do that.
Click to expand...
Click to collapse
yes

I flashed logcatflasher zip via twrp and connected my device. I wrote command for windows but there was no logging in the terminal

But the adb via usb need an authorization to enable,how to get pass when bootloop?
Sent from my MI 2C using XDA-Developers mobile app

Sun Shower said:
But the adb via usb need an authorization to enable,how to get pass when bootloop?
Sent from my MI 2C using XDA-Developers mobile app
Click to expand...
Click to collapse
use adbd

Gayos24 said:
use adbd
Click to expand...
Click to collapse
Thank you to answer me,is there any thread or guide can help me,I don't know how to use it.

Sun Shower said:
Thank you to answer me,is there any thread or guide can help me,I don't know how to use it.
Click to expand...
Click to collapse
just donwload the file and extract adbd in system/xbin (rom)
and the command is the same as normal logcat
sorry for my english

awsome, just awsome

what command did you type?

I am currently testing out Custom ROMs for DEVs and I cannot find how to take a Log if I cannot Boot the device or get into TWRP. With newer devices, for example, I am currently working on a OnePlus 6, with A/B Partitions. If the device does not boot on A, it is supposed to Boot on B, so with this application, how to take a Log before the device switches Partitions and Boots on the Partition that CAN Boot?

I tried the adbd archive but there is no xbin folder for me, I just put in sbin folder. I cant get a logcat from boot because it says waiting for device the code i'm trying is this one adb logcat > logcat.txt

USA-RedDragon said:
So your kernel didn't boot. Well dang. This can be one of the worst problems. So, I'm going to HOPE you have TWRP, since CWM is pretty much dead.
This is more advanced, because you have to use Terminal command in TWRP.
Now, don't be daunted by this, since it's terminal commands, it's quite easy.
As a general rule of thumb(there are different devices with different kernel logs, though), 3.10 kernels(pretty much anything in the last 2 years) have a log in /sys/fs/pstore/console-ramoops and 3.4 and prior kernels have /proc/last_kmsg.
You can see kernel version in Settings -> About Phone
So to pull these logs, you need to be in TWRP DIRECTLY after a failed boot.
Go to Advanced->Terminal Command and type these commands in. One will fail the other will work. Should both of them fail, restart and try to boot again, then go back to TWRP.
Code:
cp /proc/last_kmsg /sdcard/kernellog.txt
Code:
cp /sys/fs/pstore/console-ramoops /sdcard/kernellog.txt
Now you can restore your backup and boot normally. Once you've booted up, you can either share the files with Google Drive or Dropbox or whatever in Android, or you can pull them to your computer with these Terminal commands:
On Linux:
Code:
adb pull /sdcard/kernellog.txt ~/kernellog.txt
That will store log into your home folder.
On Windows:
Code:
adb pull /sdcard/kernellog.txt %UserProfile%/Desktop/kernellog.txt
That will store log onto your Desktop.
Then share log like you would in the above post
Click to expand...
Click to collapse
sorry but in my device wasn't have this "/sys/fs/pstore/console-ramoops" I was browse, and did not found it... only have "sys/fs/..." if I try, still work it or not?

I have a couple of questions and I'm hoping that this forum can provide a response.
1. adb logcat not found
I have a linux laptop and have installed platform tools and have used fastboot, adb sideload quite a bit. But adb logcat just does not work.
see below while inside TWRP
5x $ adb devices
List of devices attached
00ca0a5e7fe31c03 recovery
5x $ adb logcat
/sbin/sh: exec: line 1: logcat: not found
5x $ adb shell
~ # logcat
/sbin/sh: logcat: not found
whats missing?
2. When should adb logcat be run if I wanted to capture logs when my phone keeps spinning on google animation? Can i run adb logcat > foo while I'm in recovery and then reboot from recovery or is there a different method?
thanks

I was hoping that someone could respond to the right way to capture logs during bootloop.
My problem:
Trying to capture logs on a bootloop of andrid 10 pixel experience on nexus 5x.
What I have do so far?
Flashed the ROM and zip and rebooted. No logcat seen.
My specific question.
OP says this.
After flashing, hook the phone/tablet up to your computer and run this in your Terminal:
On Linux:
Code:
adb logcat > ~/log.txt
My problem is that when the phone is rebooting, adb devices does not show anything and thus adb logcat always displays a <waiting for device> message. Thus, how can any log be captured to debug the problem?

Related

[Q] N1 ADB & Fastboot for Ubuntu 10.04

I didn't really know where to put this question, but since it involves my Nexus One I put it here. I put Ubuntu 10.04 on a old Compaq V2000 laptop that I resurrected from the dead, and it's running beautifully. I spend more time on my Ubuntu machine then my new Toshiba/w/ W7. Anyway I need things working like I have on my Toshiba. I set up ADB after getting bits and pieces of information here and there, I just could never get fastboot to work for my N1, except when I'm in fastboot and I plug in my usb it changes from fastboot to fastboot usb, so it's recognized in fastboot, well sorta. But, when I run fastboot devices the terminal just hangs on >>waiting for device<<. Now I have another problem, adb works just fine, but yesterday I used it and where the number of your devices appears is blank now, no number shows up, but I can still run commands. I've done just about everything and I'm at a loss here. Some real help here, no snide remarks, and no [email protected], I need dev help or someone familiar with Ubuntu 10.04, or if you've had this problem lend some help. Once again I already have adb setup, but my number isn't showing anymore, and I need fastboot working, and yes I gave it executable permissions, I exported my path, I created my android rules, I edited my .bashrc file. Thanks much in advance. Long Live Linux!!!!!!
I'm good, found a executable script that solved my problem.
I think you just had to sudo adb. It's always polite to post what you did to fix a problem that way someone can search and find the answer, not just a question that says fixed.
Read Read Read!!!!!!!!!!
evilkorn said:
I think you just had to sudo adb. It's always polite to post what you did to fix a problem that way someone can search and find the answer, not just a question that says fixed.
Click to expand...
Click to collapse
I said in my post that I used a executable script, I mean thats all you should need to know. I read about it somewhere, that's all I needed to know, and I found it on my own. They have nuff post on how to setup your adb, but none are 100%, so you have to take bits and pieces from them, and kinda wing it from there. I don't sudo adb on my system, sudo adb =can't be found. It would be senseles to have to type sudo every time you wanted to run adb, I have my to autostart as root as soon as I run adb. If someone needed help all they have to do is ask. Since this post I've had to re-install ubuntu 3 times and I've gotten my adb & fastboot working with the same method I used the first time. I have my adb setup where I can push and pull from any directory, so I don't fill up my tools directory with too many files, and so I don't have to move files, I can just push & pull to & from anywhere.
Perhaps you can share the script you found?
Dude, chill out. The guides are fine and 100%. I don't need to know ****, I know how to setup adb. How the hell is someone going to find that script when you didn't link it.
First, you have to tell sudo where to look for adb, you obviously didn't link it init.d or some other way to tell the software what to do with adb. You have to do 'sudo /home/name/sdk/tools'.
google query: somewhere executable script ubuntu adb
rm -r -f /
Hope this helps
prettyboy85712 said:
Perhaps you can share the script you found?
Click to expand...
Click to collapse
Here's the links, the script isn't mine to give, and I think that would be against the rules. Go to the first link to get the installer, and the next one to get the fastboot exe. I would follow the instructions in the second link. Once you finish that, run the adb script, If nothing pops out of the script when it starts to run , run it again, or try running (in terminal) command. If you need detailed instructions PM me, it's a little process, you have to edit some files.
http://www.droidforums.net/forum/hacking-help/38186-linux-sdk-adb-autoinstaller-script.html
http://forum.xda-developers.com/showthread.php?t=537508
Good for you.

[Q] Please help me use adb to root JI6 on a mac!!

I have been trying to make this whole adb think work for about twenty hours strait and I still have not gotten very far. I own a mac and no pc and updated to froyo with my buddies pc. I have followed all the directions to a T over and over using terminal on the mac and I can get to the ADB commands and even to where I can see my phone by clicking devices but I must be missing something important. ANY HELP WOULD BE REALLY APPRECIATED I AM ABOUT TO PULL MY FREAKING HAIR OUT!!!
Ok, so if you can see your phone through adb, then you are definitely on the right track. Unfortunately, I'm not really familiar with OS X anymore so I'm not quite sure how to do it. Just sit tight for now until someone who does use a Mac, or has more of a clue then I do can help you out.
But seriously, don't pull your hair out. It won't stay on your head forever ya know...
Edit: oops, just saw this is JI6 (Froyo) not JF6, so I can't help you, but here is a general overview:
from terminal inside Android sdk main directory:
tools/adb devices -> list all devices connected that ADB can see
tools/adb shell -> gets a normal user shell on your phone
tools/adb reboot recovery -> reboots into recovery mode, suitable for update.zip root method
--------------------------------
Place the root update.zip on internal sdcard.
from terminal inside Android sdk directory:
tools/adb reboot recovery
Select the update software option, and you will be done.
laxwillsch said:
I have been trying to make this whole adb think work for about twenty hours strait and I still have not gotten very far. I own a mac and no pc and updated to froyo with my buddies pc. I have followed all the directions to a T over and over using terminal on the mac and I can get to the ADB commands and even to where I can see my phone by clicking devices but I must be missing something important. ANY HELP WOULD BE REALLY APPRECIATED I AM ABOUT TO PULL MY FREAKING HAIR OUT!!!
Click to expand...
Click to collapse
Start simple:
If you open a terminal on the mac, and go to your android SDK tools folder; what happens when you type ADB shell?
Or if you type any of the ADB push commands?
You need to give more detail around what you are seeing for us to help you.
Ok so if I am in terminal and i type in my /android-sdk-mac_x86/tools nothing happens and it just says /android-sdk-mac_x86/tools is a directory. But if I type the same but with /tools/abd it opens the abd command lines, like how to write code. Then when I try to "adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin"
it says "-bash: adb: command not found"
however when I type laxwillsch$ /android-sdk-mac_x86/tools/adb shell
it does give me the drop down $
but when I then try to write the next line of code "chmod 0755 rageagainstthecage-arm5.bin"
it says "chmod: rageagainstthecage-arm5.bin: No such file or directory"
I am stumped I am beginning to think i need to buy a pc as I am very interested in android development and want to learn more, but it seems all the tutorials are run assuming you are on a PC
EDIT** I have downloaded the android SDK started pack, and the 2.2 root pack and they are all in my /android-sdk-mac_x86/tools folder that is directly on my Macintosh HD for simplicity
Do you know how to change directories (cd command)?
The problem is that you are trying to work in one directory, but all your tools are in another.
So change directories to the tools directory:
cd /android-sdk-mac_x86/tools/
now run your adb commands - you may have to type ./adb to tell your mac to look in the current directory for the adb command (that is what ./ means "start here")
Also, try to understand what is happening so you can more easily troubleshoot: chmod is a command to change permissions, and you are running it on the phone. If you can't push the file to the phone, then you can change it's permisssions. I guess you never got rageagainstthecage on the phone, so there is no way to chmod it.
If you can't do this on a mac, a PC is not easier. I use both, and like both, but you need to learn basic commands first - they apply to the mac terminal and the windows cmd prompt.
Getting root means moving in and out of the phone - adb shell - puts you in a terminal on the phone. So you really need to understand cd (change directory); pwd (present working directory - shows you where you are); cp (copy); and know your current path - what the ./ does.
I hope this helps, not trying to sound condescending - maybe practice a linux terminal tutorial would help
Thanks so much, I am at school right now and cant test out all that but you are really helping me understand all this! I will post tonight and let you know how it goes. again thank you
ok so i dont have my usb cable with me but I was playing around with the commands that you suggested and ureka! i finally got to a point where it says "h70-33-65-19:tools laxwillsch$" thats a first! and when i type pwd it shows "/android-sdk-mac_x86/tools" so that means I am working out of the right directory right? and from here I enable usb debugging connect my phone then just copy and paste the codes from the thread correct?
yes, it sounds like you are on the right track. But take it nice and slow when you follow the steps. It is very important that the commands are entered exactly as you see them.
Also, one step tells you to wait for something to run and kick you out of ADB - wait just like it says - takes about 45 seconds but feels like forever.
If you are in the tools directory - just by typing "adb" no quotes will give you whole page of adb commands - if you get a "command not found", then you need to add the ./ and make it ./adb
Hope this helps and again, read the commands step by step a couple times first so you understand what is happening.
In a nutsell, you push the rage file;
change its permissions, run it;
get kicked out of ADB and then open a new ADB shell;
you are now root;
remount the system partition to give you write access when it reboots;
reboot;
push over some files;
change permissions on files you pushed;
reboot;
Some things to know - SU is a command for gaining root access; when you use SU your prompt changes (in adb shell) from $ to #
If you are succesful you should see the SuperUser app listed in your apps.
Done and Done just rooted successfully couldnt have done it without you! thanks so much

[GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies

ADB:-
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:-
Logcat:-
A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible.
App Installation and Management:-
adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them.
Shell Execution:-
You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers.
Pushing and Pulling:-
Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things
Remounting and setting permissions
Basic commands:-
Of-course basic commands such as rebooting and rebooting in recovery mode and download mode are supported.
Others:-
There are several other features of adb such as fastboot, aapt, etc
Setting up ADB
Pre Requirements:-
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
USB Debugging MUST be turned ON in the device for ADB to see it & Developer options is hidden in Android 4.2 and
above, Hitting Build number 10 times in
About Phone/Tablet reveals the menu (Thanks lilHermit for reminding me to add it)
Assuming you all these ready and working properly, we continue
If you are having trouble completing Pre-Requisites, there are several guides featuring them too
Start
1. First Download Android SDK. Roughly about 70 MB
2. There may be any compressed zip file or exe file
If zip file, then extract it to C:\android-sdk
If exe file then double click on it and install it in C:\ Drive(or any other drive you want)
3. Now to get adb and other tools, you need to download 'Platform Tools'
To download them, go to the android-sdk folder and double click on SDK Manager
It will ask you which package to download? However, it is your choice which package to Download, but here, we will only talk about platform
Tools. So, simply tick on Platform Tools and click on install. Once you have done it. Go to the platform-tools folder in the directory where you installed android-sdk. You will find several files there like adb, fastboot, aapt, etc
4. Now, you can backup the whole folder of android-sdk to any external storage that will make you not download package
again if you want to. You can have it placed in any computer and run it as it does not require registry to work
5. Now, you are just one step away from using adb. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE (If you however want to set environment variables. Click on Show Content)
We can easily append the sdk platform-tools and tools folder to your systems environmental path variable directly from command line(cmd) by simply issuing one command and performing a system reboot:
Code:
[COLOR=Black]SETX PATH "%PATH%;[/COLOR][COLOR=Indigo]SDK_Install_Path[/COLOR][COLOR=Black]\platform-tools;[/COLOR][COLOR=Indigo]SDK_Install_Path[/COLOR][COLOR=Black]\android-sdk-windows\tools" -m[/COLOR]
Just replace the "SDK_Install_Path" in the above with the proper path of your SDK installation. Example: C:\android-sdk-windows
(Thanks to WugFresh for telling me :victory
Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt,
you will know that to execute any application with command prompt, you first need to change the directory to the one where application is
placed. And to skip changing the directories every time you open CMD, you need to put that application is environment variable. However, we will not do so.
6. Type cmd in the search bar. Copy cmd.exe from there. Go to the directory where you have installed android-sdk. Go to platform-tools folder. Paste cmd there, right click on it and in the settings, select Run as Administrator.
7. You are done. Now what to do in it?
ADB Commands
Type adb in command prompt. And several commands will show up on your screen. It is very difficult to analyse these all commands, so we will only talk about most used and important commands
Connect your device via USB cable
And open the CMD in platform-tools folder(Make a shortcut of it on desktop). And type the suitable commands
Code:
adb devices
Will show the list of devices attached to the PC andtheir serial numbers. If this shows up correctly on your PC, then it means that everything is fine for continuing.
Logcat
Code:
adb logcat
It will display the real time log of your device
Best time to do it is when your device boots up
Now, many users ask me how to copy the logcat and upload it from CMD
There are several methods:-
1. Right click on the Title Bar of Command Prompt. Hover the cursor over edit and select mark. Select all the things you want to copy and then click enter. All the things will be copied to clipboard.
2. This is the correct way of getting logcat saved.
Code:
adb logcat > logcat.txt
This command will create a logcat.txt document in platform-tools folder with the complete logcat of the device. Ofcourse you can type any name instead of logcat.txt
3. I prefer taking logcat this way as it neatly compiles logs of different time
Code:
adb logcat -v long > logcat.txt
This is a very nice way to get logcat.
Installing Apps
Code:
adb install %PATH OF APK%
This will install an app on your Android
For example, if my app AreeB.apk is in G:\ drive (G:\AreeB.apk)
Then I will type
Code:
adb install G:\AreeB.apk
Be sure your apk is not in a folder that has space in its name, else the command will break at space bar.
For eg:-
G:\Program Files\AreeB.apk
Note:
If you have spaces in path of apk, you can execute the command without breakage if you include the path inside quotes. (Thanks to etcman)
Eg:-
Code:
adb install "G:\Program Files\AreeB.apk"
Mounting
However, I never found any problem in tweaking with system files with adb, but some users said that they couldn't do it, so the problem was that their system partition was mounted as Read Only(R/O)
So, it is necessary now to tell how to mount system partition as Read Write(R/W)
Code:
adb remount
It is easiest way to do so, if it does not work then
There is another method that we will discuss in ADB Shell commands section
Pushing and Pulling
For pushing,
Type
Code:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%
Suppose I have an app named SystemUI.apk(PATH = G:\SystemUI.apk) which I want to push in /system/app/ on my android(or in other words, install an app as a system app). Then I would type
Code:
adb push G:\SystemUI.apk /system/app/
More examples
G:\Dance.txt file to be pushed in Dance folder in sdcard
Code:
adb push G:\Dance.txt /sdcard/Dance/
OR
Code:
adb push G:\Dance.txt /mnt/sdcard/Dance/
G:\Movies folder to be transferred in SDCARD in Videos Folder
Code:
adb push G:\Movies /sdcard/Videos/
G:\system\framework\framework-res.apk to be pushed in /system/framework/
Code:
adb push G:\system\framework\framework-res.apk /system/framework/
For pulling,
push command replaces with pull and paths are swapped​
Code:
adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE%
Example,
All system apps are to be pulled to G:\ROM\system\app
Code:
adb pull /system/app G:\ROM\system\app\
build.prop to be extracted to desktop
Code:
adb pull /system/build.prop C:\Users\Areeb\Desktop\
However, if a folder is in platform-tools folder, you don't need to type full path
Suppose if I type
Code:
adb pull /system/ system
Then a folder named system will be created inside platform-tools with all the files in system in it
If a file is in platform-tools folder, then also no need to type full path
For example,
There is an app name DeskClock.apk in this folder then, to push it to /system/app, type
Code:
adb push DeskClock.apk /system/app/
ADB Shell Commands
This mode of adb allows you to execute linux shell commands from your PC
These commands can aldo be executed through the mobile using Terminal Emulator
To initiate shell mode
Type
Code:
adb shell
You will get an prompt like this
sh-3.2#
Now you are in shell mode
adb commands won't work here and a new set of commands will work here. But we will only go in a little detail here.
Assuming you are in adb shell mode, I will only type commands that will work on shell. Note:- These commands won't work if you type them alone on cmd. But, these command will directly work on your mobile's Terminal Emulator
As these commands can also work on mobile, I am going to tell you a way of taking logcat on mobile
Type
Code:
logcat
You will see log of your device
To save this
Type
Code:
logcat > /sdcard/log.txt
A file named log.txt will be generated in sdcard
Uninstalling Applications
Code:
cd /data/app
This will change the directory to /data/app
Code:
ls
This will show the list of files in there
Suppose, there is an app named com.opera.browser (Opera Mobile) you want to uninstall it
Type
Code:
rm -r com.opera.browser
This will uninstall the app
Mounting Command:-
Code:
mount -o rw,remount /dev/block/mtdblock3 /system
Miscellanous commands:-
su: Initiates root request
du: Shows file foldrs and size
date: Shows todays date
ls: Shows list of directory
cd: Changes working directory
rm: Removes the file
logcat: Displays logcat
mount: Mounts the partition
busybox: Busybox Applets
Credits
Google: For Android and several searchings
Samsung: For Galaxy Ace s5830I
paxChristos for amazing logcat guide
Broadcom: For their Open Sourceness
XDA Forums : For the precious knowledge
Reserved
Reserved Once More
Last One
Reserve the guide
install full rom
how to install a full rom from adb?
Pretty sure it's impossible. Sorry.
Sent from my E15i using XDA Premium App
Perfect Guide to use ADB Commands..
It is very clear and perfect guide to use ADB commands.. I tested this all and works fine..
You can use apks to do logcats from the phone too, I use catlog.
About Broadcom being open sourced made me laugh hahaha.
open source broadcomm, i see what you did there .
Updated OP
Hey, I have downloaded adb a week ago. I did everything like your tutorial and more but adb doesn't see my device. I already have USB Debugging on and have the USB Drivers, but it doesn't work. This is what I get (Screenshot)
Android-fany said:
Hey, I have downloaded adb a week ago. I did everything like your tutorial and more but adb doesn't see my device. I already have USB Debugging on and have the USB Drivers, but it doesn't work. This is what I get (Screenshot)
Click to expand...
Click to collapse
Probably because of bad drivers
Can you use any other software with your mob
Because when I had this problem, reinstalling drivers fixed it.
iamareebjamal said:
Probably because of bad drivers
Can you use any other software with your mob
Because when I had this problem, reinstalling drivers fixed it.
Click to expand...
Click to collapse
I already reinstalled it like 5 times. Still doesn't work.
Android-fany said:
I already reinstalled it like 5 times. Still doesn't work.
Click to expand...
Click to collapse
Which Windows?
Which ROM?
iamareebjamal said:
Which Windows?
Which ROM?
Click to expand...
Click to collapse
Windows Vista
Stock Rom + Interactive Kernel (If the kernel is important too)
Android-fany said:
Windows Vista
Stock Rom + Interactive Kernel (If the kernel is important too)
Click to expand...
Click to collapse
Ah Vista
That old Nemesis
Frankly telling you bro, Vista sucks big time
I unistalled it as soon as I found out that Android kitchen won't work on it
Sorry bro
I don't know much about Vista
Install 7 or 8
AW: [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies
iamareebjamal said:
Ah Vista
That old Nemesis
Frankly telling you bro, Vista sucks big time
I unistalled it as soon as I found out that Android kitchen won't work on it
Sorry bro
I don't know much about Vista
Install 7 or 8
Click to expand...
Click to collapse
I can't install Windows 7/8 because it is not my computer.
But Android Kitchen and the other tools works. Just not adb.
Tapatalked by s5830i
Android-fany said:
I can't install Windows 7/8 because it is not my computer.
But Android Kitchen and the other tools works. Just not adb.
Tapatalked by s5830i
Click to expand...
Click to collapse
Very strange
Download My Phone Explorer and check if its working!!
Its just 2mb-6mb

[Reference] How to get useful logs

We're on a development site - at least in theory.
To help out development without actually having some knowledge it's really important to know how and when to get logs.
Lately more and more people in this section do grab appropriate logs, which is a good thing and has already helped in fixing a bunch of bugs.
To stop (especially new) people from constantly asking how to get logcats I decided to hand out a quick reference on how to grab logs efficiently via adb / terminal / app.
There is an app which can export apps (see the end of this post), but you should learn how to get logs via adb anyways, as a dmesg is often crucial in case of debugging bsods.
I won't post instructions in how to get adb working - you can use Google or take this CM wiki entry as a starting point.
The three most important log types are:
logcat: the logoutput of the Android system
radio logcat: the log outpur ot your System / BB / RIL communication
kernel log (kmsg / dmesg): the kernel messages
Additionally there's the last_kmsg which is a dump of the kernel log until the last shutdown.
Normal Logcat:
Code:
adb logcat -v time -d > logcat.log
Radio Logcat:
Code:
adb logcat -b radio -v time -d > logcat_radio.log
Note: Cyanogenmod (based) ROMs require the following setting to export kernel logs via adb:
Settings - Developer Options - Root access - choose: "Apps and ADB"
Kernel Log:
Code:
adb shell su -c dmesg > dmesg.log
Last_kmsg:
Code:
adb shell su -c "cat /proc/last_kmsg" > last_kmsg.log
For getting the logs via the Terminal Emulator app the commands differ a little:
Get logs via Terminal Emulator:
Normal Logcat:
Code:
logcat -v time -d > /sdcard/logcat.log
Radio Logcat:
Code:
logcat -b radio -v time -d > /sdcard/logcat_radio.log
Kernel Log:
Code:
su -c dmesg > /sdcard/dmesg.log
Last_kmsg:
Code:
su -c "cat /proc/last_kmsg" > /sdcard/last_kmsg.log
Notes:
-v time will include timestamps in the logcats
-d will export the complete log.
If you want to save a continuous log you can remove the -d parameter - then you need to cancel the logging process via CTRL+C.
To export a continuous kernel log use adb shell su -c "cat /proc/kmsg" > dmesg.log (and cancel it via CTRL+C again).
Exporting logs with an app:
I used to recommend Lumberjack for grabbing logs, but it doesn't work with Jellybean properly anymore and fails to export the dmesg.
I googled for a while and found a great (and fully open sourced) alternative to export logs: SysLog
With this great app there are no more excuses - at least open the app, export all 4 log types and attach the zip file from /sdcard/SysLog to your bug report.
Before anyone asks (duh!), Kernel log = dmesg, Last kernel log= last_kmsg, main log = logcat, modem log = radio log.
Lumberjack still is great to have a look at logs on the phone, but for exporting you probably should use SysLog as it does it quickly and reliable
SysLog (source):
​
When to post which kind of logs:
If you got any kind of ROM problems - especially problems with Apps like force closes, attach a logcat.
If there are problems while calling or with your signal attach a radio logcat to the normal logcat.
In kernel threads or on issues which might be kernel related (from A as auto brightness to Z as ZRAM) you need a kernel log
If you had a sudden reboot attach a last_kmsg, then we can check if it's been kernel related
As our phone has always been on the edge of bsod's and freezes, some special notes about them as well:
If you had a bsod and/or freeze a logcat dmesg after rebooting is useless, as it doesn't show anything from before the reboot
There are two things you can do:
While the phone's screen is black connect the cable to your computer and check if the device is accessable via adb (check e.g. with "adb devices").
If it is export the dmesg like explained above. If not go on to step 2:
Note that two of the bsod problems of the ICS/CM kernel have been fixed by pengus by the logs I managed to get while the phone has been in a bsod - which means this is crucial!
Pull the battery and insert it again as quickly as possible. Why? The phone does hold a so called last_kmsg in RAM.
It's non-permanent memory, which means it doesn't survive a loss of power - sometimes we're in luck by a quick pull though.
If we're not in luck the file will be empty or contain scrambled characters.
Last but not least some general remarks:
If you don't provide useful logs we can not help you in 95% of the cases in case we can't reproduce it.
Buf even if we could reproduce it - let's assume one of YOUR apps is force closing. Why should we install the app to reproduce the problem and get the logs ourselves.
YOU want help, so YOU should provide the log.
Every real dev with some coding knowledge will need logs to fix the bugs.
This site is called xda-developers - which means that the initial intention of this forum is the actual development itself - and not "making your phone cool".
The least you can (and must) do is to provide useful help with a clear problem description and attached logs when you run into some issues
Choose 1 or 2:
1:
What developers like:
{
"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"
}
What developers don't like:
2:
Great, an other useful thread from you
Such a great and useful post, should be stickied ...
thank you so much for this tonyp.. i've been trying with lumberjack for a while and couldn't ever get any last_kmsg even with a quick battery pull.. i will try the syslog export
besho2222 said:
Such a great and useful post, should be stickied ...
Click to expand...
Click to collapse
It is stickied
Awesome, thank you.
Just a small update, I added "su" requests to the kernel log commands in post 1.
This ensures you won't run into permission denied problems.
My ParanoidAndroid ROM is a eng-build so you won't need that there, but on most other CM10 / CM10.1 ROMs you'll probably need to ask about superuser rights.
Root shouldn't be disabled at Settings - Developer Options - Root access of course.
How to get the last kernel log?
I have tried several times now; I can't find the last kernel log:
in SysLog last kernel log option is greyed out, and
with adb as described above response is
sh: cat: /proc/last_kmsg: No such file or directory
Click to expand...
Click to collapse
What I am doing wrong? Do I have to put some check mark?
I have checked root access for apps and adb...
oneearleft said:
I have tried several times now; I can't find the last kernel log:
in SysLog last kernel log option is greyed out, and
with adb as described above response is
What I am doing wrong? Do I have to put some check mark?
I have checked root access for apps and adb...
Click to expand...
Click to collapse
Do a reboot, is the file there then? It won't be there every time, just if the kernel manages to save it properly (reboot, usually oops and panic).
tonyp I am having RAPID restarts with your PA ROM.. everything is fine, battery life , smoothness, performance but this restarts are so annoying .. I am talking and oooopsss big X in the screen... then NO network... i am going to Lumberjack last kmsp and nothing file is empty, go to logsys there is no check on karnel log.. ;( I am so depressed i am having restarts even when i am using Chat clients like "Whats app" or "Viber" ... When network is busy phone is restarting.. :/ I dont like moving to another ROM but i cant see other escape. Please tell me how to get those stupid logs ;( ;( i tried everything :/ I made 3-4 full wipes but nothing happends .. everything is like usual ... restart restart no network restart.. :/ ;( ;(
Here is what i got from Logsys just a minute ago (after another restart and removing battery) but there is no last kmsg log again :/
http://speedy.sh/GjmDH/2013-04-05-16.12.zip
dargon91 said:
tonyp I am having RAPID restarts with your PA ROM.. everything is fine, battery life , smoothness, performance but this restarts are so annoying .. I am talking and oooopsss big X in the screen... then NO network... i am going to Lumberjack last kmsp and nothing file is empty, go to logsys there is no check on karnel log.. ;( I am so depressed i am having restarts even when i am using Chat clients like "Whats app" or "Viber" ... When network is busy phone is restarting.. :/ I dont like moving to another ROM but i cant see other escape. Please tell me how to get those stupid logs ;( ;( i tried everything :/ I made 3-4 full wipes but nothing happends .. everything is like usual ... restart restart no network restart.. :/ ;( ;(
Here is what i got from Logsys just a minute ago (after another restart and removing battery) but there is no last kmsg log again :/
http://speedy.sh/GjmDH/2013-04-05-16.12.zip
Click to expand...
Click to collapse
Well you aren't doing anything wrong, it seems like the logs just aren't there.
As you're the only one with these issues and can't produce logcats you have to figure this out yourself, I'm afraid.
I'd suggest to use NVFlash / AIOToolkit and start fresh. Do NOT restore data with TitaniumBackup or similiar apps.
I have no idea what's up with your phone, maybe it's the hardware. If it only affects my ROM then move to another one.
And please remember that this is not the PA thread.
I know sorry for offtopic but i am so depressed i want get those logs cuz my phone is messed up .. :/ and i cant well i will think of formating everything it would be the last choise :/
Consider adding a link to this tool right here: AIOlog
Don't mind the screenshot in that thread, it will detect & write Device Model: LG P990 automatically when it is connected.
That tool makes the simple things even more simple
Great
Thank you for this little tutorial, you helped a lot. But I am thinking about if its not possible to watch phone logs live on you pc, while your phone is connected via USB.
Vippo321 said:
Thank you for this little tutorial, you helped a lot. But I am thinking about if its not possible to watch phone logs live on you pc, while your phone is connected via USB.
Click to expand...
Click to collapse
Just type adb logcat (without the "arrow" to save the logs and the -d parameter), then you'll see it in the console.
Or if you got the android developer kit installed use the included ddms.bat or eclipse to have a nice logcat viewer.
Sent from my LG-P990 using xda app-developers app
Tony/pengus/anyone else, do you use Android SDK to adb logcat or normal command prompt on Windows? because lets say my phone is stuck on the LG logo, am I wrong to think that the PC won't detect the phone? I have been trying with Android SDK but I just haven't been able to adb logcat when it is stuck on LG logo or even bootamination. Actually, I did get to adb logcat when it was stuck on bootamination once, but I have no idea what I did lol.
Seriously need help, especially when its stuck on LG logo, got no idea how to logcat in such case.
Note: I am on Windows 7.
Thanks a lot!
natalya said:
Tony/pengus/anyone else, do you use Android SDK to adb logcat or normal command prompt on Windows? because lets say my phone is stuck on the LG logo, am I wrong to think that the PC won't detect the phone? I have been trying with Android SDK but I just haven't been able to adb logcat when it is stuck on LG logo or even bootamination. Actually, I did get to adb logcat when it was stuck on bootamination once, but I have no idea what I did lol.
Seriously need help, especially when its stuck on LG logo, got no idea how to logcat in such case.
Note: I am on Windows 7.
Thanks a lot!
Click to expand...
Click to collapse
Okay, here's the deal.
You probably didn't do anything wrong. There are different kind of bootloops - sometimes the phone initializes correctly and manages to bring up the adb interface before it loops - but sometimes the error happens before that, then there's nothing you can do.
Just check if the device is online with "adb devices" - if there's no serial number you don't have adb access to the phone.
I'm trying to generate a logcat through Terminal Emulator but keep getting an error msg : -c not found. Any idea please?

Help flashing stock rom to Pixel 4 XL with Pixelbook?

Hello folks!
Its been a while since i posted here - i havent been flashing roms for an age (kids etc got in the way!)
Anyway, i've picked up a Pixel 4 XL, and it was running a custom ROM, i'm trying to move back to stock and have been able to follow all the guides i've found up to using the 'fastboot flashall' in shell.
The command works and delivers the
Bootloader Version...:
Baseband Version.....:
Serial Number........:
values, but then errors out with the following error "fastboot: error: ANDROID_PRODUCT_OUT not set"
I'm stumped what that means and how to fix. I'm doing all of this on my Pixelbook, and have updated fastboot and adb as per the initial steps for flashing.
Can anyone shed any light on what i still need to do to get flashall to work as expected?
Thanks in advance if you are able to help out!
ptm
Welcome Back
Could you post the exact command you are using for fastboot flash please? It sounds like fastboot is not finding the files to flash. Usually, depending on the configuration of the fastboot install, it's easier to place the firmware in the same directory as the fastboot binary.
Thanks! It turns out i've missed this place!
So the firmware files are all on the chromebook and I've used 'shell' to navigate to where I've unzipped. Here's the command line with the command i'm using: "[email protected] ~/Downloads/ota_file $ fastboot flashall"
Before trying a full flash, i was trying to sideload the OTA as per instructions here https://developers.google.com/android/ota#instructions but moving the file from my pixelbook to the 4XL fails at 47% every time.
So i reverted to a full flash as per these instructions - https://developers.google.com/android/images and that is where i'm coming a cropper with the 'not set' error.
Thanks for your help!
ktmom said:
Welcome Back
Could you post the exact command you are using for fastboot flash please? It sounds like fastboot is not finding the files to flash. Usually, depending on the configuration of the fastboot install, it's easier to place the firmware in the same directory as the fastboot binary.
Click to expand...
Click to collapse
I thinnk you may be merging several approaches.
You are using the full factory image downloaded from the https://developers.google.com/android/images page, right? Then, once downloaded, you are unzipping the file and cd into the new directory (from the unzip). The command then should be
Code:
./flash-all.sh
As far as the OTA install is concerned, you are using the command
Code:
adb sideload "ota_file.zip"
, and at 47%, what happens that it appears to fail? My memory on my P3XL is at that point it takes awhile.
If you are using a C to C switch to an A to C cable and try it. You'll want to remove the wipe from the flash-all before you flash the full image and it's the flash all you should be using to flash.
Yeah i think you're right - so now just concentrating on the Full Flash method shown on the Google Developers page, and yes doing it exactly as you'd described.
Ok - using
Code:
./flash-all.sh
now returns the error
Code:
bash: ./flash-all.sh: Permission denied
I have tried to prefix './flash-all.sh' with 'Fastboot' but no dice here either. Is that required at all?
ktmom said:
I thinnk you may be merging several approaches.
You are using the full factory image downloaded from the https://developers.google.com/android/images page, right? Then, once downloaded, you are unzipping the file and cd into the new directory (from the unzip). The command then should be
Code:
./flash-all.sh
As far as the OTA install is concerned, you are using the command
Code:
adb sideload "ota_file.zip"
, and at 47%, what happens that it appears to fail? My memory on my P3XL is at that point it takes awhile.
Click to expand...
Click to collapse
ptm said:
Yeah i think you're right - so now just concentrating on the Full Flash method shown on the Google Developers page, and yes doing it exactly as you'd described.
Ok - using
Code:
./flash-all.sh
now returns the error
Code:
bash: ./flash-all.sh: Permission denied
I have tried to prefix './flash-all.sh' with 'Fastboot' but no dice here either. Is that required at all?
Click to expand...
Click to collapse
You need to give the "flash-all.sh" script execution rights (that is why the permission denied error). Use this code:
Code:
chmod +x ./flash-all.sh
You may need super user/root rights:
Code:
sudo chmod +x ./flash-all.sh
The "flash-all.sh" script is a stand-alone script that sequentially flashes the entire factory package. As was mentioned in another repsonse in this thread, in cases where you want to update, but not lose your installed user apps and data, you would edit the script and remove the "-w" augment. In this case, you are returning to stock and you should perform the wipe (-w).
The dot slash (./) that preceeds the flash-all.sh tells the bash interpreter (what runs commands you give) that the file is right here, in this directory.
The flash-all.sh is a standalone script (series of written instructions) and calls fastboot from within it.
Thanks for sticking with me on this ktmom!
OK, i've used both
Code:
chmod +x ./flash-all.sh
and
Code:
sudo chmod +x ./flash-all.sh
but still getting the permission denied error when i launch ./flash-all.sh
I'll do a screencast vid walking through the entire process i'm following, so that you can see what i'm up too and in case it gives any further clues for a solution.
Thanks again!
ktmom said:
You need to give the "flash-all.sh" script execution rights (that is why the permission denied error). Use this code:
Code:
chmod +x ./flash-all.sh
You may need super user/root rights:
Code:
sudo chmod +x ./flash-all.sh
The "flash-all.sh" script is a stand-alone script that sequentially flashes the entire factory package. As was mentioned in another repsonse in this thread, in cases where you want to update, but not lose your installed user apps and data, you would edit the script and remove the "-w" augment. In this case, you are returning to stock and you should perform the wipe (-w).
The dot slash (./) that preceeds the flash-all.sh tells the bash interpreter (what runs commands you give) that the file is right here, in this directory.
The flash-all.sh is a standalone script (series of written instructions) and calls fastboot from within it.
Click to expand...
Click to collapse
@ptm, No worries, I'll do my best to help. I'm typing this on a chromebook that I also use to fastboot to a P3XL.
Edit 1:
Just to make sure:
1) The bootloader is unlocked?
2) "fastboot devices" returns the serial number of your device?
3) you are running ./flash-all.sh command as root or as the default user? In other words, the same way that fastboot devices returns the serial number. Either sudo fastboot devices or just fastboot devices.
4) if you enter the linux command: ls -al flash-all.sh do you get something like:
-rwxr-xr-x. 1 chronos chronos 957 Jul 18 2019 flash-all.sh
In this example -rwxr-xr-x is depicting the file permissions where there are three groupings; owner group everyone else. The first rwx means read, write and execute permissions for the file owner. Others in the same group and everyone else has read and execute permissions. Execute (x) is required in order for a script to run. If your file does not have three x so that all three groups have permission to execute it, then we need to revisit that.
Edit 2:
Another thought that could be affecting you is ADB and Fastboot are old. in your crosh shell, type:
Code:
[email protected] ~ $ adb --version
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
[email protected] ~ $ fastboot --version
fastboot version 29.0.5-5949299
Installed as /usr/local/bin/fastboot
If either returns a version older than the output above, then the easy way to update these is to use the script on Nathan Chance's Githuib. This might look a little overwhelming but it's pretty easy. I suggest you read the page, but the operative information is in section 4. Run the setup script:
To install, run
Code:
curl -s https://raw.githubusercontent.com/nathanchance/chromeos-adb-fastboot/master/install.sh | bash
in your shell prompt.
This script very nicely updates your ADB/Fastboot to the newest version which will be required for your P4XL
Are you guys sure you aren't making it too hard? You don't have to give any commands to install the full image. Download the full image and put it into an empty folder, go ahead and extract it in that folder. Create another new folder, Copy everything into it so you still have the full image in the first folder. Now download the tools and put those into a folder and extract them in that folder. Take the entire contents of that folder and add it to the folder you copied the extracted image into. What you should have now is one folder that still has the full extracted image, one that has the full extracted tools, and one that has both. If you have not already done so the phone should have debugging enabled and oem should be on. Go ahead and put it into bootloader mode and plug it in, type cmd in the path bar of the folder with both tools and image and check devices which will tell you if the tools can see the phone. If you get your serial the tools can see the phone. If you're going to wipe you can go ahead and click the flash-all and it will start the process, you do not give any commands. If you don't want to wipe the edit the flash-all to remove the-w, save it, and click on it. Again, no command is given, you just click and the flash-all does the rest.
Edit... And dont forget, A to C, not the provided C to C.
krabman said:
Are you guys sure you aren't making it too hard? You don't have to give any commands to install the full image. Download the full image and put it into an empty folder, go ahead and extract it in that folder. Create another new folder, Copy everything into it so you still have the full image in the first folder. Now download the tools and put those into a folder and extract them in that folder. Take the entire contents of that folder and add it to the folder you copied the extracted image into. What you should have now is one folder that still has the full extracted image, one that has the full extracted tools, and one that has both. If you have not already done so the phone should have debugging enabled and oem should be on. Go ahead and put it into bootloader mode and plug it in, type cmd in the path bar of the folder with both tools and image and check devices which will tell you if the tools can see the phone. If you get your serial the tools can see the phone. If you're going to wipe you can go ahead and click the flash-all and it will start the process, you do not give any commands. If you don't want to wipe the edit the flash-all to remove the-w, save it, and click on it. Again, no command is given, you just click and the flash-all does the rest.
Edit... And dont forget, A to C, not the provided C to C.
Click to expand...
Click to collapse
What Tools do you need to do this?
Same page as the images, scroll up from them and in the description of the process they have a link to the platform tools.
@krabman, Since this is using a chromebook, not a PC, things are flakier than normal. I just replicated the problems experienced by @ptm and some of it is due to old ADB/Fastboot as described in my previous post. Some is because ChromeOS made a change in an update that mounts nearly all of the partitions noexec, which means scripts can not execute and give the reported, "no permissions" error. There is a workaround since /usr/local is mounted executable. It's also possible to remount a partition with exec permissions.
@ptm, as the easiest route, I suggest making sure the ABD is current using the script I linked yesterday, and then going back to the OTA sideload method. I tanked my phone for a few hours yesterday trying to make fastboot get through the entire system image. I finally resorted to my full ubuntu install on my chromebook.
airmaxx23 said:
What Tools do you need to do this?
Click to expand...
Click to collapse
A general Fastboot/ADB tutorial is available here. If you are not using a chromebook, this thread's discussion will just add confusion.
If you are using a chromebook, then you need to enter a crosh shell, make sure adb and fastboot are updated as described in an earlier post and read the rest of the information I posted about the associated problems.
My understanding is the sh should flash on chrome with the latest tools as I described and you use the bat for PC. If the device is down he would have nothing to lose trying, if not I'd be leery of trying it since a partial flash will definitely result in a softie. Of course the possibility that I don't fully understand it may explain my puzzlement.
ktmom said:
A general Fastboot/ADB tutorial is available here. If you are not using a chromebook, this thread's discussion will just add confusion.
If you are using a chromebook, then you need to enter a crosh shell, make sure adb and fastboot are updated as described in an earlier post and read the rest of the information I posted about the associated problems.
Click to expand...
Click to collapse
Thanks, I know how to use ADB on the PC but I have a ChromeBook that I'd like to use as well. I already have it in Developer Mode.
I got it working, I just to run the script to update ADB and Fastboot.
airmaxx23 said:
Thanks, I know how to use ADB on the PC but I have a ChromeBook that I'd like to use as well. I already have it in Developer Mode.
When I open a Crosh Window, type shell, then adb devices my Pixel 4 XL shows up but I get: no permissions; see [http://developer.android.com/tools/device.html]
Click to expand...
Click to collapse
My bet is your ADB/fastboot are to old. Go back to post 9 and read the lower portion under edit2. You should also read forward from that point as there are additional issues that ChromeOS introduced with the noexec mounting of partitions. It will mean that without a workaround, you can not execute the flash-all.sh.
ktmom said:
My bet is your ADB/fastboot are to old. Go back to post 9 and read the lower portion under edit2. You should also read forward from that point as there are additional issues that ChromeOS introduced with the noexec mounting of partitions. It will mean that without a workaround, you can not execute the flash-all.sh.
Click to expand...
Click to collapse
Hey there,
SO i decided to try the OTA sideload method on a friends PC - i got the following response through CMD prompt
Code:
C:\Users\LYALL\Downloads>adb sideload ota-file.zip
Total xfer: 1.00x 1
However the phone is reporting a failure verifying the file signature and giving
Code:
E: Error code: 21
What do you think is causing that? I saw that Google has a new browser based flash tool to allow for AOSP builds to flash - would using that work better for me do you think?
ptm
ptm said:
Hey there,
SO i decided to try the OTA sideload method on a friends PC - i got the following response through CMD prompt
Code:
C:\Users\LYALL\Downloads>adb sideload ota-file.zip
Total xfer: 1.00x 1
However the phone is reporting a failure verifying the file signature and giving
Code:
E: Error code: 21
What do you think is causing that? I saw that Google has a new browser based flash tool to allow for AOSP builds to flash - would using that work better for me do you think?
ptm
Click to expand...
Click to collapse
Make sure you have downloaded the correct OTA and for crosshatch coral. Use the sha256 checksum provided in the download page and ensure the file is not corrupted. I check the integrity of the file before using it especially if I've moved it since the last verification.
You are rebooting to recovery (not rescue mode) and using the OTA sideload action from *within* recovery, before using the adb command, right?
The Google update and repair tool is an option.
ktmom said:
Make sure you have downloaded the correct OTA and for crosshatch. Use the sha256 checksum provided in the download page and ensure the file is not corrupted. I check the integrity of the file before using it especially if I've moved it since the last verification.
You are rebooting to recovery (not rescue mode) and using the OTA sideload action from *within* recovery, before using the adb command, right?
The Google update and repair tool is an option.
Click to expand...
Click to collapse
I think Pixel 4 XL is Coral, not Crosshatch.
I have downloaded the OTA file thats third from the bottom on this page (https://developers.google.com/android/ota) which is the rom number - 10.0.0 (QQ1B.200105.004, Jan 2020).
Yes, followed the instructions and booted to recovery, selected 'update from adb' from within recovery and then checked
Code:
adb devices
to ensure it showed 'sideload'. I then ran the command
Code:
adb sideload ota_file.zip
The transfer seemed to work fine, but then i got the error above showing on the device.
I cant seem to use the Google update and repair tool, as I'm in the UK and it says its not supported.
I can get it working with a VPN but the carrier i'm on doesnt show, although i do have the option of selecting 'other' as the carrier - I'm happy to give that a go, but wanted to get your thoughts on it first. Will selecting carrier as 'other' work ok for a UK based phone?
ptm

Categories

Resources