Does anyone know where safestrap boot is physically located?
I was going to replace my stock rom (its borked for reasons unrelated to safestrap) but I'm unsure as to where the safestrap boot files are located.
Are they on stock rom /boot or /system. I'm hoping that if I just leave /boot alone I could just flash over /system and be ok but I wanna make sure I correct in assuming this as I dont want to lose access to safe strap.
to put it another way would flashing over stock /system wipeout the safestrap boot?
Thanks in Advance
alkmie said:
Does anyone know where safestrap boot is physically located?
I was going to replace my stock rom (its borked for reasons unrelated to safestrap) but I'm unsure as to where the safestrap boot files are located.
Are they on stock rom /boot or /system. I'm hoping that if I just leave /boot alone I could just flash over /system and be ok but I wanna make sure I correct in assuming this as I dont want to lose access to safe strap.
to put it another way would flashing over stock /system wipeout the safestrap boot?
Thanks in Advance
Click to expand...
Click to collapse
If you're replacing your stock slot, I believe you need to reinstall safestrap, and you'll have to install root before you reboot if your ROM doesn't have it already. I know ROM slots are in the data partition, but i'm pretty sure it has files in /system to get the splash on boot.
augeeLt Musical
Thanks for the reply.
I have one more question if anyone knows, I have a good stable rom in rom slot 1 and have made a backup so I have a system.ext4.win file.
So can I just switch to my stock rom slot and restore using this file
or perhaps rename it system.img and use adb to flash it to my system partition?
I'm unsure since I made the rom slot system partition 1800MB what would happen if I tried to flash this to my stock slot
would it just install the files to the full system partition or change my stock partition to 1800MB or would it not even work as the partition size probably do not match.
Sorry for all the question if I have a normal recovery id just flash away but don't wanna lose safe strap and have to terminal my way back in.
Thanks in advance
Related
Hello everyone.
By being stupid, I formatted every partition on my N4, except the bootloader and the recovery. I want to recover some images and videos. I found this tutorial. But the trick is not to touch the data partition because it may overwrite the deleted files.
I need to install some custom ROM or system image.
Since I can't put anything on the sdcard, I was going to use fastboot, and flash factory system image. However, in order to dump the partition, I need to have BusyBox installed. So the question is, can I install busybox with fastboot, or push it with adb push?
Or another question is, do I even need to install factory image. I do have the TWRP recovery installed, can I just push the busybox binaries? I don't know if I need any other files...
Your help is very appreciated.
Thank you very much.
vitya said:
Hello everyone.
By being stupid, I formatted every partition on my N4, except the bootloader and the recovery. I want to recover some images and videos. I found this tutorial. But the trick is not to touch the data partition because it may overwrite the deleted files.
I need to install some custom ROM or system image.
Since I can't put anything on the sdcard, I was going to use fastboot, and flash factory system image. However, in order to dump the partition, I need to have BusyBox installed. So the question is, can I install busybox with fastboot, or push it with adb push?
Or another question is, do I even need to install factory image. I do have the TWRP recovery installed, can I just push the busybox binaries? I don't know if I need any other files...
Your help is very appreciated.
Thank you very much.
Click to expand...
Click to collapse
If you have TWRP, try pushing busybox from adb and then run the commands
It worked.
moxtrom, thanks for your reply.
So yesterday I got home and tried the steps.
First I pushed busybox and su as instructed in this tutorial:
http://dottech.org/87443/how-to-root-nexus-4-guide/
The last step says to do busybox -install, and that didn't work for me. But it didn't matter because the rest of the steps worked fine.
From there I followed the steps from the tutorial on how to recover the files and everything worked perfectly, except now I have bunch of files with weird file names that I have sort through.
I'll see if I can find a tool that maybe can restore the whole partition, because the data partition should be all good, it's just been formatted.
moxtrom said:
If you have TWRP, try pushing busybox from adb and then run the commands
Click to expand...
Click to collapse
I'm coming from the Droid Razr Maxx. With that phone there was an internal and external sd card. I saved everything important on the ext sd card and never had to worry about losing data. Plus with Safestrap I could create up to 4 virtual Rom slots. Yes that system had a modified TWRP system... but it was highly modified.
So, I rooted my VZN g2 just now and installed TWRP via Flashify. I'd like to flash Malladus 1.2.2 but before I do I want to be sure I know which files are safe when I wipe data. I'd like to know how I'm supposed to back up my data since this system is different than what I'm used to. Any help or links would be very useful. Also, is it possible to switch between different ROMs the way I could with Safestrap? Thanks in advance.
Sent from my LG G2 android phone
jagman96 said:
I'm coming from the Droid Razr Maxx. With that phone there was an internal and external sd card. I saved everything important on the ext sd card and never had to worry about losing data. Plus with Safestrap I could create up to 4 virtual Rom slots. Yes that system had a modified TWRP system... but it was highly modified.
So, I rooted my VZN g2 just now and installed TWRP via Flashify. I'd like to flash Malladus 1.2.2 but before I do I want to be sure I know which files are safe when I wipe data. I'd like to know how I'm supposed to back up my data since this system is different than what I'm used to. Any help or links would be very useful. Also, is it possible to switch between different ROMs the way I could with Safestrap? Thanks in advance.
Sent from my LG G2 android phone
Click to expand...
Click to collapse
When you wipe data/factory reset from recovery your /sdcard contents are fine. No there's no sdcard but the folder is still named so.
I don't know about safe strap. But if you make a nandroid you can flash back and forth between ROMs. Its good to have a nandroid anyways
can i install Stock Firmware after reparation internal memory by twrp?
if i can flash so my partitions will change or not and what other problems can occur?
faizynadim said:
can i install Stock Firmware after reparation internal memory by twrp?
if i can flash so my partitions will change or not and what other problems can occur?
Click to expand...
Click to collapse
https://firmware.center/firmware/Motorola/Moto G4 (Plus)/
After u install twrp recovery you don't modify your stock rom though no ota updates.but u can replace it with stoct recovery again.. if u mess up with stock rom yeah u can get it from the above link ..
i am asking about re partition...i am not asking about briking device or flashing stock rom...
Did modify the system partition or only the internal storage?
i have not changed yet.....i am asking if i change the partition of system and data partition...then i will be able to flash stock rom or problems will occur...
Ok, now changing the size of the system partition may create problems if you try to flash the stock img files, I think
ok..i will try that... ?
Whatever you do, don't reduce the size of the system partition, if you want to flash stock ROM later...zips should work fine though. I have seen people repartition xiaomi mi 3 phones and install custom roms.
faizynadim said:
i have not changed yet.....i am asking if i change the partition of system and data partition...then i will be able to flash stock rom or problems will occur...
Click to expand...
Click to collapse
What are you hoping to achieve with changing the partitions (e.g. are you changing the format of the partitions to ext4 or f2fs? Or are you changing the sizes of the partitions)?
If you're changing the partition sizes, I personally would leave the sizes alone, unless you're confident in the size of the partition that the stock ROM would need (and need in the future). From what I see on my device running Nougat NPJS25.93-14.4, cache (ext4) is 256 MB, system (ext4) is 2.5 GB and data (f2fs) takes up the rest of my internal storage.
As for changing formats, I don't know if the stock ROM will work with a system partition not formatted as ext4. Cache may or may not work with f2fs. Again, what are you hoping to achieve?
I want that nobody can flash stock rom on my phone normally....i have cerberus installed as root and if any theif can install firmware so that is useless and theif can enjoy using my phone...so i want to change partition sizes to make it difficult for anyone to flash factory images.
faizynadim said:
I want that nobody can flash stock rom on my phone normally....i have cerberus installed as root and if any theif can install firmware so that is useless and theif can enjoy using my phone...so i want to change partition sizes to make it difficult for anyone to flash factory images.
Click to expand...
Click to collapse
Speaking from my humble (and maybe ignorant) opinion,
I had a few experiences modifying partitions from other devices in the past (i did it no more than 3-4 times), i can say that when you flash a full stock factory image, normally, all the partitions recover his original sizes and formats.
All the devices that i modified included the General Partition Table (gpt.bin) file and the FSTAB config instructions into his full factory images, and from what i saw on the G4 plus, it includes these files too.
Here you have the complete partition table list taken from my G4 plus running 7.0 (NPJS25.93-14-4).
ohhh thanks ?
I have a few questions I'm new to the a/b partitions thing I've read the page on a/b partitions. But I'm still in the mud.
1 I'm on Verizon bootloader unlocked twrp 3.2.3-23 and magisk installed I have 9.0.11 installed twrp and magisk in slot a/b
now is it necessary to backup stock rom? If I install lets say crDroid in slot A install twrp installer I know twrp goes into both slots reboot back to recovery making sure I'm still in A install gapps and magisk reboot back to recovery making sure again I'm still in A slot then reboot to crDriod that should work yes?
2 Now If I wanted to go back to my stock rom witch is in B slot can I not reboot back to twrp and switch to slot B and go to stock?
Thanks guys this A/B partition is still clear as mudd
Making a back up is always recommend, but it's up to the user to decide if the want to or not. The down side is loosing all your data, so there is that.
The short answer to your 2nd question is no you can not dual boot ROMs on this device. I posed the same question in a different thread and you can read the explanation from Dark Nightmare here.
https://forum.xda-developers.com/showpost.php?p=78375631&postcount=988
Sent from my ONEPLUS A6013 using Tapatalk
foamerman said:
I have a few questions I'm new to the a/b partitions thing I've read the page on a/b partitions. But I'm still in the mud.
1 I'm on Verizon bootloader unlocked twrp 3.2.3-23 and magisk installed I have 9.0.11 installed twrp and magisk in slot a/b
now is it necessary to backup stock rom? If I install lets say crDroid in slot A install twrp installer I know twrp goes into both slots reboot back to recovery making sure I'm still in A install gapps and magisk reboot back to recovery making sure again I'm still in A slot then reboot to crDriod that should work yes?
Click to expand...
Click to collapse
I'm new to A/B as well but have been flashing quite a bit. Maybe someone can correct me if I'm wrong. From what I've observed, ROMs are designed to flash to the slot you're not using and, on reboot, switch slots. TWRP zip installer is designed to install to both slots. Magisk and Gapps, however, install to the current slot. This means you should flash the ROM (which flashes to the non-active system and boot partitions and possibly others), flash the TWRP installer (which installs to both boot partitions, including the one that was just flashed). Then reboot back into recovery (which will be the other slot that the ROM was installed to), and then install all the other zips needed (i.e., Gapps, Magisk, etc...).
Switching A/B partitions in the TWRP reboot menu also triggers the partition switch after reboot, if needed. It doesn't seem to immediately switch before a reboot however, even though it gives that impression.
foamerman said:
2 Now If I wanted to go back to my stock rom witch is in B slot can I not reboot back to twrp and switch to slot B and go to stock?
Click to expand...
Click to collapse
The data partition, which contains user apps and system and user app data, is not slotted. Moving back and forth between slots that share a common ROM type and are close in version might not pose a problem. But A/B slotting wasn't designed for switching Roms back and forth. It was designed to try to ensure that there is always a valid bootable ROM without regard to use data (i.e., potentially, after a factory-reset). Don't expect to boot up an AOSP modded ROM using the data and apps from an OygenOS ROM. Do a backup of all partitions to be safe (with the exception of system and vendor since system_image and vendor_image give a bit-for-bit copy, instead of file-for-file copy). Copy the TWRP directory to a computer afterward, if possible. Make sure to wipe data if flashing a ROM of a different type, not just a different version (after flashing everything but before initial system boot).
phillymade said:
Making a back up is always recommend, but it's up to the user to decide if the want to or not. The down side is loosing all your data, so there is that.
The short answer to your 2nd question is no you can not dual boot ROMs on this device. I posed the same question in a different thread and you can read the explanation from Dark Nightmare here.
https://forum.xda-developers.com/showpost.php?p=78375631&postcount=988
Sent from my ONEPLUS A6013 using Tapatalk
Click to expand...
Click to collapse
Nsane457 said:
I'm new to A/B as well but have been flashing quite a bit. Maybe someone can correct me if I'm wrong. From what I've observed, ROMs are designed to flash to the slot you're not using and, on reboot, switch slots. TWRP zip installer is designed to install to both slots. Magisk and Gapps, however, install to the current slot. This means you should flash the ROM (which flashes to the non-active system and boot partitions and possibly others), flash the TWRP installer (which installs to both boot partitions, including the one that was just flashed). Then reboot back into recovery (which will be the other slot that the ROM was installed to), and then install all the other zips needed (i.e., Gapps, Magisk, etc...).
Switching A/B partitions in the TWRP reboot menu also triggers the partition switch after reboot, if needed. It doesn't seem to immediately switch before a reboot however, even though it gives that impression.
The data partition, which contains user apps and system and user app data, is not slotted. Moving back and forth between slots that share a common ROM type and are close in version might not pose a problem. But A/B slotting wasn't designed for switching Roms back and forth. It was designed to try to ensure that there is always a valid bootable ROM without regard to use data (i.e., potentially, after a factory-reset). Don't expect to boot up an AOSP modded ROM using the data and apps from an OygenOS ROM. Do a backup of all partitions to be safe (with the exception of system and vendor since system_image and vendor_image give a bit-for-bit copy, instead of file-for-file copy). Copy the TWRP directory to a computer afterward, if possible. Make sure to wipe data if flashing a ROM of a different type, not just a different version (after flashing everything but before initial system boot).
Click to expand...
Click to collapse
OK I understand what you both are saying my understanding is that data is still there in both slots yes? so If I want to go back to my 9.0.11 stock rom I should be able to just reboot to twrp and select slot B and go back to to stock yes? guys I'm sorry this is my first A/B partition phone I'm just trying to figure it out
foamerman said:
OK I understand what you both are saying my understanding is that data is still there in both slots yes?
Click to expand...
Click to collapse
As long as it isn't wiped, yes.
foamerman said:
so If I want to go back to my 9.0.11 stock rom I should be able to just reboot to twrp and select slot B and go back to to stock yes? guys I'm sorry this is my first A/B partition phone I'm just trying to figure it out
Click to expand...
Click to collapse
No. Except for the possible exception that both slots contain different versions of the same ROM, the data will work with one ROM but not the other.
When flashing a ROM in TWRP, just mke sure to make a nandroid backup first and follow the installation directions. If you have to switch back, you will need to flash the nandroid backup.
It is a pain and there are pitfalls. This phone is relatively new and this is the cost of flashing a custom ROM/bootloader.
No. Except for the possible exception that both slots contain different versions of the same ROM, the data will work with one ROM but not the other.
When flashing a ROM in TWRP, just mke sure to make a nandroid backup first and follow the installation directions. If you have to switch back, you will need to flash the nandroid backup.
It is a pain and there are pitfalls. This phone is relatively new and this is the cost of flashing a custom ROM/bootloader.[/QUOTE]
OK one more I think lol If I have 9.0.11 on my internal storage can I not go into slot A and wipe it and install it back on there and be OK?
foamerman said:
OK one more I think lol If I have 9.0.11 on my internal storage can I not go into slot A and wipe it and install it back on there and be OK?
Click to expand...
Click to collapse
Internal storage is an encrypted folder in the data partition that is wiped separately from data. As long as you don't wipe internal storage for any reason it should be ok, in theory. But it's not in practice.
Most of the problem with this phone is maintaining encryption back and forth between ROMs. Honestly, if you can't afford to lose data, don't try to flash ROM's yet. I have had very little luck flashing back and forth and, after reflashing data, being able to avoid a bootloop. TWRP has only supported encryption on this phone for a month or so and IMHO it's not ready for prime time. I have relied on Titanium Backup and moved it's backup folder back and forth between my phone and computer.
Nsane457 said:
Internal storage is an encrypted folder in the data partition that is wiped separately from data. As long as you don't wipe internal storage for any reason it should be ok, in theory. But it's not in practice.
Most of the problem with this phone is maintaining encryption back and forth between ROMs. Honestly, if you can't afford to lose data, don't try to flash ROM's yet. I have had very little luck flashing back and forth and, after reflashing data, being able to avoid a bootloop. TWRP has only supported encryption on this phone for a month or so and IMHO it's not ready for prime time. I have relied on Titanium Backup and moved it's backup folder back and forth between my phone and computer.
Click to expand...
Click to collapse
Well the mud is starting to clear up a little. Yea I've been a little leery about trying to install roms yet. I have read all the post in the Recovery thread mauronofrio is getting a 6t soon so maybe he can figure it out. But again Thank you.
I was trying to install a custom ROM, the first thing that should've made me stop is the fact i couldn't install TWRP and i only could boot from one specific img.
Anyways i proceeded, wiped everything, as always no backup, because YOLO, but this time TWRP didn't install the zip (zip file format error), the custom recovery i can boot from seem to be bad or something. Then i tried to install stock to get my phone to work, but it cannot install anything, /data is weirdly mounted, using the whole disk and leaving no space for other partitions.
Anyone has an idea? or do i have a brick for a phone now?