[GUIDE][FIX] Boot loop on Lollipop 5.0 and above (fix persist partition) - Nexus 5 General

What is the persist partition?
Persist is partition mounted at /persist. It has ext4 file system. DRM releated files, sensor reg file (sns.reg), wifi and bluetooth mac addresses are stored there.
If you experience the following issues:
Can't access to internal storage.
No signal even after formating cache and fastboot flash cache.img
IMEI number is lost even after formating cache and fastboot flash cache.img
Boot loop on Lollipop 5.0 and above
You get "e: cannot mount /persist" in recovery
then your persist partition have to be fixed.
Requirements to proceed:
Ability to use adb command.
TWRP or Philz touch recovery.
Universal Naked Driver for recovery. (Windows users)
Root.
Setting up adb, rooting and installing drivers are not part of this guide. If you have to do that then please use @rootSU's great thread to find the guides you need.
Let's start!
Reboot your phone to recovery.
Connect USB cable.
Open CMD or Terminal application.
Enter following commands in CMD or Terminal application:
adb shell
e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
Click to expand...
Click to collapse
You should be prompted to repair or fix errors. Keep pressing enter until the process finishes.
If you are not prompted for repair or you still have problems then follow my instructions.
Get to that point again when you entered the adb shell command then type the following command:
make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist
Click to expand...
Click to collapse
Reboot your phone.
Now all your problems should be gone now, but your wifi and bluetooth addresses should be fixed to prevent further problems or bugs.
Download this rar file.
Extract it.
(Linux users should enable show hidden files)
Open .bdaddr with a hexeditor.
You should see following:
BC F5 AC 00 00 00
Click to expand...
Click to collapse
Change the last three 00 to something else.
You can use 0-9 numerals and A-F letters.
Save the modified .bdaddr.
Open .macaddr with a hexeditor.
You should see the following:
8C 3A E3 00 00 00
Click to expand...
Click to collapse
Change the last three 00 to something else.
You can use 0-9 numerals and A-F letters.
Save the modified .macaddr.
Copy both files to your sdcard.
Enable USB debugging on the phone.
Open CMD or Terminal application. (If you closed it)
Enter following commands in CMD or Terminal application:
adb shell
su
Click to expand...
Click to collapse
Grant access on the phone.
cd /persist
mkdir bluetooth wifi
chown bluetooth:system ./bluetooth
chmod 770 ./bluetooth
cp /sdcard/.bdaddr /persist/bluetooth
chown bluetooth:system ./bluetooth/.bdaddr
chmod 660 ./bluetooth/.bdaddr
chown wifi:system ./wifi
chmod 770 ./wifi
cp /sdcard/.macaddr /persist/wifi
chown wifi:system ./wifi/.macaddr
chmod 660 ./wifi/.macaddr
Click to expand...
Click to collapse
Reboot your phone. All your problems should have gone now. You can delete .bdaddr and .macaddr from your sdcard.
About the other files:
SNS.reg will be regenrated, but the DRM releated files will not. Nobody ever complained about the missing DRM files, but I still want to make it possible to restore them. If anyone could make an md5 checksum about the files on the persist partition that would be great.

Great thread @bitdomo. Thanks for adding this to the forum. I added it to the root guides section of sticky roll-up
Sent from my Nexus 5 using Tapatalk

Nice job! ?

This should be very helpful, well done!

I keep getting not found when i enter that comand in cmd.

Great thread. Didn't even know about such a partition to be honest.
Sent from my Nexus 5 using Tapatalk
---------- Post added at 03:10 AM ---------- Previous post was at 03:09 AM ----------
Juniluis said:
I keep getting not found when i enter that comand in cmd.
Click to expand...
Click to collapse
Have you added adb to your PATH?
Sent from my Nexus 5 using Tapatalk

Man your a life saver thank you so much I just copy your and I stop typing because I was typing something bad.

One question the Mac address WiFi and Bluetooth steps in hex editor only the ones that had problem with the first qoute ta was ef2sck .....etc and needed to go to the second quote that was make ef4 ..,.etc need to do it right?

bitdomo said:
What is the persist partition?
Persist is partition mounted at /persist. It has ext4 file system. DRM releated files, sensor reg file (sns.reg), wifi and bluetooth mac addresses are stored there.
If you experience the following issues:
Can't access to internal storage.
No signal even after formating cache and fastboot flash cache.img
IMEI number is lost even after formating cache and fastboot flash cache.img
You get "e: cannot mount /persist" in recovery
then your persist partition have to be fixed.
Requirements to proceed:
Ability to use adb command.
TWRP or Philz touch recovery.
Universal Naked Driver for recovery. (Windows users)
Root.
Setting up adb, rooting and installing drivers are not part of this guide. If you have to do that then please use @rootSU's great thread to find the guides you need.
Let's start!
Reboot your phone to recovery.
Connect USB cable.
Open CMD or Terminal application.
Enter following commands in CMD or Terminal application:
You should be prompted to repair or fix errors. Keep pressing enter until the process finishes.
If you are not prompted for repair or you still have problems then follow my instructions.
Get to that point again when you entered the adb shell command then type the following command:
Reboot your phone.
Now all your problems should be gone now, but your wifi and bluetooth addresses should be fixed to prevent further problems or bugs.
Download this rar file.
Extract it.
(Linux users should enable show hidden files)
Open .bdaddr with a hexeditor.
You should see following:
Change the last three 00 to something else.
You can use 0-9 numerals and A-F letters.
Save the modified .bdaddr.
Open .macaddr with a hexeditor.
You should see the following:
Change the last three 00 to something else.
You can use 0-9 numerals and A-F letters.
Save the modified .macaddr.
Copy both files to your sdcard.
Enable USB debugging on the phone.
Open CMD or Terminal application. (If you closed it)
Enter following commands in CMD or Terminal application:
Grant access on the phone.
Reboot your phone. All your problems should have gone now. You can delete .bdaddr and .macaddr from your sdcard.
About the other files:
SNS.reg will be regenrated, but the DRM releated files will not. Nobody ever complained about the missing DRM files, but I still want to make it possible to restore them. If anyone could make an md5 checksum about the files on the persist partition that would be great.
Click to expand...
Click to collapse
I have a big problem: when I enter "e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist", it says that the journal has data and can't set superblocks, and when I enter "make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist" the problem persist..:crying:

thaaaaaaaaaanks the phone is work O_O

I need a professional guy help
rootSU said:
Great thread @bitdomo. Thanks for adding this to the forum. I added it to the root guides section of sticky roll-up
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
im really stuck on the starting adb and fastboot is their any guy to whom should i show this nexus 5 imei gone. storage corrupt and baseband null even camera is also not working.
i live in pak please prefer a guy who can resolve my problem
Thanks

I registered in the forum to thank you @bitdomo ! My Nexus 5 lost signal a few weeks ago and I did EVERYTHING. Started with trying to add apn stuff manually, then in-android factory reset, wipes, then stock flash, a few more flashes, and I started to go crazy. My IMEI was lost. But this got it back! Thank you very much!

The same thing here! Thanx a lot,bitdomo!

faizanfarooq86 said:
im really stuck on the starting adb and fastboot is their any guy to whom should i show this nexus 5 imei gone. storage corrupt and baseband null even camera is also not working.
i live in pak please prefer a guy who can resolve my problem
Thanks
Click to expand...
Click to collapse
Did you try any of the suggested guides/links by rootSU in the OP? The required information on getting ADB/fastboot working correctly is all there, see link http://forum.xda-developers.com/google-nexus-5/general/noob-read-adb-fastboot-how-hep-t2807273

Thank you very much! This helped me a lot.

The best way is to flash factory images.
I had this issue in the morning and solved it in no time.
Goodluck

DaGr81 said:
The best way is to flash factory images.
I had this issue in the morning and solved it in no time.
Goodluck
Click to expand...
Click to collapse
This issue won't be solved by flashing factory images. Hence the thread.

Thanks!!!!!!!!
I love my Nexus 5. This did the trick. I did have to flash-all at the end because I screwed it up too much while trying to fix it.
By the way the symptom I was experience was the phone was in a endless forever loop on the boot and I was seeing the color dots animation for a couple days.

Don't copy the whole OP page to ask a simple question please #swag
Sent from my Nexus 5

Guys can this only be done in adb? My nexus 5 is in a bootloop, tried reflashing stock. Still the same. I can get into bootloader, tried going in recovery but it just bootloops after that. Help please. Thought it was the power button. Replaced but still the same

Related

[Q] JP6 doesn't recognise my SIM card???

I have gotten myself into a mess and having upgraded to JP6 my SIM card is no longer recognised. Has anyone else had this issue and does anyone know of a Fix that they could give me to sort this mess out.
Thanks
james.boot said:
I have gotten myself into a mess and having upgraded to JP6 my SIM card is no longer recognised. Has anyone else had this issue and does anyone know of a Fix that they could give me to sort this mess out.
Thanks
Click to expand...
Click to collapse
Don't panic, this is easy to fix..
Do a reset, cache erase from recovery mode (Volume up + Home + Turn on).
Root the device, install busybox and run it, install andoid terminal emulator the execute the followings in terminal emulator:
- su
- busybox chown 1001:1001 /efs/nv_data.bin
- reboot
That is it.
EXCELLENT!,
When you say wipe the cache is that option called "wipe cache partition" and where can I download busybox from etc? Im a bit of a noob with the fixing my screw ups business.
james.boot said:
EXCELLENT!,
When you say wipe the cache is that option called "wipe cache partition" and where can I download busybox from etc? Im a bit of a noob with the fixing my screw ups business.
Click to expand...
Click to collapse
Yes "wipe cache partition".
Root using the program from here (if not rooted yet): http://forum.xda-developers.com/showthread.php?t=803682
Busy box and emulator from the market. run busy box and click install and wait till it installs then run emulator. You must choose allow when prompted in both programs.
Hi, did all of this, it would not accept the reboot command so I turned the phone off and on. I dont know if the reboot command is integral to solving the problem but it has not worked. Is there something else I need to do?
it says
---------------------------------------------------------------------------------------------------------------------------------
change the owner and/or group or each FILE to OWNER and/or GROUP
Options:
-R Recurse
-h affect symlinks instead of symlink targets
-L Traverse all symlinks to directories
-H Traverse symlinks on command line only
-P Dont traverse symlinks (default)
-c List changed files
-v List all files
-f hide errors
------------------------------------------------------------------------------------------------------------------------------------------------
What does this mean?
I don't think that you have executed the commands right, maybe because that I should have written them more clearly.
Execute in emulator:
su
(hit Enter)
Choose "Allow" and exit the program when done.
Start Emulator again and execute:
su
(hit Enter)
busybox chown 1001:1001 /efs/nv_data.bin
(hit Enter)
reboot
(hit Enter)
The phone will reboot and it will accept the card if the nv_data.bin staill intact. Try the steps above and I hope that every thing is right.
Unfortunately it has not worked. Have you got any more ideas? I appreciate your help with this.
james.boot said:
Unfortunately it has not worked. Have you got any more ideas? I appreciate your help with this.
Click to expand...
Click to collapse
Did the commands execute right, no errors?
If so then check the IMEI number: Click on Phone in the home screen as when you dial a number and dial *#06# see the number that comes off, is it your correct IMEI number?
There is no IMEI number there, which is slightly worrying haha
no errors either
james.boot said:
There is no IMEI number there, which is slightly worrying haha
Click to expand...
Click to collapse
in this case you might need to read here: http://forum.xda-developers.com/showthread.php?t=780509
It might be that the nv_data.bin file in your mobile is damaged, I'm only saying that it might be that, the only way to know for sure is to check the IMEI number in the phone under "Settings"--> "About phone" --> "Status" if there is no IMEI number then a reflash might correct that, if the IMEI number is like 000044...etc then the nv_data.bin file is damaged and can only be corrected if you have backed up the /efs folder. Please read in the linked thread to find out before doing anything.
I had this problem. I just reset my phone. When it rebooted it installed Sim Toolkit and now it works fine & reconises the Sim. Do you have Sim Toolkit installed?
I had this exact problem spent 2 hours trying fixes etc, I had my SIM card in the wrong way around, I was so used to putting it in like my old phone i did not notice the little picture saying the way to put it haha I had taken it out to flash a new ROM and assumed it was the ROMS fault cause it stopped working
no mate it doesn't. Just done a quick factory reset without success.

[GUIDE]MBR or/and Lost internal SD card Space *Fix*

As i see a lot of threads about wrongly partitioning internal sd card with cwm and having mbr checksum error or lost space in it at it should be 13.02Gb And 1.85gb in system i decided to put a walkthrough as to how to get it fixed once and for all.
Req.ODIN, Android sdk and Samsung usb drivers for Galaxy s Phones+ CWM Recovery.
Ok, lets start
Connect phone to computer via USB lead
Reboot into Recovery Mode
Type: adb shell in the cmd prompt window
Type: parted /dev/block/mmcblk0
Type: print
Type: rm 1 then rm 2 then rm3 erase all partitions on the sd card
Type print and check if there are any partitions left, if so repeat rm x number untill none are there.
Then quit and exit
Download this:
http://www.4shared.com/file/dJiyRz3v/EUGENE373_SamsungS_Froyo_PDA.html
unzip it and get odin ready.
Go to download mode, place pda only in phone area pit not needed, flash
Let it boot into recovery, remove battery and re-enter download mode.
Flash JFD with pit file and re-partitions checked.
Done and done.
Regards
looks useful i dont really need this at the moment but im pretty sure this will help alot of people
Demetris,
I will try this fix this weekend old friend, I will let you know!
demetris_I said:
As i see a lot of threads about wrongly partitioning internal sd card with cwm and having mbr checksum error or lost space in it at it should be 13.02Gb And 1.85gb in system i decided to put a walkthrough as to how to get it fixed once and for all.
Req.ODIN, Android sdk and Samsung usb drivers for Galaxy s Phones+ CWM Recovery.
Ok, lets start
Connect phone to computer via USB lead
Reboot into Recovery Mode
Type: adb shell in the cmd prompt window
Type: parted /dev/block/mmcblk0
Type: print
Type: rm 1 then rm 2 then rm3 erase all partitions on the sd card
Type print and check if there are any partitions left, if so repeat rm x number untill none are there.
Then quit and exit
Download this:
http://www.4shared.com/file/dJiyRz3v/EUGENE373_SamsungS_Froyo_PDA.html
unzip it and get odin ready.
Go to download mode, place pda only in phone area pit not needed, flash
Let it boot into recovery, remove battery and re-enter download mode.
Flash JFD with pit file and re-partitions checked.
Done and done.
Regards
Click to expand...
Click to collapse
Having the same issue with my galaxy tab. Its showing only 209mb available out of 12 gb plus. Will this work with galaxy tab or do I need to download any other file?
Nope, Tab is another beast to master, just a first name match "Galaxy"
corpsetomb said:
Demetris,
I will try this fix this weekend old friend, I will let you know!
Click to expand...
Click to collapse
Hey buddy, any news?
demetris_I said:
As i see a lot of threads about wrongly partitioning internal sd card with cwm and having mbr checksum error or lost space in it at it should be 13.02Gb And 1.85gb in system i decided to put a walkthrough as to how to get it fixed once and for all.
Req.ODIN, Android sdk and Samsung usb drivers for Galaxy s Phones+ CWM Recovery.
Ok, lets start
Connect phone to computer via USB lead
Reboot into Recovery Mode
Type: adb shell in the cmd prompt window
Type: parted /dev/block/mmcblk0
Type: print
Type: rm 1 then rm 2 then rm3 erase all partitions on the sd card
Type print and check if there are any partitions left, if so repeat rm x number untill none are there.
Then quit and exit
Download this:
http://www.4shared.com/file/dJiyRz3v/EUGENE373_SamsungS_Froyo_PDA.html
unzip it and get odin ready.
Go to download mode, place pda only in phone area pit not needed, flash
Let it boot into recovery, remove battery and re-enter download mode.
Flash JFD with pit file and re-partitions checked.
Done and done.
Regards
Click to expand...
Click to collapse
this will remove the MBR Error even though i flash to stock?
Not yet. Haven't had time to try this, inundated with school work. I will keep you posted!
kazumahits said:
this will remove the MBR Error even though i flash to stock?
Click to expand...
Click to collapse
Yeap it will, hopefully.
Don't forget you have to push parted (Thanks to Demetri for this...)
here is parted for you
http://www.multiupload.com/CA5NCRMBPC
adb push c:xxx/sbin
do it for all files in the parted.zip after you unzip it
su for become superuser
then
chmod 0755 /sbin/xxx for every file in parted.
cd /sbin then run parted
you will have this:
>(parted)
type print
>(parted)print ->enter
Now you will see 3 partitions
/system /data /swap
>(parted) rm 2
>(parted) rm 3
You cannot remove system
Then
>(parted)quit
exit
exit
run odin with repartition enabled! <-you need pit file
Enjoy and hit thanks button again lol
Regards
Edit: If this dont work you need cwm then format \system from cwm then re-run odin with repartitions enabled
---------- Post added at 03:57 PM ---------- Previous post was at 03:56 PM ----------
Demetris,
Now I am trying to push parted onto my phone but it gives me the error "cannot push" read only. Ugh.
No need for parted do as i described on the OP
When you are in Recovery you have parted from it
So you dont need to install parted on phone and you are able to delete everything on the Flash because nothing depends on it like parted executed from phone.
So you will be able to delete /system also.
Sweet, thank you! I am not going to try it for a while cause I have my phone setup the way I like it, but when I do I will drop a line!
ok i spent the night trying to do this no luck , i installed the sdk and i dont no how to get it to work i try typing in the window but it doesnt work can u make a video and put it on youtube please kuz i really dont no what else to do i odin 5 times and partition the phone 4 times no luck with any of that
Here is adb for you
http://www.multiupload.com/771UH8720L
Unrar it to c:\
Open cmd window go to \
cd adb
and then adb shell.
demetris_I said:
Here is adb for you
http://www.multiupload.com/771UH8720L
Unrar it to c:\
Open cmd window go to \
cd adb
and then adb shell.
Click to expand...
Click to collapse
just tried it the cmd window says no the system can not find the path specified
start ->run->cmd then
cd \
cd adb
adb shell
If you have 7, start, search bar, write cmd then enter then:
cd \
cd adb
adb shell
Just for your information... In the recent Android SDK (I discovered this recently) the ADB tool isn't installed by default. To install it, follow the directions below.
In Windows Explorer navigate to the Programs Files directory where you installed the Android SDK. Then go to "Android\android-sdk\tools" and then run "android.bat". A window should appear. On the left side of the window you will then find a list with an item called "Available Packages", click it. Under "Android Repository" find an item called "Android SDK Platform-tools, revision (something)", check it and then click the "Install Selected" button below. Once that's done exit out of the window.
Now browse to "Android\android-sdk\platform-tools". You should now see adb.exe. Mind you, the "platform-tools" folder didn't exist before you did the stuff above.
Why they did this, I have no idea other than frustrating us users.
trparky said:
Just for your information... In the recent Android SDK (I discovered this recently) the ADB tool isn't installed by default. To install it, follow the directions below.
In Windows Explorer navigate to the Programs Files directory where you installed the Android SDK. Then go to "Android\android-sdk\tools" and then run "android.bat". A window should appear. On the left side of the window you will then find a list with an item called "Available Packages", click it. Under "Android Repository" find an item called "Android SDK Platform-tools, revision (something)", check it and then click the "Install Selected" button below. Once that's done exit out of the window.
Now browse to "Android\android-sdk\platform-tools". You should now see adb.exe. Mind you, the "platform-tools" folder didn't exist before you did the stuff above.
Why they did this, I have no idea other than frustrating us users.
Click to expand...
Click to collapse
man im sorry i see everything u talking about but the cmd window is still not working at all it says device not found
Hey Demtrius I, I followed your instructions in the post exactly, did parted and rm1 and rm2 but I still get the MBR checksum error.
My phone is showing the System at 1.73gb and the storage at 13.43. I was using voodoo lagfix before.
Can you help me out?
protohamster said:
Hey Demtrius I, I followed your instructions in the post exactly, did parted and rm1 and rm2 but I still get the MBR checksum error.
My phone is showing the System at 1.73gb and the storage at 13.43. I was using voodoo lagfix before.
Can you help me out?
Click to expand...
Click to collapse
You didnt partition the internal sdcard correct, what pit file you use?
Storage cant go 13.43 max i saw is 13.03GB ,this is what is wrong and the MBR checksum error trigger.
Are you sure you removed all the partitions?
Re install CWM and do this from CWM in recovery by adb as OP
Type: parted /dev/block/mmcblk0
Type: print
And post here your output.
Thanks

About flash CMW V20A

Hello,
I had posted this in Frequently Asked Questions about the LG Optimus 4x HD but got no help so I post here for a last try.
Just followed all dexter's steps in this thread to flash CMW
http://forum.xda-developers.com/showthread.php?t=2180138
but I got stuck here. Tried to read 34 pages of the thread but still couldnt solve my problem
My LG was rooted and unlocked.
Any help? thanks
Ekio
The error message says it all: no such file or directory. Change /mnt/sdcard/ to /storage/external_SD/
AlderCass said:
The error message says it all: no such file or directory. Change /mnt/sdcard/ to /storage/external_SD/
Click to expand...
Click to collapse
Tried and still not such files and directory thx anyway
ekiong said:
Tried and still not such files and directory thx anyway
Click to expand...
Click to collapse
Are u sure, u have copied the neede files to the root of ur SD-Card? Seems not... U have to unpack the zip-files for CWM and copy both files to the root of ur SD-Card... After that the commands should work...
Bogeyof said:
Are u sure, u have copied the neede files to the root of ur SD-Card? Seems not... U have to unpack the zip-files for CWM and copy both files to the root of ur SD-Card... After that the commands should work...
Click to expand...
Click to collapse
Omg I already did
Look pics
ekiong said:
Omg I already did
Look pics
Click to expand...
Click to collapse
I needed to allow SuperSU access before I be able to do it...
Pay attention to your phone, when you give the command "adb shell", if Superuser/SuperSU don't ask permition.
Its just a idea...
RuedasLocas said:
I needed to allow SuperSU access before I be able to do it...
Pay attention to your phone, when you give the command "adb shell", if Superuser/SuperSU don't ask permition.
Its just a idea...
Click to expand...
Click to collapse
I did it in recovery mode and tried it in terminal app aswell, but nothing happened with "cat /mnt/sdcard/recovery-6028.img >/dev/block/mmcblk0p1"
ekiong said:
Omg I already did
Look pics
Click to expand...
Click to collapse
Looks like the path to your SD card is different to mine. Try replacing /mnt/sdcard/ in the original command with /sdcard/ , ie:
Code:
su
cat /sdcard/recovery-6028.img >/dev/block/mmcblk0p1
sync
Code:
su
cat /sdcard/unsecure-boot-mmcblk0p2.img >/dev/block/mmcblk0p2
sync
Also no need to get aggravated, none of us are being rewarded for helping you here but we're trying to help anyway...
*edit*
ooops didn't look at all the screenshots. The last one shows your SD card path actually is indeed the same as mine. I'm all out of ideas then.
---------- Post added at 06:48 PM ---------- Previous post was at 06:40 PM ----------
ekiong said:
I did it in recovery mode and tried it in terminal app aswell, but nothing happened with "cat /mnt/sdcard/recovery-6028.img >/dev/block/mmcblk0p1"
Click to expand...
Click to collapse
Did you do it in recovery mode from the start? When I did it it was when the phone was just switched on normally into the main OS.
ekiong said:
I did it in recovery mode and tried it in terminal app aswell, but nothing happened with "cat /mnt/sdcard/recovery-6028.img >/dev/block/mmcblk0p1"
Click to expand...
Click to collapse
AlderCass said:
Looks like the path to your SD card is different to mine. Try replacing /mnt/sdcard/ in the original command with /sdcard/ , ie:
Code:
su
cat /sdcard/recovery-6028.img >/dev/block/mmcblk0p1
sync
Code:
su
cat /sdcard/unsecure-boot-mmcblk0p2.img >/dev/block/mmcblk0p2
sync
Also no need to get aggravated, none of us are being rewarded for helping you here but we're trying to help anyway...
*edit*
ooops didn't look at all the screenshots. The last one shows your SD card path actually is indeed the same as mine. I'm all out of ideas then.
Click to expand...
Click to collapse
Where the hell did you found that path /mnt/sdcard/....... ???
Tutorial CWM
Dude forget what they say everyone tells different way, read here what i writeto you and make the steps like me.
1. Unlock Bootloader and get SU Permissions
2. Go to PlayStore download SuperSU and than start give permisions to it to update Binary , than go to Setting in SuperSU and install in System
3. Reboot Phone
4. Copy the 2 IMG data to root from SD and rename recovery-6028.img > recovery.img & unsecure-boot-mmcblk0p2.img > boot.img
this to IMG data must be unpacked from RAR(Zip) from Dexter.
5. make sure you have Unknow Sources and USB Debug Active , and also make sure that Superuser is replaced by SuperSU after reboot
6. Go to PlayStore and Download Android Terminal Emulator
and give in Terminal
Type "su" without quotes and than accept the permissions from SuperSU after that give in
----------------------------------------------------------------------------------------------------------------------------------
cat /mnt/sdcard/recovery.img >/dev/block/mmcblk0p1
sync
IF YOU USE UNSECURE BOOT tha use this
su
cat /mnt/sdcard/boot.img >/dev/block/mmcblk0p2
sync
Hope it helps and youv got it run :laugh:
RuedasLocas said:
Where the hell did you found that path /mnt/sdcard/....... ???
Click to expand...
Click to collapse
It's in the system root for me, it's a symlink. Though it didn't work for me in the cat command, which is why I suggested using /storage/external_SD/ instead which did work for me. It looks like the OP has the files in the right places, and the hash in the command line screenshot implies that SU is working correctly, so I'm all out of ideas now.
---------- Post added at 06:57 PM ---------- Previous post was at 06:55 PM ----------
x0BlackTeresis0x said:
Dude forget what they say everyone tells different way, read here what i writeto you and make the steps like me.
Click to expand...
Click to collapse
Little bit arrogant, we're all trying to help here, so I hope for your sake your way works for the OP
AlderCass said:
Looks like the path to your SD card is different to mine. Try replacing /mnt/sdcard/ in the original command with /sdcard/
Also no need to get aggravated, none of us are being rewarded for helping you here but we're trying to help anyway...
Click to expand...
Click to collapse
Sorry man, just had a bad feeling .
--------------------------------------------------------------------------
x0BlackTeresis0x said:
Dude forget what they say everyone tells different way, read here what i writeto you and make the steps like me.
1. Unlock Bootloader and get SU Permissions
2. Go to PlayStore download SuperSU and than start give permisions to it to update Binary , than go to Setting in SuperSU and install in System
3. Reboot Phone
4. Copy the 2 IMG data to root from SD and rename recovery-6028.img > recovery.img & unsecure-boot-mmcblk0p2.img > boot.img
this to IMG data must be unpacked from RAR(Zip) from Dexter.
5. make sure you have Unknow Sources and USB Debug Active , and also make sure that Superuser is replaced by SuperSU after reboot
6. Go to PlayStore and Download Android Terminal Emulator
and give in Terminal
Type "su" without quotes and than accept the permissions from SuperSU after that give in
----------------------------------------------------------------------------------------------------------------------------------
cat /mnt/sdcard/recovery.img >/dev/block/mmcblk0p1
sync
IF YOU USE UNSECURE BOOT tha use this
su
cat /mnt/sdcard/boot.img >/dev/block/mmcblk0p2
sync
Hope it helps and youv got it run :laugh:
Click to expand...
Click to collapse
Tried and looked like I'm typing in word lol, nothing happen, still android system recovery, not CMW.
Need CWM to wipe battery status, battery goes down to 93% in 1 min after full chagring.
ekiong said:
Sorry man, just had a bad feeling .
--------------------------------------------------------------------------
Tried and looked like I'm typing in word lol, nothing happen, still android system recovery, not CMW.
Need CWM to wipe battery status, battery goes down to 93% in 1 min after full chagring.
Click to expand...
Click to collapse
Remove micro sd from the phone.
Stick to the guide, pay atention to the phone screen behavior soo, keep the screen always on, in case of SuperSU ask for permition...
Dexter_nlb said:
......
GUIDE:
1. when you are running unlocked bootloader and is rooted goto step 2.
2. download attached zip files and extract content to internal sdcard location
3. use adb shell or terminal from market and execute the commands below
4. you are now running with native CWM recovery and unsecure boot, which enable adb root at boot instantly.
5. boot into recovery, by rebooting device and hold VOL-DOWN during bootup. (from power-off = keep holding vol-down during power on)
execute these 3 commands for recovery image install
Code:
su
cat /mnt/sdcard/recovery-6028.img >/dev/block/mmcblk0p1
sync
execute these 3 commands for unsecure boot image install
Code:
su
cat /mnt/sdcard/unsecure-boot-mmcblk0p2.img >/dev/block/mmcblk0p2
sync
or see screenshot here
do this at your own risk, and do NOT try this on old 4.0.3, which is not with unlocked bootloader, and you are required to install KDZ again.
THANKS to:
skydev - for his continued effort in finding root and giving our device full freedom with boot/recovery.
Click to expand...
Click to collapse
Copy and past the command lines from the post, like that you'll be sure that you don't miss write the path.
And like I use to say, be creative
Good luck !
RuedasLocas said:
Remove micro sd from the phone.
Stick to the guide, pay atention to the phone screen behavior soo, keep the screen always on, in case of SuperSU ask for permition...
Copy and past the command lines from the post, like that you'll be sure that you don't miss write the path.
And like I use to say, be creative
Good luck !
Click to expand...
Click to collapse
Still no such file, I give up :angel:
Thx every one
ekiong said:
Still no such file, I give up :angel:
Thx every one
Click to expand...
Click to collapse
You tried this? Only the path changes, but... I ran out of ideas.
Like I told you, be creative. Change /sdcard/ to /sdcard0/... don't know man...
"01. You must have Root access (https://mega.co.nz/#!0opzyBjS!DSoW-CaTRi49JcW58yvwCCEug4hz6VmnevdJ1prcdpE)
02. Extract both *.img files somewhere
03. Copy those files to your phone (no matter if internal or external storage, I used /sdcard/Unlocking/ so below commands will contains my directory)
04. Run terminal app on your phone or adb shell from PC while you have connected phone
05. Run those commands:
su
cat /sdcard/recovery-6028.img >/dev/block/mmcblk0p1
sync
su
cat /sdcard/unsecure-boot-mmcblk0p2.img >/dev/block/mmcblk0p1
sync
REMEMBER!
If your folder is different than /sdcard replace it in those commands above!
Methods and necessary files are found also here: http://forum.xda-developers.com/showthread.php?t=2180138
All credits goes to Dexter_nlb from xda community."
RuedasLocas said:
You tried this? Only the path changes, but... I ran out of ideas.
Like I told you, be creative. Change /sdcard/ to /sdcard0/... don't know man...
"01. You must have Root access (https://mega.co.nz/#!0opzyBjS!DSoW-CaTRi49JcW58yvwCCEug4hz6VmnevdJ1prcdpE)
02. Extract both *.img files somewhere
03. Copy those files to your phone (no matter if internal or external storage, I used /sdcard/Unlocking/ so below commands will contains my directory)
04. Run terminal app on your phone or adb shell from PC while you have connected phone
05. Run those commands:
su
cat /sdcard/recovery-6028.img >/dev/block/mmcblk0p1
sync
su
cat /sdcard/unsecure-boot-mmcblk0p2.img >/dev/block/mmcblk0p1
sync
REMEMBER!
If your folder is different than /sdcard replace it in those commands above!
Methods and necessary files are found also here: http://forum.xda-developers.com/showthread.php?t=2180138
All credits goes to Dexter_nlb from xda community."
Click to expand...
Click to collapse
OH MY GOD I'm stupid, I copied files with ZERO byte.
sorry I used airdroid to copy them to my phone. But only their icons moved into my phone, not contents.
It works now THANKSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS :laugh:
Close thread and my stupid problem :silly:

PDS Partition Fix (Very risky - Not for the faint of heart!)

I no longer have this phone!
---
Are you having problems flashing custom ROMs and then getting bootloops? Are you sick of using the Stock ROM?
I found that it is caused by accidentally wiping the PDS partition in some versions of CWM an TWRP.
By going into Settings > About > Status the serial number will no longer be shown. (Unknown or Error.)
A long time ago, someone posted their PDS (yay!) here.
The second post has an extracted PDS.
You will need to download both the pds.img and efi.zip for this tutorial.
To see where the PDS is located for the XT890, look here. (mmcblk0p12)
~
Note: I've attached some pics to help - see below.
Step One:
While booted into Android, you need to use the following commands: (Make sure you enable USB Debugging.)
Code:
adb push pds.img /data/local/tmp
adb shell
su
chmod 777 /data/local/tmp/pds.img
dd if=/data/local/tmp/pds.img of=/dev/block/mmcblk0p12
exit
exit
adb reboot
At this point, if you boot into fastboot, you'll notice the PDS is fixed, but it will not show YOUR serial number.
Step Two:
Extract efi.zip
Open up efi\factory\fti using a hex editor (I use XVI32)
Find the decimal address (Address > Goto) 21
Insert your serial number as a text string T********H (Edit > Insert string)
Remember, the serial number is TEN characters.
Remove the old serial number using Delete on the keyboard.
You should end up with your serial number and EA4 on the end.
Save the file and copy it to your phone.
Using a root explorer file manager (I use ES File Explorer) mount / as RW
Browse to /pds/factory/, copy your edited fti file and overwrite.
Step Three:
Restart the phone and boot into fastboot.
Code:
fastboot erase cache
fastboot reboot-bootloader
fasboot should now show the correct serial number.
Congrats!
I hope this has helped you, please give feedback.
Good find. Thanks for the contribution
So my Serialnumber is the MSN on my phonebox right, the one right above the IMEI? Cause mine is not beginning wit a "T", but it has 10 characters.
Btw, the Serialnumber is not the only thing that is unique - the mac adress is saved in the pds too. I will try to change mine later, should work with the same method, i just create a new one i guess - dont know how to get my old one.
I lost my box a long time ago, but had my serial number saved in a screenshot from when I unlocked the phone's bootloader.
Thanks for the info on the MAC address, I'll look into it later.
Sent from my XT890
Worth a try with the Moto X Style?
AlertRobotdude said:
Worth a try with the Moto X Style?
Click to expand...
Click to collapse
Maybe, but not this one. Do know u are in the "Razr I" forums of XDA and not in the "Moto X Style" forums.

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