Question Help with bootloop after editing settings file

Search This thread

RetroTech07

Senior Member
Apr 24, 2021
369
275
Google Pixel 2 XL
Google Pixel 6 Pro
Hey folks,

Last night I was editing a file located under "data/system/users/0/settings_ssaid.xml" and upon rebooting my phone, it's been stuck in a boot loop. I have an original copy saved in a different folder, but unable to access anything to replace it.

Is there any specific fastboot command I can run to swap the files (adb push, pull etc)? Only boot slot A is giving me an issue, and I was reading flashing system.img would be able to help, but I don't wanna do anything I'm unsure will wipe any of my data where I'd have to start over unless I've recovered some of that data first.

If I do have to flash any stock images, pls post the instructions for clarity.

Thanks in advance.
 
  • Wow
Reactions: roirraW "edor" ehT

Morgrain

Senior Member
Aug 4, 2015
1,131
1,314
Assuming adb can actually access your device, while it's stuck in a boot loop (test this by running 'adb devices' and see if you receive a response)

You can run the following command to list all the files in your specific folder.

adb shell ls FILEPATH

Every file in your specific folder will be listed. You can then do the following to pull/push your file

adb pull FILEPATH
adb push FILENAME FILEPATH

Of course you need to place the file that you want to push in your ADB folder.

Mind though, that simply replacing your edited file with the backup might not solve your bootloop.

You can always look up available commands here

 

RetroTech07

Senior Member
Apr 24, 2021
369
275
Google Pixel 2 XL
Google Pixel 6 Pro
Assuming adb can actually access your device, while it's stuck in a boot loop (test this by running 'adb devices' and see if you receive a response)
Yes, I can access adb and my device while it's booting up, but once it reboots I lose connection. Unless I can interrupt the process I'd have to be very quick in my typing to copy files lol.

Even with the few seconds I have to type some commands to access the directory of the file I edited, I do get a permission denied error.

Would swapping to Slot B during boot allow me into the system, or even flashing the system.img file?
 

foobar66

Senior Member
Jan 8, 2011
2,188
2,275
Brussels
Google Pixel 6 Pro
Yes, I can access adb and my device while it's booting up, but once it reboots I lose connection. Unless I can interrupt the process I'd have to be very quick in my typing to copy files lol.

Even with the few seconds I have to type some commands to access the directory of the file I edited, I do get a permission denied error.

Would swapping to Slot B during boot allow me into the system, or even flashing the system.img file?
No because your file is on /data.
The issue is that you can't push your file to /scard since (I guess) you can't even get beyond to the point where /sdcard is mounted.
So copying it from /sdcard will likely be too late in the boot process.
Pushing directly into /data does not work either as you would have to be root. In the old days you could run and in root mode but I'm not sure that is still possible.
Factory reset will work.

On devices with separate recovery partition it would be possible to change recovery to allow adb access to /data so then push old file via recovery... But I would not know how to do that on Pixel as recovery is s part of the boot partition.
 
Last edited:
  • Like
Reactions: roirraW "edor" ehT

RetroTech07

Senior Member
Apr 24, 2021
369
275
Google Pixel 2 XL
Google Pixel 6 Pro
I would first try a full flash removing the -w to avoid the wipe. It may work.
Ok, I'm rooted so to be sure I don't mess anything up, lol can you list the steps just as a precaution?

Obviously I'd be in fastboot / recovery mode, then perform a flash-all but remove the -w so as to not erase my data?

Once the system boots, all of my texts and setup should remain as is, or do I have to go and recover it?

Would I be able to install the OS again on the inactive slot to recover data, or does that not work that way?
 

foobar66

Senior Member
Jan 8, 2011
2,188
2,275
Brussels
Google Pixel 6 Pro
Would I be able to install the OS again on the inactive slot to recover data, or does that not work that way?
Nope ... there is only 1 data partition, so even when you flash the OS to the inactive slot, it would still use the same data partition. Moreover, it is then likely to upgrade/convert some files on /data which might result in not being able to go to the previous version in the old slot.
 

RetroTech07

Senior Member
Apr 24, 2021
369
275
Google Pixel 2 XL
Google Pixel 6 Pro
so, unfortunately doing a full flash without wiping data didn't work. I'm almost inclined to believe that if TWRP was available for the P6/P, that I could go and push the file I had saved back into the directory of where it was and save myself from this mess.

I'm kicking myself because I'm usually backing up my data before I modify any system files, but this one time I hadn't done so and I had Google's backup turned off at the time, so I'm gonna have to lose some text messages over the last few days with some folks I enjoy speaking to. I do have some saved from late last week, but nothing from the weekend up until now. 😕
 

DanielF50

Senior Member
Jul 22, 2010
580
400
Hampshire, England
Google Pixel 6 Pro
As you said you can access ADB while booting, why not push/remove/replace the file while booting, even if this takes multiple boots to perform all commands, it should work assuming you can also use SU, if you can't, none of the below will work.


Code:
adb push <backup file location> /sdcard

adb shell
su

rm data/system/users/0/settings_ssaid.xml

cp /sdcard/settings_ssaid.xml /data/system/users/0/

chmod 600 data/system/users/0/settings_ssaid.xml


I don't know why it's affecting your boot though, there's a .fallback file that the system should fall back to when the system notes that this file is corrupt.


If the above doesn't work, and you could try:

Code:
adb shell
su

rm data/system/users/0/settings_ssaid.xml

cp /data/system/users/0/settings_ssaid.xml.fallback /data/system/users/0/settings_ssaid.xml


If that doesn't work, try:

Code:
adb shell
su

rm data/system/users/0/settings_ssaid.xml

And reboot, but again, I don't know why you're bootlooping from this, that file shouldn't be integral to booting.

Also, if you need to back up your data, why not just boot to boot_b, if it's not causing you issues? You really shouldn't have to reset your device to fix one problem - you could do a /data & /sdcard pull while booted to boot_b, or just run something like Titanium & SMS backup/restore.
 
Last edited:

RetroTech07

Senior Member
Apr 24, 2021
369
275
Google Pixel 2 XL
Google Pixel 6 Pro
As you said you can access ADB while booting, why not push/remove/replace the file while booting, even if this takes multiple boots to perform all commands, it should work assuming you can also use SU, if you can't, none of the below will work.


Code:
adb push <backup file location> /sdcard

adb shell
su

rm data/system/users/0/settings_ssaid.xml

cp /sdcard/settings_ssaid.xml /data/system/users/0/

chmod 600 data/system/users/0/settings_ssaid.xml


I don't know why it's affecting your boot though, there's a .fallback file that the system should fall back to when the system notes that this file is corrupt.


If the above doesn't work, and you could try:

Code:
adb shell
su

rm data/system/users/0/settings_ssaid.xml

cp /data/system/users/0/settings_ssaid.xml.fallback /data/system/users/0/settings_ssaid.xml


If that doesn't work, try:

Code:
adb shell
su

rm data/system/users/0/settings_ssaid.xml

And reboot, but again, I don't know why you're bootlooping from this, that file shouldn't be integral to booting.

Also, if you need to back up your data, why not just boot to boot_b, if it's not causing you issues? You really shouldn't have to reset your device to fix one problem - you could do a /data & /sdcard pull while booted to boot_b, or just run something like Titanium & SMS backup/restore.
I appreciate the help but I can't go back as I've already wiped everything minutes before you sent this. If I had the above commands sooner I would have loved to try, although I'm not really sure why this became an issue in the first place. I tried booting to slot B, using both patched and normal boot images but it wasn't working, unless I did something wrong.

All I remember is installing an app to edit UDID for individual apps that I've used in the past, but because it wasn't identifying root properly, to which I'm assuming is an Android 12 issue, I decided to follow instructions for manually editing such IDs in the file I edited in my OP.

After I rebooted, I remember the main system about to start and seeing the Google boot logo with a percentage # go all the way up to 90%, then that's where the boot loop started. My guess at this point is either the app or the file I edited caused an issue, because I did nothing else up until that point. What's odd, is that after I formatted the whole system and rebooted, I saw the same percentage appear on screen after installing the same app to see if that was the issue, but it booted fully just fine.

I was going to just keep fighting this and keep the phone the way it was until I could maybe fix everything, but figured there's nothing I could do at this point since trying a flash of everything failed. I was up until 5am last night and it's almost 4 am with me trying to fix this. I feel defeated and upset because I don't believe I had to wipe this in the first place, and could have likely saved all of my data. I didn't have Google's backup option turned on and hadn't backed up my text messages because I was dumb. I'm more upset with myself than the phone honestly.
 
  • Like
Reactions: roirraW "edor" ehT

DanielF50

Senior Member
Jul 22, 2010
580
400
Hampshire, England
Google Pixel 6 Pro
I appreciate the help but I can't go back as I've already wiped everything minutes before you sent this. If I had the above commands sooner I would have loved to try, although I'm not really sure why this became an issue in the first place. I tried booting to slot B, using both patched and normal boot images but it wasn't working, unless I did something wrong.

All I remember is installing an app to edit UDID for individual apps that I've used in the past, but because it wasn't identifying root properly, to which I'm assuming is an Android 12 issue, I decided to follow instructions for manually editing such IDs in the file I edited in my OP.

After I rebooted, I remember the main system about to start and seeing the Google boot logo with a percentage # go all the way up to 90%, then that's where the boot loop started. My guess at this point is either the app or the file I edited caused an issue, because I did nothing else up until that point. What's odd, is that after I formatted the whole system and rebooted, I saw the same percentage appear on screen after installing the same app to see if that was the issue, but it booted fully just fine.

I was going to just keep fighting this and keep the phone the way it was until I could maybe fix everything, but figured there's nothing I could do at this point since trying a flash of everything failed. I was up until 5am last night and it's almost 4 am with me trying to fix this. I feel defeated and upset because I don't believe I had to wipe this in the first place, and could have likely saved all of my data. I didn't have Google's backup option turned on and hadn't backed up my text messages because I was dumb. I'm more upset with myself than the phone honestly.

Ah damn, I was too late!

The 90% thing sounds like the November Google Play services updated - mine updated yesterday and I got the same thing when I rebooted, maybe something between the two got corrupt.

Yeah, I get that, I've had more than my fair share of self inflicted (and not so self inflicted) problems that have lost me data but you live and you learn I suppose 😅
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    So effectively, it's likely you're only solution is to do a full firmware flash along with wipe.
    2
    I would first try a full flash removing the -w to avoid the wipe. It may work.
    2
    I would first try a full flash adding the -w to avoid the wipe. It may work.
    Probably a typo, but I think you meant you need to "remove" the -w to avoid a wipe.
    2
    Probably a typo, but I think you meant you need to "remove" the -w to avoid a wipe.

    Thank you! My post is fixed.
    1
    Yes, I can access adb and my device while it's booting up, but once it reboots I lose connection. Unless I can interrupt the process I'd have to be very quick in my typing to copy files lol.

    Even with the few seconds I have to type some commands to access the directory of the file I edited, I do get a permission denied error.

    Would swapping to Slot B during boot allow me into the system, or even flashing the system.img file?
    No because your file is on /data.
    The issue is that you can't push your file to /scard since (I guess) you can't even get beyond to the point where /sdcard is mounted.
    So copying it from /sdcard will likely be too late in the boot process.
    Pushing directly into /data does not work either as you would have to be root. In the old days you could run and in root mode but I'm not sure that is still possible.
    Factory reset will work.

    On devices with separate recovery partition it would be possible to change recovery to allow adb access to /data so then push old file via recovery... But I would not know how to do that on Pixel as recovery is s part of the boot partition.