Jump to content

How do I get root when running stock OS/ROM?


Recommended Posts

Hello,

How do I obtain root permissions on my Fxtec Pro1, using only stock OS and no custom recovery?

I saw the "Got my Pro1, any ideas on root access?" thread already.

It doesn't help me because I don't want to flash anything with fastboot until I have backups of my stock recovery and stock android image.

Getting those backups seems to require root access:
https://android.stackexchange.com/a/220324
https://forum.xda-developers.com/t/how-do-i-backup-my-stock-recovery.2798853/post-53770286

In the aforementioned thread, `Linkandzelda` seemed to have similar end-goals to mine. However, they were willing to take more risks than myself, and seemed to get Magisk installed by flashing without first creating backups. And they even lamented, "... It is a shame because I would have liked an unrooted and rooted stock backup for easy restore."

Here's what I've tried so far:

When I use `adb shell` to connect to my Pro1 and try to run `su`, it says "/system/bin/sh: su: not found".

When I connect with adb and try to run `adb root`, it tells me "adbd cannot run as root in production builds".

In one Stack Overflow post, `NgaNguyenDuy` mentions that "In some developer-friendly ROMs you could just enable Root Access in Settings > Developer option > Root access. After that adb root becomes available."
Cool! Surely this very open hacker-friendly phone will have this enabled? Nope. I scanned the developer options carefully, and found nothing like a "Root access" option.

This really seems like something basic that an open phone with support for multiple OSes should be able to do out-of-the-box. I hope there's something I'm missing and it's actually really easy.

So... how do I get root on my Fxtec Pro1?

Edited by Chad Joan
Add `root` tag.
  • Like 1
Link to post
Share on other sites

There are several links to various stock rom packages in this thread:

That thread also has instructions for rooting the stock rom. It will require wiping data.

 

This thread

Has yet-more images, and also instructions to roll back to older releases.

Personally, I recommend rooting, installing all the magisk stuff you want to use, and then testing the ability to upgrade without losing root before you add any other data. You have to be very careful to not modify the system partition to preserve the ability to upgrade.

 

  • Like 1
  • Thanks 1
Link to post
Share on other sites

Thank you for those links and the advice!

I might do that soon.

What operations would modify the system partition?

For clarity's sake, here's how I understood it: It's fine to modify the system partition when done with the intent to restore stock images or perform updates, but if anything like magisk/root ends up relying on something that's stored on the system partition, then an OTA update could wipe out that stored something and disable magisk/root/whatever. Please correct me if I misunderstood.

(Even if I understood correctly, I still don't know what kind of activities/procedures might modify the system partition.)

In the second link I saw this in the list of fastboot commands:

Quote

fastboot flash system_a system.img
fastboot flash system_b system.img

... and I'm wondering, is that the system partition?
(Or system partitions, but just as A/B slots for the sake of release engineering.)

Link to post
Share on other sites
On 4/2/2021 at 2:57 PM, Chad Joan said:

What operations would modify the system partition?

Any root-using software could do it. I hit it using AdAway before I found the Magisk and AdAway option to configure "systemless" mode for both. Some apps or plugins/whatever might have a "systemless" option that prevents modifying the system partition.  Check docs, but the best way to know is to test. 😉

The way it works is that an incoming OTA update checks the signature of the filesystem before proceeding, and if it's different at *all*, it can't be applied. OTA updates are basically a binary diff of the whole disk, so any difference from what it expects could result in a completely bricked phone.

 

Yes, that is the system partitions. I assume that was in the thread about returning to stock. In theory if you have the system image for your current state, you could use that type of flash to allow an OTA update to proceed, and wouldn't lose data (but would lose any modifications to the system partition, of course).

  • Like 1
Link to post
Share on other sites
2 hours ago, Laska said:

But there is a disk encryption and if you flash fresh system partition it asks for password. In my case no password work. I don't know why...

Did you wipe userdata?  And did you flash both the a and b partitions.  I did hit that wanting a password problem once but it has been so long I don't remember the solution, but i think either erasing userdata or flashing both partitions (or both) saved the day.

Link to post
Share on other sites
1 hour ago, Hook said:

Did you wipe userdata?  And did you flash both the a and b partitions.  I did hit that wanting a password problem once but it has been so long I don't remember the solution, but i think either erasing userdata or flashing both partitions (or both) saved the day.

Thanks, but the most important thin is I don't want to erase data for the second time. The strange thing is that no password known to me was working to unlock it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms