What for SuperUser command does exists?
Is there a List?
How can i get the file from
/data/data/com.android.providers.settings/databases/settings.db ?
i used:
adb pull /data/data/com.android.providers.settings/databases/settings.db C:
but it says:
failed to copy '/data/data/com.android.providers.settings/databases/settings.db' to 'C:': Permission denied
any solution?
try typing
Code:
su
or if not try
Code:
adb remount
I dont know much about this stuff yet, but that could help
ilendemli said:
How can i get the file from
/data/data/com.android.providers.settings/databases/settings.db ?
i used:
adb pull /data/data/com.android.providers.settings/databases/settings.db C:
but it says:
failed to copy '/data/data/com.android.providers.settings/databases/settings.db' to 'C:': Permission denied
any solution?
Click to expand...
Click to collapse
are you rooted?
try:
Code:
adb shell "su -c 'cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/'"
this will use su to copy it to the sdcard, then you should be able to pull it from there. Phone may pop up a "Superuser request". Be prepared to allow it.
when i type:
adb shell "su -c '/data/data/com.android.providers.settings/databases/settings.db /sdcard/'"
It says:
/data/data/com.android.providers.settings/databases/settings.db: permission denied
My Device is rooted, and i gave su permission
You forgot the "cp" between "su -c" and "/data/data/..."
C:\Users\ilendemli>adb shell "su -c '/data/data/com.android.providers.settings/databases/settings.db /sdcard/'"
/data/data/com.android.providers.settings/databases/settings.db: permission denied
C:\Users\Muhammet ilendemli>adb shell "su -c 'cp /data/data/com.android.provider
s.settings/databases/settings.db /sdcard/'"
cp: not found
My CMD Window, whats wrong?
Hum, that's strange.
Try this : (<Enter> means pressing the Enter key on your keyboard)
adb shell <Enter>
su <Enter> (here you may have to look at your phone to give him the autorisation it needs)
cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/ <Enter>
If it says "cp: not found", try this line :
busybox cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/ <Enter>
busybox: not found
Try to replace busybox by bb in the command I gave you.
If it doesn't work, well, I'll doubt you did your root well ^^ Cause it should have install BB
Can you explain us what you did to root your phone ?
I used SuperOneClick Root, to root my Phone. it installed the su files and superuser.apk nothing else
EdIT:
I installed busybox manually and rebootet my phone, now when i type:
>adb shell "busybox -c cp '/data/data/com.android.providers.settings/databases/settings.db /sdcard/'"
it says:
-c: applet not found
EDIT2:
>adb shell
$ busybox cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/
busybox cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/
cp: can't open '/data/data/com.android.providers.settings/databases/settings.db': Permission denied
$
That's normal, you missed the "su" command in your Edit 2.
So, 2 ways to do it.
Edit 1 version :
adb shell "su -c busybox cp '/data/data/com.android.providers.settings/databases/settings.db /sdcard/'"
Edit 2 version :
adb shell
su
busybox cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/
And I thought SuperOneClick did install BB... Well, I thought wrong ^^
Edit 1 version: Didnt worked..
Edit 2 version: WORKED!? i have the database,
now, how can i give these command in java?
anything with exec("..
From adb, you can't execute Java methods (because you're not in a JVM).
And I don't think you can access the DB like that in fact.
You have to make an app that read/write/do what you want on the DB (and it seems you're doing so, refering to the other topic you made )
it's not allowed, to edit databases directly, so my app will copy the database somewhere else, edit it, and copy it back, then it should work.
€: and i don't want to edit databses from the adb, i cant do it, the program cant do it, but java can do it:
Code:
myDB.execSQL("DELETE FROM system WHERE name = 'name1';");
myDB.execSQL("DELETE FROM system WHERE name = 'name2';");
myDB.execSQL("INSERT INTO system (name, value) VALUES ('name1', '"+arr[0]+"');");
myDB.execSQL("INSERT INTO system (name, value) VALUES ('name2', '"+arr[1]+"');");
Yes it should.
Make sure you don't mess with the DB though. It's an easy thing to break
Edit : From adb, apparently you can do something like
sqlite3 settings.db
Then you'll have a DB prompt where you can write SQL commands like SELECT, INSERT, etc.
can busybox delete and replace files?
BB lets you use any Unix command.
So you can use (in your example) the mv command, which will move a file from a directory to another one.
Runtime.getRuntime().exec("busybox mv /sdcard/ /data/data/com.android.providers.settings/databases/settings.db");
this should work
E: Hmm, doesn't work..
E2: should look like this: Runtime.getRuntime().exec("busybox mv /sdcard/settings.db /data/data/com.android.providers.settings/databases/");
will try it.
Yes. But remember you have to be root to do that
I am having issues with file permission on su when either I cook a clockwork mod or DFT NAND Rom.
I have verified that su has the following permissions inside the .zip or .img file:
Code:
-rwxr-xr-x
Once flashed to phone when I check the permissions they have been changed to:
Code:
-rwsr-sr-x
SuperUser will crash until I issue the following commands via adb:
Code:
adb shell chmod 4755 /system/bin/su
adb shell chmod 4755 /system/xbin/su
adb reboot
After reboot the permissions are correct wtih:
Code:
-rwxr-xr-x
Anyone have any thoughts or know why this is happening? I am using Ubuntu v10 with the root account.
Thanks
-CMYLXGO
hi.
i'm trying to root my HTC Legend (stock froyo) but i'm stuck to the downgrade step.
i've created the gold card but when i try to downgrade i get always this:
Code:
C:\Program Files (x86)\Android\android-sdk\tools>crackin.bat
"Copying tools"
2301 KB/s (698452 bytes in 0.296s)
1190 KB/s (76044 bytes in 0.062s)
2413 KB/s (655360 bytes in 0.265s)
"Freeing primary PERM linker"
rm failed for /data/DxDrm/fuse/*, No such file or directory
rm failed for /data/DxDrm/fuse, No such file or directory
rmdir failed for /data/DxDrm/fuse/, No such file or directory
cannot create /data/DxDrm/fuse: directory nonexistent
Unable to chmod /data/DxDrm/fuse: No such file or directory
"Freeing secondary PERM linker"
rmdir failed for /data/DxDrm/fuse/, No such file or directory
rmdir failed for /data/DxDrm, No such file or directory
link failed Permission denied
"Rebooting to normal mode to unlock CHMOD links"
rmdir failed for /data/dontpanic, Permission denied
rm failed for /data/DxDrm, No such file or directory
link failed File exists
link failed Permission denied
"Rebooting to normal mode to downgrade ROM"
/dev/mtd/mtd0: Permission denied
cr--rw---- 1 1001 2002 90, 0 Mar 5 17:17 /dev/mtd/mtd0
error writing misc: Permission denied
"Freeing links"
rm failed for /data/DxDrm, No such file or directory
rm failed for /data/dontpanic, Permission denied
any idea?
- Get visionary+
- Temproot your legend with it
- Use commandline with adb on your pc to flash misc1-2.img.
type the following commands from the folder where you have adb;
Code:
adb shell
su
accept the notification on your phone if one comes up
and then in the command line type this;
Code:
/data/local/flash_image misc /data/local/misc1-2.img
That should be enough to make it possible to run the 1.31 RUU.
same problem here..try many way as stated!!
Azaruc said:
- Get visionary+
- Temproot your legend with it
- Use commandline with adb on your pc to flash misc1-2.img.
type the following commands from the folder where you have adb;
Code:
adb shell
su
accept the notification on your phone if one comes up
and then in the command line type this;
Code:
/data/local/flash_image misc /data/local/misc1-2.img
That should be enough to make it possible to run the 1.31 RUU.
Click to expand...
Click to collapse
thanks for your answer.
please, tell me if i'm right.
i should follow these downgrade steps http://forum.xda-developers.com/showthread.php?t=725430 till the end when i keep receiving the reported error, then i should install visionary, temproot, and from a command prompt (starting from the "tools" directory of the android SDK? and the misc1-2.img goes there?) i should type those command.
and then?
run the RUU_Legend_HTC_WWE_1.31.405.5_R_Radio_47.26.35.04_ 7.05.35.26L_release_126592_signed.exe?
thanks man!
i did it!
I get error [171] anyone have any idea what is the reason ??
please hepl
I tried every way i managed o find
hboot - 1.00.0000
radio-7.13.35.05
soft 3.14.161.1
kernel 2.6.32.17
Azaruc said:
- Get visionary+
- Temproot your legend with it
- Use commandline with adb on your pc to flash misc1-2.img.
type the following commands from the folder where you have adb;
Code:
adb shell
su
accept the notification on your phone if one comes up
and then in the command line type this;
Code:
/data/local/flash_image misc /data/local/misc1-2.img
That should be enough to make it possible to run the 1.31 RUU.
Click to expand...
Click to collapse
i get permissions denied on the last step
/data/local/flash_image misc /data/local/misc1-2.img
help please?
Ohh c'mom dude! What does "adb shell" return? What does "su" return?
Sent from my HTC Legend
chris.chhoeu said:
i get permissions denied on the last step
/data/local/flash_image misc /data/local/misc1-2.img
help please?
Click to expand...
Click to collapse
Did you get the # symbol after the su command? If not, then you have to do temp root again.
What does ADB say? Do you have Debug Mode eneabled?
Sent from my HTC Legend using XDA App
temproot on boot or temproot now pls ?? thanks m8
"Temproot now"
Sent from my HTC Legend using XDA Premium App
I have a MT4G and I'm using the Cyanogenmod rooting technique. I'm at the part where i'm pushing certain files to the /data/local path.
adb push psneuter /data/local/tmp/
adb push gfree /data/local/tmp/
adb push busybox /data/local/tmp/
adb push hboot-eng.img /data/local/tmp/
adb push root_psn /data/local/tmp/
adb push flash_image /data/local/tmp/
adb push su /sdcard/
adb push Superuser.apk /sdcard/
adb shell chmod 755 /data/local/tmp/*
When i get to "root_psn", I get the error that I cannot push due to being read only...I dont understand because this is the same path as the rest of the files, and I have no problem with them.
I don't want to go any further until I know what's going on.
Are you sure your not just running out of space on your data partition?
Gene Poole said:
Are you sure your not just running out of space on your data partition?
Click to expand...
Click to collapse
It was actually a mistake on my part. I was typing only /data/tmp for some reason...
Anyway, I moved on from there, having trouble here:
adb push su /sdcard/
failed to copy 'su' to /sdcard//su': permission denied
Same error goes for Superuser.apk, and once i get into the adb shell I get permission errors for /data/local/tmp/psneuter.
I didnt go any further than this. My phone is still fine, I also do NOT have visionary installed. I also got rid of the superuser app that was already on my phone.
Kind of stuck.
ugh, wtf. More trouble.
Moved passed the previous error, now i have a new one:
./gfree -f -b hboot-eng.img -y recovery.img
"Error opening backup file"
I tried the next step, then get the error saying how Superuser.spk and SU cannot be found. I placed them directly on the SD card via usb cable since I got the error of write protected SD card.
Hi,
I am trying to push
Code:
$ adb push androidvncserver /data/androidvncserver
failed to copy 'androidvncserver' to '/data/androidvncserver': Permission denied
When I do 'su' in 'adb shell', i get a root prompt , that means I have rooted my device, right?
Code:
$ adb shell
$ su
#
If so, how can I push to /data?
Thank you.
Your default shell is secured - means, when you're executing ADB command without executing something through SU, you're going through the regular permissions.
To enable insecure boot, set ro.secure to 0 in your build.prop. I'm not sure if it's enough, though, or if you need a kernel compiled with security off to take full advantage of insecure adb commands.
You can push the file to sdcard, enter shell, enter su, and in root shell copy the file where you want it to be.
And you're posting in the wrong section. There is Q&A for questions, please move there.