Pixel C bootloop after flashing TWRP - Android Q&A, Help & Troubleshooting

Hello,
My Pixel C seems to boot loop every time I flash and get into the recovery mode to access the freshly installed TWRP.
After doing my changes, in TWRP, I reboot my tablet into system, the Google logo pops for 5 seconds or so, and then goes back into TWRP.
A stock image flash solves the problem, however I do not want to restore the system files as this is particularly the reason why I am using the recovering mode.
I am trying to edit a system file requiring root permissions, and that without having to root my tablet, therefore, reflashing the system makes me lose my changes.
I also tried flashing every partitions except system's, the problem persists.
Here is what I am doing step by step (I am on Linux):
Code:
# In bootloader
$ fastboot flash recovery ~/Downloads/twrp-3.2.1-0-dragon.img
$ fastboot reboot
# Interrupt booting process to directly access recovery mode (into TWRP)
# I explicitly tell TWRP to mount partitions as READ ONLY
$ adb shell
$ mount /system
$ exit
# I do my changes in here using adb pull / push
$ adb shell
$ umount /system
$ exit
# Finally in TWRP, I go to the reboot button and reboot into the system
These steps generate the bootloop that I described above.
Here is where the TWRP image was downloaded from: https ://eu.dl.twrp.me/dragon/
Any idea on how to solve that is welcome, thanks !

To note I've also tried editing the system.img image with the modified files.
The tablet ended up getting stuck at the Google's logo though.

Das Kartoffel said:
To note I've also tried editing the system.img image with the modified files. The tablet ended up getting stuck at the Google's logo though.
Click to expand...
Click to collapse
I don't have this device but, your best bet is to post this question within the following Official TWRP thread that's specific to your device.
https://forum.xda-developers.com/showthread.php?t=3400503
The following thread may also be helpful for you that's specific to your device as well.
https://forum.xda-developers.com/showthread.php?t=3307183
Good Luck!
~~~~~~~~~~~~~~~
I DO NOT provide support via PM unless asked/requested by myself. PLEASE keep it in the threads where everyone can share.

Related

Wrong recovery, now can't install any rom or recovery

Guys,
I need help. I tried to work the solution myself and spend days reading different forums and tried different tricks but no luck.
So basically I was asked by my wife to root her Hero as she wanted a higer version of Android to install Viber and some other programmes. I did that using instructions on a Cyanogenmod wiki and everything went fine. However the new rom made the phone a bit slow and clumsy, so I thought I'd look for a different older version that works. I tried numerous roms and they all for some reason were not suitable - either wouldn't boot or were force closing etc...
So at the end of the day I read somewhere that for some ROM you need to install a CWM recovery and I was running a RA 1.7. So I tried to download a newer version of a recovery (to be honest I forgot which one - it was a week ago) and I flashed it and then I realised I have installed a recovery for CDMA and I have a GSM.
So, currently the phone boots and gets stuck at the HERO logo forever. There is no way I can boot into recovery. I have no problem to boot into fastboot, but any attempt to install a different recovery brings a failed signature error. I tried fastboot erase recovery and it did work, but no instalation is possible. When the phone is powered on and while on HERO logo I can run adb and can make it reboot from the command line, but when I try the instructions http://forum.xda-developers.com/showthread.php?t=1630519 I get past the first two lines:
Code:
adb push recovery-clockwork-2.5.0.7-hero.img /data/local/
adb push flash_image /data/local/
and then when I attempt this
Code:
adb shell chmod 777 /data/local/recovery-clockwork-2.5.0.7-hero.img
I get an error message
-exec /system/bin/sh failed no such file or directory
Please help!
PS. A screen shot in fastboot:
http://i3.photobucket.com/albums/y78/tsvet/fastboot.jpg
I managed to fix that with a stock rom and Hboot installation.

[Q] Complete wipe through ADB

OK, here's the deal. My i777 was running SlimROM, updated, and now my power button is inop. Flashed back to stock ICS, but I forgot to do one critical step - a complete wipe before installing. Now my phone gets stuck at the "Rethink Possible" screen, and I can't do anything else.
I've booted into 3e recovery and tried recovery --wipe_data through adb, but it still hangs. (as suggested here). I've got a jig, forced it into download mode, and tried flashing another ROM, but I still get stuck on the Rethink Possible screen.
Is there a way that I can basically nuke all the contents of the phone so I can use it again? I've read through most of the documentation for adb, but I don't see an option.
steelforce said:
OK, here's the deal. My i777 was running SlimROM, updated, and now my power button is inop. Flashed back to stock ICS, but I forgot to do one critical step - a complete wipe before installing. Now my phone gets stuck at the "Rethink Possible" screen, and I can't do anything else.
I've booted into 3e recovery and tried recovery --wipe_data through adb, but it still hangs. (as suggested here). I've got a jig, forced it into download mode, and tried flashing another ROM, but I still get stuck on the Rethink Possible screen.
Is there a way that I can basically nuke all the contents of the phone so I can use it again? I've read through most of the documentation for adb, but I don't see an option.
Click to expand...
Click to collapse
Id wait until a dev chimes in, but my understanding is that as you can still get into DL mode, ODIN would be your best bet. Id flash one of the all in one ODIN ICS packages that also contain boot loaders (LL6 would be most recent). As a last resort you can also flash the stock .pit file and repartition the whole phone, BUT BE SURE TO BACKUP YOUR EFS FOLDER if possible. I say this as I did not do this and now have a generic IMEI on my phone, hindering some aps from working.
ADB is able to reformat and flash ROM packages as far as i know, though it should be unnecessary as long as you can still use ODIN. The only reason i used ADB was to resurrect a S2 i bought of someone that flashed a ROM from a i9100.
steelforce said:
OK, here's the deal. My i777 was running SlimROM, updated, and now my power button is inop. Flashed back to stock ICS, but I forgot to do one critical step - a complete wipe before installing. Now my phone gets stuck at the "Rethink Possible" screen, and I can't do anything else.
I've booted into 3e recovery and tried recovery --wipe_data through adb, but it still hangs. (as suggested here). I've got a jig, forced it into download mode, and tried flashing another ROM, but I still get stuck on the Rethink Possible screen.
Is there a way that I can basically nuke all the contents of the phone so I can use it again? I've read through most of the documentation for adb, but I don't see an option.
Click to expand...
Click to collapse
You need root access to format the data partition. I don't use adb a lot, but I think you can boot into recovery, then "adb shell", then "format data." You might have to type "su." If that doesn't get you out of the Rethink Possible screen, the I would format data, format system, and format cache. Then turn the phone off, by pulling the battery if necessary, and enter download mode and flash the full stock distribution. As the previous poster suggested, UCLL6 would be a good choice. You can get it from the download repository. See the link in my signature.
creepyncrawly said:
You need root access to format the data partition. I don't use adb a lot, but I think you can boot into recovery, then "adb shell", then "format data." You might have to type "su." If that doesn't get you out of the Rethink Possible screen, the I would format data, format system, and format cache. Then turn the phone off, by pulling the battery if necessary, and enter download mode and flash the full stock distribution. As the previous poster suggested, UCLL6 would be a good choice. You can get it from the download repository. See the link in my signature.
Click to expand...
Click to collapse
Thanks. I forgot to grab the phone before I left for the office this morning, so I'll try it when I get home later tonight.
steelforce said:
Thanks. I forgot to grab the phone before I left for the office this morning, so I'll try it when I get home later tonight.
Click to expand...
Click to collapse
So, home with my phone. When I get into the shell, format isn't a valid command:
Code:
[email protected]:/ $ format
format
/system/bin/sh: format: not found
Trying to su ends up segfaulting, so I don't think it's a permissions issue. Other sources suggest using fastboot, but as I understand it, the i777 doesn't support it.
I'm looking at the mounts - is there documentation on which of the /dev/block/mmcblk0pX partitions map to the mount points? I'm familiar with Linux (at least enough to get me in trouble), but I'm lost on where to go next.
You have to have root access to do the format command. Requires the # prompt, like this:
Code:
adb shell
$ su
# format data
# exit
$ exit
Probably, cache is mounted but system and data are not mounted. It shouldn't make any difference though, if I remember right.
If you can't get the su command to give you the # prompt, then maybe adb is not connected to the daemon correctly?
Edit:
I have never used adb in recovery before, so for my own interest, I decided to do a little experimentation. First of all, to get a hash prompt in shell try
Code:
adb root
followed by
Code:
adb shell
From reading, it seems some people say both wipe and format commands should work in shell in recovery, but I couldn't get them to work. I would get "/sbin/sh: format: not found" error. So the work around is this:
Code:
adb shell
~ # mount /data
~ # rm -rf /data/*
~ # reboot
This will recursively force the removal of the contents of the data directory. I did not test this, but I did test "rm -rf /cache/*" and successfully removed the contents of the cache directory, so I know it should work.
If your system still doesn't boot, you could wipe cache and system as well as data and then reboot into download mode and flash the full stock tar
Code:
adb shell
~ # mount /data
~ # mount /system
~ # rm -rf /cache/*
~ # rm -rf /data/*
~ # rm -rf /system/*
~ # reboot download
creepyncrawly said:
Edit:
I have never used adb in recovery before, so for my own interest, I decided to do a little experimentation. First of all, to get a hash prompt in shell try
Code:
adb root
followed by
Code:
adb shell
Click to expand...
Click to collapse
Ugh - adb root fails with the following error:
Code:
D:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools>adb root
adbd cannot run as root in production builds
Looks like it's because the build that I have flashed doesn't have root. Wicked catch-22, since I can't root the phone until I wipe the cache to actually boot.
steelforce said:
Ugh - adb root fails with the following error:
Code:
D:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools>adb root
adbd cannot run as root in production builds
Looks like it's because the build that I have flashed doesn't have root. Wicked catch-22, since I can't root the phone until I wipe the cache to actually boot.
Click to expand...
Click to collapse
Well, yes, you need root. You could flash one of the stock plus root packages, probably Entropy512's original uckh7 plus root since it has busybox, with odin, see links in my sig. I didn't see anything in your original posts that indicate the flash would fail.
creepyncrawly said:
Well, yes, you need root. You could flash one of the stock plus root packages, probably Entropy512's original uckh7 plus root since it has busybox, with odin, see links in my sig. I didn't see anything in your original posts that indicate the flash would fail.
Click to expand...
Click to collapse
The flash doesn't fail, but it's never able to boot past the AT&T "Rethink Possible" splash screen. I've tried flashing a couple of different packages, but i'll try some more tonight.
steelforce said:
The flash doesn't fail, but it's never able to boot past the AT&T "Rethink Possible" splash screen. I've tried flashing a couple of different packages, but i'll try some more tonight.
Click to expand...
Click to collapse
Flash the rooted package and you will then have root. Whether the phone boots or not, the system will then contain the superuser.apk and the su binary. I suggested Entropy512's package because I'm not sure but I think you need busybox to use the unix commands in adb in recovery. My stock plus root packages don't have busybox, and if you can't boot, you can install it from the play store. Once you have root in the system, then adb root should succeed.
creepyncrawly said:
Flash the rooted package and you will then have root. Whether the phone boots or not, the system will then contain the superuser.apk and the su binary. I suggested Entropy512's package because I'm not sure but I think you need busybox to use the unix commands in adb in recovery. My stock plus root packages don't have busybox, and if you can't boot, you can install it from the play store. Once you have root in the system, then adb root should succeed.
Click to expand...
Click to collapse
I tried both of Entropy512's packages from here. Flashed them and tried to boot, both hung at the Rethink Possible screen. Rebooted into recovery, was able to connect to it via adb - but adb root failed on both.
I'm getting closer and closer to punting and picking up a Nexus 4 after this....
With lineage recovery I do a full wipe like:
Code:
mkfs.ext4 -qFF /dev/block/by-name/userdata
mkfs.ext4 -qFF /dev/block/by-name/cache
mkfs.ext4 -qFF /dev/block/by-name/system

How to fix Android boot loop, ADB?

My android (jellybean) tablet was turned off in middle of update and now is in boot loop. It was rooted with USB debugging on.
I MUST recover files (PDFs, .doc, .wav .JPEG, etc ) without erasing them.
Questions:
1 Do I use Odin and TWRP together?
2 Will Odin flash Samsung stock firmware erase files on device?
3. Will TWRP .img file erase everything?
4. Are these instructions correct?
I recommend you install TWRP recovery. It's the most feature-rich of all the recoveries I have used, and I will be assuming that is the recovery you use for the rest of this.
1. Boot into TWRP. (how? TWRP is an .img file )
2. Push your ADB public key to your device to force authentication.
____On Windows, do: adb push %UserProfile%\.android\ad
bkey.pub /data/misc/adb/adb_keys
3. Reboot into Android. Try adb shell and see if you get a shell prompt. If so, great! Exit it and run adb logcat, and read the huge error log for problems. If you didn't get the shell, well, then I think you're screwed, unless someone has cooked up a recovery zip for enabling adb.
What happens after ADB logcat?
Thank you..

[ROOT] How to flash recovery within Android with terminal / adb shell

Hi,
this is a small tutorial to show you how to flash the recovery, also eRecovery, via command line / adb shell within Android.
Flashify and other apps never worked for me, so I used commands to flash it without the need of fastboot.
It's a small tutorial for those who never worked with commands like this.
Please notify me if something went wrong or if you found any other issues.
I wanted to make a small script but I stopped it because of the lack of available commands in Android.
DISCLAIMER:
Read this tutorial first.
Never flash custom recovery to eRecovery.
Never flash recoveries from different devices.
Don't try to flash other partitions with this commands if you don't want to risk a brick.
Requirements:
- Oreo / EMUI 8 installed, Nougat hast other partition names. Pie isn't supported by me until final release.
- working root access
- terminal emulator app (I recommend Termius, it's easy to use and has nice features, it's free to use)
> or a PC, and USB cable and working ADB, also USB Debugging enabled in developer settings
- recovery img files on your phone, I recommend it to put them into your user root /data/media/0/ (internal memory)
NOTE: All commands are case sensitive!
Now open your terminal app or open the adb shell.
Type following command to enable root access:
Code:
su
SuperSU will ask you for root access, grant it.
Following command is needed to figure out, which type of memory your phone has:
Code:
ls /dev/block/platform
There are two possible outputs:
If you've a device with the faster UFS memory, it's ff3b0000.ufs, if eMMC it's hi_mci.0.
From now I'll write MEMORY instead of ff3b0000.ufs or hi_mci.0.
For flashing the recovery fire up following command:
Code:
dd if=/PATH/TO/YOUR/RECOVERY.IMG of=/dev/block/platform/MEMORY/by-name/recovery_ramdisk_a
Example: dd if=/data/media/0/twrp_3.2.1.img of=/dev/block/platform/ff3b0000.ufs/by-name/recovery_ramdisk_a
The output should look like this:
Code:
65536+0 records in
65536+0 records out
33554432 bytes transferred in 0.247 secs (135847902 bytes/sec)
If not, check your command and file paths.
For flashin the eRecovery fire up following command:
Code:
dd if=/PATH/TO/YOUR/ERECOVERY.IMG of=/dev/block/platform/MEMORY/by-name/erecovery_ramdisk_a
Example: dd if=/data/media/0/ERECOVERY_RAMDI.IMG of=/dev/block/platform/ff3b0000.ufs/by-name/erecovery_ramdisk_a
IMPORTANT NOTE: DO NOT INSTALL TWRP IN THIS! Flash only stock eRecovery!
The dd command won't give you any progress output, so be a bit patient. It should be done in a few second, but don't close the terminal app or connection before you got any output.
Unix systems like Android will give an output if something went wrong, always.
I use this to flash new TWRP versions or to flash stock recovery before I update.
If you recently updated your phone, you still need to flash via fastboot, because you lost root during the update.
The dd commands also work with fastboot. Mostly you'll use "fastboot flash recovery_ramdisk", but if you need to flash eRecovery, you can use the dd command.
23. February 2019:
Pie should also work, but you have to remove the "_a" after the partition name.
Example:
dd if=/data/media/0/twrp_3.2.1.img of=/dev/block/platform/ff3b0000.ufs/by-name/recovery_ramdisk
Please report if it's working or not.
How to know the path to the recovery_ramdisk?? Is all devices the same?? I didn't get it right the 1st time .. it shows path is invalid
Sent from my VTR-L29 using Tapatalk
fr3ker said:
How to know the path to the recovery_ramdisk?? Is all devices the same?? I didn't get it right the 1st time .. it shows path is invalid
Sent from my VTR-L29 using Tapatalk
Click to expand...
Click to collapse
Should be the same on every device. Remember, case sensitive and use _ and not -.
Maybe it's different on non UFS devices, which one do you have?
Are you able to post a screenshot of your command and output?
Jannomag said:
Should be the same on every device. Remember, case sensitive and use _ and not -.
Maybe it's different on non UFS devices, which one do you have?
Are you able to post a screenshot of your command and output?
Click to expand...
Click to collapse
Maybe @fr3ker is not on Oreo? The recovery_ramdisk partition is only for Oreo. In Nougat it is just called recovery. I don't know how the Pie partitions are called.
M1chiel said:
Maybe @fr3ker is not on Oreo? The recovery_ramdisk partition is only for Oreo. In Nougat it is just called recovery. I don't know how the Pie partitions are called.
Click to expand...
Click to collapse
Also my thought, I wanted to add this to the requirements when I created this post but apparently I forgot this. Now it's added as first point.
Hi.
I have a hard bricked p10. When I connect to laptop it's says USB SER. It doesn't not turn on I can't access recovery with power + vol. I can't get into fastboot. Anyway I can access fastboot to flash kernel and erecovery?
Jannomag said:
I use this to flash new TWRP versions or to flash stock recovery before I update.
Click to expand...
Click to collapse
Is it mandatory to flash stock recovery before update? Is it applies only to ota update or ff method?
Yes, FF or OTA are using stock recovery to flash the update. With TWRP it won't work.
Updated?
@ Jannomag:
Have you checked this for Pie meanwhile?
I currently have the problem, not being able to enter fastboot with:
Code:
sudo adb reboot bootloader
Additionally, there's something I do not understand. For the dd-command for flashing, why is the input-file (if=) the file in "/dev/block/platform/..." and the output on the sd-card? Wouldn't mean flashing an img to the device, that if= on the sd (or connected PC) and of= the path to the device (phone)?
BlĂĽmchen Blau said:
@ Jannomag:
Have you checked this for Pie meanwhile?
I currently have the problem, not being able to enter fastboot with:
Code:
sudo adb reboot bootloader
Additionally, there's something I do not understand. For the dd-command for flashing, why is the input-file (if=) the file in "/dev/block/platform/..." and the output on the sd-card? Wouldn't mean flashing an img to the device, that if= on the sd (or connected PC) and of= the path to the device (phone)?
Click to expand...
Click to collapse
WTF....Why didn't I notice this terrible mistake! Thank you for reading my post completely, you're 100% correct, I'll correct this directly after I submit this post.
Huawei did also a small change at naming the recovery partition, which I'll update, too.
I had also the problem that I wasn't able to boot into fastboot by command before I fried my phone - I couldn't figure out the reason for this.
Again, thank you!
Jannomag said:
Again, thank you!
Click to expand...
Click to collapse
Your'e welcome! I did update now, but didn't need your (correct ) way to fastboot, because the method described by borgerapper did the trick for me to get into fastboot and flash the needed original recovery.
Thanks anyway!

Motorola One Macro

Hello, i wanted to flash my phone(Motorola One Macro) to LineageOS 17.1, but it get error at flashing and now is phone permanently restarting.... i dont know how to flash new stock firmware, or any new android.
i know i can use adb, but it doesnt work or i do it bad. :angel:
pls help, thanks.
@drobec255
You by means of ADB always can re-flash phone's Stock ROM ( it's not necessary phone's boot-loader is unlocked )
Code:
adb devices
adb reboot recovery
[i][color=red]Note: In recovery menu presented select option Apply Update From ADB and confirm it, then proceed with[/color][/i]
adb sideload <PATH_TO_STOCK_ROM_IMAGE_FILE_ZIP>
adb reboot
jwoegerbauer said:
@drobec255
You by means of ADB always can re-flash phone's Stock ROM ( it's not necessary phone's boot-loader is unlocked )
Code:
adb devices
adb reboot recovery
[i][color=red]Note: In recovery menu presented select option Apply Update From ADB and confirm it, then proceed with[/color][/i]
adb sideload <PATH_TO_STOCK_ROM_IMAGE_FILE_ZIP>
adb reboot
Click to expand...
Click to collapse
ok, i flashed it to stock ROM, phone works.
I wanna flash it to LineageOS 17.1 but file is ".img.xz" ??? how to? bootloader is unlocked
@drobec255
1st of all things is you must have a TWRP matching your phone at your fingertips.
Next thing is that you must have a Lineage OS 17.1 version that's at 100% compatible with your phone - don't think this exists. BTW: Lineage OS always is offered as a signed ZIP-file.
If these requirements are met, then to replace phone's Android 9 by Lineage OS 17.1 you run this command sequence:
Code:
adb devices
[i][color=red]next 6 cmds backup /efs & /vendor partitions[/color][/i]
adb shell "cat /efs > /data/local/temp/efs_bkup"
adb pull /data/local/temp/efs_bkup %TEMP%\EFS_BKUP
adb shell "rm /data/local/temp/efs_bkup"
adb shell "cat /vendor > /data/local/temp/vendor_bkup"
adb pull /data/local/temp/vendor_bkup %TEMP%\VENDOR_BKUP
adb shell "rm /data/local/temp/vendor_bkup"
adb reboot bootloader
fastboot devices
fastboot erase system
fastboot erase cache
fastboot erase userdata
[i][color=red]temporarily boot into TWRP[/color][/i]
fastboot boot <PATH_TO_TWRP_IMG>
[i][color=red]In TWRP's menu select option Apply update from ADB and confirm[/color][/i]
adb sideload <PATH_TO_LINEAGE_OS_ZIP>
[i][color=red]next 2 cmds restore /efs & /vendor partitions[/color][/i]
adb push %TEMP%\EFS_BKUP /efs
adb push %TEMP%\VENDOR_BKUP /vendor
adb reboot
For anyone that this may still happen too....
Use RSA to put your phone back to it's stock rom. Even if it's bricked. it'll recovery it.
Rescue and Smart Assistant Tool - Motorola
<h6><span style="color:#FFFFFF"><strong>Our Rescue and Smart Assistant tool</strong><br />can help diagnose and resolve issues on your<br />Motorola phone or Lenovo phone/tablet.</span></h6>
www.motorola.com

Categories

Resources