Run adb shell and how to get # instead of $ for root permission : Android


Here is the solution when running adb shell and get $ instead of #, which is not the su command. I found this solution in a comment of my previous post. Lot of people have this problem and keep asking me this question. So I thought to post “ryo” ‘s (unknown author) solution here as it will help for many others.

Problem

April 8, 2013 by ryo :

My Samsung Ace 2 is rooted, but when I type ‘adb shell’, I get a $ instead of #, which I’ve found out is not the su command. So I’ve tried various ways to get the ‘#’ instead of ‘$’, like typing ‘adb shell’ and then ‘su’, which returns the cursor to the next line, is blank for 10 seconds, and then ‘$’ appears again (after 10 seconds). I’ve also tried typing ‘adb shell su’, and it waits for a few seconds, and then just returns to the android\sdk\platform-tools folder.

Running Gingerbread 2.3.6 – what am I doing wrong?! Just need to get a # instead of $……………..

Solution 

April 8, 2013 by ryo :

OK! So, after 2 hours of trying to unsuccessfully trying to get ‘sqlite3 settings.db’ to work through adb shell, I found an alternate method (I am using a rooted Samsung Ace 2 running Android 2.3 Gingerbread on Windows 7, with debugging mode on):

1. Download SDK Installer for windows and install BOTH tools (SDK tools + Platform-tools) – you don’t need any of the other stuff in there.
2. Launch cmd.exe, and navigate to the platform-tools folder (mine was C:/android/sdk/platform-tools
3. Use command: adb pull /data/data/com.android.providers.setting­s/databases/settings.db \some_folder_on_your_computer (all one line)

**NOTE**If permission is denied, then type ‘adb shell’, and ‘su’ to get superuser; it should show #, not $. Then type ‘chmod 666 /data/data/com.android.provide­rs.settings/databases /settings.db’ (don’t type the ” apostrophe). Then type exit, and exit, again until you’re back to …../platform-tools

4. use “adb pull /data/data…settings.db” command again. It should work this time, and the settings.db file should be in the folder you told it to push to
5. Get Firefox, and get add-on called “SQLite Manager”. Restart Firefox. Go up to top left Firefox tab and under ‘web developer’ menu, you should see ‘SQLite Manager’. Open it.
6. Open the settings.db with SQL Manager (you might have to change it from only showing .sqlite files, to show All Files *.*
7. After settings.db is open, go to Tables–>Secure, and look for lockscreen.lockedoutpermanently. If you’re phone was TOTALLY Locked out (e.g., after 20 pattern attempts…=damn kids), then it should show a value of “1″ (this means “on”). Select it, click the edit button up top, and change the value to “0″ (=”OFF”). Commit changes and close SQLite Manager.
8. go back to cmd.exe window (you should still be in the …./platform-tools folder), use the command:
adb push \some_folder_on_your_computer\settings.db /data/data/com.android.providers.setting­s/databases/
9. If this transfers successfully, you SHOULD be good to go.
10. Unplug phone, turn off, turn on = YOUR GOOD OLD SIM PIN SCREEN! :D

Big Credit due to AppsCatalog and the clues in his description in his youtube video (http://www.youtube.com/watch?v=pHs-Afd2lp0)

Thank You Very much “ryo” for your solution 🙂

Categories: Android | Tags: , , , , , , , , | 12 Comments

Post navigation

12 thoughts on “Run adb shell and how to get # instead of $ for root permission : Android

  1. Aditya

    SU command is not working ..access denied

  2. Jagadeesh

    Not working,.,

  3. fritz

    this might be working only if you have root the device source: http://adbshell.com/commands/adb%20shell%20su/how-to-use-adb-shell-su.html

  4. Rooterrrrr

    this works … **NOTE**If permission is denied, then type ‘adb shell’, and ‘su’ to get superuser; it should show #, not $. <<when u enter "su" it will ask to allow super user access from phone .. you should click ALLOW then u will get # instead of $ … i didn get it first time .. thought this post was rubbish .. but its working .. kewl 🙂

  5. Prabhu

    hi
    i have a Fusion5 Extreme Tablet which is locket by drawing a wrong pattern,
    i went thru many web sites n blogs to find a solution where in all solutions work with VOLUME+ buttons.
    unfortunately my device is not having any VOLUME Button(Physical Buttons). available only on screen.
    tried with putting google id n password, enabled/disabled 2 step verification option n many more
    nothing worked out
    pl help in unlocking my tab

  6. ich

    same problem but open superuser on the phon run su superuser wil popup an you give permission
    workt fin for me

  7. cjan

    why cant i do it?

  8. How to root micromax a27

  9. DJ

    Hey i am newbie to root and adb stuff as I am a commerce student.
    I purchased this cell two months ago which have Cortex A7 1.3ghz dual core processor with JB4.2.2
    Naturally i wont root it straight away to avoid voiding warranty.
    It had whatsapp pre-installed which i want to replace with whatsapp plus which cant b done unless i uninstall whatsapp..
    I came across the adb way of removing pre installed apps and tried removing whatsapp with following commands

    adb devices
    adb shell
    cd system/app
    ls
    rm whatsapp.apk
    But it showed failed on ‘whatsapp.apk’ – Cross-Device link
    Please help me with the commands.
    Thank You

  10. jorge

    adb shell -permission denied ‘ then write su’
    $su
    su
    #’ that’s all

  11. shwky

    how can i
    6-Open the settings.db with SQL Manager (you might have to change it from only showing .sqlite files, to show All Files — ???

  12. rai

    THANK YOOOOU!! to You & Ryo for re/posting the info how to clear the ‘permanent lock’ via changing the database cell value – exactly what i needed –
    (samsung android 2.3.6 gingerbread & was in cwm recovery, but all else still locked & not rooted)
    worked perfectly, great solution! 😀

Leave a reply to ich Cancel reply

Create a free website or blog at WordPress.com.