yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] rmk40:
Anyone following the RUU threads already knows about this and it's starting to get more attention now. The latest official build of Superuser does not work with newer Sense ROMs (such as Vision 1.72+, anything released recently). HTC has started utilizing a relatively new feature of sqlite; a journaling mode called WAL (write-ahead logging). It's actually smart. WAL journaling should improve sqlite throughput, which represents a large amount of Android's IO and benefits applications across the board. The downside is it broke Superuser because it's actually special in its' use of sqlite.

WAL journaling, as built with these new Sense ROMs, is using exclusive locking. Why is this important for Superuser? It's the one situation where you have an application running within Android's process space and one outside of it, both accessing the same sqlite database. When su runs, it opens the sqlite database to check whether you have allowed access for said command to run. If not, a call is made to the Android application, which fires up and prompts you for an answer. Problem is, su has the database open with an exclusive lock (i.e. nothing else can touch it), so Superuser (the Android app) fails to open the database and cannot run. It'll either force close or do nothing.

To fix this, I have modified Superuser and su. Both changes have been submitted to ChainsDD for review. You can look at his git repository's pull requests to see the changes I'm proposing. I'm basically changing the journal mode being used by su one that is non-exclusive and Superuser to close its' database when sitting idle. I couldn't change Superuser's journal mode no matter what I did; it seems to be set deeper in the stack than I can access.

Here are the links to my pull requests on Github if you want to review the code:

https://github.com/ChainsDD/android_packages_apps_Superuser/pull/14

https://github.com/ChainsDD/android_system_extras/pull/1

Anyway, the end result is I have a working Superuser. Here are the caveats:

This is not an official build, so it's signed with my key, not ChainsDD. He has merged my patches into his Github repository so they should be making their way into a release soon.

I've artificially incremented the version number to 9.9.9, to make sure if you install my version, it'll "win" over any other installed version. Also, this prevents the Market from nagging you for updates.

I don't recommend using this version unless you must. In other words, you are on one of the Sense ROMs which is broken. Use an official build otherwise.

If you ran the RUU and have trashed your custom recovery (Clockwork), this isn't going to help you root the device again. Superuser is a tool for managing root access, not obtaining it.

If you are running Virtuous, you DO NOT need this.

Download Patched Superuser Flashable Zip​
[G2 and Desire Z Android Development] chchia:
great work rmk! but i still prefer to stick with your virtuous.
[G2 and Desire Z Android Development] tbalden:
I'm trying to work around the no root available for 1.72 problem with my stock HTC Z rom updated to 1.72 OTA, but with Rage method temp-root I'm stuck with a frozen terminal after the 'Force Close' step, starting the terminal the 3rd time in the process. I've replaced the gfree_temp_root package's su file with the one provided here, used the APK provided here (pre-installed the apk too before the attempt). It's unfortunately stuck with a frozen black terminal window. Probably the Rage thingy doesn't work with the new 1.72 update, or am I using these files correctly at all?

(guide http://xdaforums.com/wiki/index.php...cess_.28Permanent_Root_.2F_.22Permaroot.22.29 )
[G2 and Desire Z Android Development] rmk40:
ChainsDD merged my patches into his repositories today so they should make it into an official release soon.
[G2 and Desire Z Android Development] ~~Tito~~:
Nice! Is ChainsDD going to be changing Journal Mode himself?
[G2 and Desire Z Android Development] afrcom15:
thanks for this, confirmed working on DHD.
[G2 and Desire Z Android Development] Dacoco:
Just for a correct understanding:

I need to have root like described here to use SU right?

Or is it now possible to get the new Update via OTA and get root with this method and its a solution for rooting 1.72?

Thanks!
[G2 and Desire Z Android Development] steviewevie:
That's a DHD thread and this is the DZ/G2 forum. So you're either in the wrong forum, or looking at the wrong procedure (which could brick your phone).
[G2 and Desire Z Android Development] MacaronyMax:
Soo.... Us stock 1.72 people can root?? :D :p
[G2 and Desire Z Android Development] steviewevie:
There has been more than one report that rage doesn't work either, on the 1.72 ROMs.

Also, there's the issue of S-OFF that needs addressing, whether that can be re-done at 1.72.
[G2 and Desire Z Android Development] denich:
I dont understand, or I miss some information. The 1,72 ROM is not patched yet (or what?).. Then. If I install 1,72 I will loose root. So in what cases I will need this patch?
[G2 and Desire Z Android Development] steviewevie:
Check this thread - http://xdaforums.com/showthread.php?t=886023

The patched su/Superuser is just part of the solution.
[G2 and Desire Z Android Development] Dacoco:
Oh! You're right. I just followed some links. Okay thanks.
[G2 and Desire Z Android Development] denich:
According to this- there is now root method to 1.72.. I don't understand, why this patch is needed if rooting 1,72 is not availeble?
[G2 and Desire Z Android Development] b1oh4zard:
Cause the Virtuous 0.8.X is build from the Egypt 1.72.X Release, if I understood it right ;)
[G2 and Desire Z Android Development] DanWilson:
Is the Egypt RUU rootable?

That could solve our problems!
[G2 and Desire Z Android Development] seo:
&partialy working for me.. still creating read-only -wal and -shm files

here is an another solution: http://saraev.ca/su/

it is modified to "chmod" own databases - have a look at README file included

don't forget to grant permissions to superuser itself ;)

EDIT: this is a dirty workaround, I hope someone can make it better...
[G2 and Desire Z Android Development] rmk40:
The one in your link is a dirty workaround for sure, it modifies baksmali code. Mine is working as intended. The wal and shm files are only present when you're actually sitting in the Superuser app. I'll modify the code some more to close the DB anytime it's not being read or written from. As it stands it's already rare to trigger a case where a request would fail.
[G2 and Desire Z Android Development] seo:
yeah i know that.. :):)
[G2 and Desire Z Android Development] gominolo2002:
Hi,

This patch works only on Desire Z or I can install in my Desire HD?

Regards,
[G2 and Desire Z Android Development] rmk40:
It'll work for any ROM actually.
[G2 and Desire Z Android Development] gominolo2002:
Ok, I will testing ;)

Thank U! ;)
[G2 and Desire Z Android Development] steviewevie:
Not as I understand it, it has the same issues as the other 1.72 ROMs.
[G2 and Desire Z Android Development] hamdir:
does WAL require the supplied kernel? I'm mean does it need to be integrated in custom kernels
[G2 and Desire Z Android Development] vkennedy:
"If you ran the RUU and have trashed your custom recovery (Clockwork), this isn't going to help you root the device again. Superuser is a tool for managing root access, not obtaining it."

OK, like and idiot I ran the RUU and cannot get into recovery.

How do I unscrew myself?

Thanks in advance,

Vince
[G2 and Desire Z Android Development] lovelldr:
Hi.

I ran the ota update, which obviously broke the previous su/superuser, but from what I gather, I should still have root?! But it just can't be managed?!

I hadn't previously put clockwork mod on, and I don't think I am s-off (is there any way to check?!)

Anyway, what I was wanting to do was to get SU back, so I could at least backup my apps. Currently, wireless is b0rked because of the update... So, I was wanting to make a backup of my data, and (if possible, although don't think it is), revert back to a previous rom release...

Am I able to do this at all? This is a zip, which I guess requires clockwork to run?!

Any info greatly appreciated...

Or, is there any way of getting all the data from my apps backed up?! I had previously been using MyBackup Pro, which requires root to get the data for all my apps. Can this be done without root at all? At least I can then reflash and get wifi working!!!
[G2 and Desire Z Android Development] afrcom15:
No, the OTA would have broken root

You'd know if you had S-OFF because you would have had to do it to your phone in the first place surely! :confused:

Anyway, if you didn't have

radio S-OFF

prior to installing the update then you are fooked until the devs figure it out
[G2 and Desire Z Android Development] lovelldr:
Thing is, so many things have happened since then, I can't remember whether I s-off'd or not... So that's why I said I can't remember... :p
[G2 and Desire Z Android Development] keinengel:
You can check if you're S-OFF by powering off your phone and going into hboot by holding down Volume down and Power. Or connect it to your PC and use adb reboot bootloader
[G2 and Desire Z Android Development] lovelldr:
lol, guess I must not have s-off'ed then, as when pressing vol down and powering on, I get:

VISION PVT SHIP S-ON
HBOOT-0.85.0008
MICROP-0425
RADIO-26.04.02.17_M2
eMMC-boot
Nov 17 2010,21:21:39

Looks like I'm buggered then until someone can give us root :p
[G2 and Desire Z Android Development] steviewevie:
So did it flash ok ? When you try to boot into recovery, does it come up with a screen with a red triangle and exclamation mark ? If so, then just press Volume Up and Power and it will go into the stock recovery screen. But that won't help you root the device. Flashing the whole RUU of 1.72 will have flashed stock recovery.
[G2 and Desire Z Android Development] ygwd111:
hmm，my question is how to flash this zip file?:o

i'm a newer :D
[G2 and Desire Z Android Development] ygwd111:
Is this patch flashed in recovery?

help me,thanks~~
[G2 and Desire Z Android Development] Yoshi_523:
^^yes first copy the patch zip file to your SDCard yes once you've got eng s-off and installed ClockworkMod recovery as in this link http://xdaforums.com/showthread.php?t=841076 then you enter your bootloader (power off device, hold down the volume down button while tapping the power button once) enter hboot, enter recovery, choose install zip file, choose install from and select the file from the sdcard.

It works if you can now run terminal emulator on your device and type su and it says super user access granted.
[G2 and Desire Z Android Development] Yoshi_523:
Can someone please help... I have a Desire HD and have followed the root procedures including installing clockwork recovery and eng s-off as in this guide here http://xdaforums.com/showthread.php?t=841076. After installing the lastest LeeDrOiD version 1.3a which uses the core 1.72.x.x sense ROM I had no super user access. I then downloaded and ran the super user patch from this forum thread. When I type SU in teminal emulater it now says superuser granted. I run superuser app and it only has terminal emulator in there. When I run Astro File manager or AndroZip file manager I cannot remove system files any more because it says system access not grated (or something similar). Now when I had just the older 1.32.x.x Stock Sense ROM rooted I could delete system files. What I am specifically talking about is using Astro file manager and navigating to "system/apps" and being able to delete annoying, useless, abuse of social network apps like crackbook, twitter, ect, ect.

In short it although it appears like this patch gives me superuser access back it really seems to not give superuser access to my apps which is what I need. How do I fix that?
[G2 and Desire Z Android Development] steviewevie:
This is the Vision forum (Desire Z/G2), sorry but we don't have the DHD here, is there not a thread on this in the DHD forum ? If not, you could start one.
[G2 and Desire Z Android Development] madindehead:
This Superuser is fantastic ^^ Thank you very much :)
[G2 and Desire Z Android Development] Yoshi_523:
Ok just to update on that... I found out that I installed 1.72.405.3 version of HTC's ROM inbuilt into LeeDrOiD 1.3 custom ROM. I did have root access, h-boot Eng S-Off but not Radio S-Off. Obviously this means I've ****ed myself over without knowing it. Previously I was able to run Visionary+ with the option grant System R/W and then could enter the /system/app folder and delete whatever system apps I wanted. Now it doesn't matter what I do, even using the root access patch here and using root explorer it still will not let me mount the system folder to get R/W access. Is there any way anyone with can get full access to delete system apps after loading 1.72.405.3 with Radio S-On? Terminal Emulator grants me SU access but still not dice on letting me delete the .apk files. Anyone know if it can be done with adb commands mounting the drive in Windows? If I can't figure it out soon I will just use Root Manager <--edit.. sorry that was a mistake I mean the windows based app ROM Cleaner 0.8. Anyway I've now solved the issue so no flashing needed :)) to delete the system apps from the LeeDrOiD ROM and reflash however I will loose so much time in having to re-enter all the data and reinstall everything for the upteenth time.... I really want to avoid.

As with others here who've loaded the 1.72.405.3 patch/ROM I've tried to load Radio S-Off after doing this and it won't give me Radio S-Off super CID. Damn! :mad:

If I didn't say so already the this rmk40 super user patch does say super user access granted when an app calls for it however no R/W access of the system folder and no ability to Run Visionary+ properly or run Radio S-Off patch successfully which leads me to believe this is only a pseudo super user patch.
[G2 and Desire Z Android Development] afrcom15:
1.more **** highlighted.

2.root manger needs root, which you say you do not have.
[G2 and Desire Z Android Development] Yoshi_523:
Ok I've had success against the tricky bastard 1.72.405.3 with crippled root access. After lots of messing I've found out how to remove the system apps that this version this latest version of the ROM has locked out R/W access to. I had to have the Android SDK installed with USB drivers. I then in windows I opened up command prompt and using the good old dos commands like "cd\program files (x64)" I go to my android sdk folder platform-tools. Once in the platform-tools let the foreign Unix commands begin ;)

Without the exclamation marks type I type "adb remount shell"

Then "adb shell rm /system/app/Facebook.apk"

Now Facebook.apk being an example of the app you want to delete. I use a file browser such as Astro on my phone to go the the /system/app folder and easily look around and get the file names of the apps I want to delete. An important thing to remember for all the other's unfamiliar with Unix commands like myself, this ain't DOS. Unlike DOS, files and commands are case sensitive so if you try to delete the Facebook app and type it in "facebook.apk" all lower case it won't delete. Make note of any letters uppercase or lowercase in the folder name and file and type it in correctly in the Unix commands or they won't work.

The other two important things to note before you go on a Spring cleaning, delete frenzy (like I will be after I finish typing this up :p) is: 1) If you delete some certain system apps (for example TelephonyProvider.apk) Android will **** itself and after booting enter a loop where you can't access anything & you can't stop it complaining about blah blah app failed. So make sure you have on your microSD card either a Nandroid backup done recently using the Backp/Restore function under the Bootloader installed with Clockwork Recovery or a working ROM that you've tried and know works such as the stock ROM or a custom ROM from LeeDrOiD, Cyanogen, ect. If you get into one of those non recoverable loops you'll need to flash the ROM and of course loose any data and apps not backed up. Okay this brings me to my next point if you want to copy any of the system apps off to your microSD card either to backup or just if you're not 100% sure if you may want to install it again later then in command prompt type this:

"adb shell cp /system/app/Calculator.apk /sdcard/"

Obviously here Calculator.apk is the app we are copying but you can choose any app to copy.

Stick it to tha man and have fun cleaning up your ROM and deleting all that crap bloatware your service provider and HTC don't wanna give you access to and now without the cripple of HTC update 1.72.405.3 stopping you! :)
[G2 and Desire Z Android Development] Yoshi_523:
Sorry my bad I mean ROM Cleaner 0.8 not ROM Manager. I have been saying that trying to mount the system folder as R/W in Root Explorer doesn't work as the super user access is granted but doesn't actually work and let me delete system files using the patch from this thread after flashing LeeDrOiD 1.3 (wich contains 1.72.405.3) with Radio S-On. Also Visionary using the option selected to load system as R/W doesn't let me delete system files in just a standard file manager like Astro or AndroZip as it did before installing LeeDrOiD 1.3 (1.72.405.3).

ROM Cleaner 0.8 is the Windows based software wich is just an easy way to remove system apps from a .zip ROM file without having to open the .zip yourself and delete all the .apks manually.

Anyway I've solved the issue now as documented in my last post above so no worries. ;) Looks like I shouldn't have to lose all my data and everything. :) Nice one bruvva! :D
[G2 and Desire Z Android Development] afrcom15:
I'm pretty sure that you've lost all your 'data' the day you were concieved
[G2 and Desire Z Android Development] snooffy:
Thanks!

It worked on my DHD 1.72... as well:D cool!
[G2 and Desire Z Android Development] CodeJACK:
Worked for me also :-)

I had to clear cache for superuser but once that was done, all my apps now request root and then i grant it. Great, thanks.

Only issue I have is with Rom Manager. Rom Manager runs but I cant select OK at first pop up screen. So this app does not recognise the root?
[G2 and Desire Z Android Development] copenhagen:
I have been plaqued with su root permission problems for a few weeks now..

this thread was brought to my attention from a user of my build.

the problems we were having was com.noshufou.android.su would fc any time an app would request su access. (well.. not the first time an app would call for it, but subsequest request would throw a fc) either way. your modified su has correct our problem. So I'm afraid we were suffering from the same problems you outline in your first post... however non - sense based rom tho.. we too are effected.

The fix for us was the same (however my approached was slightly different)

we used your com.noshufou.android.su.apk renamed to Superuser.apk and placed in our system.ext2 /system/app folder.

left our current 74kb /system/xbin/su alone, and replaced our /system/bin/su with your modified ~26kb? su binary. Fixed. Done and Done.

I'm going to throw a thanks and a link to your thread on the builds first post.

Once again.. there a quite a few people that owe fixed root access to your work here. We collectively thank you.

-cope
[G2 and Desire Z Android Development] speculatrix:
is it possible for the wiki to be updated with this new information?

http://wiki.cyanogenmod.com/index.php?title=HTC_Desire_Z:_Rooting

I just got a brand new off-contract Desire Z, and during the initial excitement of getting started I let it update to 1.72 (I don't know what version it had been to be honest), and I have a genuine need to root it, but I am nervous about needing to downgrade then root then re-upgrade it etc, so a simple guide would be welcome.

I did get a patched superuser and follow the wiki's section on gaining temporary root access without any luck. Quite likely I am being too cautious!

Meanwhile thanks to all those who've put in so much work!
[G2 and Desire Z Android Development] MrEzzzkiel:
I updated my ROM using Football's RUU-ROM and my Superuser fc'd all the time... Downloaded this, installed via recovery and now it's all good again! Thank you for this awesome fix!

Desire Z - with XDA Premium
[G2 and Desire Z Android Development] madindehead:
Just to check, has this all be uploaded to ChainsDD's git hub? If so, will he be incorporating it into v3? Has someone been able to ask him. Would be nice to have an "official" Superuser again instead of the hacked one (not that the hacked one isn't good).
[G2 and Desire Z Android Development] rmk40:
I committed the change and he pulled them into his repo. I'd also traded a few emails with him about this. I'll check with him again and see if we can get an official release sometime soon.
[G2 and Desire Z Android Development] Chopes:
This worked perfectly for me, thank you for support :)
[G2 and Desire Z Android Development] dsixda:
Thanks dude, I've included your patch in the Android Kitchen (well, until ChainsDD has his new version out). Great work!!
[G2 and Desire Z Android Development] marleyb:
Will you update your patched version to the latest build of su? Your patched version is based on 1.0 if I read correct

thx and regards
[G2 and Desire Z Android Development] marleyb:
that was in december, we are in march now, and as far I can tell the market version still does not run on 1.72 sense based roms :confused:
[G2 and Desire Z Android Development] infamousxsniper:
Do we flash this or what?
[G2 and Desire Z Android Development] Spaniard85:
Yes, flash from recovery.

Working great for me so far on my Thunderbolt.
[G2 and Desire Z Android Development] prscott1:
Hi - I just rooted my TBolt and have the same problem mentioned above and need to flash this but I can't install the tbolt recovery without it. Is there another way to install?

Edit: never mind - I just pulled the apk and the su from the zip and pushed / installed from adb. Thanks for this!! Worked like a charm.
[G2 and Desire Z Android Development] :
Informative read. Thanks! Also, I like your open source attitude. Viva la revolution!
[G2 and Desire Z Android Development] rabnud:
I just rooted my TB and am getting the "not rooted" error and I can't boot into recovery with Rom Manager/clockwork mod. I'm failing at using ADB pretty terribly, I've read and read and read, yet when I try to install the apk, adb shell won't let me run it. My head hurts now!
[G2 and Desire Z Android Development] eginu:
good work.
[Android Apps and Games] closedchannel:
so i hear a lot of people talking about Root Explorer in different "how to's" and i really didnt want to pay 4 bucks for it so after searching the market i found super manager which has similar features but its free and just wanted to know what other people thought. Is root explorer better? if so how? or is there another app out there better than both of them. so far ive used super manager to remove some bloat ware from my droid 2, no more blockbuster app for me. thoughts?
[Android Apps and Games] rohitece06:
I use super manager and love it and its free so cant complain. only thing is you cant open non standard text files to edit like build.prop

rest is great
[Android Apps and Games] lexluthor:
On my droid x, super manger is running as a service using 21mb, no thanks. Uninstalled. Is there a way to fully disable the task manager and run it on demand only?
[Android Apps and Games] xyellx:
using estrongs file explorer works well.
[Android Apps and Games] lexluthor:
Really? How do you enable root functions for stock roms?
[Android Apps and Games] d0nald01:
go to bottom of settings and check both root permissions
[Android Apps and Games] lexluthor:
Yes, but, at least on my version of estrong, it says it's experimental, says it only works with 2 specific ROMS and then asks which one I'm using. I'm using neither of those.

Are you saying it'll still work on my Droid X, running stock/rooted?
[Android Apps and Games] STxza:
I use Android Mate instead of Root Explorer and it's great.