[Q] "Enable OEM Unlock" - G4 Q&A, Help & Troubleshooting

Hey Guys/Gals;
I am very aware that Rooting & Bootloader unlocking are two completely separate entities, my question on this matter is though, Is there anyway in which I can someone use the "Unlock OEM Bootloader" and ADB commands to my advantage to be able to flash a .zip for SuperSU?
Basically I find the "Stock ROM" for the LGUS991 to be good enough on its own merit that I do not want/need to change the ROM itself (So I do not really have a need for TWRP or CWM for that aspect), I would just like to install a couple of Root required apps for changing around some theme options and status bar modifications (things I could do with Framework Modules for example).
Is this all basically just a pipe dream (at least for now until we can get full Bootloader access) or is does this sound like something that might actually be able to be accomplished?
[Sorry if this is a super-noob question, This is my first non Samsung/HTC device so I was used to always having the root methods being there from day one of my old device purchases]

Related

Are su/sudo available in android, can root be performed without rom flash?

Hello guys, seem like I will be moving to this part of xda in a couple of weeks
I have several questions though, mostly regarding roms and rooting. I have used linux for sometime and from what I understand su/sudo/gksu/gksudo etc. are not available in android? I mean I cannot gain root access in the same way as on the desktop. And if I root the device it will not lose warranty, as I can unroot it later on similar to SPL/HardSPL in winmo. The other question is, I think I am going to be OK with the stock rom, as the desire is some pretty fast hardware, so can I root it without installing rooted rom, again as HardSPL in winmo. I will probably need the root access for some applications, like task manager, otherwise I will probably only use the phone, browser, mp3, social stuff, gps, email, videos like I did in the past.
I am sorry if these questions were asked before, I read the tutorials in the first post, however things are still not quite clear for me
You don't have to install a custom ROM if you use unrevoked for root, it just adds the superuser app to your current ROM. However it will flash the recovery, so it voids your warranty anyway. There is no way to avoid this.
No idea about su/sudo though, I know nothing about linux
Well,I kinda have the same questions...First off,there is the su command in Android which is equal to the sudo command in Ubuntu etc.To give an example,I was trying out the ezHero rom on my Hero the other day and jit was enabled with this process:in terminal emulator you type in su,and then it asks for superuser permissions(probably only available through root?) and then you type jit-on and some other things happen that don't really matter here.I believe I answered half your question.Now,if root can be achieved through terminal...I don't think so!It's above my head though...
Thanks guys, that cleared up a lot
About this recovery, I guess if I can unroot and flash "stock recovery" if there is such a thing, it will not be a problem, is this the case? If I can't maybe I should buy a used device instead of a new one.
About the su/sudo, I have used mostly Ubuntu, and in the users menu I usually had 2 users - admin and root, once I set up a root password. Then I used the admin user and if I needed root access for something I did it with su or sudo + <command>, requiring password, or if it was software launcher requiring root access with a path gksudo + <regular parameters/command> in the launcher properties. For example, as far as I know you cannot change attributes like readable/writeable or edit files which are not personally belonging to your user without root access . It is a really neat and simple feature on the desktop and I am puzzled as to why they removed it from the stock rom. I didn't include this in the original post so that it is not too confusing.
Anyway thanks guys, having been with winmo for the last few years, I will finally give android a go and see if it works for me
Yeah it is relatively easy to flash to complete stock ROM and recovery. There's a guide somewhere in the developer board.
Invisible Elf said:
You don't have to install a custom ROM if you use unrevoked for root, it just adds the superuser app to your current ROM. However it will flash the recovery, so it voids your warranty anyway. There is no way to avoid this.
Click to expand...
Click to collapse
No. Just no.
There's nothing in the warranty agreement to suggest that (there is a line that confirms that in the N1 agreement, though), and countless people have sent their rooted Desires back to HTC for repairs, and they've all been repaired. They just won't repair it if the ROM you flashed broke some hardware (ie overheated the LED and made it short-circuit).
Thanks guys, then I'll get a new device, great

[Q] Newbie questions about DHD rooting and memory

Hi,
I'd be really grateful to anyone who can answer my newbie questions.
I'm looking to follow the guide to downgrade my non-network-branded (i.e. sim-free) Desire HD, so I can permanently root it. Then I intend to follow the other guide so I can still update to the latest official release. My primary requirement for rooting is just so I can make complete backups of my phone's state in future. Though I'll probably play about with other community ROMs too!
Sorry if answers to my questions are elsewhere, and feel free just to point if that's the case. I've searched but haven't found definitive answers. Knowing these things will increase my understanding. Although I'm used to tinkering with things a little am in no way a programmer and my last phone was a Nokia E65!
1) Please can someone list the different parts of the phone's memories, including which are impossible to write over and which are. E.g. my understanding is:
--One flash chip with:
- 'bootloader', which to me sounds like a PC's BIOS or the kind of app you can boot into on a standard desktop PC when choosing which OS to boot into;
- factory image partition;
- separate partition for over the air updates;
- 1GB partition for user-writeable memory for things like apps installed on the phone, contacts, etc.
--Physically separate 'radio' chip that can be overwritten (I don't understand the difference between this and the OS though)
--RAM;
--microSD card.
2) After following the two guides mentioned above, will I still be able to receive over the air HTC updates in future? And if not, does that mean I'd be relying on the community to make available any official updates? I bought my DHD through an official UK retailer.
3) After following the two guides mentioned above, will it still be possible to restore my phone to its factory state in future, e.g. for resale or sending back to HTC, so everything that we unlock ('eng s-off', 'radio s-off', etc., which fries my brain right now) is locked again? If so, can a guide to this process be linked to?
4) I understand it's possible to switch between custom ROMs easily. When this is done, does that mean all system settings, such as phone contacts and app settings are also switched, or are these settings written to a different part of the phone memory?
I'll be sure to thank (and donate) for your time. Many thanks in advance as well!
Hi, I just bought the DHD 3 weeks ago and it is still difficult to understand to understand all this android stuff sometimes
1) I was a little lost at the beginning too, I don't know if this is what you are looking for but this is what I understood.
There are 4 flashable "things" :
- ROM OS (android OS)
- Linux Kernel (linux kernel)
- ROM radio (another ROM that manage ONLY the hardware stuff like 3G, Wi-Fi, bluetooth, GPS...)
- bootloader (exactly like a bios) and contains a recovery menu (that can be flashed by clockworkmod for example)
The ROM radio seems independant and you can flashed it separatly from the other it doesn't bother. The last versions improve battery life or GPS startup etc...
The ROM OS (android) need to be flashed with the kernel otherwise you can have some problem (wi-fi or data network that doesn't work anymore...).
S-Off means security off and it is necessary to do it if you want to write a new recovery on the bootloader or flash a new radio ROM...
Ther is two kind of S-Off but I'm not sure of the meaning so I let you watch about it.
When you install through the official ways :
1 OTA : You need to have the official recovery from the bootloader otherwise it will NOT work (no OTA with clockworkmod)
If your phone is network-branded you need a goldcard here and/or superCID (I don't really understand here lol)
After the installation I think you keep the S-Off but you're not root anymore.
2 RUU : It will install/reinstall everything (ROM OS, kernel, ROM radio and bootloader).
It is even capable of reseting your CID (your not concerned here because your phone is non-network-branded)
If think you loose the S-Off (or ENG S-Off -> SHIPS S-Off), you're not root anymore...
If you want to keep S-OFF, SuperCID and ClockWorkMod you need to :
1 flash the ROM OS through the ClockWorkMod recovery -> update.zip (you can give it the OTA file .zip, it will only flash the ROM OS)
2 flash the kernel manualy with fastboot (you can also use the boot.img contain in your OTA file)
3 flash the ROM radio (there is the excellent tuto here on XDA about this)
2) OTA will not be possible if you want to use clockworkmod. I was a little anxious about that too at the beginning! But you can find the official
ROMS REALLY easily on XDA probably before your provider send it to you. And when you do everything manually, you can CHOOSE wich radio ROM you want,
you can do backup REALLY quickly with clockworkmod and you can come back (things you can't do if you use OTA)... The last point that confort me
in doing all of this is that you can download OTA but not install it to pick up the ROMs inside and the kernel ! I did it last week and my phone
is now running the two ROMS that was contained in the OTA file AND the kernel. This is why I'm not worried anymore.
3) I never tried to restore my phone to its exact factory settings but I think you can...
4) I don't really now. In my case, I decided to use Google for my contact too, so when I flash, a few minutes later I have all my contacts
I hope my english is not too bad for explainations like this
Hi poumpoum,
Firstly, thanks so much for taking the time to help. Your English is ten times better than my Française! If you've a PayPal account you'd like to Personal Message me, or just the name of your preferred charity, I'd like to say a little thanks that way too.
Okay: so I understand that doing these cool things to my phone means I won't be able to update it over the air. You've convinced me this isn't a problem because any updates find their way to the community.
I'm also convinced I can restore my phone completely to factory defaults due to this thread (the thread's for a different region but the principle still stands).
Thanks for clarifying the radio ROM shares the same physical chip as all the other memory (including the RAM actually, I found this out).
This thread also explained some of the jargon to me.
You're welcome

Difference between rooting and unlocking bootloader

I just want to know the difference
Sent from my Wildfire S using XDA
There is no difference. If you unlock bootloader you can gain root.
Sent from my Wildfire S using XDA
SanderTheNinja said:
There is no difference. If you unlock bootloader you can gain root.
Sent from my Wildfire S using XDA
Click to expand...
Click to collapse
Of course there is a difference. Rooting lets you have complete admin rights on your phone, eg access to write files to the system partition for example or delete all the files. Or uninstall system apps.
Unlocking lets you flash an entire new rom or a custom recovery.
OP - There is plenty of info elsewhere, don't be lazy, just do some reading
with an unlocked bootloader, then you are able to root your phone and install custom roms and overclock and root stuff.
an unlocked bootloader is something you must do before having full access to your phone
scott_doyland said:
Of course there is a difference. Rooting lets you have complete admin rights on your phone, eg access to write files to the system partition for example or delete all the files. Or uninstall system apps.
Unlocking lets you flash an entire new rom or a custom recovery.
OP - There is plenty of info elsewhere, don't be lazy, just do some reading
Click to expand...
Click to collapse
I mean, you can only get root if you unlock your bootloader.
Sent from my Wildfire S using XDA
Root
Rooting a device is a method to gain full access to the operating system. With root you can do all the administrative stuff, write to locations normally restricted to the system and customize your device deeper.
Root enhances your privileges and you are able to change almost anything inside of your rom.
The rooting, however, affects ONLY your operating system (Android)
Unlocked Bootloader
In most devices, the Bootloader is the instance that calls the operating system (Android) and manages direct access to the device's partitions. Having an unlocked bootloader enables you to flash custom roms, custom kernels, recoveries and so on.
Bootloader and Rooting Teamplay
Often it is the case, and so, too in our devices, that a locked bootloader also locks write access to several partitions like the system partition. This is the reason why rooting is not able without unlocked bootloader. Rooting needs write access to the system partition (for storing the superuser binary and the superuser app)
Without unlocked bootloader, only a temporary half-root can be achieved.
Thanks alot guys
Sent from my Wildfire S using XDA
How to unlock bootloader ,but the way that I can lock it again
prdonja said:
How to unlock bootloader ,but the way that I can lock it again
Click to expand...
Click to collapse
Do some research. There are hundreds of posts on this topic.
scott_doyland said:
Of course there is a difference. Rooting lets you have complete admin rights on your phone, eg access to write files to the system partition for example or delete all the files. Or uninstall system apps.
Unlocking lets you flash an entire new rom or a custom recovery.
OP - There is plenty of info elsewhere, don't be lazy, just do some reading
Click to expand...
Click to collapse
19 months after the question was asked, i just happened to be wanting to answer the same question for myself, so I searched and found this thread...
I am happy he asked the question, as it was the first answer I saw in google search... so maybe he could also have done a search 19 months ago, but his question was useful to me, and your response seemed rude and unnecessary. You never know who may benefit from a little generosity.
Mark.
scott_doyland said:
Do some research. There are hundreds of posts on this topic.
Click to expand...
Click to collapse
I know that you're not rude (even though you sounded so). You replied what was correct and appropriate.
But my research for the question in question (pun unintended) on google pointed me straight to this very thread.
So, it would be greater if someone had posted some more good links besides their rude looking remark (again, not rude, but just looking so).
theq86 said:
Root
Rooting a device is a method to gain full access to the operating system. With root you can do all the administrative stuff, write to locations normally restricted to the system and customize your device deeper.
Root enhances your privileges and you are able to change almost anything inside of your rom.
The rooting, however, affects ONLY your operating system (Android)
Unlocked Bootloader
In most devices, the Bootloader is the instance that calls the operating system (Android) and manages direct access to the device's partitions. Having an unlocked bootloader enables you to flash custom roms, custom kernels, recoveries and so on.
Bootloader and Rooting Teamplay
Often it is the case, and so, too in our devices, that a locked bootloader also locks write access to several partitions like the system partition. This is the reason why rooting is not able without unlocked bootloader. Rooting needs write access to the system partition (for storing the superuser binary and the superuser app)
Without unlocked bootloader, only a temporary half-root can be achieved.
Click to expand...
Click to collapse
Thanks for this useful info
I agree. It is the autumn of 2014, and I've been reading webpages until my eyes are bleary. This is the 1st thread that actually explains how the two concepts relate rather than descending into buttonology. I think the OP's question hits the nail on the head (well, one of them at least) and he doesn't need to be treated in a demeaning manner.
Wow, 1 year after last post, I thanked he asked this question! Was thinking as same as u, loll
fredphoesh said:
19 months after the question was asked, i just happened to be wanting to answer the same question for myself, so I searched and found this thread...
I am happy he asked the question, as it was the first answer I saw in google search... so maybe he could also have done a search 19 months ago, but his question was useful to me, and your response seemed rude and unnecessary. You never know who may benefit from a little generosity.
Mark.
Click to expand...
Click to collapse
Root vs bootloader
If i have an unlocked bootloader can i install apps that require root. Will they still work even though im not rooted?
Deogracias said:
If i have an unlocked bootloader can i install apps that require root. Will they still work even though im not rooted?
Click to expand...
Click to collapse
I'm not an expert, but here's my understanding from months of reading up on this: Unlocking the bootloader lets you install a program known as Recovery, which is another program that lets you install operating systems, e.g., stock Android, CyanogenMod. Whether you have root or not is determined by settings made after the operating system is installed. So unlocking a bootloader is different from root. You can have either one without the other. However, I am also left with the impression that software that helps you unlock the bootloader also give you root (and perhaps vice-versa). This dual functionality is designed into the software, but they are separate things which don't have to both happen.
I just reviewed my answer and realized that it doesn't really address the quoted question very directly. Unfortunately, there is no "delete" function. So hopefully, it helps a bit. As further info, I unlocked bootloader, changed the Recovery, and replaced the native Android OS from Koodo with CyanogenMode. However, I did not root. Hopefully, someone else can chime in with further experience.
I've been wondering about this for years, as well. I don't feel confident doing things to my phone that I don't understand. I'm sure I'll never have a thorough understanding, as I'm not a programmer, but even a rough one would suffice. This is the same reason why I will only attempt certain operations on my car -- if I muck it up, I'm boned.
I rooted my phone (or maybe unlocked the bootloader?) a couple years ago, and never got around to doing anything else with it, because I couldn't figure out how to "do a recovery" (still don't know what that means, exactly). Or maybe I unlocked the bootloader, and never rooted it? I'm still confused. I see LOADS of folks who throw the terms around, whom I suspect, actually have no clue. I have a Verizon S4 MDK 4.2.2, and I just now finished the process -_- Better late than never? Now, I'm trying to decide if it's worth the headache, and possible risk, of installing custom ROMs, etc. Also, I know my phone is "SO old!!' and blah-blah-blah. At least if I screw things up now, I can get a new phone with a new contract, etc.
I really wish Verizon weren't such dirtbags about the locked bootloader thing.
No
SanderTheNinja said:
There is no difference. If you unlock bootloader you can gain root.
Sent from my Wildfire S using XDA
Click to expand...
Click to collapse
Heee is full difference between rooting and unlocking bootloader
Rooting - Administrative access to the entire file system including the ability to change system files such as installing system-wide ad-blocker by modifying the host file on your device, or uninstalling system apps, such as bloatware that comes pre-installed on your device. Without root, one can only see files in root directory instead of editing them. Some alps and mods only work with root.
Unlocking bootloader- To understand this term, one need to know the meaning of bootloader first. In simple terms, bootloader is like a person which checks many functions at the time of boot. It's on of the most important part and boots the first. Unlocking bootloader means asking that person to give us rights to do some modifications in our device like flashing custom recovery, rom etc.
prdonja said:
How to unlock bootloader ,but the way that I can lock it again
Click to expand...
Click to collapse
ADB

Custom rooted firmware suggestions (Possible fix for my root issues?)

Hello!
Alright I'll keep it simple after I make my point.
I've been having trouble with my rooting (Noob probably?) but even tho root-checker sais that "Root access is properly installed on this device"; there are some things that says it's not... for example while using the "Explorer" or the "Super Manager" it says that "The root function is not supported on my device"... so I'm like "What the ****?... am I or am I not rooted?"... and I can see that there are some settings in which I have not access to edit, a quick example is Renaming system sounds, in order to customize my device I wanted to change the lock and unlock sounds... but it seems that I can't edit those files.
Since Rooting my device seems to not work properly with the original firmware (My device is an ASUS Z00A - 2.20.40.139). I thought that maybe it could be easier just to install a custom firmware into my device that's already rooted and hopefully comes with some cool stuff added.
I've seen a lot of custom versions, but I wanted to ask the experts here which one on your experience is better and why, I don't want to just keep switching OS every now and then... (Hopefully you can leave a small guide on how to install it properly)
Thank you!!!

JTAG G4?

Alright, let me preface this with a few things... I am FAR from new to android, rooting, linux, exploits, or almost anything embedded (UART, JTAG, SPI, I2C, etc...). I am by no means a guru though...
I am attempting to root this device; it is an unlocked LG G4 US Cellular branded, MM 6.0 lgus991 22a rollback 2, and I am so far at a total impasse... I'll explain my situation.
No fastboot.
Bootloader is locked, and I cannot unlock it. If I try and check "Enable oem unlock" it unchecks itself, and reading through the dmesg it references a file stating two errors; one for lack of permissions, and another for no file(same filename though; likely trying to create the file, being denied, then trying to edit a non-existing file). I forget the exact file name but I have the name of it saved somewhere(persis1234 or something like that, I just don't remember the exact path, I can post it later if it makes a difference).
I have had minor success with the dirtycow exploit, but mostly just replacing files and nothing getting anywhere, or the phone quickly reboots if I replace certain system files(ifconfig, toybox, toolbox, etc...) When it works,it says I have root, but it is VERY limited due to selinux, and the context. Also unable to get a root shell open.
Selinux is protected and I haven't been able to find a way to make it permissive as of yet. Past attempts of editing the recovery or init have resulted in "secure boot error 1003"; phone reboots, and then still stock...
If I grenade this thing, I will only slightly give a f**k. I am not above pulling this thing apart and trying to JTAG my way in if I need to, as it is not my only device. Which seems to me to be the only way at the moment aside from finding another kernel exploit like dirtycow or rowhammer... Unless someone else has another idea, but for now I am going to pursue the JTAG route.
Would something that I already own like a buspirate, RPI, or Arduino Mega, be enough or would I need something like a busblaster? I just don't want to spend more than I need to. I'd rather spend the money on a new phone than something like a medusa pro or something like that.
Any help is appreciated
Why not to flash TOT and then proceed with unlock through lg unlock tool? Maybe it fix the fastboot issue.
aanarchyy said:
Alright, let me preface this with a few things... I am FAR from new to android, rooting, linux, exploits, or almost anything embedded (UART, JTAG, SPI, I2C, etc...). I am by no means a guru though...
I am attempting to root this device; it is an unlocked LG G4 US Cellular branded, MM 6.0 lgus991 22a rollback 2, and I am so far at a total impasse... I'll explain my situation.
No fastboot.
Bootloader is locked, and I cannot unlock it. If I try and check "Enable oem unlock" it unchecks itself, and reading through the dmesg it references a file stating two errors; one for lack of permissions, and another for no file(same filename though; likely trying to create the file, being denied, then trying to edit a non-existing file). I forget the exact file name but I have the name of it saved somewhere(persis1234 or something like that, I just don't remember the exact path, I can post it later if it makes a difference).
I have had minor success with the dirtycow exploit, but mostly just replacing files and nothing getting anywhere, or the phone quickly reboots if I replace certain system files(ifconfig, toybox, toolbox, etc...) When it works,it says I have root, but it is VERY limited due to selinux, and the context. Also unable to get a root shell open.
Selinux is protected and I haven't been able to find a way to make it permissive as of yet. Past attempts of editing the recovery or init have resulted in "secure boot error 1003"; phone reboots, and then still stock...
If I grenade this thing, I will only slightly give a f**k. I am not above pulling this thing apart and trying to JTAG my way in if I need to, as it is not my only device. Which seems to me to be the only way at the moment aside from finding another kernel exploit like dirtycow or rowhammer... Unless someone else has another idea, but for now I am going to pursue the JTAG route.
Would something that I already own like a buspirate, RPI, or Arduino Mega, be enough or would I need something like a busblaster? I just don't want to spend more than I need to. I'd rather spend the money on a new phone than something like a medusa pro or something like that.
Any help is appreciated
Click to expand...
Click to collapse
I am new to LG devices so perhaps this is a bit different(had mostly Samsung or HTC). But from what I can find, that won't help unless it's pre-rooted or my bootloader is unlocked. And I am unable to find a pre-rooted TOT. Unless I am just completely missing something here...
I am not trying to go to stock, the device is already stock and functions mostly alright(aside from the inability to add a Verizon APN, so I'm stuck with 3g). But also attempting to have a bit of a failsafe if I wanton flash something I shouldn't have and still have a recovery option. Which is why I brought up the JTAG option, as I'm sure I would use it in more than just this device.
Not sure why you are attempting to reinvent the wheel with a device that has been out for 2 years....
LG devices are very different from Samsung and HTC. You should read up on the LGUP tool to flash .kdz and .tot file to put the device as close to stock as possible before any further attempts.
Could also look at entering hidden menu options via the dialer in order to select/modify apn settings.
TWRPinFish can be found here in the development section. Will likely be your only option if you cannot fully unlock the bootloader.
Since the Tmo and ATT/international versions allowed bootloader unlock, other variants didn't see as much support. Was easy for us... Sorry to say(for you).
Wish ya the best of luck though
Just a quick remark could jtag be used in such a way to make the boolloader thinks it is something else and maybe trick it in to doing something?????
ElfinJNoty said:
Not sure why you are attempting to reinvent the wheel with a device that has been out for 2 years....
LG devices are very different from Samsung and HTC. You should read up on the LGUP tool to flash .kdz and .tot file to put the device as close to stock as possible before any further attempts.
Could also look at entering hidden menu options via the dialer in order to select/modify apn settings.
TWRPinFish can be found here in the development section. Will likely be your only option if you cannot fully unlock the bootloader.
Since the Tmo and ATT/international versions allowed bootloader unlock, other variants didn't see as much support. Was easy for us... Sorry to say(for you).
Wish ya the best of luck though
Click to expand...
Click to collapse
I don't really see this as reinventing the wheel as right now there is no root for this device, I am looking for a way to do it though. Which is why I was asking about JTAG/eMMc programming as a viable option to do this, especially if I may have a few borked flash attempts, it would be a nice fail-safe.
Most dialer codes do not work, and the few that do, pop up a menu saying "This program does not work on your phone"; even though I can see some info behind the toast, I cannot scroll and as soon as I click ok, it closes.
TWRPinFIsH is a no-go, need to be rooted and be able to disable SELinux, neither of which I can do.
The name of the file that stores the "oem unlock" seems to be /dev/block/platform/soc.0/f9824900.sdhci/by-name/persis1234
Would someone that is able to oem unlock be able to tell me what the contents of that file are?
aanarchyy said:
The name of the file that stores the "oem unlock" seems to be /dev/block/platform/soc.0/f9824900.sdhci/by-name/persis1234
Would someone that is able to oem unlock be able to tell me what the contents of that file are?
Click to expand...
Click to collapse
I own a T-Mobile h811
Running ResurrectionRemix Nougat
.../persis1234 not present
I have an LG H812 and I have the same as previous post - the directory is there but no persis1234 file. The directory you are indicating contains a list of the partitions that are present on the phone's internal memory.

Categories

Resources