Please help me understand technical details of Safestrap - AT&T Galaxy Note 3 Q&A, Help & Troubleshooting

Hey guys,
I am REALLY impressed with what Hashcode has done (I sent him a donation, totally deserved) but I would like it if someone explained Safestrap to me a bit more in detail. I read the Safestrap thread, but I don't feel like it explained technical details of it. This is just to satisfy my curiosity of what is actually happening.
I will also ask questions about what I don't understand and I hope someone can help me understand more clearly what is happening.
Can someone help me understand the boot process of Android? From what I understand, the bootloader will only boot signed kernels, kinda like some of the new motherboards are doing (or are capable of doing). How does this differ when safestrap is introduced?
How does Safestrap "partition" or break up the different slots? Is it creating new partitions? Is it creating files that are then mounted as partitions?
Do the partitions use the same space for saving application preferences? Or is each environment (slot) separate and isolated from each other?
I'd really like to know more details! Thanks for any help and explanations.

woodsdog said:
Hey guys,
I am REALLY impressed with what Hashcode has done (I sent him a donation, totally deserved) but I would like it if someone explained Safestrap to me a bit more in detail. I read the Safestrap thread, but I don't feel like it explained technical details of it. This is just to satisfy my curiosity of what is actually happening.
I will also ask questions about what I don't understand and I hope someone can help me understand more clearly what is happening.
Can someone help me understand the boot process of Android? From what I understand, the bootloader will only boot signed kernels, kinda like some of the new motherboards are doing (or are capable of doing). How does this differ when safestrap is introduced?
How does Safestrap "partition" or break up the different slots? Is it creating new partitions? Is it creating files that are then mounted as partitions?
Do the partitions use the same space for saving application preferences? Or is each environment (slot) separate and isolated from each other?
I'd really like to know more details! Thanks for any help and explanations.
Click to expand...
Click to collapse
creates virtual ROM-slots, not partitions
http://blog.hash-of-codes.com/how-to-safestrap/ it uses your freed space on your phone

woodsdog said:
Hey guys,
I am REALLY impressed with what Hashcode has done (I sent him a donation, totally deserved) but I would like it if someone explained Safestrap to me a bit more in detail. I read the Safestrap thread, but I don't feel like it explained technical details of it. This is just to satisfy my curiosity of what is actually happening.
I will also ask questions about what I don't understand and I hope someone can help me understand more clearly what is happening.
Can someone help me understand the boot process of Android? From what I understand, the bootloader will only boot signed kernels, kinda like some of the new motherboards are doing (or are capable of doing). How does this differ when safestrap is introduced?
How does Safestrap "partition" or break up the different slots? Is it creating new partitions? Is it creating files that are then mounted as partitions?
Do the partitions use the same space for saving application preferences? Or is each environment (slot) separate and isolated from each other?
I'd really like to know more details! Thanks for any help and explanations.
Click to expand...
Click to collapse
Safestrap does not change your kernel. It is simply the same as multi OS boot on a PC. SS still uses the original kernel but during boot the bootloader is redirected to the ROMS you have stored in your internal RAM to load instead of the original ROM. You get a menu at boot that allows you to selc original or a slot ROM to boot from. SS as well as the ROMS for it does nothing to or with the Kernel. As of right now the kernel on this phone cannot be touched, much less modified.

So using safestrap, I can switch between stock and a modded rom at will?

jonrobertd said:
So using safestrap, I can switch between stock and a modded rom at will?
Click to expand...
Click to collapse
You have to reboot, but yes you can change when you want. Just keep in mind this method consumes a large amount of internal memory. As space will be taken by each ROM in each slot.

What is a virtual rom slot? If it's a pre-determined space, then it's not just a directory on the file system.
I see you can put custom /data on there up to 4GB. What is the default system one without safestrap?
I'd be really curious to almost see this in a diagram of the internal SD card, or understand it well enough to create my own.
Still trying to understand the magic...

woodsdog said:
What is a virtual rom slot? If it's a pre-determined space, then it's not just a directory on the file system.
I see you can put custom /data on there up to 4GB. What is the default system one without safestrap?
I'd be really curious to almost see this in a diagram of the internal SD card, or understand it well enough to create my own.
Still trying to understand the magic...
Click to expand...
Click to collapse
First it is not done on the SD card. it is done on the internal RAm that is 16 or 32 GB depending on your model.
Just imagine aside form the stuff that is already written to your RAM there are now reserved sections that we call slots. Those reserved sections are where the virtual ROM is kept. Just think of the internal RAM as a tower with lets just say 32 floors to keep it simple. Each of those floors are 1 GB tall. Safestrap reserves 4 each of those floors times 4 for it's own use to store ROMS in. So think of a section of that tower consisting of 16GB now belonging to Safestrap for ROM storage and use. The rest is open for the system to use but those 16 floors/slots cannot be touched by the system. I really don't know how to make it simpler and this may be too simple.

Thanks, this is extremely helpful and interesting!

Related

sd space question

I have a 4 gig sd card with it partioned ext2,ext3, and a linux swap. To be honest I don't know really what that means exactly, just followed the tutoriul to have my apps to go to my sd card. When I go to sd storage info it says.
Total space- 3,255mb Available space 1,875 mb.
Under Sd card secondary it says Total space- 457mb Available space- 292mb
For Internal phone storage it says 78mb available.
My question is where are my apps actually going? And where does my other stuff such as music, movies and other files go? From what i am guessing I have 1875mb for files and 292mb for apps. Correct? Thanx in advance for explaining this too me.
It should be fat32, ext3, linux-swap. 78 megs sounds right for apps2sd. Your apps go to ext3 along with your cache, movies and other files you can browse on your phone go to your fat32which is your normal storage and swap is a location where your phone puts operating memory to hold more processes in the background(helps out you ram)
badaphooko01 said:
To be honest I don't know really what that means exactly
Click to expand...
Click to collapse
This is a warning flag that you will probably brick or otherwise disable your phone in the future.
Nothing in the dev subforum should be performed until you fully understand how it works.
jashsu said:
This is a warning flag that you will probably brick or otherwise disable your phone in the future.
Nothing in the dev subforum should be performed until you fully understand how it works.
Click to expand...
Click to collapse
I doubt everybody here knows exactly every technical detail and aspect about their phones. In addition I knew I was partioning my sd card just wanted to understand where all my files were going. I have successfully rooted my phone the old fashion way and installed numerous roms and themes after many hours of reading and following directions in these forums. I'm sorry i am not expert in linux or coding. All I asked was for some information of the subject, if you can't help then don't post. Thanks gridlock for your answer.
You are welcome but I must defend jashsu, you have only been a member since last month and made a few posts, he was just staying on the side of caution because there are a lot of people who just dive in without knowing what they are doing and no offense but your ? Was a common type of ? That a noob who did not have much knowledge would ask
badaphooko01 said:
if you can't help then don't post.
Click to expand...
Click to collapse
I tried to help, you weren't receptive of it. Maybe a second time with some added emphasis will drive the point home?
Nothing in the dev subforum should be performed until you fully understand how it works.
Are there people in the dev forum who can/should do things that they don't fully understand? Of course; they are the hackers and experimenters who are not afraid of bricking their devices. I assume (perhaps wrongly?) from your comment "I don't know really what that means exactly, just followed the tutoriul" that you are not one of those people. I'd be happy to be proven wrong.
I stand by what I wrote.
Edit: by the way the asking of questions (although searching would be good too) is part of the process of learning and therefore understanding. I was not at all trying to discourage you from asking the question, I was just pointing out the danger of proceeding with dev modifications without proper understanding.
78mb?? your lucky I only got 33mb! and I got cyanogens rom with automatic apps2sd!
where do you guys reckon my space has gone?
Did you wipe before you flash cyanogen, right now on 4.04 I have 64mb internal with running the danger spl, that does change internal memory

Ext3 as root filesystem?

Hi there,
I've seen all the posts about formatting the sd card with the ext3 filesystem, but i would like to know if there is a way to modify the root filesystem to be ext as well?
I know this is probably a daunting task, but im willing to learn and want to jump into android headfirst. Any suggestions would be appreciated. Thanks!
Sent from my SAMSUNG-SGH-I897 using XDA App
That's basically what Voodoo does, except it uses ext4 not 3. No such thing yet for Froyo unfortunately.
Well this may be OCD of me , but I like knowing the file system isn't some virtual filesystem. I'm still learning advantages and disadvantages of different file systems, but I know that FAT (or RFS) is horrible.
It sounds like I'd need to write my own ext4 driver, flash a kernel with that driver, make a partition on the main 1GB internal memory as ext4, and install the ROM over that. Am I missing anything, or does that sound right? And if that is right, are there resources on how to do that task?
Thanks so much, everyone!
sigmaelectric87 said:
Well this may be OCD of me , but I like knowing the file system isn't some virtual filesystem. I'm still learning advantages and disadvantages of different file systems, but I know that FAT (or RFS) is horrible.
It sounds like I'd need to write my own ext4 driver, flash a kernel with that driver, make a partition on the main 1GB internal memory as ext4, and install the ROM over that. Am I missing anything, or does that sound right? And if that is right, are there resources on how to do that task?
Thanks so much, everyone!
Click to expand...
Click to collapse
first of all, you need to start out with source for 2.2, which is not available yet....so everything else is pretty much not going to happen until source is available. there are couple of 2.1 kernels that have already been built and they work pretty well.
**EDIT**
and source has been released for the i9000. we are close now

Is there flash able roms?

Are there any flashable roms? I hear clockwork can be used on nook so are there any non sd card roms? Like clean tablet only roms I don't care about reading any books.
not in a sense. I saw someone just put up some froyo .img files you can dd to your emmc to boot nookie froyo off of internal memory.
Also good job on not even bothering to open the developers thread and looking at the 4th post down. Much better to create garbage threads of things that have already been answered. lol
What is emmc? Bunch of threads with this word, but none explain what it is.
dont quote me here, but to my understanding its the internal memory on an android device. If i am wrong, feel free to correct me.
madfatter said:
dont quote me here, but to my understanding its the internal memory on an android device. If i am wrong, feel free to correct me.
Click to expand...
Click to collapse
You are correct! The closest thing we have to a flashable rom is the froyo images
http://forum.xda-developers.com/showthread.php?t=926749
If i recall correctly, emmc stand for embedded multi-media card. It is the internal flash memory of any portable device that doesn't use a hard drive.
Sent from my Nook Color via XDA app
JRDroid said:
If i recall correctly, emmc stand for embedded multi-media card. It is the internal flash memory of any portable device that doesn't use a hard drive.
Click to expand...
Click to collapse
Ah, thanks.
So what is the difference between flashing to emmc and the normal way of flashing on phones etc? (Alternatively: when flashing to phones, where is that flashing to?)
Paul22000 said:
Ah, thanks.
So what is the difference between flashing to emmc and the normal way of flashing on phones etc? (Alternatively: when flashing to phones, where is that flashing to?)
Click to expand...
Click to collapse
Nothing. All phones are basically emmc (yes, this is simplifying things a bit, when you deal with different types for rom, but i think simpler is better in this case)..

[Q] [Webtop] Next steps: More space or newer Ubuntu? (Poll effectively closed)

----- Announcements -----
The poll is now being treated as closed. As such, since I would be unlikely to look back after moving to a newer Ubuntu, and since the two efforts are effectively incompatible (unless I wanted to try my hand at flashing a new /osh which... no), I'm concluding that there are enough users who are happy enough staying on Ubuntu 9.04 that I'll work on the union filesystem first before moving on to newer versions of Ubuntu.
----- Your regularly scheduled post below. -----
I believe I'm getting close to having a reasonable "first pass" of having a working Ubuntu on the Atrix. The interesting question becomes: what next? There are two steps I can see right now:
Get a FUSE kernel module working so that we can get a union mount for our modified Linux so that we can have more effective space. Note: this process is almost guaranteed not to work with the next option.
Now that source code is available for the Ubuntu files (I need to find out if we have everything we need, mind you), port newer releases of Ubuntu (starting with either 9.10 or 10.04).
Users, what would you like to see? The numbers at "closing" were 48/47/3.
i think it would be cool to see a 10.04 ubuntu - but what can be done with that without very much effective space? if you could find a way to expand the storage with an ubuntu port (even if it's after you port ubuntu, then find a way to increase storage) i think that makes more sense than trying to improve the inherently crippled current webtop setup
It would be great to see more storage! That is the biggest limitation at this point..
im all for 10.04 or 10.10
Wouldn't you require more space for this though?
seven2099 said:
Wouldn't you require more space for this though?
Click to expand...
Click to collapse
Not really. Remember that the 1 GB filesystem file is a copy of the partition that Motorola ships. Upgrading would be swapping out Ubuntu 9.04 packages for Ubuntu x.yy packages, so it would be a matter of trading space, not strictly losing it.
Sogarth said:
Not really. Remember that the 1 GB filesystem file is a copy of the partition that Motorola ships. Upgrading would be swapping out Ubuntu 9.04 packages for Ubuntu x.yy packages, so it would be a matter of trading space, not strictly losing it.
Click to expand...
Click to collapse
Forgive my stupidity but... you are reffering to the 1gb file called Ubuntu.disk right?
Meaning, I can move that to SD to leave more space internally?
seven2099 said:
Forgive my stupidity but... you are reffering to the 1gb file called Ubuntu.disk right?
Meaning, I can move that to SD to leave more space internally?
Click to expand...
Click to collapse
I'm pointing out that ubuntu.disk is 1 GB, but once it's created, it has no reliance on /osh. So as long as the Ubuntu x.yy installation is < 1 GB like the current 9.04 installation is, the space issue won't get any worse. No better, though.
And, no, moving ubuntu.disk to /mnt/sdcard won't work. If it did, I would have created a partition on the SD card to start with.
NUKE webtop and make it run ubuntu Pure ubuntu with the option to show it on the atrix screen too HEHE !
union mount! Also I bet this has non-ubuntu implications (internal and sd card as 1 mount point would be hot). Also why do we need a newer version other than to say "i have ubuntu x now which version number is greater than y was". What features are there in 10 over 9?
tical2k said:
Also why do we need a newer version other than to say "i have ubuntu x now which version number is greater than y was". What features are there in 10 over 9?
Click to expand...
Click to collapse
I dunno. Minor things like Firefox 4, chromium browser, stuff like that.
once again... what was wrong with firefox 3 other than 4 > 3? just being the devil's advocate here.
tical2k said:
once again... what was wrong with firefox 3 other than 4 > 3? just being the devil's advocate here.
Click to expand...
Click to collapse
You're asking somebody who's typing this from IE9, so I can't help you there. But, interest seems high, and it is true that newer software isn't available as easily for older versions of the operating system.
Would it be possible to move it to SD card if there was an ext2 partition there? For example, on my 16gb SD card, have a 14gb fat32 partition, then a 2gb ext2 partition, with your mod mounting the latter instead of a file on /data.
I started playing with this idea yesterday, but ran out of time before I got it to mount properly in Android... Do you think it's feasible?
Sent from my MB860 using XDA App
lindsaytheflint said:
Would it be possible to move it to SD card if there was an ext2 partition there? For example, on my 16gb SD card, have a 14gb fat32 partition, then a 2gb ext2 partition, with your mod mounting the latter instead of a file on /data.
I started playing with this idea yesterday, but ran out of time before I got it to mount properly in Android... Do you think it's feasible?
Click to expand...
Click to collapse
From the been there, done that file, no, it's not feasible at this point in time. Sorry.
..................
Sogarth said:
From the been there, done that file, no, it's not feasible at this point in time. Sorry.
Click to expand...
Click to collapse
Ah I see... What about symlinking a whole lot of stuff over to /cache, since it's a 600mb partition doing not much? I'm guessing you've probably tried that avenue too?
Sent from my MB860 using XDA App
molotof said:
NUKE webtop and make it run ubuntu Pure ubuntu with the option to show it on the atrix screen too HEHE !
Click to expand...
Click to collapse
Actually, here's a question: based upon a link another user pointed out, the other Linux loaders use VNC to display the Linux desktop on their Android screen. That's not enough?
lindsaytheflint said:
Ah I see... What about symlinking a whole lot of stuff over to /cache, since it's a 600mb partition doing not much? I'm guessing you've probably tried that avenue too?
Click to expand...
Click to collapse
No, actually, since the initial idea didn't involve use FUSE to be able to do crazy filesystem tricks. I thought /cache was needed, though? If we can find space here and there, it might be possible to decrease the footprint in /data a bit so that people aren't squeezed so tightly on space.
Sogarth said:
No, actually, since the initial idea didn't involve use FUSE to be able to do crazy filesystem tricks. I thought /cache was needed, though? If we can find space here and there, it might be possible to decrease the footprint in /data a bit so that people aren't squeezed so tightly on space.
Click to expand...
Click to collapse
/cache is only used for temp downloads (market apk installs, email attachment previews, etc) and OTA updates. The temp downloads don't take up much space - less than 50mb usually, but the OTA updates would probably be a a bit bigger. But who uses those right?
I'm one of those greedy people who have over 1gb of junk on their /data partition

Help, several NOOB questions

THANK YOU IN ADVANCE FOR ANY HELP! I'm dead new with android and just got a Nook HD+ 32gb (groupon deal $130)
anyway, I've done a ton of reading on here and watched a bunch of youtube vids- i don't know if people use overlapping terminology that means the same things or what.. and also seems like theres a lot of opinions in the forums.
I want basically the full android experience and root access- like i said, never used any android, but i like toying around with these things. BUT i also really want a fully stable platform- don't want constant crashing or it reseting on me.
questions i have-
1)the CWM is the "program" (don't know the correct terminology) that basically gives me the access to back up and install new roms, root, etc? TWRP does the same thing- but i understand you don't use that?
2)If i have a BRAND NEW nook HD+ do i need to back it up before messing with it OR are the "stock rom" zips you provided just that?
2) with the SD card image, do i need to put a specific image on the specified sd card. i.e. 4gb SD gets a 4gb image? or is the image universal to whatever size SD card i get?
2a) What problems am i going to run into using my mac to make the SD card, if any? what program do i need to use?
4) when you back up through CWM where does it save it? to the SD card?
4a) this is where i was confused about the image, reading into some of the posts it led me to think the image file took up the entirety of the
SD card.
4b)So in the future i could just boot from the SD card and would have the option to flash the stock rom back on the HD+ if desired? and/or
go back to CM?
5) what is DUALBOOTING? and NANDROID? how do they tie into CWM and CM10. very confused about this.
6) any disadvantage to flashing the EMMC vs booting from SD card every time? I THINK i want to flash the emmc, i don't want to be tied to booting from the SD card everytime- if I'm understanding that correctly.
7)what is this "trim" lag problem? couldn't really figure out what people were talking about.
thanks a ton for any help you can give me- I'm sure you receive a lot of questions!
-Sonny
santinod15 said:
THANK YOU IN ADVANCE FOR ANY HELP! I'm dead new with android and just got a Nook HD+ 32gb (groupon deal $130)
anyway, I've done a ton of reading on here and watched a bunch of youtube vids- i don't know if people use overlapping terminology that means the same things or what.. and also seems like theres a lot of opinions in the forums.
I want basically the full android experience and root access- like i said, never used any android, but i like toying around with these things. BUT i also really want a fully stable platform- don't want constant crashing or it reseting on me.
questions i have-
1)the CWM is the "program" (don't know the correct terminology) that basically gives me the access to back up and install new roms, root, etc? TWRP does the same thing- but i understand you don't use that?
Click to expand...
Click to collapse
CWM (ClockworkMod) is a recovery program that allows you to do just what you said. TWRP is also a recovery, but uses the touch screen instead of hardware keys to control it.
2)If i have a BRAND NEW nook HD+ do i need to back it up before messing with it OR are the "stock rom" zips you provided just that?
Click to expand...
Click to collapse
You can either use the CWM backup tool to return your device to stock (including any data you have already created, like registration) or the plain stock zips I have will also return you to stock, but the way it was when you got it new before registering.
3) with the SD card image, do i need to put a specific image on the specified sd card. i.e. 4gb SD gets a 4gb image? or is the image universal to whatever size SD card i get?
3a) What problems am i going to run into using my mac to make the SD card, if any? what program do i need to use?
Click to expand...
Click to collapse
Since you have a Mac, the best way to do it is the new procedure without burning an image. Since I don't have a Mac, I don't know the exact programs to use. I think SDFormatter comes in a Mac version. And I know there are lots of mac partitioning programs to set the first partition active. And using the procedure does use all of the SD, so it is best to use a relatively small one, 2-4GB.
4) when you back up through CWM where does it save it? to the SD card?
4a) this is where i was confused about the image, reading into some of the posts it led me to think the image file took up the entirety of the
SD card.
4b)So in the future i could just boot from the SD card and would have the option to flash the stock rom back on the HD+ if desired? and/or
go back to CM?
Click to expand...
Click to collapse
It saves it either to the SD card or internal memory, you choose.
Yes it uses all of the SD if you use the new procedure. But you need that if you choose to backup to SD. A backup takes about 1.5GB.
And yes, save the SD for future use, like restoring backups or installing new ROMs.
5) what is DUALBOOTING? and NANDROID? how do they tie into CWM and CM10. very confused about this.
Click to expand...
Click to collapse
Dual booting means having one operating system on internal memory (also called emmc for Embedded MultiMedia Card) and one installed to a bootable SD. Most people that dual boot have stock on internal and CM on SD. They are separate and independent from each other.
Nandroid just means internal memory. So a nandroid backup means backing up whatever you have on internal memory.
6) any disadvantage to flashing the EMMC vs booting from SD card every time? I THINK i want to flash the emmc, i don't want to be tied to booting from the SD card everytime- if I'm understanding that correctly.
Click to expand...
Click to collapse
The only advantage to booting to CM on SD is it leaves internal memory untouched for warranty reasons. The disadvantage is it runs slower and is less stable.
7)what is this "trim" lag problem? couldn't really figure out what people were talking about.
Click to expand...
Click to collapse
LAG is a complex issue to explain. If you are used to hard drives getting fragmented and slowing down your system, LAG is similar but a different mechanism with solid state flash drives. TRIM is a process to undo what causes LAG. But some of the solid state chips in these devices have a bug and when TRIM is run, it bricks the chip, making it unusable.
thanks a ton for any help you can give me- I'm sure you receive a lot of questions!
-Sonny
Click to expand...
Click to collapse
leapinlar said:
CWM (ClockworkMod) is a recovery program that allows you to do just what you said. TWRP is also a recovery, but uses the touch screen instead of hardware keys to control it.
You can either use the CWM backup tool to return your device to stock (including any data you have already created, like registration) or the plain stock zips I have will also return you to stock, but the way it was when you got it new before registering.
Since you have a Mac, the best way to do it is the new procedure without burning an image. Since I don't have a Mac, I don't know the exact programs to use. I think SDFormatter comes in a Mac version. And I know there are lots of mac partitioning programs to set the first partition active. And using the procedure does use all of the SD, so it is best to use a relatively small one, 2-4GB.
It saves it either to the SD card or internal memory, you choose.
Yes it uses all of the SD if you use the new procedure. But you need that if you choose to backup to SD. A backup takes about 1.5GB.
And yes, save the SD for future use, like restoring backups or installing new ROMs.
Dual booting means having one operating system on internal memory (also called emmc for Embedded MultiMedia Card) and one installed to a bootable SD. Most people that dual boot have stock on internal and CM on SD. They are separate and independent from each other.
Nandroid just means internal memory. So a nandroid backup means backing up whatever you have on internal memory.
The only advantage to booting to CM on SD is it leaves internal memory untouched for warranty reasons. The disadvantage is it runs slower and is less stable.
LAG is a complex issue to explain. If you are used to hard drives getting fragmented and slowing down your system, LAG is similar but a different mechanism with solid state flash drives. TRIM is a process to undo what causes LAG. But some of the solid state chips in these devices have a bug and when TRIM is run, it bricks the chip, making it unusable.
Click to expand...
Click to collapse
THANK YOU.. so much answered for me

Categories

Resources