Git Product home page Git Product logo

superuser's Introduction

This is the Superuser.apk for Android

Any app that requires root access must call the su binary which in turn calls this app to prompt the user for permission. This app is also used to manage which apps have root permission as well as monitor their usage of the permission.

Please note that the 'master-dev' branch is a working branch. Code contained in that branch should be considered 'pre-alpha'. Many features are missing and there are many bugs. Compile and use at your own risk.

superuser's People

Contributors

blunden avatar chainsdd avatar dreamcwli avatar elegos avatar eug89 avatar gavchap avatar hyperb1iss avatar kevinslashslash avatar kmobs avatar koush avatar mongoosehelix avatar nomego avatar pawitp avatar redvirus avatar rmk40 avatar rubemlrm avatar sebva avatar takuo avatar thiasb avatar tprochazka avatar velazcod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superuser's Issues

Quiet (BFU) mode in Settings

Would be great to have options to enable quiet mode which will don't open confirmation dialog and will automatically denied all not explicitly permitted application to get root rights.

Installation Failiure

Hey.
I tried to install Superuser 2.3 onto my Samsung Galaxy Portal/Spica/Lite with Android 2.1. When flashing via recovery I got the following error message.
Installing Files
Deleting Files
Copying Files
E: Error in fixsuperm
(Status 65280)
E: Failure at line 8:
run_program PACKAGE:fixsuperm
Installation aborted.

Any idea why?

Please sign, fetch or otherwise securely transfer update su binaries

It seems that at the present time the updater service found in su.apk fetches new su binaries over http and checks that the md5sum of the downloaded binary matches that defined in the json descriptor. [0]
I would like to suggest that future upgrades hashsums are distributed through su.apk via updating su.apk in the android market (and or the binary as well) which can be used to verify a su binary is legit.

[0] https://github.com/ChainsDD/Superuser/blob/master/src/com/noshufou/android/su/service/UpdaterService.java

Superuser don't keep track of permissions

Hi,
I'm experiencing an issue with superuser: every time it asks for some permissions I grant it but the permission is not stored and every time I have to re-enter it.
I tried to wipe dalvik-cache and reinstall the app with no changes.

Can someone give me some hints?

Many thanks.

log shows this:
V/WindowManager( 2250): Dsptch 1 x86.0 y627.0 > Window{482a0e20 com.noshufou.android.su/com.noshufou.android.su.SuRequest paused=false}
E/Database( 2984): Error inserting package=com.noshufou.android.su uid=10079 exec_uid=0 allow=1 name=Superuser exec_cmd=/system/bin/sh
E/Database( 2984): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
E/Database( 2984): at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
E/Database( 2984): at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:66)
E/Database( 2984): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1522)
E/Database( 2984): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1382)
E/Database( 2984): at com.noshufou.android.su.DBHelper.insert(DBHelper.java:87)
E/Database( 2984): at com.noshufou.android.su.SuRequest.onClick(SuRequest.java:109)
E/Database( 2984): at android.view.View.performClick(View.java:2417)
E/Database( 2984): at android.view.View.onTouchEvent(View.java:4232)
E/Database( 2984): at android.widget.TextView.onTouchEvent(TextView.java:6583)
E/Database( 2984): at android.view.View.dispatchTouchEvent(View.java:3762)
E/Database( 2984): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/Database( 2984): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/Database( 2984): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/Database( 2984): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/Database( 2984): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1713)
E/Database( 2984): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1131)
E/Database( 2984): at android.app.Activity.dispatchTouchEvent(Activity.java:2070)
E/Database( 2984): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1697)
E/Database( 2984): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
E/Database( 2984): at android.os.Handler.dispatchMessage(Handler.java:99)
E/Database( 2984): at android.os.Looper.loop(Looper.java:123)
E/Database( 2984): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/Database( 2984): at java.lang.reflect.Method.invokeNative(Native Method)
E/Database( 2984): at java.lang.reflect.Method.invoke(Method.java:521)
E/Database( 2984): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
E/Database( 2984): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
E/Database( 2984): at dalvik.system.NativeStart.main(Native Method)
D/SuRequest( 2984): Sending result: ALLOW for UID: 10079
D/su ( 3012): 10079 com.noshufou.android.su executing 0 /system/bin/sh

Only works when adb is enabled

I am running CyanogenMod 7 on an HTC G2. When adb over USB is enabled in Settings/Applications/Development, superuser works just fine. However, when adb is disabled there is trouble.

When Root Explorer is run, I get the popup "Root Explorer has been granted superuser permissions" but then after a couple of seconds I get "Root Explorer hos not yet managed to get root access" and the app exits.

From Android Terminal, when I run su (actually, I set the shell to be "/system/xbin/su root -c bash") the command just hangs until I press ctrl-C. After pressing ctrl-C, I am dropped to the root shell. Running "ps fauxww" from Debian chroot, I see that su is apparently stuck when running "am broadcast". I'll attach the logs and ps results.

Force Closes

Running CM passion nightly build 08102010
Flashed SU 2.3 I get FCs when I open SU 2.3, go into log and settings. All previous permissions were retained.

Please pull in changes from CM

Could you pull in the changes from CM9 to su/Superuser? This is the code we use to have some framework control over su access.

NullPointerException

Just did repo sync on CyanogenMod, built and flashed on N1. Superuser FC'd on me when pressing Home button when inside the app. Log below.

E/AndroidRuntime( 1135): FATAL EXCEPTION: main
E/AndroidRuntime( 1135): java.lang.RuntimeException: Unable to pause activity {com.noshufou.android.su/com.noshufou.android.su.Su}: java.lang.RuntimeException: Unable to pause activity {com.noshufou.android.su/com.noshufou.android.su.LogActivity}: java.lang.NullPointerException
E/AndroidRuntime( 1135): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3348)
E/AndroidRuntime( 1135): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3305)
E/AndroidRuntime( 1135): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3288)
E/AndroidRuntime( 1135): at android.app.ActivityThread.access$2500(ActivityThread.java:125)
E/AndroidRuntime( 1135): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2040)
E/AndroidRuntime( 1135): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1135): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1135): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 1135): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1135): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1135): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 1135): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 1135): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1135): Caused by: java.lang.RuntimeException: Unable to pause activity {com.noshufou.android.su/com.noshufou.android.su.LogActivity}: java.lang.NullPointerException
E/AndroidRuntime( 1135): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3348)
E/AndroidRuntime( 1135): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3305)
E/AndroidRuntime( 1135): at android.app.LocalActivityManager.performPause(LocalActivityManager.java:200)
E/AndroidRuntime( 1135): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:184)
E/AndroidRuntime( 1135): at android.app.LocalActivityManager.dispatchPause(LocalActivityManager.java:547)
E/AndroidRuntime( 1135): at android.app.ActivityGroup.onPause(ActivityGroup.java:73)
E/AndroidRuntime( 1135): at android.app.Activity.performPause(Activity.java:3842)
E/AndroidRuntime( 1135): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1190)
E/AndroidRuntime( 1135): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3335)
E/AndroidRuntime( 1135): ... 12 more
E/AndroidRuntime( 1135): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 1135): at com.noshufou.android.su.PinnedHeaderListView.configureHeaderView(PinnedHeaderListView.java:153)
E/AndroidRuntime( 1135): at com.noshufou.android.su.LogActivity$LogAdapter.onScroll(LogActivity.java:230)
E/AndroidRuntime( 1135): at android.widget.AbsListView.invokeOnItemScrollListener(AbsListView.java:675)
E/AndroidRuntime( 1135): at android.widget.ListView.layoutChildren(ListView.java:1489)
E/AndroidRuntime( 1135): at android.widget.AbsListView.onLayout(AbsListView.java:1147)
E/AndroidRuntime( 1135): at com.noshufou.android.su.PinnedHeaderListView.onLayout(PinnedHeaderListView.java:123)
E/AndroidRuntime( 1135): at android.widget.AdapterView.updateEmptyStatus(AdapterView.java:724)
E/AndroidRuntime( 1135): at android.widget.AdapterView.checkFocus(AdapterView.java:697)
E/AndroidRuntime( 1135): at android.widget.AdapterView$AdapterDataSetObserver.onInvalidated(AdapterView.java:813)
E/AndroidRuntime( 1135): at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:43)
E/AndroidRuntime( 1135): at android.widget.BaseAdapter.notifyDataSetInvalidated(BaseAdapter.java:54)
E/AndroidRuntime( 1135): at android.widget.CursorAdapter$MyDataSetObserver.onInvalidated(CursorAdapter.java:391)
E/AndroidRuntime( 1135): at android.database.DataSetObservable.notifyInvalidated(DataSetObservable.java:43)
E/AndroidRuntime( 1135): at android.database.AbstractCursor.deactivateInternal(AbstractCursor.java:89)
E/AndroidRuntime( 1135): at android.database.AbstractCursor.close(AbstractCursor.java:108)
E/AndroidRuntime( 1135): at android.database.sqlite.SQLiteCursor.close(SQLiteCursor.java:500)
E/AndroidRuntime( 1135): at com.noshufou.android.su.LogActivity.onPause(LogActivity.java:46)
E/AndroidRuntime( 1135): at android.app.Activity.performPause(Activity.java:3842)
E/AndroidRuntime( 1135): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1190)
E/AndroidRuntime( 1135): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3335)
E/AndroidRuntime( 1135): ... 20 more
W/ActivityManager( 115): Activity pause timeout for HistoryRecord{446594d0 com.noshufou.android.su/.Su}

How to import annotations.jar in Superuser aosp built?

I am building Superuser master branch on an aosp-4.0.4 for pandaboard. I:

  1. fetched your repo in packages/apps,
  2. issue 'mm' in 'packages/apps/Superuser'
    I face following issue:
    http://pastebin.com/50vGLhH1

I read that I have to embed annotations.jar in app's dependencies. I kinda of know how to do that with eclipse, but not with aosp source code. Anyone does?

clockwork rom manager

Intermittantly does not grant SU pivilage to rom manager (no SU granted message).

running Oxygen 0.2.2 rom, s-off, n-1 table

Applications cannot get root access on GNext 4.2

Hello,

After the update to 4.2 on my GNext the GUI applications (superuser itself for example) cannot get root access. Running su in CLI is working but doesn't trigger any confirmations

The logs are showing me:

W/ActivityManager( 385): Permission Denial: broadcast asks to run as
user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
I/AndroidRuntime(18314): VM exiting with result code 1.
W/su (18245): request rejected (10058->0 /system/bin/sh)

The only reference I've found is this bug: https://code.google.com/p/android/issues/detail?id=39801

Rename su binary to fool Google's Android Market

As is known, Google is blocking Android Market videos on rooted devices by checking for any files named 'su'. A workaround exists, but using it requires one to effectively unroot their device by renaming su to another name. Is it possible to for SuperUser to be able to use a different name for it's 'su' binary and call that each time SuperUser needs to?

please fix chinese %s bug

in res/values-zh-rTW/strings.xml

please change the following % to %, these % are all in 2 bytes, change them to 1 byte.

  <string name="log_count">顯示%d個項目</string>
  <string name="notification_text_allow">%s 已被授予超級用戶權限</string>
  <string name="notification_text_deny">%s 已被拒絕超級用戶權限</string>

(% = 2 bytes, % = 1 byte)

Doesn't remember allowed apps on Galaxy Tab 10.1

Superuser prompt pops up every time on stock GT 10.1 and ignores "remember" checkbox.

From the logcat:
E/su (4917) sudb - Opening database
E/ (4917): Couldn't open database: database is locked
E/su (4917): sudb - Could not open database, prompt user.

can't update su binary on JB 4.1.1

Hi,

i'm running JB 4.1.1 (locked bootloader, always saved a backup copy of the su binary). su binary version is 3.0.3.2. I have some problems with the access granting lately: already added apps worked perfectly, but i cannot add new ones. I accidentally wiped all superusers data, and learned just afterwards that an update of the su binary should fix that problem.

But now, as there are no apps (that includes superuser itself) are listed as 'granted' and i can't add apps manually (can i?) i'm stuck :( Trying to update the su binary, results in 'Erlange root rechte.. Fehlschlag' (sth like getting root permission.. failed). I bet if the superuser app would be listed as 'root permission granted' the update would work. Is it possible to add the app manually?

[I'm currently on vacation and have limited access to the internet. So don't expect answers from me timely. Sorry.]

App name format issue in Traditional Chinese resource

When set to Traditional Chinese, the notification text when an app asked for root permission, shows "%s 已被授予超級用戶權限", the "%s" is not formatted into the actual app name because the unicode character "%" won't be recognized to be a string format.

I reviewed the resource file : res/values-zh-rTW/strings.xml , there are 3 in"%" existed, i suggest this patch:

--- strings.orig.xml    2012-01-08 17:17:03.355563806 +0800
+++ strings.xml 2012-01-08 17:19:31.021993707 +0800
@@ -38,7 +38,7 @@
   <string name="toggled">已切換</string>
   <string name="empty_apps">在清單中沒有應用程式</string>
   <string name="empty_logs">沒有記錄資訊</string>
-  <string name="log_count">顯示%d個項目</string>
+  <string name="log_count">顯示%d個項目</string>
   <string name="detail_package">包封</string>
   <string name="detail_app_uid">應用程序的UID</string>
   <string name="detail_request">請求的 UID</string>
@@ -151,8 +151,8 @@
   <string name="updater_bad_install_location">su 二進位目前安裝於 /sbin 中。此更新程式無法對其進行更新。請尋找適用於您裝置的新的 ROM。</string>
   <string name="updater_bad_install_location_explained">This updater is incapable of updating your su binary since it is installed in /sbin. This is not an error in the updater, it is an error on the behalf of your ROM or kernel developer. You can continue to use Superuser with your outdated binary.</string>
   <string name="updater_failed_remount">This updater cannot update the su binary on phones that have some kind of write protection on the system partition like S-ON. You can continue to use Superuser with your outdated binary, or update su with ROM Manager.</string>
-  <string name="notification_text_allow">%s 已被授予超級用戶權限</string>
-  <string name="notification_text_deny">%s 已被拒絕超級用戶權限</string>
+  <string name="notification_text_allow">%s 已被授予超級用戶權限</string>
+  <string name="notification_text_deny">%s 已被拒絕超級用戶權限</string>
   <string name="notif_outdated_ticker">你的su二進制文件已過時</string>
   <string name="notif_outdated_title">su二進制文件過時</string>
   <string name="notif_outdated_text">點擊以更新su二進制文件</string>

Superuser wont work on honeycomb

The superuser app avaliable in the market does not work on nook color. I and many others in the community are ready and willing to test.

"Toggle" and "forget" application buttons do not work sometimes (and sometimes "forget" works as "toggle")

I have rooted LG P500 (Android 2.3.3), latest superuser from market.

When viewing application details in superuser there are buttons "toggle" and "forget" at the bottom of screen.

The problem is:
When viewing application that is in blacklist, theese buttons do not work (do not trigger visual blink or whatever at all).
When viewing a whitelisted application, "forget" button sometimes works as "toggle", meaning app is moved to blacklist and cannot be forgotten after that.

All in all, on LG P500 Superuser is very buggy and crashes a lot.

Duplicate strings

There is a string that is duplicated in almost every language for info_elite_installed. It threw a fit until I removed it from every strings.xml when building in AOSP.

Source code for assets/

Can the source code repos/headers be provided for these binaries and if not, what are the consequences of not including them?

superuser problem w/ root explorer

hi!

i have your latest version 2.3.6.1 installed. problem is it won't work well with root explorer but works well w/ other root apps (root explorer keeps on telling me to restart, problem w/ superuser). my workaround is to turn wifi/data on, then update superuser binary, then root explorer will work. but whenever i reboot my phone, the same problem occurs again and i have to reupdate binary everytime. how to fix this? by the way i'm running froyo cyanogenmod 6 ported to the samsung spica. thanks a lot, and great job!

terence

Installation failure on FRG22 with SPRecovery

This is a Motorola Droid (Droid 1) running FRG22 (leaked) (FroYo) with SPRecovery. Renamed su-2.3-ef-signed.zip to update.zip and copied to root of SD card. Booted to SPRecovery, install, allow update.zip, apply update.zip.

Progression is:
Install from sdcard...
Finding update package...
Opening update package...
Verifying update package...
Installing update...
Installation aborted.

No further messages or clues.

Superuser not working on 4.0.1 3.0.8-FuguMod kernel on Galaxy S

I found this in logcat:

02-22 13:30:30.843: I/System(1876): Failed to destroy process 2033
02-22 13:30:30.859: I/System(1876): libcore.io.ErrnoException: kill failed: ESRCH (No such process)
02-22 13:30:30.859: I/System(1876): at libcore.io.Posix.kill(Native Method)
02-22 13:30:30.859: I/System(1876): at libcore.io.ForwardingOs.kill(ForwardingOs.java:77)
02-22 13:30:30.859: I/System(1876): at java.lang.ProcessManager$ProcessImpl.destroy(ProcessManager.java:257)

Saw issue #43, I've already updated su to v3.0.3.2, but it does help.

Superuser fails and doesn't prompt (with solution)

Installed Superuser 3.0.7 with su 3.0.3.2 on an ICS device and got the following error in logcat:-

"""
W/ActivityManager( 422): Permission Denial: broadcastIntent()
requesting a sticky broadcast from pid=9080, uid=10171 requires
android.permission.BROADCAST_STICKY
"""

Used apktool to rebuild Superuser.apk with that permission added to AndroidManifest.xml, test-signed and pushed to the device.

Now works fine. :-)

(Clarity: This occurred whether Superuser.apk was pushed to /system/app or /data/app)

SU does sometimes not respond

Ok, so I am developing an app at the moment, my first on actually, so the problem in this case meight be myself.

basically my application tries to gain su permissions and then execute some commands by sending it to a method called ShellInterface in my case:
Example of calling the method:

Code:

String[] commands = { "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system", };
sendShell(commands, true, 250);


Part of the ShellInterface class:

Code:

try {
System.out.println("ShellInterface got the job.");
System.out.println("Requesting SU permissions");
processx = Runtime.getRuntime().exec("su");
System.out.println("Granted?!");

        os = new DataOutputStream(processx.getOutputStream());
        System.out.println("Stream created?!");

        // Doing Stuff ;)

   for (String single : commands) {
            System.out.println("Doing the commands...");
                os.writeBytes("\n" + single + "\n");
                os.flush();
                System.out.println("Sending exit-signal!");
                os.writeBytes("exit\n");
                os.flush();
                os.close();
                Thread.sleep(sleeptime);
        }

} catch (Exception e) {
System.out.println("Failure in SU command: " + e.getMessage());
Log.d("Unexpected error - Here is what I know: "
+ e.getMessage(), null, e);
e.printStackTrace();
msg = Message.obtain();
msg.arg1 = 1;
msg.arg2 = 0;
res.add(e.getMessage());
}


The Problem is that, from my perspective it only randomly works. I am executing about 10 commands, after e few ones to processX terminates and it will respawn as intended, but sometimes it does simply not finish the command:

processx = Runtime.getRuntime().exec("su");

It gets stuck there and there is no toast notification showing up the access has been granted or not. Just nothing happens. I found the possibility of not running into this increases when I kill the Superuser.apk in the Settings before executing the commands. But still it does often just randomly run into this state of "nothing" happening anymore. (Su request not granted or rejected)

In the logcat I can't find anything interesting. I just noticed that this happens not only in my app but sometimes even in the SU application:

http://dl.dropbox.com/u/39401915/Screenshot_2012-07-08-18-43-04.png
http://dl.dropbox.com/u/39401915/Screenshot_2012-07-08-18-42-44.png

Choose between AsyncTask and IntentService/AsyncTaskLoader

Hello, I'm doing research on Android async programming. I see in Superuser, you use IntentService at some places (such as ResultService) while use AsyncTask at other places (such as in PreferencesActivity). I'm wondering how do you choose between AsyncTask and IntentService? because both are used to execute background tasks.

As far as I know, some articles (for example this article) mention that AsyncTask leads to memory leak and losing task result when there's a configuration change (such as orientation change). But using IntentService or AsyncTaskLoader can avoid such problems.

Superuser.apk v2.3.6.1 not granting root to my application (in development)

Superuser works just fine and grants some applications root privileges.

Bot now I am creating my own App in Eclipse, which does need root permissions at one point. I called it AutoMarket, and it the code gets currently signed by Eclipse/ADT (but I understand that this is only test signing keys). So this can't be published to the Android Market as is.

I used "adt install AutoMarket.apk" to install my app on my device (ZT-180 android tablet)

Internally the app does the usual "Runtime.getRuntime().exec("su something") and then waits for the return code and captures stderr/stdout.

The problem is that I do not get any popup by Superuser.apk asking me whether or not I am supposed to give root permissions to AutoMarket. Instead I get this in the logcat buffer:

W/su: ( 3178) request rejected (0->0 /system/bin/sh)

and the exit code and stderr output are as follows:
255
Permission denied

What could be wrong here? Right now I perform all actions in my UI thread (which is bad practice, I know). Could this be blocking Superuser from showing the prompt? Or is it something else, for example the test signing keys that are used?

superuser verification text truncated in landscape

When being prompted for allow/deny by superuser 2.3 for Better Terminal Emulator in landscape on Motorola Droid (cm 6.x nightly 20100809) the text is completely truncated and unreadable.

WORKAROUND: Closing the keyboard allows selection.

Superuser.apk force closing - have tried all fixes listed on XDA

Here is logcat. I have manually installed it, installed from Market and everything else. The program force closes every time when there is an su request. I am running this on a Pandigital Novel tablet running Android 2.0 (yes 2.0) OS. If someone could tell me what the problem is I would appreciate it very much.

E/WindowManager( 1877): computeNewConfigurationLocked
I/ActivityManager( 1877): Displayed activity com.protocol.x.hn/.RootBooter: 416
ms (total 416 ms)
E/su ( 2136): Notifications check failed with error message no such table:
prefs
E/Bundle ( 1877): readBundle: bad magic number
E/Bundle ( 1877): readBundle: trace = java.lang.RuntimeException
E/Bundle ( 1877): at android.os.Bundle.readFromParcelInner(Bundle.java: 147
3)
E/Bundle ( 1877): at android.os.Bundle.(Bundle.java:82)
E/Bundle ( 1877): at android.os.Parcel.readBundle(Parcel.java:1344)
E/Bundle ( 1877): at android.os.Parcel.readBundle(Parcel.java:1329)
E/Bundle ( 1877): at android.content.Intent.readFromParcel(Intent.java: 517
5)
E/Bundle ( 1877): at android.content.Intent.(Intent.java:5153)
E/Bundle ( 1877): at android.content.Intent$1.createFromParcel(Intent.j ava
:5144)
E/Bundle ( 1877): at android.content.Intent$1.createFromParcel(Intent.j ava
:5146)
E/Bundle ( 1877): at android.app.ActivityManagerNative.onTransact(Activ ity
ManagerNative.java:249)
E/Bundle ( 1877): at com.android.server.am.ActivityManagerService.onTra nsa
ct(ActivityManagerService.java:1531)
E/Bundle ( 1877): at android.os.Binder.execTransact(Binder.java:287)
E/Bundle ( 1877): at dalvik.system.NativeStart.run(Native Method)
W/Parcel ( 1877): Attempt to read object from Parcel 0x65be7dd8 at offset 184 t
hat is not in the object list
E/Bundle ( 1877): readBundle: bad magic number
E/Bundle ( 1877): readBundle: trace = java.lang.RuntimeException
E/Bundle ( 1877): at android.os.Bundle.readFromParcelInner(Bundle.java: 147
3)
E/Bundle ( 1877): at android.os.Bundle.(Bundle.java:82)
E/Bundle ( 1877): at android.os.Parcel.readBundle(Parcel.java:1344)
E/Bundle ( 1877): at android.os.Parcel.readBundle(Parcel.java:1329)
E/Bundle ( 1877): at android.app.ActivityManagerNative.onTransact(Activ ity
ManagerNative.java:256)
E/Bundle ( 1877): at com.android.server.am.ActivityManagerService.onTra nsa
ct(ActivityManagerService.java:1531)
E/Bundle ( 1877): at android.os.Binder.execTransact(Binder.java:287)
E/Bundle ( 1877): at dalvik.system.NativeStart.run(Native Method)
I/ActivityManager( 1877): Start proc com.noshufou.android.su for broadcast com.n
oshufou.android.su/.SuRequestReceiver: pid=2141 uid=10045 gids={1015, 3003}
D/AndroidRuntime( 2141): Shutting down VM
W/dalvikvm( 2141): threadid=3: thread exiting with uncaught exception (group=0x4
001b180)
E/AndroidRuntime( 2141): Uncaught handler: thread main exiting due to uncaught e
xception
E/AndroidRuntime( 2141): java.lang.RuntimeException: Unable to start receiver co
m.noshufou.android.su.SuRequestReceiver: java.lang.IllegalArgumentException: the
bind value at index 3 is null
E/AndroidRuntime( 2141): at android.app.ActivityThread.handleReceiver(Act
ivityThread.java:2618)
E/AndroidRuntime( 2141): at android.app.ActivityThread.access$3100(Activi
tyThread.java:119)
E/AndroidRuntime( 2141): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1885)
E/AndroidRuntime( 2141): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 2141): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2141): at android.app.ActivityThread.main(ActivityThrea
d.java:4325)
E/AndroidRuntime( 2141): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 2141): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 2141): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 2141): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 2141): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 2141): Caused by: java.lang.IllegalArgumentException: the bind
value at index 3 is null
E/AndroidRuntime( 2141): at android.database.sqlite.SQLiteProgram.bindStr
ing(SQLiteProgram.java:174)
E/AndroidRuntime( 2141): at android.database.sqlite.SQLiteQuery.bindStrin
g(SQLiteQuery.java:190)
E/AndroidRuntime( 2141): at android.database.sqlite.SQLiteDirectCursorDri
ver.query(SQLiteDirectCursorDriver.java:55)
E/AndroidRuntime( 2141): at android.database.sqlite.SQLiteDatabase.rawQue
ryWithFactory(SQLiteDatabase.java:1220)
E/AndroidRuntime( 2141): at android.database.sqlite.SQLiteDatabase.rawQue
ry(SQLiteDatabase.java:1193)
E/AndroidRuntime( 2141): at com.noshufou.android.su.DBHelper.checkApp(DBH
elper.java:64)
E/AndroidRuntime( 2141): at com.noshufou.android.su.SuRequestReceiver.onR
eceive(SuRequestReceiver.java:24)
E/AndroidRuntime( 2141): at android.app.ActivityThread.handleReceiver(Act
ivityThread.java:2609)
E/AndroidRuntime( 2141): ... 10 more
I/Process ( 1877): Sending signal. PID: 2141 SIG: 3
I/dalvikvm( 2141): threadid=7: reacting to signal 3
I/dalvikvm( 2141): Wrote stack trace to '/data/anr/traces.txt'
D/dalvikvm( 1877): GREF has increased to 401
I/DumpStateReceiver( 1877): Added state dump to 1 crashes
I/Process ( 2141): Sending signal. PID: 2141 SIG: 9
I/ActivityManager( 1877): Process com.noshufou.android.su (pid 2141) has died.
E/gralloc ( 1877): [unregister] handle 0x3c93c8 still locked (state=40000001)
E/StatusBarView( 1877): onInterceptTouchEvent hit at -- home back menu --
E/StatusBarView( 1877):
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarView( 1877): state machine error! Never be here!
D/StatusBarPolicy( 1877): jerryxu Intent.ACTION_HOMEICON
W/WindowManager( 1877): Unable to find ITelephony interface
I/ActivityManager( 1877): Start proc com.android.settings for broadcast com.andr
oid.settings/.widget.SettingsAppWidgetProvider: pid=2151 uid=1000 gids={3003, 30
02, 3001}
I/ActivityManager( 1877): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=org.adw.launcher/.Lau
ncher }
E/WindowManager( 1877): computeNewConfigurationLocked
D/dalvikvm( 2095): GC freed 1513 objects / 96440 bytes in 63ms
D/dalvikvm( 2089): GC freed 1689 objects / 85072 bytes in 62ms
E/su ( 2136): select failed with 2: No such file or directory
W/su ( 2136): request rejected (10032->0 /system/bin/sh)

evade crippled functionality

With an uptick of cheeky app developers attempting to discover root'd devices to deny or cripple app functionality needlessly perhaps it is prudent to consider methods of denying such untowardly frippery? and not via obfuscation.

Each app with legitimate su employment claims could prompt user for path to uniquely named su binary should the default su not be located. Additionally allowing end user to pad su binary to evade hash value discovery might be wise.

SU

SuArtSu

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.