Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on Updating Symlinks after several reboots post initial bootstrap #278

Open
1 task done
scamdotnet opened this issue Sep 22, 2024 · 26 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@scamdotnet
Copy link

Device Model

iPhone 12, A14

iOS Version

16.6.1

Bootstrap Version

1.2.6

Serotonin Version

No response

What happened

After initially bootstrapping, I rebooted my phone several times to try to get something else to work. During this I did not bother to bootstrap again, and rebooted probably like 5 times. Now, every time I try to bootstrap using the app, the process fails on the Updating Symlinks step, with a “code(255)” message box appearing. I was expecting to be able to re-bootstrap without running into issues. I currently have not tried to fully uninstall Bootstrap, since I would prefer to keep my configurations and installed packages.

Screenshot of error:
IMG_3359

Log output

ios-version: 16.6.1
device-model: iPhone13,2
app-version: 1.2.6
boot-session: 2F9E19E7-9CC2-4066-A7E3-554E9AD3F78F
bootstrap instalado
El sistema no tiene bootstrap
bootstrap...

device is strapped: /var/containers/Bundle/Application/.jbroot-CFB53A009C72E54B
Status: Rerandomize jbroot

Status: Building Base Binaries

Status: Starting Bootstrapd

bootstrap server load successful

bootstrap server check successful
Status: Updating Symlinks

***exception: Bootstrap.m (310): spawnBootstrap((char*[]){"/bin/sh", "/usr/libexec/updatelinks.sh", NULL}, nil, nil) == 0

Acknowledgement of README and FAQ

  • I have read both the README and the FAQ.
@scamdotnet scamdotnet added the bug Something isn't working label Sep 22, 2024
@roothider
Copy link
Contributor

can you zip and upload /var/mobile/Library/Logs/CrashReporter ?
(using Filza trollstore version)

@scamdotnet
Copy link
Author

Can I retract WifiLQMMetrics files from the zip file? I cannot seem to find what they contain, but I am worried about them containing nearby wifi SSIDs and other information that could pinpoint my location. I've looked at all the other log files and I am comfortable sharing those ones, but am unsure about the Wifi ones.

@roothider
Copy link
Contributor

Can I retract WifiLQMMetrics files from the zip file? I cannot seem to find what they contain, but I am worried about them containing nearby wifi SSIDs and other information that could pinpoint my location. I've looked at all the other log files and I am comfortable sharing those ones, but am unsure about the Wifi ones.

sure, no problem

@scamdotnet
Copy link
Author

scamdotnet commented Sep 22, 2024

Here you go!
CrashReporter.zip
From my brief look at it, it doesn't seem to contain anything related to Bootstrap, but maybe you'll see something I didn't.

@roothider
Copy link
Contributor

Here you go! CrashReporter.zip From my brief look at it, it doesn't seem to contain anything related to Bootstrap, but maybe you'll see something I didn't.

yes. did you clean the CrashReporter files after the failure of "update symlinks"?

@scamdotnet
Copy link
Author

I don't think I did, will the logs appear after rerunning or do I need to reboot and then bootstrap again?

@roothider
Copy link
Contributor

I don't think I did, will the logs appear after rerunning or do I need to reboot and then bootstrap again?

yes please

@scamdotnet
Copy link
Author

No files appeared or were updated from what I can see in Filza, both after bootstrapping without rebooting and bootstrapping after rebooting. I do have the capabilities to run xcode with a debugger, if trollstore installed apps lets them be debugged by xcode, though I don't really know how to use a debugger nor to allow apps to be debugged if xcode doesn't work out of the box, so I would need to be helped through all that.

@roothider
Copy link
Contributor

what was the last working version of Bootstrap?

No files appeared or were updated from what I can see in Filza, both after bootstrapping without rebooting and bootstrapping after rebooting. I do have the capabilities to run xcode with a debugger, if trollstore installed apps lets them be debugged by xcode, though I don't really know how to use a debugger nor to allow apps to be debugged if xcode doesn't work out of the box, so I would need to be helped through all that.

what was the last working version of Bootstrap on your device ?

@scamdotnet
Copy link
Author

1.2.6 is the only version I have had on this device. I did have it working, and was able to restore the boostrap environment once after a single reboot (when my phone died), but after the multiple reboots, I cannot get it to go.

@roothider
Copy link
Contributor

1.2.6 is the only version I have had on this device. I did have it working, and was able to restore the boostrap environment once after a single reboot (when my phone died), but after the multiple reboots, I cannot get it to go.

I'm guessing that for some reason bootstrap's environment is corrupted.
can you use filza to check how many ".jbroot-xxxx" in /var/containers/Bundle/Application/ ?

@scamdotnet
Copy link
Author

scamdotnet commented Sep 22, 2024

I'm guessing that for some reason bootstrap's environment is corrupted. can you use filza to check how many ".jbroot-xxxx" in /var/containers/Bundle/Application/ ?

There is only one environment.

@roothider
Copy link
Contributor

I'm guessing that for some reason bootstrap's environment is corrupted. can you use filza to check how many ".jbroot-xxxx" in /var/containers/Bundle/Application/ ?

There is only one environment.

and make sure these file exists in your device :
jbroot:/bin/sh
jbroot:/usr/bin/dash
jbroot:/usr/libexec/updatelink
jbroot:/usr/libexec/updatelinks.sh

@scamdotnet
Copy link
Author

scamdotnet commented Sep 22, 2024

All of those files exist where they should be, however the /bin/sh symlink is pointing to a .jbroot- directory that doesn't exist. Some other symlinks in jbroot:/bin/ also point to invalid locations as well. I wonder if there is a way to easily search for all of them without having a full terminal available.

@roothider
Copy link
Contributor

All of those files exist where they should be, however the /bin/sh symlink is pointing to a .jbroot- directory that doesn't exist. Some other symlinks in jbroot:/bin/ also point to invalid locations as well. I wonder if there is a way to easily search for all of them without having a full terminal available.

can you show me that the full path of /var/containers/Bundle/Application/.jbroot-xxx,
and what path that the /bin/sh symlink to in your device?

@scamdotnet
Copy link
Author

The full path is /var/containers/Bundle/Application/.jbroot-07611732F50FF74E, and the destination path of the /bin/sh symlink is /var/containers/Bundle/Application/.jbroot-F35BD590C91E1329/usr/bin/dash
I am currently looking into using the find command in Fliza’s terminal to try and find all the incorrect symlinks.

@scamdotnet
Copy link
Author

Okay, quick update, it seems like a lot of files are pointing to the wrong location. Once /bin/sh is fixed, would the updating symlinks command automatically resolve the incorrect symlinks to point to the current .jbroot?

@roothider
Copy link
Contributor

Okay, quick update, it seems like a lot of files are pointing to the wrong location. Once /bin/sh is fixed, would the updating symlinks command automatically resolve the incorrect symlinks to point to the current .jbroot?

updatelinks.sh relies on these symlinks, which should link to relative paths instead of absolute paths:
jbroot:/bin/sh -> ".jbroot/usr/bin/dash"
jbroot:/usr/lib/.jbroot -> "../../.jbroot"

@scamdotnet
Copy link
Author

I resymlinked those two files (actually the /usr/lib/.jbroot one was fine), and reran bootstrap, and it errored out in the exact same way. jbroot:/bin/sh now is pointing to the same invalid location as before... is there a file that sets the ID value of the .jbroot- folder?

@roothider
Copy link
Contributor

I resymlinked those two files (actually the /usr/lib/.jbroot one was fine), and reran bootstrap, and it errored out in the exact same way. jbroot:/bin/sh now is pointing to the same invalid location as before... is there a file that sets the ID value of the .jbroot- folder?

I think you need to fix these symlinks as well:
jbroot:/.jbroot -> "."
jbroot:/bin/.jbroot - > "../.jbroot"

@scamdotnet
Copy link
Author

unfortunately I just ran out of Screen Time on my phone, I can test those as well tomorrow. I can confirm for you that .jbroot was already pointing to ".", but I don't know about bin's .jbroot

@roothider
Copy link
Contributor

unfortunately I just ran out of Screen Time on my phone, I can test those as well tomorrow. I can confirm for you that .jbroot was already pointing to ".", but I don't know about bin's .jbroot

ok let me known if there any progress

@scamdotnet
Copy link
Author

Okay, fixing all those symlinks fixed the issue. Should I close this issue since I manually resolved the problem? Or should I leave it open for further investigation for why this occurred encase this is an actual bug with Bootstrap?

@roothider
Copy link
Contributor

1: If your device suddenly reboots/shuts down during boot, then the updatelinks process will be interrupted and one part of .jbroot will be updated but another part may not be updated. and updatelinks depends on the .jbroot mentioned above, so this will cause updatelinks to fail to start normally again.

2: If you reinstall the "dash" package (which provides /bin/sh), the symlink to /bin/sh will change from a relative path to an absolute path. (due to the way procursus's bootstrap is built, it may automatically reinstall the dash package when you use apt to update packages.)

this is an imperfection of updatelinks. we plan to make it a standalone executable without relying on .jbroot

@ben-3310
Copy link

ben-3310 commented Nov 1, 2024

Work?

@TragicLifeHu
Copy link

I have this issue on my iPhone, too. My device is iPhone 13 Pro with iOS 17.0.
What dangerous action I could figure out might be that I downloaded iCleaner Pro, converted it with Roothide layer and cleaned for once. This may break some environments or file permissions, but I don't know which. I did this a month ago, only once then I uninstalled iCleaner Pro tweak because I think it is too dangerous.
But everything was fine, till today I found opening Sileo will start Bootstrap app instead, so I rebooted and the same issue as this title happened.
Exactly the same log.

I tried to uninstall Bootstrap then reinstall, but this time it only hangs on "Finalizing Bootstrap".
I closed BS and opened Filza (TS Version, not any cracked one), deleted all jbroot related folders, back to BS, still stuck. (I noticed that this time it won't ask me for that alpine password to fill, does BS use any other folders? I have no idea)
Could anyone tell me what to do? At least I have the basic knowledge for debugging so I may help (or not)
Any crash log? nothing. Yeah, I checked, just nothing in the folder.
Using version 1.3, 1.3.2, 1.2.9, 1.2.8, none worked.
I want to restore the original environment but without the instruction, I could barely have this done.

Though I just used BS to tweak a few apps, I still need BS strongly. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants