[XTS][Recovery]Boot Menu S (safestrap port) BETA v0.8

Search This thread

pajn

Senior Member
Aug 13, 2009
225
109
What is this?

Boot Menu S is a bootstraped recovery.
Bootstraped means that it installs itself in the system partition and
hijacks Androids boot process. This means that it will not protect
your device if you screw up you stock system. Therefore it supports
up to four rom-slots. A rom-slot is stored on your internal storage
and holds one rom. When you flash something to a rom slot it will
not touch your stock system partition and therefore protects you
from a brick.

How do I use this?
Install the app https://play.google.com/store/apps/details?id=se.pajn.bms.manager
Open the app and install the recovery.
Reboot to the recovery.

If you want to enter the recovery during boot hold volume down until the boot animation hungs.

REMEMBER TO NEVER FLASH, WIPE OR RESTORE SOMETHING
TO YOUR STOCK SYSTEM, IT MAY BRICK YOUR DEVICE.


Thanks to
Hashcode and STS dev team for writing Safestrap
TeamWin for writing TWRP
And Developers and Skrilax_CZ for writing 2nd-init

As always you are fully responsible for your device if you brick your device
using this you are on your own. I nor anyone else take any responsibility
for what you do with your device.
 
Last edited:

pajn

Senior Member
Aug 13, 2009
225
109
wow, apparently something good is going on here :) :) theoretically via some changes should be also available for 1st tab S users ?
I can't promise anything but I espect so yes. @smgdev here have sent me some device information so I hope that it should be possible. I will start doing some real work towards STS now.

Sent from my XT910 using Tapatalk 4 Beta
 

dex9mm

Senior Member
See this is where im confused the is no imne number for the device therefore no way to complie or am I totally wrong
What I am intrested in is kernal and radio flashes to the oem software like doomloord but the real shame about the tablet is the sligly aggressive battery "saving" ints in the kernal that are there like the ever present wifi issue ive always found frustrating buttery smooth yes once my wifi kicks in then I can say hold on while I disable and renable the wifi because reuter is going nuts with the constant disconnects and starts a new cache every time it reconnects to it thus filling up its memory ram? And then it causes problems its not a laptop so I dont see why I was given to viao to build hard ware they knew little about and a software system even less ha ha

rooted lighting wildfire on unoffical j.b from benni
and sony XTS rooted stock j.b thanks djrbliss
 

CoolApps

Senior Member
May 12, 2011
3,386
611
I can't promise anything but I espect so yes. @smgdev here have sent me some device information so I hope that it should be possible. I will start doing some real work towards STS now.

Sent from my XT910 using Tapatalk 4 Beta

Awesome, if you use the uninstall option will it boot to the stock recovery like nothing happened?

Sent from my Sony Tablet S using xda premium
 

smgdev

Senior Member
Jan 13, 2013
321
48
Ankara
I can't promise anything but I espect so yes. @smgdev here have sent me some device information so I hope that it should be possible. I will start doing some real work towards STS now.

Sent from my XT910 using Tapatalk 4 Beta

Can you post the apk? And did you use the twrp recovery from the original safestrap?

Sent from my Sony Tablet S using xda app-developers app
 

CoolApps

Senior Member
May 12, 2011
3,386
611
Can you post the apk? And did you use the twrp recovery from the original safestrap?

Sent from my Sony Tablet S using xda app-developers app

I do want the apk BUT it is a major risk since XTS and the STS are different in a few ways like the bootloader, hardware, system, 2nd init and such so we may have to wait until it is supported.

Sent from my Nexus 4 using xda app-developers app
 

pajn

Senior Member
Aug 13, 2009
225
109
See this is where im confused the is no imne number for the device therefore no way to complie or am I totally wrong
What I am intrested in is kernal and radio flashes to the oem software like doomloord but the real shame about the tablet is the sligly aggressive battery "saving" ints in the kernal that are there like the ever present wifi issue ive always found frustrating buttery smooth yes once my wifi kicks in then I can say hold on while I disable and renable the wifi because reuter is going nuts with the constant disconnects and starts a new cache every time it reconnects to it thus filling up its memory ram? And then it causes problems its not a laptop so I dont see why I was given to viao to build hard ware they knew little about and a software system even less ha ha

rooted lighting wildfire on unoffical j.b from benni
and sony XTS rooted stock j.b thanks djrbliss
You can compile the kernel but you can't boot it as we have a locked bootloader, it's solvable with kexec which I have looked into a bit however the kernel is a mess so I don't relay know where to start. But it would be nice to have. With kexec and 2nd-init we have fully worked around the locked bootloader problem.

Awesome, if you use the uninstall option will it boot to the stock recovery like nothing happened?
You can always access the stock recovery because that one is started from the bootloader where a bootstraped recovery is started from the system. What happens when you press uninstall is that it removes every file that is installed in the system partition and restores the hijack binary (currently logwrapper but I will start searching for a new one as Sony starts logwrapper very late (usually it's one of the first things to start as the mounting of the system, user and cache partitions usually are wrapped with logwrapper)).

Can you post the apk? And did you use the twrp recovery from the original safestrap?
Ofcourse. However I don't relay know what you want to use it for. The recovery is just included as a binary so the APK doesn't realy reveal much. Is there anything special that you are searching for?
If you use the current APK on the STS there is a big risk of bricking. I will send you a test build for STS as soon as possible if you don't mind doing some testing, else I have to find someone else.

View attachment BootMenuS.apk

The recovery is TWRP however it isn't exactly the same as in the real safestrap builds because I couldn't compile the master branch of safestrap (probably some configuration error but the error I got from make wasn't very helpful so...) so I used a branch with a later version of TWRP and because TWRP had some big changes in its PartitionManager I had to rework most of the rom slot code.
I will post the full source on Github later.
 

Plays2

Senior Member
Sep 4, 2011
266
123
Peachtree City
You can compile the kernel but you can't boot it as we have a locked bootloader, it's solvable with kexec which I have looked into a bit however the kernel is a mess so I don't relay know where to start. But it would be nice to have. With kexec and 2nd-init we have fully worked around the locked bootloader problem.


You can always access the stock recovery because that one is started from the bootloader where a bootstraped recovery is started from the system. What happens when you press uninstall is that it removes every file that is installed in the system partition and restores the hijack binary (currently logwrapper but I will start searching for a new one as Sony starts logwrapper very late (usually it's one of the first things to start as the mounting of the system, user and cache partitions usually are wrapped with logwrapper)).


Ofcourse. However I don't relay know what you want to use it for. The recovery is just included as a binary so the APK doesn't realy reveal much. Is there anything special that you are searching for?
If you use the current APK on the STS there is a big risk of bricking. I will send you a test build for STS as soon as possible if you don't mind doing some testing, else I have to find someone else.

View attachment 2083568

The recovery is TWRP however it isn't exactly the same as in the real safestrap builds because I couldn't compile the master branch of safestrap (probably some configuration error but the error I got from make wasn't very helpful so...) so I used a branch with a later version of TWRP and because TWRP had some big changes in its PartitionManager I had to rework most of the rom slot code.
I will post the full source on Github later.

I can also help out with testing!
 

pajn

Senior Member
Aug 13, 2009
225
109
Okey, I post here the version I sent to smgdev in private.

Remember that this is a completely untested version, I have never even seen a STS IRL. It's only based on information smgdev sent and while that info were good there is still some possibility that something isn't right at the first try.

This version doesn't include any hijack and is therefore not modifying any existing files, only adding, so it shouldn't create a brick however as always: nothing can be guaranteed. Also there is risk that the recovery isn't correctly configured and can cause problem so please follow the protocol if you aren’t absolutely sure of what you are doing.

APK: http://ge.tt/3lBh0nk/v/0

Install the app.
On the install screen make sure that it says Device: STS in the top right corner, if it doesn't: abort!
Install the recovery.
Open adb shell and run
Code:
su
reboot-recovery
In the recovery:
Go to backup and make sure that it says the correct free space of your internal storage. If it doesn't: abort!
Do a backup.
Go to mounts and mount system
Go to advanced>file manager and check that /system contains your stock system.
Go to boot options>rom slot 1 and make sure that it says the correct free space of your internal storage. If it doesn't: abort!
Create the slot.
Go to mounts and mount system
Go to advanced>file manager and check that /system only contains lost+found. If it contains your stock system: abort!
Restore your backup
Go to mounts and mount system
Go to advanced>file manager and check that /system contains your stock system (well, the backup of it).
Go to boot options>rom slot 2 and create it
Go to mounts and mount system
Go to advanced>file manager and check that /system only contains lost+found.
Try to delete one rom slot

That should cover most things.
 

Plays2

Senior Member
Sep 4, 2011
266
123
Peachtree City
When I run reboot-recovery I get
"Cp can't stat '/system/etc/safestrap/bbx no such file or directory
Unable to chmod /sbin/bbx no such file or directory and a whole bunch of the same line "/system/bin/reboot-recovery[19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32,35,38,41,42,43,44,45,46,47,48,49,50,51,53] /sbin/bbx not found"
And finally,
"/system/bin/reboot-recovery[55] /sbin/hijack.killall not found
/system/bin/reboot-recovery[57] /sbin/taskset: not found
/system/bin/reboot-recovery[58] /sbin/bbx not found
/system/bin/reboot-recovery[59] /sbin/taskset not found"

Sent from my SGH-I747 using Tapatalk 4 Beta
 
  • Like
Reactions: pajn

pajn

Senior Member
Aug 13, 2009
225
109
When I run reboot-recovery I get
"Cp can't stat '/system/etc/safestrap/bbx no such file or directory
Unable to chmod /sbin/bbx no such file or directory and a whole bunch of the same line "/system/bin/reboot-recovery[19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32,35,38,41,42,43,44,45,46,47,48,49,50,51,53] /sbin/bbx not found"
And finally,
"/system/bin/reboot-recovery[55] /sbin/hijack.killall not found
/system/bin/reboot-recovery[57] /sbin/taskset: not found
/system/bin/reboot-recovery[58] /sbin/bbx not found
/system/bin/reboot-recovery[59] /sbin/taskset not found"

Sent from my SGH-I747 using Tapatalk 4 Beta

Such a stupid misstake. I will fix it when I get home.

Sent from my XT910 using Tapatalk 4 Beta
 
  • Like
Reactions: Plays2

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    What is this?

    Boot Menu S is a bootstraped recovery.
    Bootstraped means that it installs itself in the system partition and
    hijacks Androids boot process. This means that it will not protect
    your device if you screw up you stock system. Therefore it supports
    up to four rom-slots. A rom-slot is stored on your internal storage
    and holds one rom. When you flash something to a rom slot it will
    not touch your stock system partition and therefore protects you
    from a brick.

    How do I use this?
    Install the app https://play.google.com/store/apps/details?id=se.pajn.bms.manager
    Open the app and install the recovery.
    Reboot to the recovery.

    If you want to enter the recovery during boot hold volume down until the boot animation hungs.

    REMEMBER TO NEVER FLASH, WIPE OR RESTORE SOMETHING
    TO YOUR STOCK SYSTEM, IT MAY BRICK YOUR DEVICE.


    Thanks to
    Hashcode and STS dev team for writing Safestrap
    TeamWin for writing TWRP
    And Developers and Skrilax_CZ for writing 2nd-init

    As always you are fully responsible for your device if you brick your device
    using this you are on your own. I nor anyone else take any responsibility
    for what you do with your device.
    4
    The first thing that needs to be understood and mad work is 2nd-init.
    2nd-init is a very complex thing and I redirect to the explanation at
    http://cvpcs.org/blog/2011-06-14/2nd-init._what_it_is_and_how_it_works

    So what this basically means is that by running 2nd-init we can do a
    new start-up. But before we do a new start-up we need to make sure that
    the it now starts up whatever we want to start up.
    This is (in reboot-recovery) done by extracting recovery.zip which holds
    the ramdisk for the recovery. After that we need to kill everything (in a
    reboot you first need to shut down) this is (in reboot-recovery) done by
    hijack.killall

    After that the last three lines in reboot-recovery loads 2nd-init which
    basically just makes the kernel start up the system again.

    Do you get what is basically happens up to this point?
    3
    wow, apparently something good is going on here :) :) theoretically via some changes should be also available for 1st tab S users ?
    I can't promise anything but I espect so yes. @smgdev here have sent me some device information so I hope that it should be possible. I will start doing some real work towards STS now.

    Sent from my XT910 using Tapatalk 4 Beta
    3
    I can't promise anything guys, but I'm working on it. I have a spare tap :D

    Sent from my Nexus 5 using XDA Premium 4 mobile app

    Spare tap? Lol

    Sent from my Nexus 4 using Tapatalk