[ROOT] General concept of rooting - Samsung Galaxy R i9103

First of all, Merry X'mas! I have been going out for hundreds of buffets and drinks these days... now writing this post with little drunk
I think some might get confused with my kernel and why rooting is bundled in the kernel? Should rooting a separate process?
Let me explain how it works.
Most of you would know what is rooting. It is the granting of superuser permission in the android environment such that you could execute commands with the highest right. With this right, you can *almost* do anything in the phone, like touching the kernel or like read/write any file system.
To get "rooted" is actually simple with a few words: To put su into /system/bin/ and put Superuser.apk into /system/app/
Simple? Right? Yes, it is simple to say. In old days (dated back in the years of Google Nexus One), if you want to put su or Superuser.apk into those directories, you need to have rooted. But wait, you need to get rooted before you can root the phone? This does not make sense!!! Therefore, we need to use another method to put those files to the system. Yes, it is CWM recovery. It is through using custom recovery that we could write scripts to put those 2 files into the system. And therefore, in old days (or even in nowadays), one of the method to root your phone is to flash the .zip file using CWM.
In years of Samsung device, there is a brand new method that can actually flash something into the system apart from using CWM. Yes, you guess right, it is through Odin3. It is through Odin3 that you could flash your ROM, kernel, radio, etc.
When Galaxy R (i9103) first appeared on the market, no CWM was made to this phone, and therefore the only method is to flash the su and Superuser using Odin3.
While the most straight-forward approach is to flash the whole /system/ (factoryfs.img) (with su and Superuser.apk already embedded) using Odin3, this method is working but is not suggested because this will need you to overwrite the whole /system/ (of 5xx MB) and the flashing time is long.
So, here it comes another not-so straight-forward approach. That is to flash a custom kernel through Odin3. And we put su and Superuser.apk inside the custom kernel and ask the kernel ramdisk to execute a script to check whether your phone already get su in /system/bin/, if no, the script will copy the files to your phone. Using this method, what we need to do is to flash a custom kernel with a few megabytes and thus the flashing time is fast and it would have no impact to any of the apps nor data. This method is the method I use for rooting.
As described above, when you have flashed the kernel, it will push su and Superuser.apk to the device once boot up and after that, your phone is rooted and you can change to any other kernels that would still retain your phone in rooted state.

ardatdat said:
As described above, when you have flashed the kernel, it will push su and Superuser.apk to the device once boot up and after that, your phone is rooted and you can change to any other kernels that would still retain your phone in rooted state.
Click to expand...
Click to collapse
In other words, we can put your kernel on i9103 with odin and immediately later put back stock kk5 kernel and device will stay rooted and with oc?
But it increases the counter.

legion1911 said:
In other words, we can put your kernel on i9103 with odin and immediately later put back stock kk5 kernel and device will stay rooted and with oc?
But it increases the counter.
Click to expand...
Click to collapse
device will stay rooted and with oc? << 'yes' to rooted, but 'no' to OC
OC is done in the kernel. Root is done through a script in the ramdisk. The script is actually pushing su and Superuser to your phone. Once your phone get su and Superuser, it is rooted and you will not be un-rooted unless these files are deleted. When you flash other kernel, of course you cannot enjoy the OC kernel. I think it is easy to understand.
By far, I cannot see the harm of the increase in counter. Actually, there is no official statements that this counter will lead to non-warranty. In theory, when you have rooted the device, you can have the right to alter any system files and that is already sufficient to make your device out of warranty.
Experiences from many people have proved that Samsung is still willing to provide support & warranty to the device even if it is flashed with any custom things or rooted. Although it is not officially acknowledged & guaranteed.

Really interesting thread. Thanks for sharing your knowledge, ardatdat. I'll take this as a reference

thanks ,,,,,,,,,,,,,,,,,,,,,,,,,,
---------- Post added at 08:55 PM ---------- Previous post was at 08:44 PM ----------
hay ardatdat i want to know abou u some things about u
*how u know that the all stuff ?
*r u student ?
*what u do ?
*i want too dev my own kernel and rom what i have for that?

SbXLivE said:
thanks ,,,,,,,,,,,,,,,,,,,,,,,,,,
---------- Post added at 08:55 PM ---------- Previous post was at 08:44 PM ----------
hay ardatdat i want to know abou u some things about u
*how u know that the all stuff ?
*r u student ?
*what u do ?
*i want too dev my own kernel and rom what i have for that?
Click to expand...
Click to collapse
Thanks SbXLivE. I am not a student and is working right now. I am over age of 30 ...
Good question. I have been investigating into the kernels and ROMs from the date of Google Nexus One (more than 1 year). Experiences are gained from playing with the nexus one and I have been compiling custom kernel for it. In terms of technical skill, I am much lag behind from those ROM and Kernel gurus that could possibly modify anything.
I am still a learner and gaining experience everyday. Let's discuss and share our ideas to make us grow! To compile your own kernel or ROM, A Ubuntu environment (linux) is a must.

ardatdat said:
Thanks SbXLivE. I am not a student and is working right now. I am over age of 30 ...
Good question. I have been investigating into the kernels and ROMs from the date of Google Nexus One (more than 1 year). Experiences are gained from playing with the nexus one and I have been compiling custom kernel for it. In terms of technical skill, I am much lag behind from those ROM and Kernel gurus that could possibly modify anything.
I am still a learner and gaining experience everyday. Let's discuss and share our ideas to make us grow! To compile your own kernel or ROM, A Ubuntu environment (linux) is a must.
Click to expand...
Click to collapse
Thanks Mate

Related

How to make a custom ROM that doesn't change your bootloader?

On this guide here: http://forum.xda-developers.com/showthread.php?t=1858508 there is a file (PG88IMG.zip) that flashes a rom WITHOUT affecting custom recovery, or s-off etc.
My question is: how can i make an img that doesnt remove my recovery or change my bootloader like Grant2k did?
I recently (2 days ago) got my Desire S from virginial 2.3.3 Orange Stock to S-Off, rooted, 4Ext ICS (via the above linked guide) but am now very interested in making my own rom - just to remove the bloatware and make it faster/better/stronger/harder. Also to get the Orange Email app working on ICS (because i like my free push email ^.^).
I have kitchen up and running, but can't see how i can achieve this. (i keep looking for: rom "without boot.img" which i think is wrong.)
Any ideas? I don't actually know what I'm looking for, so my search-fu and google-fu were very weak.
Pilch <3
Why would you want to make a ROM installable through bootloader, that's the real question. Custom ROMs are installed through custom recovery. The only reason to make a ROM installable through bootloader is when you have to reformat partitions after changing the bootloader, and this is what the PG88IMG in the reference thread was made for.
In any case, if you really really want to do it for whatever strange reason - grab a ready-made PG88IMG, create the IMGs for your ROM (you need to create an IMG of EXT4 with all the ROM files on it, for /system, /system/lib and /boot partitions), and replace the IMGs in PG88IMG by yours.
ThePilch said:
just to remove the bloatware and make it faster/better/stronger/harder. Also to get the Orange Email app working on ICS (because i like my free push email ^.^).
Click to expand...
Click to collapse
You can always use Titanium backup (free on Google Play Store) to uninstall system apps (your bloatware) and any file explorer with root rights or adb push to install them.
This will take less time then unpacking/modifying/repacking/flashing system images
Sent from my HTC Desire S
@amidabudda
I could, and i have, but i think i'd improve my 'droid by having a zipaligned ROM without those files in, rather than making holes in a ROM.
@Jack_R1
Ah, thanks that explains a lot. So as far as i can tell, making my own rom also means flashing the bootloader? I don't really want to do that due to the risks involved :S is there any way to make a rom that doesn't flash hboot?
Pilch <3
ThePilch said:
So as far as i can tell, making my own rom also means flashing the bootloader? I don't really want to do that due to the risks involved :S is there any way to make a rom that doesn't flash hboot?
Click to expand...
Click to collapse
I'm not a dev but I will say NO. Like Jack said, usually custom roms are flashed in recovery so hboot will remain unchanged. I've never came across a rom who changed my bootloader (no interests for end-users IMO).
Also:
I have kitchen up and running, but can't see how i can achieve this. (i keep looking for: rom "without boot.img" which i think is wrong.)
Click to expand...
Click to collapse
hboot and boot.img are two differents things. When the first is the bootloader, the second means "/boot" partition which contains kernel.
ThePilch said:
@amidabudda
I could, and i have, but i think i'd improve my 'droid by having a zipaligned ROM without those files in, rather than making holes in a ROM.
Click to expand...
Click to collapse
Easily solved by a zipalign init.d script.
But it is your choice after all. You can make your own ROM with the kitchen and it is not necessary to be in img form. If you make a flashable zip it will preserve all the properties you are looking for. Good luck
chninkel said:
hboot and boot.img are two differents things. When the first is the bootloader, the second means "/boot" partition which contains kernel.
Click to expand...
Click to collapse
wow, that explains everything. gosh i feel dumb >.<. So i can make a flashable zip rom and it preserves my S-Off and Custom Recovery.
amidabuddha said:
Easily solved by a zipalign init.d script.
But it is your choice after all. You can make your own ROM with the kitchen and it is not necessary to be in img form. If you make a flashable zip it will preserve all the properties you are looking for. Good luck
Click to expand...
Click to collapse
..that's a yes ^.^ awesome, thank you both so much!
Pilch <3 (feels like a newb)

[Q] 100% Original Stock ROM backup before root?

Hi there,
I am new to xda and new to Android hacking.
What I wanna ask is, (I guess it's of most newbies concern as well), can we have a 100% backup of our system (stock ROM)? Obviously, it is important because:
If we perform an official (OTA) update to a new Android version. And we don't like it. It is possible to get back to the old original one which we are used to. (not everybody likes new things, and/or not every new thing is good)
If our phones are having some problems. And we have to give it back to the company for a fix. In most cases they will flash a new ROM for us. If we wanna keep using the old one (explained in #1), we have to keep a copy of it by ourselves.
If we want to try new custom ROMs, we may want to switch it back after trying.
Whenever we do any modifications, it's always better to keep a backup/roll-back point. In case anything goes wrong, we have a safeguard.
For the official warranty issue.
Yup I do see there are some official stock ROMs downloads for some particular phones. But those are not really a backup of our original ROMs. And it's always hard to verify if those downloads are the original official releases. And, if those downloads are 100% stock ROMs, this means some guys out there could make it, so what is the way to do so?
Or, how those mobile phone companies do it in their labs?
I have been doing researches on this topic for a few days. Some posts claim that their methods are "backup stock ROM" or "backup before rooting". But after digging into it, they requires rooting and/or flashing CWM. Here comes a few questions:
Questions
Rooting will in fact changes some files/data of the system. So backup after root is NOT getting the original stock ROM. Is it?
Is there a method to "un-root", so ALL the changes are TOTALLY reverted?
Installing/flashing things like CWM in phone requires rooting, which would make the ROM not original. Is there a way to extract the system backup from a computer externally?
In addition, I have found some related pieces. which could be useful to anyone viewing this post, and might be useful for you to solve this (my) question. :fingers-crossed:
* as I'm a new user, I can't post links directly. Please delete the blank spaces in between.
ht tp://www .modaco .com/topic/351269-backup-original-rom/
In reply #5, user C3C0 raised a method of backing up the original stock ROM without root. But it seems he is flashing CWM and that method is only for ZTE Skate.
adb backup tool of Android SDK
At the first sight i came across this approach, I thought it is the official method to do whole system (ROM) backup (WOW - how nice!). But after studying for a few more posts, I think adb backup can only backup app+app_data, and possibly some system settings only. Am I correct? And also, adb backup is only for ICS (Android 4.0), isn't it?
adb backup usage: ht tp://forum.xda-developers .com/showthread.php?t=1420351
(But mentioned in the bottom of #1 the poster is having some issues on using adb backup. Perhaps there are some bugs and not reliable(?)
One more question on adb backup: Can it backup just one app+app_data, and restore just one app+app_data, without affecting other things? If yes, we don't need to root and don't need Titanium Backup (which requires root) for backup app+app_data. Isn't it?
** In case I have said anything or any terms wrongly in this thread, please DO correct me, for helping me and helping others.
P.S. i am using LG Optimus 3D.
Thanks a lot, wholeheartedly,
midnite_
Backup phone before root
Hello all this is my first post here...woohoo!:fingers-crossed: This forum is amazing as to the amount of information available. I just wish that in looking for what I need to do I did not need to look in so many places. I feel that if I want to root my T-Mobile GS3 that all the information should be in one subsection of the forum, but it is not that simple I guess....lol Anyway any help would be greatly appreciated.
I have a Samsung GS3 with T-Mobile that I want to root. Everyone says to back up the phone before you do it but I am not really seeing how to make a backup before I start. It appears that most of the guides to root just say to backup without telling you how to fo it. Another thing (correct me if I am wrong) I see the nandroid backup that I think is a backup of the phone however it seems to be done after you make changes to the phone and I thought the backup was supposed to be done before you do anything. Is it that there is not a way to make a complete backup with an unrooted phone?
My question is basically the same as the OP here. I have been reading and reading and reading posts here in the forum. There is much information here and much of it is duplicated with slight variances in some of the duplicates. I am not certain as to which rooting method I should use. There seem to be so many choices. As a new person to this forum I will say that you can find just about everything about any phone which is awesome. The hard thing is sifting through the many options to pick one to use for your issue.
I do see that Mr. Robinson has a thread with backups of the original roms. The only thing is that they are default roms that are like an out of the box phone and not my phone with my apps and my settings. That is what I want to backup...My phone with my settings and my apps.
:good: Thank you in advance for any one that can shed some light on this for me and the OP'er
ASharpEdge said:
Hello all this is my first post here...woohoo!:fingers-crossed: This forum is amazing as to the amount of information available. I just wish that in looking for what I need to do I did not need to look in so many places. I feel that if I want to root my T-Mobile GS3 that all the information should be in one subsection of the forum, but it is not that simple I guess....lol Anyway any help would be greatly appreciated.
I have a Samsung GS3 with T-Mobile that I want to root. Everyone says to back up the phone before you do it but I am not really seeing how to make a backup before I start. It appears that most of the guides to root just say to backup without telling you how to fo it. Another thing (correct me if I am wrong) I see the nandroid backup that I think is a backup of the phone however it seems to be done after you make changes to the phone and I thought the backup was supposed to be done before you do anything. Is it that there is not a way to make a complete backup with an unrooted phone?
My question is basically the same as the OP here. I have been reading and reading and reading posts here in the forum. There is much information here and much of it is duplicated with slight variances in some of the duplicates. I am not certain as to which rooting method I should use. There seem to be so many choices. As a new person to this forum I will say that you can find just about everything about any phone which is awesome. The hard thing is sifting through the many options to pick one to use for your issue.
I do see that Mr. Robinson has a thread with backups of the original roms. The only thing is that they are default roms that are like an out of the box phone and not my phone with my apps and my settings. That is what I want to backup...My phone with my settings and my apps.
:good: Thank you in advance for any one that can shed some light on this for me and the OP'er
Click to expand...
Click to collapse
Hi ya,
It's so nice that you are having the same concern as I do.
As far as i know, the approaches of rooting differ from phones to phones. So we may have to find our own specific rooting method in the phone model sub-forums. It won't be hard for your popular S3
I would like to have a look at that Mr. Robinson's thread. If he can backup the stock ROM, those app+app_data wont a big issue (i guess).
cheers,
midnite_
midnite_ said:
Questions
Rooting will in fact changes some files/data of the system. So backup after root is NOT getting the original stock ROM. Is it?
Is there a method to "un-root", so ALL the changes are TOTALLY reverted?
Installing/flashing things like CWM in phone requires rooting, which would make the ROM not original. Is there a way to extract the system backup from a computer externally?
Click to expand...
Click to collapse
Hi midnight, welcome to a new and exciting world of Android and trying new things. First, let me assure you, what you want is NOT something new. People have been doing this type of thing for years. That is flashing and testing roms. As you will learn, it actually becomes quite addictive. We call those folks that get addicted to flashing: Flashaholics or crackflashers, lol
First let me talk about "root". This process consists of unlocking a lower level of the Android system known as the bootloader. Unlocking the bootloader of your device allows you to flash a custom recovery, flashing a custom recovery allows you to flash the Superuser binary and Superuser.apk, This is what allows you to use apps that require "root". The bootloader is not an OS file. So when you are unlocking your bootloader you are not modifying your stock rom. Only when you have flashed the Superuser package have you modified your stock rom. And even that isn't really modifying anything. When you flash the Superuser package, it adds two files to your rom at certain locations of the file system. It adds the Superuser.apk file to system/app and it adds the SU binary to system/bin. Basically you CAN have a totally S-OFF (unlocked) bootloader and still have an entirely stock rom if you want. But the real benifit is flashing a custom recovery like ClockworkMod Recovery and then flash the superuser package.
As far as extracting the stock system, you should try giving adb a go. Do it right now if you like. Ensure you have the android sdk installed and properly set up on your computer and your computer can recognize your phone. Ensure your phone is in debugging mode, connect your phone to your computer, open up a command window, and run this command:
Code:
adb pull \
This command will pull everything off your phone except for data which is where your market or Google Play apps are stored.
Beyond XDA there are aso more resources to learn from. For example, http://www.android.com is a good place to start, and to learn more about adb check out http://developer.android.com/tools/help/adb.html
If you need to learn how to setup the sdk here is the place to learn how: http://developer.android.com/sdk/index.html
I'm sure others will add to this as well which is the good thing about this community.
Welcome to XDA, I hope you have fun learning, and maybe share back someday things you learn along the way.
wildstang83 said:
Hi midnight, welcome to a new and exciting world of Android and trying new things. First, let me assure you, what you want is NOT something new. People have been doing this type of thing for years. That is flashing and testing roms. As you will learn, it actually becomes quite addictive. We call those folks that get addicted to flashing: Flashaholics or crackflashers, lol
First let me talk about "root". This process consists of unlocking a lower level of the Android system known as the bootloader. Unlocking the bootloader of your device allows you to flash a custom recovery, flashing a custom recovery allows you to flash the Superuser binary and Superuser.apk, This is what allows you to use apps that require "root". The bootloader is not an OS file. So when you are unlocking your bootloader you are not modifying your stock rom. Only when you have flashed the Superuser package have you modified your stock rom. And even that isn't really modifying anything. When you flash the Superuser package, it adds two files to your rom at certain locations of the file system. It adds the Superuser.apk file to system/app and it adds the SU binary to system/bin. Basically you CAN have a totally S-OFF (unlocked) bootloader and still have an entirely stock rom if you want. But the real benifit is flashing a custom recovery like ClockworkMod Recovery and then flash the superuser package.
As far as extracting the stock system, you should try giving adb a go. Do it right now if you like. Ensure you have the android sdk installed and properly set up on your computer and your computer can recognize your phone. Ensure your phone is in debugging mode, connect your phone to your computer, open up a command window, and run this command:
Code:
adb pull \
This command will pull everything off your phone except for data which is where your market or Google Play apps are stored.
Beyond XDA there are aso more resources to learn from. For example, ht tp://www .android .com is a good place to start, and to learn more about adb check out ht tp://developer .android .com/tools/help/adb.html
If you need to learn how to setup the sdk here is the place to learn how: ht tp://developer .android .com/sdk/index.html
I'm sure others will add to this as well which is the good thing about this community.
Welcome to XDA, I hope you have fun learning, and maybe share back someday things you learn along the way.
Click to expand...
Click to collapse
Hi Wildstang,
Thanks very much for your warm welcome and very informative reply. So are you a Flashaholics or Crackflashers yet?
As I am a newbie, please forgive me if I am asking dumb questions.
As far as I understand,
The steps of root is
1. Unlock the bootloader
2. Flash Superuser binary & Superuser.apk
** does "flash a custom recovery" means "flash Superuser binary & Superuser.apk"?
"Flash Superuser binary & Superuser.apk" is just "add SU binary to system/bin" and "add Superuser.apk to system/app". Then why not just copy them into place?
I just found on the web that "flashing" means replacing the OS of the phone with a new ROM. Would that still keeping the stock ROM?
To have a backup of the original stock ROM, can I
1. Unlock the bootloader
2. Flash Superuser binary & Superuser.apk
3. Perform the backup
And later, after I have flashed a new ROM, or whatever I do, as long as I didn't brick it, when I want to rollback my phone to its original, I can
1. Restore the backup
2. Delete "SU binary in system/bin" and "Superuser.apk in system/app"
3. re-lock the bootloader
Is this correct?
I don't mean to challenge you. But does adb pull \ really backup the system, or just all the files?
Thanks very much again!
midnite_
Hey midnite_,
I am a newbie too and have a lot of blank spots in my understanding of what we can do with android. I also came here with same question. I found how to root, this isn't a secret. Like you, I want to know how do I fix it if I break it.
So, with regards to your questions.
1. Unlock the bootloader
Not clear on this one, as not every tutorial even mentions this part. My feeling is that this might be specific to some phones, like HTC.
2. Flash Custom Recovery (such as AmonRa, CWR, TWRP...)
Recovery is an intermediate stage of phone booting process after bootloader but before OS.
It is there to allow OTA (Over the air) updates. During those, the OS is halted and replaced with a newer one.
What this means for us is that the recovery is capable of replacing OS (ROM - are these terms interchangeable?).
Recovery is the same as hidden partition on windows, that is sometimes present on a PC. It has a limited interface.
It can replace one OS image with another. It probably checks the checksum and creates the new one after the update. It is probably the gatekeeper.
Stock recovery will not replace OS with an image from SD card or from PC through USB. Only OTA.
This is the reason for flashing the custom (hacked) recovery on.
Custom recovery is made to allow additional options, such as allowing image sources such as PC or SD card, and also a ROM backup (write OS image to PC).
3. Flash update file using "upgrade from SD card" function of custom recovery now in place.
In this step, the Superuser.apk and bin files are placed. Stock recovery will not let us do that.
Also, I think the reason we can't just use ADB to "copy" superuser package to phone is because the system is either running or exists as an image (compressed?), and is probably protective of its modification. (So, likely the superuser package also replaces the checksum that the OS uses to check if it has been compromised?) Yes, this modifies your rom.
I assume that unrooting could be done after this by updating again with a file that removes superuser package and that would make your rom stock again.
4 OR flash custom ROM, which usually includes superuser package. Of course using custom rom means you no longer have stock rom.
To have a backup of original ROM, you would :
1 Unlock bootloader,
2 Flash (install) custom recovery
3 superuser doesn't matter here
4 Use custom recovery function to back up your stock ROM.
I want to know the answers to the rest of your questions as well as some clarifications to mine.
Personally, I am looking for a way to backup the stock recovery as well.
I know there are some people asking about this. The procedure appears to be as follows:
(pieced together so don't take it as a tutorial)
1 Unlock bootloader (again, unclear on this. Also some mention S-OFF and others don't)
2 With USB debugging allowed (meaning connect as device requiring a driver), Connect to a PC with ABD, and a driver installed.
3 From ADB, issue a command "adb boot recoveryimage.name" instead of the usual "adb flash recoveryimage.name".
This will make the phone boot into a custom recovery image that is residing on PC, without first writing it to the phone.
4 Unclear how, but make that custom recovery now being live to back up stock rom to pc.
5 Unclear how, but make that custom recovery now being live to flash either root or custom rom to the phone.
6 Disconnect, reboot the phone. Once in OS, use root privileges to mount recovery partition ? (this makes it visible as drive)
7 Don't know how, but use root privileges to back up now visible stock recovery partition to PC as image.
( This should give you two out of three original parts.)
Keep in mind that even if my peace-by-peace "know-how" ever works, there is at least one clearly faulty step:
The back up of the original state of the boot loader has been never made. I do not know if it is easily can be toggled back and forth from lock to unlock and back without leaving any trace. Also, like yourself, I probably don't quite understand what am I talking about, but I have tried to make as much sense of what I have read here and there.
This is my first smart phone, and my experience with linux is limited to building a minecraft server on MineOS, which was pre-made so that not much was required to make it run. I have "mounted" a partition for the first time last week, trying to break Win7recovery, booting it with Knoppix. This is why I think this is probably will come in play here too, as the recovery partition on W7 was hidden. Until then I didn't understand what mounting means, as windows always does it for you. So, take everything I say with a bunch of salt.
Please, let me know too, if you find out more. I want to flash the hell out of my Prism, but I want to be smart about it.
bump... midnite_ r u still around?
Hi Descent2,
Yes i am still around but i am busy with other stuffs at this moment. Thanks very much for your reply. You have studied a lot and you really did good summarisations. Very informative and I learnt a lot from it. Hope some of the masters or experienced ones would come by and bring us out of the mist
cheers,
midnite_
Descent2 said:
Hey midnite_,
I am a newbie too and have a lot of blank spots in my understanding of what we can do with android. I also came here with same question. I found how to root, this isn't a secret. Like you, I want to know how do I fix it if I break it.
So, with regards to your questions.
1. Unlock the bootloader
Not clear on this one, as not every tutorial even mentions this part. My feeling is that this might be specific to some phones, like HTC.
2. Flash Custom Recovery (such as AmonRa, CWR, TWRP...)
Recovery is an intermediate stage of phone booting process after bootloader but before OS.
It is there to allow OTA (Over the air) updates. During those, the OS is halted and replaced with a newer one.
What this means for us is that the recovery is capable of replacing OS (ROM - are these terms interchangeable?).
Recovery is the same as hidden partition on windows, that is sometimes present on a PC. It has a limited interface.
It can replace one OS image with another. It probably checks the checksum and creates the new one after the update. It is probably the gatekeeper.
Stock recovery will not replace OS with an image from SD card or from PC through USB. Only OTA.
This is the reason for flashing the custom (hacked) recovery on.
Custom recovery is made to allow additional options, such as allowing image sources such as PC or SD card, and also a ROM backup (write OS image to PC).
3. Flash update file using "upgrade from SD card" function of custom recovery now in place.
In this step, the Superuser.apk and bin files are placed. Stock recovery will not let us do that.
Also, I think the reason we can't just use ADB to "copy" superuser package to phone is because the system is either running or exists as an image (compressed?), and is probably protective of its modification. (So, likely the superuser package also replaces the checksum that the OS uses to check if it has been compromised?) Yes, this modifies your rom.
I assume that unrooting could be done after this by updating again with a file that removes superuser package and that would make your rom stock again.
4 OR flash custom ROM, which usually includes superuser package. Of course using custom rom means you no longer have stock rom.
To have a backup of original ROM, you would :
1 Unlock bootloader,
2 Flash (install) custom recovery
3 superuser doesn't matter here
4 Use custom recovery function to back up your stock ROM.
I want to know the answers to the rest of your questions as well as some clarifications to mine.
Personally, I am looking for a way to backup the stock recovery as well.
I know there are some people asking about this. The procedure appears to be as follows:
(pieced together so don't take it as a tutorial)
1 Unlock bootloader (again, unclear on this. Also some mention S-OFF and others don't)
2 With USB debugging allowed (meaning connect as device requiring a driver), Connect to a PC with ABD, and a driver installed.
3 From ADB, issue a command "adb boot recoveryimage.name" instead of the usual "adb flash recoveryimage.name".
This will make the phone boot into a custom recovery image that is residing on PC, without first writing it to the phone.
4 Unclear how, but make that custom recovery now being live to back up stock rom to pc.
5 Unclear how, but make that custom recovery now being live to flash either root or custom rom to the phone.
6 Disconnect, reboot the phone. Once in OS, use root privileges to mount recovery partition ? (this makes it visible as drive)
7 Don't know how, but use root privileges to back up now visible stock recovery partition to PC as image.
( This should give you two out of three original parts.)
Keep in mind that even if my peace-by-peace "know-how" ever works, there is at least one clearly faulty step:
The back up of the original state of the boot loader has been never made. I do not know if it is easily can be toggled back and forth from lock to unlock and back without leaving any trace. Also, like yourself, I probably don't quite understand what am I talking about, but I have tried to make as much sense of what I have read here and there.
This is my first smart phone, and my experience with linux is limited to building a minecraft server on MineOS, which was pre-made so that not much was required to make it run. I have "mounted" a partition for the first time last week, trying to break Win7recovery, booting it with Knoppix. This is why I think this is probably will come in play here too, as the recovery partition on W7 was hidden. Until then I didn't understand what mounting means, as windows always does it for you. So, take everything I say with a bunch of salt.
Please, let me know too, if you find out more. I want to flash the hell out of my Prism, but I want to be smart about it.
Click to expand...
Click to collapse
check here
All your answers can be found here: [REF] [GUIDE] Welcome to your device, the Galaxy S III. For more XDA related issues check here: [GUIDE] - XDA New User Guide - Getting started on XDA
Good Luck!
mf2112
XDA Moderator
ASharpEdge said:
Hello all this is my first post here...woohoo!:fingers-crossed: This forum is amazing as to the amount of information available. I just wish that in looking for what I need to do I did not need to look in so many places. I feel that if I want to root my T-Mobile GS3 that all the information should be in one subsection of the forum, but it is not that simple I guess....lol Anyway any help would be greatly appreciated.
I have a Samsung GS3 with T-Mobile that I want to root. Everyone says to back up the phone before you do it but I am not really seeing how to make a backup before I start. It appears that most of the guides to root just say to backup without telling you how to fo it. Another thing (correct me if I am wrong) I see the nandroid backup that I think is a backup of the phone however it seems to be done after you make changes to the phone and I thought the backup was supposed to be done before you do anything. Is it that there is not a way to make a complete backup with an unrooted phone?
My question is basically the same as the OP here. I have been reading and reading and reading posts here in the forum. There is much information here and much of it is duplicated with slight variances in some of the duplicates. I am not certain as to which rooting method I should use. There seem to be so many choices. As a new person to this forum I will say that you can find just about everything about any phone which is awesome. The hard thing is sifting through the many options to pick one to use for your issue.
I do see that Mr. Robinson has a thread with backups of the original roms. The only thing is that they are default roms that are like an out of the box phone and not my phone with my apps and my settings. That is what I want to backup...My phone with my settings and my apps.
:good: Thank you in advance for any one that can shed some light on this for me and the OP'er
Click to expand...
Click to collapse
Thanks mf2112. But those resources are seem only for GS3. And it seems it is not teaching us to backup our stock ROMs, it provides stock ROMs for us to download instead. Is there a general way to backup our stock ROMs?
Thanks,
midnite_
mf2112 said:
All your answers can be found here: [REF] [GUIDE] Welcome to your device, the Galaxy S III. For more XDA related issues check here: [GUIDE] - XDA New User Guide - Getting started on XDA
Good Luck!
mf2112
XDA Moderator
Click to expand...
Click to collapse
You must unlock your bootloader then flash a custom recovery. You will then use that custom recovery to make a backup of your rom. That backup will be stored on your sd card.
Now, I have tried to help you and so have a couple other folks. You expect us to just give you answers step by step. I am sorry but this is simply not how XDA works. XDA is set up in a way which makes it for any users to find quickly what they want to know. Use the search feature on the site and you will find many answers. I tell you to go do your own research now and be proud of what you learn on your own. And if you cannot, please do not try to modify your phone further, you may just brick it if you aren't careful.
midnite_ said:
Thanks mf2112. But those resources are seem only for GS3. And it seems it is not teaching us to backup our stock ROMs, it provides stock ROMs for us to download instead. Is there a general way to backup our stock ROMs?
Thanks,
midnite_
Click to expand...
Click to collapse
I put in the GS3 links since the OP was using that phone. Every phone will be different so I don't think a general way or guide would be practical.
Sent from my HTC Sensation 4G using xda premium

zte z990g (Rooted) Needing general information about su rights & commands

:fingers-crossed: ok so I've FINALLY been able to root my net10 zte merit z990g using a simple .zip install suggestr
d to me by a friend. (I know I took the easy way)
Since rooting it, I've went from the factory 2.3.5 stock and installed an ICS based verioson, which seems to be running great minor exception internet browser crashed & installation of opera web browser seemed to work smoothly on.
Since rooting it, I've bought another phone (Lg Optimus Dynamic) and activated it so that I may study the rooted device futher.
My questions are as follows:
1. Could someone possibly tell me the complete list of su commands are for my zte merit z990g and how to enter them? (Id like to use my su rights to explore the device componets, network (since its deactivated and has no working sim) and bootloader files/settings, etc for my own educational purposes to POSSIBLY futher my knowledge of the android based device. (quite new still yet to the whole technology mods, hacks & tricks) as well as explaining the whole shell thing?
2. Bootloader: how do I know if its unlocked, and if it isnt then what do I do to unlock it?
3. Is it possibe for one flash or install another custom rom or kernel to unlock a device? As stated I've went from gingerbread 2.3.5 to ICS . I first installed a .zip of TouchNav then a DexMeritRoot. zip, shortly after that I installed the ICS.zip. Though it seems to be stable, the battery drains extremly quick and there still is hardly any memory. Any ideas on a tweak setting to optimize
these issues?
4. Does anyone have another suggestion for a rom that I could try?
I ask advice as I know there are possibly other users out in the xda forum who are waaay more experienced with this device and could possibly share their wisdom with an inexperienced noob thats looking to expand her knowledge. So far, whats been done since the root, Ive enjoyed it (I use it to connect via wifi only to connect with friends and play online games when not tinkering with trying to enhance it to full potential) Ive just grown sightly accustomed to the udated zip of ICS and would like to try something new.
So, there it is guys, is there anyone who would like to offer their advice on the subjects? Id love to get some feedback.
Thanks in advance!!
ok, so I now know that I can install a .zip custom rom contaning no kernel since the merit is known to have issues rebooting and its linked to an "unstable kernel....but this confuses me. Doesnt the android based Zte Merit z990g have to have a kernel to function??
And I've come across the Stayboggy blue steel custom rom but Im apperhensive due to conflicting replies in the forum area I located it in. Dont get me wrong, he has some wonderful ROMS and software that Ive researched online. I just get a little nervous upon installing anything (Fear of drastic noob brick)
I've yet to find any real answers in my researches just yet, however I will continue to explore the device.
I guess upon reading Ive realized the bootloader thing has pretty much been addressed all on its own. Im guessing I wouldnt of been able to install the icecream Scamwhich custom rom, version of the ICS, would I??
Im still trying to find out the whole su commands, how to create shell etc so thats what Im tryin to grasp now.
Still would appreciate any opinions, and advice from others. on anything in the thread...
Okay so just to clear a few things up.
The bootloader for the merit is already unlocked due to Touch Nav being able to be flashed and replace the Stock Recovery with the update.zip. The bootloader would be the first menu that you "tampered" with in order to flash a permanent recovery that would allow you to use Touch Nav or ClockWorkMod recovery and then install ROMS. In my experience, I haven't ever come across a ROM being "pre-unlocked". This is because the way to unlock most phones is using the IMEI and being that is different in every phone it just can't be done until after the ROM is flashed. Some phones have apps for them like the Galaxy line and others are harder to unlock.
As far as running shell commands, you'll need to do that through ADB or a Terminal App. That's really the manual way of performing tasks on your device like pushing or pulling files with read/write privileges aka SuperUser. So it depends on what all is you want to try to learn to do manually. Like pulling system apps from your phone, replacing boot animations zip files, or what have you. In ADB, if your device is connected and have ADB debugging checked off you can try the command: "Adb devices". Minus the parentheses to check if can run other commands. "Adb help" will show you a quick command paragraph. You should still Google ADB commands or Android Terminal commands to explore further. Since your phone doesn't have a service, I recommend you trying a voip app to make calls through wifi just as neat thing to mess around with. Well that's just a bit of what I've gathered in my short time here in Xda Developers. If you like the challenge of research in the android/Linux world, this is really exciting way to start.
Oh and as far as the Ice scam Sandwich ROM, it is still Gingerbread. It's only themed system ui to look like ICS. There isn't an ICS based rom out for the ZTE Merit. Even SpeedFreak2.0 is Gingerbread. The low system storage issue was greatly addressed in SpeedFreak2.0 by creating an sd-ext3 partition on the micro sd. I had to create that in either TouchNav or ClockWorkMod and format. So backup all your data prior to doing this and installing the New Rom. I now have 4gb free of system storage and the Merit clocking at 864mhz. Pay close attention as I believe you install that ROM by restoring a backup file NOT flashing the. zip.
Now for the unstable kernel, I would recommend you download the 1.0 kernel I mentioned in another thread. The kernel comes in the ROM and it wouldn't run "without a kernel". Again, this would be after installing SpeedFreak2.0 by backup restore using ClockWorkMod that I believe is installed by flashing an update.zip that reboots TouchNav and let's you use a Temporary ClockWorkMod from which to backup(install) SpeedFreak2.0. You extract the SpeedFreak2.0. zip and get the backup file from there. I hope I made sense. I'm up late and I'll come back and check on you. Feel free to PM me if you find yourself lost.
Sent from my PantechP9090 using xda premium

Possible Method to Flash ROMs without Custom Recovery on MK2 (Confirmed for MF3)

Credit goes to developer, zroice, at the International Note 3 section for his work towards this.
DISCLAIMER: I AM NOT HELD RESPONSIBLE IF YOU BRICK/BOOTLOOP/ OTHERWISE INCAPACITATE YOUR DEVICE IN ANY WAY. YOU'VE BEEN WARNED!
This has been confirmed working for the AT&T Note 3 (Thanks to drakeymcmb and Bri315317) WITH SOME PROBLEMS. Therefore, probably with some changes, this *might* work for our device. I wanted to share the information here to simply see if anyone is able to confirm or deny this for the SGH-I337.
Original Thread: http://forum.xda-developers.com/showthread.php?t=2550120
AT&T Note 3 Thread: http://forum.xda-developers.com/showthread.php?t=2554411
OP from zroice:
zroice said:
Ladies and Gentlemen I present to you the
kn0x0ut Toolbox v1.03!
(notice the 0x0 reference! hehe)
This script allows you to install custom roms, and mods that you would normally have to flash with custom recovery.
,
But as we all know, if you want to keep knox warranty void at 0x0 you cannot use a custom recovery or kernel.
If your knox warranty is already void aka 0x1 then you can still use this tool but it wont bring back the warranty...
---
This kn0x0ut toolbox itself requires root! You will have to use "Root de la vega" or some other method to get rooted while keeping your warranty intact.
---
How to use:
Extract the download from below to your internal or external sd card.
Then browse into that directory with terminal or adb shell and type:
Code:
sh kn0x0ut.sh
or
Code:
sh kn0x0ut.sh help
and you will get all the commands supported currently.
---
Check post 2 for full command list!
To install a rom or other zip you will have to extract its contents to the "extract_files_here" subfolder of kn0x0ut and then run the install command.
Code:
sh kn0x0ut.sh install
or
Code:
sh kn0x0ut.sh new_rom
(this is the command to install a new rom basically, meaning: backup and clean base, clean dalvik, install rom, reboot)
or if you want to install a rom with all the mods currently available:
Code:
sh kn0x0ut.sh new_rom all_addons
NOTE: The install script looks inside the extract_files_here folder for data and/or system folders to be copied over to the system or data folder on your device respectively.
All other folders it finds will get "ignored" (they will be copied to a folder "not_installed" which is created if the script finds incompatible folders or files). After the seperation
of the data and system folder from the unsupported ones, some dangerous libs which cannot be copied while the system runs will get removed from the temporary installation
folder so to ensure that there is no crash during the copy process. Once these files are removed the safe files get copied to your system and the permissions get fixed with
my permission fixing script.
The files that have been installed will get moved into a subfolder called "installed" and into another subfolder with the date and time of the installation.
The files that could not be installed by the script in the first run get moved to "not_installed".
These files could still become installed if you copy or move them over to the extract_files_here folder again for a second run. But remember that a data and/or a system folder is expected by the script inside the extract_files_here folder - so you have to make sure the structure is alright if you do things like this.
---
Example:
X-Note has the following folders when extracted:
META-INF, data, system, xnote.
The data and system folder will get installed, while the metainf and xnote folder wont. Inside the xnote folder you will find stuff that would normally be installed by aroma through user choice.
If you look inside there at the acid mod folder for example, there will be a system folder. To install this mod with kn0x0ut in a second run, you would have to move that system folder back
to the extract_files_here folder and then run the install command again. Only things inside data or system folder will ever be installed. And even then you gotta make sure the folder structure is
as on the system or data partition itself. (so apks need to be inside ..../kn0x0ut/extract_files_here/data/app or ..../kn0x0ut/extract_files_here/system/app to be moved to the right folder, etc...
you get it. (if not you should not use it for stuff like that)
---
This is only version 1.03 - I got more ideas to integrate but I dont wanted to hold things back any longer...
A word of warning though:
This is made for lazy people (like myself) and not for dumb people! (aka: its made to save time and ease up things and should be used with caution to not mess up things)
(for example: dont clean_base or use new_rom without actually installing a new rom or you will most likely end up without system apps and device not booting correctly - like you wouldnt wipe system in a custom recovery without installing a rom...).
It can be used over adb or terminal, but if you install a rom (clean_base) the system ui gets stopped, so better do it over adb!
It basically does the steps I described in my guide to install custom roms on knox firmware in a script, plus some other nice little timesavers.
Dont worry about error messages that say files dont exist or that they already exist! (thats normal)
Feel free to check out the source code and suggest improvements or enhancements like new mods to integrate.
Click to expand...
Click to collapse
Sent from my SAMSUNG-SGH-I337 using Tapatalk
Interesting...but since it doesn't flash kernels we'd still only be able to use whichever ROMs are compatible with stock kernels? I wonder how different the libs used are between the s4 and note 3
prisonnet said:
Interesting...but since it doesn't flash kernels we'd still only be able to use whichever ROMs are compatible with stock kernels? I wonder how different the libs used are between the s4 and note 3
Click to expand...
Click to collapse
You're probably right. It would be preferable for someone on mf3 to test because they would have a way to odin back to stock.
This basically sounds like framework modification. It sounds as if it might be use-able with TW based type ROMs but I doubt CM, AOSP, AOKP, or MIUI ROMs will work. If it works, it should simplify modifying the framework because it allows Devs to create certain Pseudo-Roms with many modifications to be flashed all at one time via ADB instead of needing to do several individual changes.
Take a look at the P-ROM or Pseudo-ROM thread in Android development by Nottach. It seems to be the same concept just for MDL firmwares.
phobia09 said:
You're probably right. It would be preferable for someone on mf3 to test because they would have a way to odin back to stock.
Click to expand...
Click to collapse
I'd be interested to see if this works on MJ9 / MK2 since SafeStrap isn't available for those versions yet, but I don't think there's odin available for MK2. Might be a one-way trip to bricksville.
prisonnet said:
I'd be interested to see if this works on MJ9 / MK2 since SafeStrap isn't available for those versions yet, but I don't think there's odin available for MK2. Might be a one-way trip to bricksville.
Click to expand...
Click to collapse
That's the main reason I posted this. I wouldn't want to test since I'm on mk2. I was more hoping someone on mf3 could test it and then maybe see if we could somehow tweak it for mj9/mk2 users if necessary.
phobia09 said:
That's the main reason I posted this. I wouldn't want to test since I'm on mk2. I was more hoping someone on mf3 could test it and then maybe see if we could somehow tweak it for mj9/mk2 users if necessary.
Click to expand...
Click to collapse
Going to try this after work tonight. I'm still on MF3. Read through the kn0x0ut script and no changes need to be made for this to work on our device - the partitions listed are all the same. I'll try a 4.2.2 TW Rom, then 4.2.2 GPE, then upgrade to MK2 and try a 4.3 TW and 4.3 GPE rom.
I'd be more confident trying this on MK2 if it worked on MF3 without any problems.
prisonnet said:
Going to try this after work tonight. I'm still on MF3. Read through the kn0x0ut script and no changes need to be made for this to work on our device - the partitions listed are all the same. I'll try a 4.2.2 TW Rom, then 4.2.2 GPE, then upgrade to MK2 and try a 4.3 TW and 4.3 GPE rom.
I'd be more confident trying this on MK2 if it worked on MF3 without any problems.
Click to expand...
Click to collapse
I would definitely appreciate it. If we can somehow get in touch with the same individual who uploaded the mf3 tars we may be able to get a method to flash back to stock mk2. Then we would be all set up with a way to flash without waiting on bootloader unlock or custom recovery. Looking forward to what you find out.
phobia09 said:
I would definitely appreciate it. If we can somehow get in touch with the same individual who uploaded the mf3 tars we may be able to get a method to flash back to stock mk2. Then we would be all set up with a way to flash without waiting on bootloader unlock or custom recovery. Looking forward to what you find out.
Click to expand...
Click to collapse
We also might be able to restore MK2 if someone can back up their MK2 installation using this method: http://forum.xda-developers.com/showpost.php?p=44917036&postcount=1
Would it be possible to use this to downgrade from MF3 back to MDL?? This could be very awesome...
hexagonsunja said:
Would it be possible to use this to downgrade from MF3 back to MDL?? This could be very awesome...
Click to expand...
Click to collapse
Unfortunately not. That requires a whole different level of access which, to my knowledge, no one has been able to achieve yet. Think of this as a command-line version of safestrap, without the rom slot functionality.
Interesting. I've given up hope on unlocking the bootloader for the s4. Minds much better than mine have tried and failed. If there's a way to circumvent the bootloader problem completely, this could be the holy grail for ATT S4 users! I agree that we'd probably have to stick with stock kernel ROMs, much like SS does, but it does open up an avenue of options for users.
I would volunteer, but as far as I know, there's no way to flash back to stock MK2 just yet. I can root easily enough, but I'm not going to risk a brick until there's a known flash to stock method. >_>
prisonnet said:
Unfortunately not. That requires a whole different level of access which, to my knowledge, no one has been able to achieve yet. Think of this as a command-line version of safestrap, without the rom slot functionality.
Click to expand...
Click to collapse
Ah I see, I wonder if this is the first step though... I am currently on MF3 and rooted, so I would likely be willing to try this out once others report success. I am hesitant to brick my daily driver though...
Zephcemi said:
Interesting. I've given up hope on unlocking the bootloader for the s4. Minds much better than mine have tried and failed. If there's a way to circumvent the bootloader problem completely, this could be the holy grail for ATT S4 users! I agree that we'd probably have to stick with stock kernel ROMs, much like SS does, but it does open up an avenue of options for users.
I would volunteer, but as far as I know, there's no way to flash back to stock MK2 just yet. I can root easily enough, but I'm not going to risk a brick until there's a known flash to stock method. >_>
Click to expand...
Click to collapse
I can verify that the script works on MF3. Just used it to remove then re-install the 4.2.2 GPE rom I was using with safestrap. I'm now going to upgrade to MK2 and try a 4.3 GPE rom...wish me luck
prisonnet said:
I can verify that the script works on MF3. Just used it to remove then re-install the 4.2.2 GPE rom I was using with safestrap. I'm now going to upgrade to MK2 and try a 4.3 GPE rom...wish me luck
Click to expand...
Click to collapse
Good luck! If you can verify, I'll be getting a 4.3 GPE rom myself. Godspeed!
prisonnet said:
We also might be able to restore MK2 if someone can back up their MK2 installation using this method: http://forum.xda-developers.com/showpost.php?p=44917036&postcount=1
Click to expand...
Click to collapse
I think this would be awesome, I am much too ignorant to understand; Where/how is this script to be run? Terminal Emulator? ADB? Odin itself? If it's something relatively low risk (and assuming I'm capable of doing it) I'll attempt it because I'm on MK2.
prisonnet said:
I can verify that the script works on MF3. Just used it to remove then re-install the 4.2.2 GPE rom I was using with safestrap. I'm now going to upgrade to MK2 and try a 4.3 GPE rom...wish me luck
Click to expand...
Click to collapse
GOOD LUCK! Thanks again for your contribution! :fingers-crossed:
phobia09 said:
I think this would be awesome, I am much too ignorant to understand; Where/how is this script to be run? Terminal Emulator? ADB? Odin itself? If it's something relatively low risk (and assuming I'm capable of doing it) I'll attempt it because I'm on MK2.
GOOD LUCK! Thanks again for your contribution! :fingers-crossed:
Click to expand...
Click to collapse
Just in case, I'd make an odin backup using this script http://forum.xda-developers.com/showpost.php?p=44917036&postcount=1
That way you can return to the state your phone is in now if something goes wrong - it will probably take at least an hour, and is harder to restore than a backup would be in TWRP or similar, but at least it's possible.
If you do want to give it a shot (make a backup first!), all you need to do (which I'll be doing myself after my phone finishes updating to MK2) is extract this rom http://forum.xda-developers.com/showthread.php?p=47718525#post47718525 into the "put_files_here" folder of the kn0x0ut zip, then send the whole kn0x0ut folder somewhere to your phone, like /mnt/extSdCard or just /mnt/sdcard.
Then through adb (not terminal emulator because the GUI will crash - as expected - when you delete the rom you are currently running), do sh kn0x0ut.sh install and it should automatically install the rom in the "put_files_here" folder. I think there's a new update of the kn0x0ut script coming soon that allows flashing of straight zip files, but not sure when that will be released.
prisonnet said:
Just in case, I'd make an odin backup using this script http://forum.xda-developers.com/showpost.php?p=44917036&postcount=1
That way you can return to the state your phone is in now if something goes wrong - it will probably take at least an hour, and is harder to restore than a backup would be in TWRP or similar, but at least it's possible.
If you do want to give it a shot (make a backup first!), all you need to do (which I'll be doing myself after my phone finishes updating to MK2) is extract this rom http://forum.xda-developers.com/showthread.php?p=47718525#post47718525 into the "put_files_here" folder of the kn0x0ut zip, then send the whole kn0x0ut folder somewhere to your phone, like /mnt/extSdCard or just /mnt/sdcard.
Then through adb (not terminal emulator because the GUI will crash - as expected - when you delete the rom you are currently running), do sh kn0x0ut.sh install and it should automatically install the rom in the "put_files_here" folder. I think there's a new update of the kn0x0ut script coming soon that allows flashing of straight zip files, but not sure when that will be released.
Click to expand...
Click to collapse
@prisonnet Have you utilized this script on any previous versions? Actually used the tar ball to restore anything? I haven't tried and I'm a bit skeptical.
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
brobinson2102 said:
@prisonnet Have you utilized this script on any previous versions? Actually used the tar ball to restore anything? I haven't tried and I'm a bit skeptical.
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
I'm making one right now to see if it can work, though i had to build the commands into my own batch file as running the script through ADB or Terminal Emulator didn't work. Currently compressing the files and then hopefully when i test them it will work, but i am highly doubtful that it will because i believe they need to be signed and i remember Aou creating something like this for MF3 in his neutered update thread and I believe it didn't flash.
DeadlySin9 said:
I'm making one right now to see if it can work, though i had to build the commands into my own batch file as running the script through ADB or Terminal Emulator didn't work. Currently compressing the files and then hopefully when i test them it will work, but i am highly doubtful that it will because i believe they need to be signed and i remember Aou creating something like this for MF3 in his neutered update thread and I believe it didn't flash.
Click to expand...
Click to collapse
I'm working on the same thing now. If the tar file doesn't work, my next step is to try manually flashing the backed-up system.img.ext4 with busybox dd. Someone correct me if I'm wrong, but ROMs contain boot.img and system files, since we can't flash boot.img without bricking that leaves system.img? I know safestrap doesn't flash boot.img; I assumed it just flashed the system - so I'm just trying to do that manually.

How do you set SELinux to permissive on the J700P model?

Title, I can't figure out how to do this.
And as a side question, has anyone figured out how to unlock the bootloader?
Found this it might do the trick for permissive but the bootloader i wonder if a loki patch would work if it was applied to the recovery and boot image then you wouldnt need to unlock completely to flash but all the roms would need to be loki'd but the its better to have full unlocked bootloader. There is a unlock bootloader thread on here but im not sure whos all used it...
You can set the SELinux to Permissive temporarily by running the bellow two commands in Terminal emulator
su
setenforce 0
But it SElinux will change to default once you hard reboot your phone.. In order to keep it in permissive, you need to soft reboot always whenever reboot needed and it's quite annoying..
So I found a workaround to Set the SELinux to permissive on boot itself.
For this you need to have init.d support.. If you don't have just install it via universal init.d tool available in xda.. (just do a search, u will get it) install universal init.d and activate init.d..
Then go to /etc/init.d directory, create a file and rename it as "08setperm" (without quotes) and add the below lines in the file and save it..
#!/system/sh
setenforce 0
And give full permission (rwxrwxrwx) .. Use root Explorer to edit and give permissions..
Now hard reboot your phone and you can see SELinux is set to "permissive" on boot itself..
---------- Post added at 04:14 PM ---------- Previous post was at 03:43 PM ----------
If loki would be something youd be interested in its a add on of android image kitchen it will loki patch youre boot image and i believe recovery is supported as well. It auto generates the loki patches for you all you have to do is drag and drop the images over the loki selection and it does the rest.
http://forum.xda-developers.com/showthread.php?t=2073775
CoffeeNAndroid said:
Found this it might do the trick for permissive but the bootloader i wonder if a loki patch would work if it was applied to the recovery and boot image then you wouldnt need to unlock completely to flash but all the roms would need to be loki'd but the its better to have full unlocked bootloader. There is a unlock bootloader thread on here but im not sure whos all used it...
You can set the SELinux to Permissive temporarily by running the bellow two commands in Terminal emulator
su
setenforce 0
But it SElinux will change to default once you hard reboot your phone.. In order to keep it in permissive, you need to soft reboot always whenever reboot needed and it's quite annoying..
So I found a workaround to Set the SELinux to permissive on boot itself.
For this you need to have init.d support.. If you don't have just install it via universal init.d tool available in xda.. (just do a search, u will get it) install universal init.d and activate init.d..
Then go to /etc/init.d directory, create a file and rename it as "08setperm" (without quotes) and add the below lines in the file and save it..
#!/system/sh
setenforce 0
And give full permission (rwxrwxrwx) .. Use root Explorer to edit and give permissions..
Now hard reboot your phone and you can see SELinux is set to "permissive" on boot itself..
---------- Post added at 04:14 PM ---------- Previous post was at 03:43 PM ----------
If loki would be something youd be interested in its a add on of android image kitchen it will loki patch youre boot image and i believe recovery is supported as well. It auto generates the loki patches for you all you have to do is drag and drop the images over the loki selection and it does the rest.
http://forum.xda-developers.com/showthread.php?t=2073775
Click to expand...
Click to collapse
The init.d thing hasn't worked for me... oh well. As for the bootloader, yeah, I'm just going to wait for a guide on how to do it. I don't want to break my phone haha. Thanks anyway!
minz1 said:
The init.d thing hasn't worked for me... oh well. As for the bootloader, yeah, I'm just going to wait for a guide on how to do it. I don't want to break my phone haha. Thanks anyway!
Click to expand...
Click to collapse
It didn't work coz stock kernel does not support init.d , i think that i made a permissive kernel you can find it in the bounty thread
messi2050 said:
It didn't work coz stock kernel does not support init.d , i think that i made a permissive kernel you can find it in the bounty thread
Click to expand...
Click to collapse
That permissive kernel is the stock kernel and see it does support init.d.
https://play.google.com/store/apps/details?id=os.tools.scriptmanager
Id use use script manager and run it put it in the init.d folder and run it as script with root permissions
See init.d works with script manager
CoffeeNAndroid said:
That permissive kernel is the stock kernel and see it does support init.d.
https://play.google.com/store/apps/details?id=os.tools.scriptmanager
Id use use script manager and run it put it in the init.d folder and run it as script with root permissions
Click to expand...
Click to collapse
I have done that, and it hasn't worked. I dunno what's going on with this.
Download the test file in this thread and use its instructions to do everything correctly. Once its in init.d folder browse as root in script manager, press on the test file select open as script. Click root, boot, save... reboot then go into youre data folder and see if theres a test log. If theres a test log youre init.d is working
http://forum.xda-developers.com/showthread.php?t=1933849
Anyways iam running that permissive kernel and id hate to break it to you but theres no init.d included in the kernel. You dont need a permissive kernel anyways to get init.d. when i modified the optimus elite with a galaxy s3 apps2sd script the phone didnt have init.d or a permissive kernel and i ran init.d scripts through script manager.. its either flash the kernel which to remove permissive you have to flash stock kernel which removes root unless you flash in flashfire cause the kernel is included in the boot image so a clean flash of the stock boot removes root too. Or use script manager to get init.d and then add the perm script. With script manager you can turn it on and off alot easier and when you remove it doesnt remove youre root and you dont have to take steps to reroot...
Oh and the reason messi is being ****ty is cause i didnt help root the galaxy s6 active.. i dont make money off other peoples work.. since super su is chainfires id have all the money given to chainfire but messi believes in making money off people using stuff other people created. Making a boot image permissive is not really considered work.. messi would of had a fit if the money went to chainfire... it seems messi only focuses on the bountys to see how much money messi can make. I would of been the one to add root and wouldnt of got nothing for it. Messi would of felt entitled to the money for doing nothing but making a permissive kernel...
CoffeeNAndroid said:
Oh and the reason messi is being ****ty is cause i didnt help root the galaxy s6 active.. i dont make money off other peoples work.. since super su is chainfires id have all the money given to chainfire but messi believes in making money off people using stuff other people created. Making a boot image permissive is not really considered work.. messi would of had a fit if the money went to chainfire... it seems messi only focuses on the bountys to see how much money messi can make. I would of been the one to add root and wouldnt of got nothing for it. Messi would of felt entitled to the money for doing nothing but making a permissive kernel...
Click to expand...
Click to collapse
I dunno about the drama on these forums man.. if that's really true then I don't know...
messi2050 said:
It didn't work coz stock kernel does not support init.d , i think that i made a permissive kernel you can find it in the bounty thread
Click to expand...
Click to collapse
CoffeeNAndroid said:
That permissive kernel is the stock kernel and see it does support init.d.
https://play.google.com/store/apps/details?id=os.tools.scriptmanager
Id use use script manager and run it put it in the init.d folder and run it as script with root permissions
Click to expand...
Click to collapse
A constructive discussion is fine but anything else either take it to Pm or add each other to your ignore lists. Also there is no point in posting that you have added someone to your ignore list as you wont see their reply
Supersu is a free app... when the only thing you add is root access by supersu which is what the free version does then it should be distributed for free.. if anyone is entitled to money off of it then it would be chainfire.. to take someone elses work and charge money for it is ridiculous.. if i would of known that root provided was cf auto root i wouldnt of ever paid the $20 i kinda figured theyd make their own root method but that never happened... chainfire was the first to make a root boot image for marshmallow so technically everything would be credited to him... its easy to give someone credit but much more difficult to do the right thing and give that someone the money especially when youre motivated by money...
Check this post, selinux is set always permissive on my stock kernel, i don't have init.d support ?
https://forum.xda-developers.com/g2...w-to-set-selinux-to-permissive-t3329439/page4
I have permissive kernel on this model. There is a thread here with a version posted. I'll have him update the thread to State the process so far. Currently in testing phase

Categories

Resources