GithubHelp home page GithubHelp logo

Segmentation Fault about superuser HOT 16 CLOSED

koush avatar koush commented on July 16, 2024
Segmentation Fault

from superuser.

Comments (16)

koush avatar koush commented on July 16, 2024

hm i have not tested on a nexus one, I suspect it may be an ARM/thumb/neon issue. I'll rebuild as ARM only and send you a binary.

from superuser.

ogr3 avatar ogr3 commented on July 16, 2024

I've ran Superuser succesfully on my HTC Desire (s-off, with Oxygen 2.3.2 ROM), so 'arm-wise' it should run fine on Nexus One. I haven't tried a home-built version, only the one from Google play.

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

@koush Can you see my email? Is the build on http://download.clockworkmod.com/superuser/superuser.zip always the latest one?

@ogr3 I am think its a MIUI thing since not many people have complained about it.

from superuser.

koush avatar koush commented on July 16, 2024

@Sarkie yes, that is always the latest. Can you paste comments relevant to the issue here, versus email?

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

@koush Oh ok, the latest one still blew up. I'm currently doing the printfs.

I meant regarding sending me a different build instead of putting my email on here.

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

It is dying on

dballow = database_check(&ctx);

Line 829 in su.c

Which is calling db.c but I am now too busy to look where in db.c, database_check, I'll look later if you have no idea why/where its dying.

I changed the following switch statement to switch(ALLOW) to allow everything through for now and everything works correctly for my phone now.

Cheers.

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

@koush It is dying on

int ret = sqlite3_open_v2(ctx->user.database_path, &db, SQLITE_OPEN_READONLY, NULL);

in db.c, you are using the latest sqlite I can see, and it works on Desire, so it must be miui? The database file is there and is valid, I adb pull'ed it to make sure. Hmm.

from superuser.

koush avatar koush commented on July 16, 2024

can you check the value of ctx->user.database_path

make sure it is populated, etc.

I assume you're using the sqlite included with Superuser, vs another one? How are you building it? Embedded or standalone app?

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

Yeah I printf'd it, its pointing to the correct place in \data\ I adb'd it to my local drive and opened it up, it was valid, just empty.

Yeah I'm using yours, just going into Superuser and ndk-building it, I think put it inside a update.zip, booting to recovery to install it.

from superuser.

koush avatar koush commented on July 16, 2024

That's weird. I have no idea what could be wrong.

You could try putting an older version of SQLite in I guess? Maybe there's a regression in the lib.

My other thought is that it does not support some CPU instruction generated by the NDK. But the Nexus One is ARMv7 with Neon support.

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

Yeah, that was the plan but I can't figure out where to get an older version of it amalgamated, can you?

Yeah, could be but the HTC Desire is the same CPU, so ogr3's would've died too, I don't know anyone else with a Nexus One to test it.

I was going to try and get ndk-gdb working, to see if I can find where it is actually blowing up. :(

from superuser.

koush avatar koush commented on July 16, 2024

@Sarkie try using android's official sqlite3 instead of the one I packaged. Can grab that off AOSP or CM. I used the official website one, which may be more recent.

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

I've just tried using CM and AOSP (with the one from Gingerbread and still the same, so it might be the ndk compilers? I was going to get an old version and see if it compiles correctly?

Annoying.

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

We have a winner.

Looking at : http://stackoverflow.com/questions/5523067/sqlite-with-android-ndk

He mentioned about the libsqlite.so included, so I'm thinking that the one on my device or the _jni one is bugged or too old and the lib needs to be in the correct directory to be picked up over the one in /system/lib but since its su should it be in /var or /usr somewhere?

I took a different build of miui from miuiandroid.com instead of miui.us and installed over the top of my rom and now Superuser works! :)

from superuser.

koush avatar koush commented on July 16, 2024

Superuser uses a statically linked sqlite, why would the libsqlite.so on device matter?

from superuser.

Sarkie avatar Sarkie commented on July 16, 2024

Ah ok, I haven't got a clue then. I'm guessing my ROM was fubar'ed so installing over the top fixed whatever was corrupted...

from superuser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.