Murena / Teracube 2e rooting

,

Yes, this is a Super partition device.

Thank you. Please can you give the source of your TWRP.

It’s the latest version directly from TeamWin.

Apparently we need a new ‘fastbootd’, rather than ‘fastboot’, to write to the user-space super-partition containing the system, vendor, recovery, etc. partitions as dynamic logical sub-partitions.

Apparently the phones running Android 11 already have fastbootd on them, running via the fastboot interface. But you need to update the software on your computer to access it properly.

And apparently we can’t flash to the active slot… so if Slot A is active, you have to do: fastboot set_active b, and if Slot B is active, you have to do: fastboot set_active a before flashing anything, then reverse that when you’re done and before you reboot.

If those commands don’t work, try fastboot --set-active=a and fastboot --set-active=b.

So basically, they set one huge partition (which is why these phones seem to take more space than older phones), and the free space within that ‘super partition’ can be dynamically allocated to any of the sub-partitions within the super partition… they did this so each partition didn’t have to allocate free space for future OTA updates… and instead they… allocated free space for future OTA updates in one giant partition. Not quite seeing the point of that.

Negative, you have a dynamic partition; do not worry about A + B slots. It is interesting if official TWRP can now accommodate fastbootd. That is good news; I will check it out.

No, there are still the slots. Before I bricked my phone, it was running on Slot B because it’d already done an OTA update. After I un-bricked it with the latest ROM, it’s running on Slot A because that OTA update was rolled into the ROM I installed.

My main concern now is restoring the blank IMEI numbers. I might have to root it to do that. How do they do it ‘at the factory’? There’s got to be a way of doing it without rooting, otherwise the phones would ship out rooted (which ought to be an option, in my opinion).

Still reading … this is a bit complex … https://source.android.com/devices/tech/ota/virtual_ab … so we have to understand where Teracube fits with this “virtual” model.

… err … I don’t think so !

Or, at the very least (since we’ve got root ADB access), convince app coders not to check for su as their gauge whether the phone is rooted or not; then use root ADB to grant the app the permissions it needs to run. The app would run as though the phone were rooted but without being rooted… for instance, Battery Charge Limit checks for su to check for root, but I can grant all the permissions it needs. If it didn’t check for su, it’d run just fine.

Sorry you completely lost me there – perhaps you are trolling over a different bridge now.

On this phone, ADB can be run as root (it’s in Developer Options), which means we can use ADB to grant permissions to an app. So if an app has all the permissions it needs to run granted to it, it’ll run, as long as it doesn’t search for su (superuser) as a condition of even starting up, as Battery Charge Limit does.

BatteryChargeLimit / app / src / main / java / com / slash / batterychargelimit / activities / MainActivity.kt

// Exit immediately if no root support

        if (!Shell.SU.available()) {

            showNoRootDialog()

            return

        }
adb root

adb shell appops set com.slash.batterychargelimit android.permission.MANAGE_USB allow

adb shell appops set com.slash.batterychargelimit android.permission.BATTERY_STATS allow

You can list all permissions via:
adb shell pm list permissions

To get the permissions for a specific app (in this case, Battery Charge Limit):
adb shell appops get com.slash.batterychargelimit

I would like to install AFwall+ on my new Teracube 2e to block all incoming traffic as a basic security measure. I noticed you mentioned it in this thread, and also that the phone can run apps as root. Is it possible to use AFwall+ on this device without rooting? If so how? If not, what is the best way to get root access?

I do believe AFWall+ still requires root. There are other firewalls that do not require root such as NetGuard and InviZible Pro (among its other networking features).
TrackerControl can act as a simple firewall of sorts since Internet Access can be turned on/off for each app. They use the VPN slot.

I always have to be rooted so my Teracube is. If what you need to do can be done without root then try to go that route.

Oh, missed the part about blocking incoming traffic. Oops. I really don’t know how or if NetGuard or InviZible handles that.

I just posted these instructions on the Teracube community pages a few days ago, following them should get your Murena rooted at the system level (so you can give apps superuser permission) if that’s what you’re after. It uses Magisk, which is 3rd-party (but open source) software.

Let me know if it’s useful, and I may post the instructions here as well, for wider dissemination.

Have you tried changing the code to check for the permissions (and not su presence), recompile and reinstall the app to see if nothing breaks?