No sqlite3 commands available via ADB?? - Android General

I am trying to run a sqlite3 command from within ADB, however each time I do I get an error stating "sqlite3 not found". Can anyone assist me in figuring out what I am doing wrong?

Well... how are you doing it?

RoberGalarga said:
Well... how are you doing it?
Click to expand...
Click to collapse
See the attached image.

Hmmm... weird, I have no problems running the same commands. If you run the command from Terminal Emulator on your device it works?
Or try running directly:
Code:
adb shell "sqlite3"

adb shell sqlite3 works well on android emulator

RoberGalarga said:
Or try running directly:
Code:
adb shell "sqlite3"
Click to expand...
Click to collapse
Directly running that command unfortunately doesn't work either.

webmaster said:
I am trying to run a sqlite3 command from within ADB, however each time I do I get an error stating "sqlite3 not found". Can anyone assist me in figuring out what I am doing wrong?
Click to expand...
Click to collapse
The sqlite3 binary doesn't get built for the Android OS builds targeting production devices (user build), only the development (eng) builds. You'll have to copy the sqlite3 binary to your device first.
Code:
$ adb push /home/kuisma/android-4/out/target/product/generic/system/xbin/sqlite3 /data/local/tmp/sqlite3
2616 KB/s (33428 bytes in 0.012s)
$ adb shell /data/local/tmp/sqlite3
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

Thanks for the file
kuisma said:
The sqlite3 binary doesn't get built for the Android OS builds targeting production devices (user build), only the development (eng) builds. You'll have to copy the sqlite3 binary to your device first.
Code:
$ adb push /home/kuisma/android-4/out/target/product/generic/system/xbin/sqlite3 /data/local/tmp/sqlite3
2616 KB/s (33428 bytes in 0.012s)
$ adb shell /data/local/tmp/sqlite3
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
Click to expand...
Click to collapse
I was searching this file (google), no where found. Thanks for providing... Will it work on any device? Any link to get the file apart from here?:good:

Some
I have the same problem... sqlite3 con not be run alfer i pushed it to device(S4 with android 4.2.2)
i push it to /data/local/tmp/sqlite3 and when i try adb shell: can't execute: Permission denied

cmg_george said:
I have the same problem... sqlite3 con not be run alfer i pushed it to device(S4 with android 4.2.2)
i push it to /data/local/tmp/sqlite3 and when i try adb shell: can't execute: Permission denied
Click to expand...
Click to collapse
Change permissions & ownership first:
Code:
chmod 775 /data/local/tmp/sqlite3 && chown 0.0 /data/local/tmp/sqlite3

lolet said:
Change permissions & ownership first:
Code:
chmod 775 /data/local/tmp/sqlite3 && chown 0.0 /data/local/tmp/sqlite3
Click to expand...
Click to collapse
I Thought about that. I change the permission but when i try to change owner chown give me:
Code:
Operation not permitted
If i try to run sqlite3 after i set the permission i get:
Code:
cannot locate symbol "sqlite3_enable_load_exten
sion" referenced by "/data/local/tmp/sqlite3"...CANNOT LINK EXECUTABLE

cmg_george said:
I Thought about that. I change the permission but when i try to change owner chown give me:
Code:
Operation not permitted
Click to expand...
Click to collapse
adb shell
su
->retry

where to copy sqlite3
plese provide path where to copy sqlite3 that i dont have in my phone ..i tried xbin but could not paste says check path ..plz help
---------- Post added at 01:59 PM ---------- Previous post was at 01:37 PM ----------
please provide path where to copy sqlite3 that i dont have in my phone ..i tried in xbin but could not paste says check path ..plz help
kuisma said:
The sqlite3 binary doesn't get built for the Android OS builds targeting production devices (user build), only the development (eng) builds. You'll have to copy the sqlite3 binary to your device first.
Code:
$ adb push /home/kuisma/android-4/out/target/product/generic/system/xbin/sqlite3 /data/local/tmp/sqlite3
2616 KB/s (33428 bytes in 0.012s)
$ adb shell /data/local/tmp/sqlite3
SQLite version 3.7.4
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
Click to expand...
Click to collapse

RoberGalarga said:
Hmmm... weird, I have no problems running the same commands. If you run the command from Terminal Emulator on your device it works?
Or try running directly:
Code:
adb shell "sqlite3"
Click to expand...
Click to collapse
Nope, 'command not found' on my Galaxy S3.

pkardam said:
plese provide path where to copy sqlite3 that i dont have in my phone ..i tried xbin but could not paste says check path ..plz help
---------- Post added at 01:59 PM ---------- Previous post was at 01:37 PM ----------
please provide path where to copy sqlite3 that i dont have in my phone ..i tried in xbin but could not paste says check path ..plz help
Click to expand...
Click to collapse
You can push it anywhere, even /sdcard/.
Then you just need to provide the full path to execute it (assuming the file is executable, you may need to `chmod` as mentioned earlier)
Code:
adb push sqlite3 /sdcard/
adb shell '/sdcard/sqlite3'

dev47 said:
You can push it anywhere, even /sdcard/.
Then you just need to provide the full path to execute it (assuming the file is executable, you may need to `chmod` as mentioned earlier)
Code:
adb push sqlite3 /sdcard/
adb shell '/sdcard/sqlite3'
Click to expand...
Click to collapse
thanx dev
---------- Post added at 12:41 PM ---------- Previous post was at 12:33 PM ----------
dev47 said:
You can push it anywhere, even /sdcard/.
Then you just need to provide the full path to execute it (assuming the file is executable, you may need to `chmod` as mentioned earlier)
Code:
adb push sqlite3 /sdcard/
adb shell '/sdcard/sqlite3'
Click to expand...
Click to collapse
thanx dev

How to build the sqlite3 binary and library yourself.
I have put together some build scripts to compile SQLite for Android Native Code using the Android NDK. It builds the SQLite CLI in two versions: Statically and Dynamically Linked, as well as it's Static and Shared Libraries. You may get the scripts from my GitHub and build the binaries yourself:
github/stockrt/sqlite3-android
Hope this will be useful for someone.

Related

[Q] adb shell in batch

Hi,
I'm making a batch file (*.bat) for myself to try make some things easier file where I enter commands with adb.exe.
The problem is, any code after 'adb shell' is not executed in the batch.
So if I had a batch with the following:
Code:
adb shell
su
'su' will not be executed and stays at '$'.
It seems like it's too deep for a batch file to enter codes.
I also tried pushing a sh with the same script and run it from adb but then all I get it permission denied.
I have also tried 'adb shell su' without any luck.
Anyone with a solution?
Anyone? Or how about a .rc file that gets su and runs commands...
Sent from my HTC
To execute a script, you can always push your script and then execute it:
Code:
adb push script /sdcard/script
adb shell sh /sdcard/script
As for the commands you have shown, keep in mind that su doesn't simply change the running shell's permissions or the like but creates a new child environment within its own shell. You leave your script and after the new shell has finished, you're back in your old environment and the script continues.
mizch said:
To execute a script, you can always push your script and then execute it:
Code:
adb push script /sdcard/script
adb shell sh /sdcard/script
As for the commands you have shown, keep in mind that su doesn't simply change the running shell's permissions or the like but creates a new child environment within its own shell. You leave your script and after the new shell has finished, you're back in your old environment and the script continues.
Click to expand...
Click to collapse
yes, is there any way to automate the script inside the shell and use exit to finally go back to the batch script.
Can you provide me with an example of what you want to achieve?
To execute shell commands from a batch, it doesn't matter if I have to push a script and execute it. It's so that I get su and automate commands after that. Like flash_image, remount, chmod etc..
you will need to use the 'adb shell command' ad 'sh' files
I am trying to create a unix script file that copies files from /dbdata/databases to another folder as a backup.
When I try running the script in adb shell as SU, I get
cd: can't cd to /dbdata/databases
This is on a rooted Captivate. Any help would be greatly appreciated!
Hi,
su -c "command" should do the job for you. You will need to enclose the whole of the command in quotes however, otherwise su will be expecting the command to execute, doing nothing.
Example: adb shell "su -c 'sqlite3 /data/data/my.db/databases/mydb.db < /sdcard/dump.sql'" (run from a Unix or Windows(?) shell). Notice the use of "" and ''.
(in this case dump.sql contains .dump, for instance)
Of course the sqlite3 command could be placed within another script on the android device.
Hope that helps.
I looked around a bit and found the answer.
The simple answer is, wrap the command
Code:
cp "source" "destination"
in double quotes!
Thank you grindingbob for the adb shell "su -c 'sh /mnt/sdcard/tmp/2.sh'" command.
No probs I was more referring to executing commands as a su without interacting with adb shell.
As a side-note, cp might not be a good idea, unless you're sure no db accessing is taking place at the same time.
I am pretty sure well as sure as a novice can be! The files I am backing up are log files, call history and text message history.
The results from running a unix script which contains
Code:
cp "/dbdata/databases/com.android.providers.contacts/contacts2.db" "/mnt/sdcard/tmp4/contacts2.db"
cp "/dbdata/databases/com.android.providers.telephony/mmssms.db" "/mnt/sdcard/tmp4/mmssms.db"
cp "/dbdata/databases/com.sec.android.provider.logsprovider/logs.db" "/mnt/sdcard/tmp4/logs.db"
are only the logs.db file is copied, the other two are not.
grindingbob said:
No probs I was more referring to executing commands as a su without interacting with adb shell.
As a side-note, cp might not be a good idea, unless you're sure no db accessing is taking place at the same time.
Click to expand...
Click to collapse
Permission issues for *.sh files from ADB
Dear All,
I have a 3.2 device with Root permissions & Busybox.
I created a sample *.sh file, Pushed to SDcard, and gave '777' Permissions. When i Try to run it from ADB shell its not working Any help...
CMD prompt Traces:
Step -1: Created a sh file
cat TAB.sh
#!/bin/sh
cd /data/data/com.android.gallery/shared_prefs
Step -2 Pushed the file to SDcard
# ls -l *.sh
ls -l *.sh
-rw-rw-r-- root sdcard_rw 56 2012-03-13 15:06 SP.sh
-rw-rw-r-- root sdcard_rw 62 2012-03-13 15:05 TAB.sh
Step -3 Gave 777 permission for *.sh files
# chmod 777 *.sh
chmod 777 *.sh
# ls -l
ls -l
-rw-rw-r-- root sdcard_rw 56 2012-03-13 15:06 SP.sh
-rw-rw-r-- root sdcard_rw 62 2012-03-13 15:05 TAB.sh
Execute permission not applied
Tried other operations, dint workout
Step 4 other options:
# chmod +X *.sh
chmod +X *.sh
Bad mode
# chmod +x *.sh
chmod +x *.sh
Bad mode
# chmod u+x *.sh
chmod u+x *.sh
Bad mode
Any Help?

How do I install netflix patch

Hi,
I am rooted now (I guess/hope) I would like to fix it, I have the patch and have tried to copy the libnvomx.so to the lib dir n my TF using file manager HD, but it wont let me paste it, I dont have or seem to have access.
also, is the libnvomx.so the only one I need to copy from the patch?
does this mean I am not rooted?
Is there somewhere/link where I can learn how to, and what terms like adb, push, clear the cache sideload, quickboot, recovery, etc... mean? (search hasnt helped me much with the ones I have looked for, too many results or too few)
thanks for any help,
John
use the terminal emulator, and make sure you "su" before you try to copy.
Another option is Root Explorer: https://market.android.com/details?id=com.speedsoftware.rootexplorer
Root Explorer will allow you to establish write access to system files. It's what I used to get Netflix working on my Transformer
AustinMartin said:
use the terminal emulator, and make sure you "su" before you try to copy.
Click to expand...
Click to collapse
Hi,
Thanks, what is su?
I tried using adb (at dos prompt) I tried
adb push libnvomx.so /system/lib/
it said read only access
will the su give me access? how do I su?
I am not even sure what the terminal emu is?
thanks,
John
I don't know if your rooting added the terminal app to the tf101.
You need to run the su(superuser) command to gain access to the system files.
I think you can run it from adb as well, if you used adb to root, then you probably already used this command.
you can also just download the netflix patch zip to the microsd card, and install the zip from cwm recovery mode.
Xerravon said:
Hi,
Thanks, what is su?
I tried using adb (at dos prompt) I tried
adb push libnvomx.so /system/lib/
it said read only access
will the su give me access? how do I su?
I am not even sure what the terminal emu is?
thanks,
John
Click to expand...
Click to collapse
Close, no cigar:
try this:
adb remount
adb pull /system/lib/libnvomx.so libnvomx.so.orig
adb push libnvomx.so /system/lib/
adb chmod 644 /system/lib/libnvomx.so
adb remount
adb reboot
----
I'm not recalling if you can do an adb chmod, but probably you can so I'll add that in up there just in case it works: Also I added a bit where you get a copy of the original in case this all somehow goes bad.
hachamacha said:
Close, no cigar:
try this:
adb remount
adb pull /system/lib/libnvomx.so libnvomx.so.orig
adb push libnvomx.so /system/lib/
adb chmod 644 /system/lib/libnvomx.so
adb remount
adb reboot
----
I'm not recalling if you can do an adb chmod, but probably you can so I'll add that in up there just in case it works: Also I added a bit where you get a copy of the original in case this all somehow goes bad.
Click to expand...
Click to collapse
hI,
Thanks,
I havnt tried yet but will asap. Where did you learn this stuff? I was reading this thread (I finally looked in general)
http://forum.xda-developers.com/showthread.php?t=872128
It has some info but real detailed, like in your script, the "chmod 644" the 644 part. I guess it takes time, I ave only had this TF for a week or so and it is my first android OS.
thanks again, (I will let you know when I try,
John
edit
Just wondering before I try this, the pull command (Is that backing up the libnvomx file to the pc?
after reading the thread linked above, wont I have to be in adb shell to geet permission to copy the file to the lib dir?
AustinMartin said:
I don't know if your rooting added the terminal app to the tf101.
You need to run the su(superuser) command to gain access to the system files.
I think you can run it from adb as well, if you used adb to root, then you probably already used this command.
Click to expand...
Click to collapse
I used nvflash and adb to install busybox and superuser and su.
I dont know anything about su or superuser, I havent found any threads with info on them yet.
thanks,
It might sound confusing but this is just all basic linux.
when you're running the adb shell just enter su. This gives you permission to edit the /system files
Then pull(copy) the file from your tf101, to your local machine. this is a backup.
Then change the permissions on the file on your tf101.
Then push the new file from your local machine to your tf101.
AustinMartin said:
It might sound confusing but this is just all basic linux.
when you're running the adb shell just enter su. This gives you permission to edit the /system files
Then pull(copy) the file from your tf101, to your local machine. this is a backup.
Then change the permissions on the file on your tf101.
Then push the new file from your local machine to your tf101.
Click to expand...
Click to collapse
Hi,
I broke down and used your script, I tried doing it on my own but kept getting errors. I did seem to get one error in this line of yours
adb chmod 644 /system/lib/libnvomx.so
when I ran it (and I copy and pasted it to dos window)) it gave an error, well not an error but it listed commands and switches like if there is a typo. I dont know if it took the command or not here is a paste
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Kerr Avon>cd adb
The system cannot find the path specified.
C:\Users\Kerr Avon>
C:\Users\Kerr Avon>cd\adb
C:\ADB>adb remount
remount succeeded
C:\ADB>adb pull /system/lib/libnvomx.so libnvomx.so.orig
3429 KB/s (189660 bytes in 0.054s)
C:\ADB>adb push libnvomx.so /system/lib/
1174 KB/s (164764 bytes in 0.137s)
C:\ADB>adb chmod 644 /system/lib/libnvomx.so
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storag
e)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or
recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specifie
d port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
C:\ADB>remount
'remount' is not recognized as an internal or external command,
operable program or batch file.
C:\ADB>adb remount
remount succeeded
C:\ADB>adb reboot
C:\ADB>adb reboot
Click to expand...
Click to collapse
Looks like it probably did work, anyway netflix is running.
some of the lines I tried that didnt work (and did) are here, not sure what was wrong.
adb push libnvomx.so /system/lib/
adb pull /system/lib/libnvomx.so libnvomx.so.orig
(I think push and pull wont work under shell)
*******************************************
cp /system/lib/libnvomx.so removable/microsd/isoa/libnvomx.so.orig
cp /system/lib/libnvomx.so removable/microsd/isoa/libnvomx.so.orig
cp isoa/libnvomx.so /system/lib/libnvomx.so
(dont know why these didnt work, I did su first)
***************************************************************
this worked!!!
cp /system/lib/libnvomx.so sdcard/isoa/libnvomx.so.orig
***************************************************************
cp sdcard/isoa/libnvomx.so system/lib/libnvomx.so
file exists error
********************************************************
Click to expand...
Click to collapse
Oh, so the android runs linux, or a version of it (like ubuntu, freebsd, etc...)? that should help me a lot. I installed ubuntu on one of my PC's a few years back but they didnt have drivers for sli and raid for my system at the time, I played with it a day or 2 and went back to MS. It has always been on the list to do. I am going to have to try it again.
I just looked, it looks like there are lots of new "distro's" (versions) now a day from back when I tried it.
anyway, thank you very much for the help,
John
once you did this:
C:\ADB>adb push libnvomx.so /system/lib/
1174 KB/s (164764 bytes in 0.137s)
you already copied it, so you must have already had permissions. Therefore this next command:
C:\ADB>adb chmod 644 /system/lib/libnvomx.so
Android Debug Bridge version 1.0.26
was redundant anyways. I suspect you needed to run
adb shell chmod 664 /system/lib/libnvomx.so
for adb to run the command on the transformer(shell) rather than in the dos directory.
AustinMartin said:
once you did this:
C:\ADB>adb push libnvomx.so /system/lib/
1174 KB/s (164764 bytes in 0.137s)
you already copied it, so you must have already had permissions. Therefore this next command:
C:\ADB>adb chmod 644 /system/lib/libnvomx.so
Android Debug Bridge version 1.0.26
was redundant anyways. I suspect you needed to run
adb shell chmod 664 /system/lib/libnvomx.so
for adb to run the command on the transformer(shell) rather than in the dos directory.
Click to expand...
Click to collapse
I see, so shell is like I am running it in/from the TF. I guess that is why push and pull doesn't work in shell, it could be confusing??
I downloaded/installed root explorer but I would rather learn it the harder way.
thanks again for your help!!
John
Cool. I wasn't sure about the "adb chmod" working since I'd only done that from a linux shell before this, but it was worth a shot. If you went into adb shell, then typed "mount -o rw,remount /system"; chmod 644 /system/lib/{whatever that file name was}; and mount -o remount,ro the thatt that would work", or I suspect he is right about how you can use "adb shell chmod 644 /../../.....".
Anyway, glad it worked out.
hachamacha said:
Cool. I wasn't sure about the "adb chmod" working since I'd only done that from a linux shell before this, but it was worth a shot. If you went into adb shell, then typed "mount -o rw,remount /system"; chmod 644 /system/lib/{whatever that file name was}; and mount -o remount,ro the thatt that would work", or I suspect he is right about how you can use "adb shell chmod 644 /../../.....".
Anyway, glad it worked out.
Click to expand...
Click to collapse
Hi,
If I shell, do su, then exit the shell (which I couldn't figure out how to do) do the su rights still apply, if I then use adb commands?
mount and remount, I see those are for mounting partitions, do the partitions each have different rights? and what does chmod do?
thanks again,
John
Xerravon said:
Hi,
If I shell, do su, then exit the shell (which I couldn't figure out how to do) do the su rights still apply, if I then use adb commands?
mount and remount, I see those are for mounting partitions, do the partitions each have different rights? and what does chmod do?
thanks again,
John
Click to expand...
Click to collapse
If you did an $su ; # inside the shell (adb shell), then when you typed in exit, that'd exit the shell, and cause any subshell's kicked off with a command (like "su" to pick one from a hat), to 'go away', So no, you wouldn't still be su.
But: There is a 'switch' or setting somewhere that brings up the adb shell in # su mode, but it escapes me right now.
Mount -o remount,rw||ro /{mountshare} (one command) will just remount some partition like system as you direct it to. It will 'outlast' the adb session. If you leave adb after doing a mount -o remount,rw /system, then you've left /system mounted rw. It doesn't hurt anything, but in theory you type in $sync; sync and $ mount -o remount,ro, and then the clean police will be happier.
chmod changes permissions. You could look up the man page on google, and it'll show you that you have 3 groups, owner, group and world. You could do the command in a couple forms, like #chmod {permission mask like 777} {filename} or chmod w+x {filename} where first one gave all permissions (rwe/rwe/rwe) to some file, 2nd gave the world execute permission.
hachamacha said:
If you did an $su ; # inside the shell (adb shell), then when you typed in exit, that'd exit the shell, and cause any subshell's kicked off with a command (like "su" to pick one from a hat), to 'go away', So no, you wouldn't still be su.
But: There is a 'switch' or setting somewhere that brings up the adb shell in # su mode, but it escapes me right now.
Mount -o remount,rw||ro /{mountshare} (one command) will just remount some partition like system as you direct it to. It will 'outlast' the adb session. If you leave adb after doing a mount -o remount,rw /system, then you've left /system mounted rw. It doesn't hurt anything, but in theory you type in $sync; sync and $ mount -o remount,ro, and then the clean police will be happier.
chmod changes permissions. You could look up the man page on google, and it'll show you that you have 3 groups, owner, group and world. You could do the command in a couple forms, like #chmod {permission mask like 777} {filename} or chmod w+x {filename} where first one gave all permissions (rwe/rwe/rwe) to some file, 2nd gave the world execute permission.
Click to expand...
Click to collapse
hI,
Thanks again, this is over my head right now, I am going to do like you say and search Google for a good beginners site. I am thinking about putting linux on my pc also, been wanting to for a while, I think that will help. I do know a lot more than I did when I started the thread
thank you,
John

[ROOT] LG Intuition & LG Spectrum ICS

Source: http://www.androidpolice.com/2012/0...root-the-lg-intuition-and-lg-spectrum-on-ics/
If you find this useful please follow me (jcase) on twitter ( https://twitter.com/teamandirc/ ).
Here you go, root for both the new LG Intuition and the LG Spectrum running ICS. The vulnerability is a simple permission bug allowing us to setup a symlink to local.prop (yes yet again). While the bug is the same, the procedure is slightly different, so I will have the instructions separate.
With the LG Intuition, they did seem to attempt to mitigate this attack. Not by setting correct permissions, but by dropping adbD to the shell user if it runs as root, even if ro.kernel.qemu=1 is set. They failed, they give us enough time to run one command before dropping the root privileges, in our case a script to root the phone.
LG Spectrum ICS Root (for the leaked ICS rom):
Expect this to be patched in the release rom. Leaked ICS rom has locked bootlaoders, ie no recovery at this point.
Files needed:
su ( http://dl.dropbox.com/u/8699733/lgroot/su )
adb shell
$ rm /data/vpnch/vpnc_starter_lock
$ ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
$ exit
adb reboot
adb wait-for-device shell
$ echo 'ro.kernel.qemu=1' > /data/local.prop
$ exit
adb reboot
adb wait-for-device remount
adb push su /system/xbin/su
adb shell
# chown 0.0 /system/xbin/su
# chmod 06755 /system/xbin/su
# rm /data/local.prop
# rm /data/vpnch/vpnc_starter_lock
# reboot
Once rebooted, install Superuser from the market and enjoy.
LG Intuition Root
Files needed:
su ( http://dl.dropbox.com/u/8699733/lgroot/su )
lgroot.sh ( http://dl.dropbox.com/u/8699733/lgroot/lgroot.sh )
adb push su /data/local/tmp/su
adb push lgroot.sh /data/local/tmp/lgroot.sh
adb shell
$ chmod 777 /data/local/tmp/lgroot.sh
$ rm /data/vpnch/vpnc_starter_lock
$ ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
$ exit
adb reboot
You may have to unplug/replug your phone to get some computers to pick it up again after this reboot.
adb wait-for-device shell
$ echo 'ro.kernel.qemu=1' > /data/local.prop
$ exit
Here is the important part, you will have to execute the next to commands one after the other. We want the second command to be fired off as soon as adbD comes up, before it drops root privileges. This may take some a few minutes, and after the second command is complete you may have to unplug/replug you phone to get your computer to see it again.
adb reboot
adb wait-for-device /data/local/tmp/lgroot.sh
(Here is where you may have to unplug/replug, but only after the second command has ran).
adb wait-for-device shell
$ su
# rm /data/local.prop
# rm /data/vpnch/vpnc_starter_lock
# reboot
Once rebooted, install Superuser from the market and enjoy.
Thanks!
Dude, it has been killing me not having root since I managed to get the leaked ICS installed. But I tried this, and just wasn't having any luck. I tried to make a .bat file for it, no go. So i tried inputting it line by line and i keep getting hung up at the $ echo 'ro.kernel.qemu=1' part. Just wondering if anyone else is having this problem.
Also, since yesterday whenever I check for a software update, I'm getting an "error occurred during download". I was wondering if I would even be able to get the final ICS OTA when it finally is available.
Thanks again jcase!
LostCauseSPM said:
Dude, it has been killing me not having root since I managed to get the leaked ICS installed. But I tried this, and just wasn't having any luck. I tried to make a .bat file for it, no go. So i tried inputting it line by line and i keep getting hung up at the $ echo 'ro.kernel.qemu=1' part. Just wondering if anyone else is having this problem.
Also, since yesterday whenever I check for a software update, I'm getting an "error occurred during download". I was wondering if I would even be able to get the final ICS OTA when it finally is available.
Thanks again jcase!
Click to expand...
Click to collapse
Which specific ICS version do you have, I had a couple different leaks to work with.
jcase said:
Which specific ICS version do you have, I had a couple different leaks to work with.
Click to expand...
Click to collapse
build #: IMM76D
Still tweeking on it. Just updated all my drivers, too. I'm not a total newb, but I'm no pro, either.
jcase said:
Source: http://www.androidpolice.com/2012/0...root-the-lg-intuition-and-lg-spectrum-on-ics/
LG Intuition Root
Files needed:
su ( http://dl.dropbox.com/u/8699733/lgroot/su )
lgroot.sh ( http://dl.dropbox.com/u/8699733/lgroot/lgroot.sh )
adb push su /data/local/tmp/su
adb push lgroot.sh /data/local/tmp/lgroot.sh
adb shell
$ chmod 777 /data/local/tmp/lgroot.sh
$ rm /data/vpnch/vpnc_starter_lock
$ ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
$ exit
adb reboot
You may have to unplug/replug your phone to get some computers to pick it up again after this reboot.
adb wait-for-device shell
$ echo ‘ro.kernel.qemu=1’ > /data/local.prop
$ exit
Here is the important part, you will have to execute the next to commands one after the other. We want the second command to be fired off as soon as adbD comes up, before it drops root privileges. This may take some a few minutes, and after the second command is complete you may have to unplug/replug you phone to get your computer to see it again.
adb reboot
adb wait-for-device /data/local/tmp/lgroot.sh
(Here is where you may have to unplug/replug, but only after the second command has ran).
adb wait-for-device shell
$ su
# rm /data/local.prop
# rm /data/vpnch/vpnc_starter_lock
# reboot
:crying:
Once rebooted, install Superuser from the market and enjoy.
Click to expand...
Click to collapse
i tried but as soon as i entered adb shell it kick me off and haven't been able to try since
jcase said:
Which specific ICS version do you have, I had a couple different leaks to work with.
Click to expand...
Click to collapse
Ive got the spectrum, btw. Still trying to make a nice, clean, automated .bat, but it keeps failing now at the remount command.
---------- Post added at 07:37 PM ---------- Previous post was at 07:24 PM ----------
And now is saying "rm failed for /data/vpnch..."
When the remount fails, I get a "remount failed: operation not permitted" message.
Hope this is useful to you.
LostCauseSPM said:
Ive got the spectrum, btw. Still trying to make a nice, clean, automated .bat, but it keeps failing now at the remount command.
---------- Post added at 07:37 PM ---------- Previous post was at 07:24 PM ----------
And now is saying "rm failed for /data/vpnch..."
When the remount fails, I get a "remount failed: operation not permitted" message.
Hope this is useful to you.
Click to expand...
Click to collapse
add [email protected] to gltak and hit me up.
lahegry said:
i tried but as soon as i entered adb shell it kick me off and haven't been able to try since
Click to expand...
Click to collapse
unplug/replug, The intuition is very touchy. Might need to do it from another system or with another cable.
jcase said:
unplug/replug, The intuition is very touchy. Might need to do it from another system or with another cable.
Click to expand...
Click to collapse
i don't think i'm fast enough, i just can't type faster than it kicks me off
lahegry said:
i don't think i'm fast enough, i just can't type faster than it kicks me off
Click to expand...
Click to collapse
Place the two commands into a batch file/shell script, or setup teamviewer and msg me on gtalk
so this is just I've come up with tonight, the exploit still fails line by line, so I made a batch file just for that command, and I think I may be misunderstanding that "adb mount - o" command you recomended.
Wow, this chrome is NOT liking this txt box, keeps jumping backwards for some reason. C'mon Google...
I've got the intuition and here is what I'm coming up with using cmd prompt in windows:
C:\android-sdk\platform-tools>adb push su /data/local/tmp/su
2642 KB/s (380532 bytes in 0.140s)
C:\android-sdk\platform-tools>adb push lgroot.sh /data/local/tmp/lgroot.sh
10 KB/s (164 bytes in 0.015s)
C:\android-sdk\platform-tools>adb shell
[email protected]:/ $ chmod 777 /data/local/tmp/lgroot.sh
chmod 777 /data/local/tmp/lgroot.sh
[email protected]:/ $ rm /data/vpnch/vpnc_starter_lock
rm /data/vpnch/vpnc_starter_lock
[email protected]:/ $ ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
[email protected]:/ $ exit
exit
C:\android-sdk\platform-tools>adb reboot
C:\android-sdk\platform-tools>adb wait-for-device shell
[email protected]:/ $ echo `ro.kernel.qemu=1' > /data/local.prop
echo `ro.kernel.qemu=1' > /data/local.prop
> exit
exit
> adb reboot
adb reboot
> adb wait-for-device /data/local/tmp/lgroot.sh
adb wait-for-device /data/local/tmp/lgroot.sh
> adb wait-for-device shell
adb wait-for-device shell
>
I believe I see where the mistake is, but don't know how to fix it.
---------- Post added 30th September 2012 at 12:02 AM ---------- Previous post was 29th September 2012 at 11:57 PM ----------
actually I don't see my mistake and I should be doing all this in PTP mode correct?
Try now, something was altering my post
arnshrty said:
I've got the intuition and here is what I'm coming up with using cmd prompt in windows:
C:\android-sdk\platform-tools>adb push su /data/local/tmp/su
2642 KB/s (380532 bytes in 0.140s)
C:\android-sdk\platform-tools>adb push lgroot.sh /data/local/tmp/lgroot.sh
10 KB/s (164 bytes in 0.015s)
C:\android-sdk\platform-tools>adb shell
[email protected]:/ $ chmod 777 /data/local/tmp/lgroot.sh
chmod 777 /data/local/tmp/lgroot.sh
[email protected]:/ $ rm /data/vpnch/vpnc_starter_lock
rm /data/vpnch/vpnc_starter_lock
[email protected]:/ $ ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
ln -s /data/local.prop /data/vpnch/vpnc_starter_lock
[email protected]:/ $ exit
exit
C:\android-sdk\platform-tools>adb reboot
C:\android-sdk\platform-tools>adb wait-for-device shell
[email protected]:/ $ echo `ro.kernel.qemu=1' > /data/local.prop
echo `ro.kernel.qemu=1' > /data/local.prop
> exit
exit
> adb reboot
adb reboot
> adb wait-for-device /data/local/tmp/lgroot.sh
adb wait-for-device /data/local/tmp/lgroot.sh
> adb wait-for-device shell
adb wait-for-device shell
>
I believe I see where the mistake is, but don't know how to fix it.
---------- Post added 30th September 2012 at 12:02 AM ---------- Previous post was 29th September 2012 at 11:57 PM ----------
actually I don't see my mistake and I should be doing all this in PTP mode correct?
Click to expand...
Click to collapse
Correction needed for Intuition
First of all, thank you!!!
For Intuition, where the 'important part' is, the second command returns an error.
I was able to succeed by running
adb reboot
adb wait-for-device shell
then wait for the # to appear, and quickly paste and execute:
/data/local/tmp/lgroot.sh
took a few tries, but I am rooted! :laugh:
krapman said:
First of all, thank you!!!
For Intuition, where the 'important part' is, the second command returns an error.
I was able to succeed by running
adb reboot
adb wait-for-device shell
then wait for the # to appear, and quickly paste and execute:
/data/local/tmp/lgroot.sh
took a few tries, but I am rooted! :laugh:
Click to expand...
Click to collapse
Just wondering how you guys like this device? I was just debating on switching to verizon and this device stands out as the most interesting to me... so I had to look here to see if anybody rooted it.
Anybody try any different roms? or think there may be a Jelly Bean update for it?
/system/bin/sh su not found
any help with this was having an issue with the echo command but got past that but now it's giving me this error
davieslacker said:
Just wondering how you guys like this device? I was just debating on switching to verizon and this device stands out as the most interesting to me... so I had to look here to see if anybody rooted it.
Anybody try any different roms? or think there may be a Jelly Bean update for it?
Click to expand...
Click to collapse
It's an amazing device I love it and im rooted. used the steps above and it worked. I am sure it will get jelly bean love eventually. No roms yet. But LG added a lot of customization to the device form what developers usually add as mods.
Will there be a single click method for root on the intuition. I can't seem to get this method to work
Exploit still works on the final version of ICS for the LG Spectrum
Just updated my phone. Couldn't wait for the OTA rollout, updated via the Verizon Wireless Update Util on my comp. Root worked no problem. Thanks again Jcase!
What did you update your phone to?
Sent from my VS950 4G using xda app-developers app

[GUIDE] Rooting Samsung Galaxy [email protected] GT-B5330

This might work on other devices.
WARNING: this might brick your phone use it at your own risk.
Warning you have to have some knowlage of linux to do this kind of stuff.
WARNING: actually you have to have _good_ knowlage of linux/gnu stuff to do it.
The idea is this is to make the /system/bin/toolbox from the stock rom suid (permision 6755, it originaly has 0755)
This is how I did it. It might be simpler.
get a stock rom that you want. for me it was B5330XWALH3
it is now available at samsung-updates.
You need odin (heimdal will not work with my phone) (my was 3.07)
unpack the zip.
you get a .tar.md5 file (the tar file has broken headers so tar from ubuntu 12.04 will not unpackit).
the tar file works in sectors of 512 bytes.
take out the md5sum at the end of file. (some thing like: head -c (the size up to the last md5sum) original.tar.md5 > file1)
split the file so you will have the system.img.md5 separated (some thing like: head -c (the size upto "system.img.md5") file1 > file2;
head -c (the size upto "dt-blob.md5") file1 | tail -c +(the size upto "system.img.md5" + 1) > file3;
tail -c +(the size upto "dt-blob.md5" + 1) file1 > file4
file3 now has the system.img.md5, trim the md5sum from the tail and the tar headr from head (ex.:
head -c (upto the md5sum output from the rear of the file) file3 | tail -c +513 > file5)
file5 is a sparce image file of an ext4 filesystem. run simg2img (from ext4fs_utils (search on xda)) (ex.:
simg2img file5 file6)
sudo mount -o loop,ro file6 /mnt
look for the file /mnt/bin/toolbox (ex.: ls -l /mnt/bin/toolbox) it will give you an output like this:
-rwxr-xr-x 1 root 2000 99068 Aug 9 07:59 /mnt/bin/toolbox
sudo umount /mnt
the permisions and the size of the file yield the following hex sequence that you get in the file (we will hexedit the ext4 fs): ED 81 00 00 FC 82 01 00
in file3 edit the sequence (it should be only one in the file) from ED 81 00 00 FC 82 01 00 to ED 8D 00 00 FC 82 01 00 (practically adding the suid guid bits to the inode of the toolbox)
we are almost done, now to pack our bags and go.
verify that you have indeed put suid guid to toolbox:
head -c (upto the md5sum output from the rear of the file) file3 | tail -c +513 > file5;
simg2img file5 file6;
sudo mount -o loop,ro file6 /mnt;
ls -l /mnt/bin/toolbox
It should give an output:
-rwsr-sr-x 1 root 2000 99068 Aug 9 07:59 /mnt/bin/toolbox
sudo umount /mnt
recalculate the md5sum to the _expanded_ image: md5sum file6 > file7
overide the md5sum at the end of file3 with the one from file7
now pack the pieces in one tar: cat file2 file3 file4 > myfirmware.tar
add the md5sum to it: md5sum myfirmware.tar >> myfirmware.tar
change the name to .tar.md5: mv myfirmware.tar myfirmware.tar.md5
copy the file on a windowze machine (that has odin and the samsung drivers intalled).
update with odin the new firmware (which you should put in the PDA section) (don't forget to un check the repartitioning).
you should have now a practivally rooted device.
in order to have su and Superuser.apk on it you have to do the following steps:
push with adb su, busybox and Superuser.apk into /data/local/tmp on device (you get the files from other forums here at xda)
the next steps are on device (use adb shell)
verify that indeed we have a suid toolbox: ls -l /system/bin/toolbox should give that wanderfull -rwsr-sr-x permission.
find a rw mount that has suid (in my case a tmpfs is mounted /mnt/obb)
copy su to /mnt/obb (remember that we have suid toolbox this means that toolbox now gives you root on any command):
dd if=/data/local/tmp/su of=/mnt/obb/su
give su suid and make it owned by root: chmod 6755 /mnt/obb/su; chown 0.0 /mnt/obb/su
run su now and enjoy the #: /mnt/obb/su -
Click to expand...
Click to collapse
Ofcorse after you get # you should remount /system as rw, copy su in /system/xbin, copy Superuser.apk in /system/app, copy busybox in /system/xbin, make symlinks to busybox for all the comands in /system/xbin.
You should also upon success remove suid from toolbox so as to not mistakely do damage to the system (for instance "rm /")
And here you have it.
If you do not understand what I have done, you should read more linux / tar / ext4 / md5sum.
This method should work for any phone provided that it has odin as bootloader and there is the stock rom available.
hello
I don't have knowledge about how you have rooted the firmware for b5330, the steps you made are waaaay to dificult for me . Could you provide here an already rooted firmware, to download and install. thanks in advance
ETTT said:
This might work on other devices.
WARNING: this might brick your phone use it at your own risk.
Warning you have to have some knowlage of linux to do this kind of stuff.
WARNING: actually you have to have _good_ knowlage of linux/gnu stuff to do it.
The idea is this is to make the /system/bin/toolbox from the stock rom suid (permision 6755, it originaly has 0755)
This is how I did it. It might be simpler.
Ofcorse after you get # you should remount /system as rw, copy su in /system/xbin, copy Superuser.apk in /system/app, copy busybox in /system/xbin, make symlinks to busybox for all the comands in /system/xbin.
You should also upon success remove suid from toolbox so as to not mistakely do damage to the system (for instance "rm /")
And here you have it.
If you do not understand what I have done, you should read more linux / tar / ext4 / md5sum.
This method should work for any phone provided that it has odin as bootloader and there is the stock rom available.
Click to expand...
Click to collapse
bogdan_rize said:
I don't have knowledge about how you have rooted the firmware for b5330, the steps you made are waaaay to dificult for me . Could you provide here an already rooted firmware, to download and install. thanks in advance
Click to expand...
Click to collapse
no need to upload 400M for this little modification.
I'm unable to post links, goto samsung-updates
go and download B5330XWALI2_B5330OXXALI2_B5330XWLH1_HOME stock firmware.
and apply this xdelta patch over it.
xdelta patch sGTB5330.patch B5330XWALI2_B5330OXXALI2_B5330XWLH1_HOME.tar.md5 myfrm.tar.md5
Click to expand...
Click to collapse
after that you have the firmware that I use to root my phone.
Still... this firmware will not have "su" install, it will just be a rootable firware because it has a suid'ed toolbox.
a suid'ed toolbox in android means that you can exec chown and chmod as a root.
So. After the patching of the stock rom and flashing it. you have to have this md5sum output:
032b4344ab503c8413db9127efaa3d83 myfrm.tar.md5
Click to expand...
Click to collapse
odin will accept it (I've used Oding 3.07).
after that you push the files from the attached tar.gz to /data/local/tmp
tar -xzf superuser_stuff.tar.gz
adb push su /data/local/tmp
adb push Superuser.apk /data/local/tmp
adb push busybox /data/local/tmp
Click to expand...
Click to collapse
after that you bassically have to run this commands in an android shell in order to get to a stardard rooted android:
adb shell # enter the in the phone
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nologer with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
Click to expand...
Click to collapse
have fun.
I downloaded this firmware: Samsung-Updates.com-GT-B5330_COA_1_20120913171601_pducfx5hbw.zip. Where, how, what???...i unzipped it and now how to apply the patch? The rest of the stept i think i get it....i think For you it's easy to say, for me it's hard to do. I've had sgs1, sgs2 and sgs3, and the root of those was sooooooo easy... but this piece of crap b5330 drives me crazy )
ETTT said:
no need to upload 400M for this little modification.
I'm unable to post links, goto samsung-updates
go and download B5330XWALI2_B5330OXXALI2_B5330XWLH1_HOME stock firmware.
and apply this xdelta patch over it.
after that you have the firmware that I use to root my phone.
Still... this firmware will not have "su" install, it will just be a rootable firware because it has a suid'ed toolbox.
a suid'ed toolbox in android means that you can exec chown and chmod as a root.
So. After the patching of the stock rom and flashing it. you have to have this md5sum output:
odin will accept it (I've used Oding 3.07).
after that you push the files from the attached tar.gz to /data/local/tmp
after that you bassically have to run this commands in an android shell in order to get to a stardard rooted android:
have fun.
Click to expand...
Click to collapse
bogdan_rize said:
I downloaded this firmware: Samsung-Updates.com-GT-B5330_COA_1_20120913171601_pducfx5hbw.zip. Where, how, what???...i unzipped it and now how to apply the patch? The rest of the stept i think i get it....i think For you it's easy to say, for me it's hard to do. I've had sgs1, sgs2 and sgs3, and the root of those was sooooooo easy... but this piece of crap b5330 drives me crazy )
Click to expand...
Click to collapse
I've used xdelta package.
if you are on win then you're on your own.
there is xdelta.org and it seems to have pachage for windows.
for sgs[123] was easy because are main streams. may hackers were working on it.
this device is very new/obscure.
I whould have made a script, but alas, "heimdal" firmware loader whould not work with this device.
I've used linux to patch the firmware and windowze to upload it.
So a script whould be imposible, but after you pach .tar.md5 file and load it on your phone is just about cut and paste form my previous post.
My hope is that a more android savy guy will take this concept and make it a script.
I am just happy that I can now have debian on my phone.
yes, i am on win....there is no way to patch that COA firmware (i am from romania) and upload somewhere to download???i know i am probably asking to much from you, but i dont't think i will manage by my own...this rooting busines is driving me crazyyyyy :crying::crying::crying: thank you so much for your answer!!!
ETTT said:
I've used xdelta package.
if you are on win then you're on your own.
there is xdelta.org and it seems to have pachage for windows.
for sgs[123] was easy because are main streams. may hackers were working on it.
this device is very new/obscure.
I whould have made a script, but alas, "heimdal" firmware loader whould not work with this device.
I've used linux to patch the firmware and windowze to upload it.
So a script whould be imposible, but after you pach .tar.md5 file and load it on your phone is just about cut and paste form my previous post.
My hope is that a more android savy guy will take this concept and make it a script.
I am just happy that I can now have debian on my phone.
Click to expand...
Click to collapse
bogdan_rize said:
yes, i am on win....there is no way to patch that COA firmware (i am from romania) and upload somewhere to download???i know i am probably asking to much from you, but i dont't think i will manage by my own...this rooting busines is driving me crazyyyyy :crying::crying::crying: thank you so much for your answer!!!
Click to expand...
Click to collapse
ok here it is the modified firmware.
http://dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Interesting, reading carefully
Sent from my GT-B5330 using xda app-developers app
Thank you so much, tomorow morning i know how i'll spend my time...installing and rooting my b5330, unfortunately this evening i don't have my laptop on me forgoted at work ), but i've downloaded the firmware from phone and now waiting to have it done...finally!!! I'll let you know what have i done. Have a nice day and once again thanks!!!
ETTT said:
ok here it is the modified firmware.
http://dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Click to expand...
Click to collapse
it's not working, when i'm trying to adb remont it says: remount failed: Opertaion not permited. After i flashed with odin the firmware you gave to me, i think i do not have permission to make any changes, and i don't know why
ETTT said:
ok here it is the modified firmware.
http://dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Click to expand...
Click to collapse
Can you make patch for dxlh3..? Thanks
Sent from my GT-B5330 using xda app-developers app
bogdan_rize said:
it's not working, when i'm trying to adb remont it says: remount failed: Opertaion not permited. After i flashed with odin the firmware you gave to me, i think i do not have permission to make any changes, and i don't know why
Click to expand...
Click to collapse
There commands are supposed to be given in a command line box (cmd on win).
where does it gives you error?
adb shell # enter the in the phone
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nologer with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
finally it worked
yeeeees, damn you're good!!!! i have managed to root my b5330, root checher tell me that i am rooted and busybox is instaled...the only problem is that it shows me that i do not have installed superuser and supersu. Is there a problem if i just copy paste the apk file (supersu.apk and superuser.apk -> i've downloaded the pro version of bouth of them ) straight into the directory /data/local/tmp where it should be? or to copy-paste in another directory. Thanks in advance, CMD(and adb shell) gave me headache, but i finally got it an succedeed )) :victory::good:
ETTT said:
There commands are supposed to be given in a command line box (cmd on win).
where does it gives you error?
adb shell # enter the in the phone
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nologer with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
Click to expand...
Click to collapse
bogdan_rize said:
yeeeees, damn you're good!!!! i have managed to root my b5330, root checher tell me that i am rooted and busybox is instaled...the only problem is that it shows me that i do not have installed superuser and supersu. Is there a problem if i just copy paste the apk file (supersu.apk and superuser.apk -> i've downloaded the pro version of bouth of them ) straight into the directory /data/local/tmp where it should be? or to copy-paste in another directory. Thanks in advance, CMD(and adb shell) gave me headache, but i finally got it an succedeed )) :victory::good:
Click to expand...
Click to collapse
1. I'm glad you got it.
2. You should give thanks (that button) if I helped you.
3. I'm you dont read instructions. Maybe it's a problem with us romanian engineers, or maybe engineers in general
look at item 11. from my previous post. maybe I just c&p here.
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
So, when you are in adb shell and you go root (su command, you get the promt with #) and you have the /system mounted rw.
Then any apk that you copy to /system/app folder will get intalled and when you list your application (the button with 16 squares) you should see it.
Have fun.
i was having trouble understanding adb shell and cmd from the begining. I never used this command tool...ever ) and i think from yesterday to this day i managed really ok . Anyway i think i will just copy-paste the superuser.apk in "app" folder directly in the system (it's the same thing, isn't it??). I have done that in item 11., and after a restart supersu was instaled, only superuser.apk didn't, i think i wrote something wrong in adb shell
ETTT said:
1. I'm glad you got it.
2. You should give thanks (that button) if I helped you.
3. I'm you dont read instructions. Maybe it's a problem with us romanian engineers, or maybe engineers in general
look at item 11. from my previous post. maybe I just c&p here.
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
So, when you are in adb shell and you go root (su command, you get the promt with #) and you have the /system mounted rw.
Then any apk that you copy to /system/app folder will get intalled and when you list your application (the button with 16 squares) you should see it.
Have fun.
Click to expand...
Click to collapse
hihihi
neeeah, my bad, i thought that in "superuser_stuff" is superuser and supersu files, it was just su->for superuser.apk, easy peasy, it worked and installed from the first time...it was just me verry verry dizzy and confused. Your guide is 100% OK, my phone is rooted and now i can enjoy !!!
ETTT said:
1. I'm glad you got it.
2. You should give thanks (that button) if I helped you.
3. I'm you dont read instructions. Maybe it's a problem with us romanian engineers, or maybe engineers in general
look at item 11. from my previous post. maybe I just c&p here.
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
So, when you are in adb shell and you go root (su command, you get the promt with #) and you have the /system mounted rw.
Then any apk that you copy to /system/app folder will get intalled and when you list your application (the button with 16 squares) you should see it.
Have fun.
Click to expand...
Click to collapse
can you release xdelta patch for your XWALH3 because we have the same device..
phyxar said:
can you release xdelta patch for your XWALH3 because we have the same device..
Click to expand...
Click to collapse
I've started a new more universal thread:
http://forum.xda-developers.com/showthread.php?t=1965600
There you have the shell-script that will patch the firmware for you.
If you still want an xdelta patch I'll make one for you but:
Give a man a fish and it will be full for the day, teach him how to fish and it will never go hungry again.
Have fun.
ETTT said:
ok here it is the modified firmware.
dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Click to expand...
Click to collapse
Hello, i'm new here and i don't know about scripting, so need your help..
i downloaded your firmware and install it to my b5330 and did the cmd command, and it worked, thanks..:good:
but now i've a new problem that my b5330 can't type a question mark ('?').. can you help me please..
whenever i want to type a question mark it always typed a comma (',') in the screen..:crying:
it also it change the symbol and language key to emoticon and symbol, but that's not a problem for me..
andhikarogue said:
Hello, i'm new here and i don't know about scripting, so need your help..
i downloaded your firmware and install it to my b5330 and did the cmd command, and it worked, thanks..:good:
but now i've a new problem that my b5330 can't type a question mark ('?').. can you help me please..
whenever i want to type a question mark it always typed a comma (',') in the screen..:crying:
it also it change the symbol and language key to emoticon and symbol, but that's not a problem for me..
Click to expand...
Click to collapse
That's because you have use the romanian firmware. whitch has a qwerty layout keyboard.
you have to do it the right way:
first. find the firmaware for your region:
http://samsung-updates.com/device/?id=GT-B5330
second. find a linux machine and run the script from the thread.
It is unrealistic for me to just upload all the 40 version of the firmware patched.
That is why I've made the script.
If you don't have a linux machine then look for a virtual box ubuntu and run on it.
Cheers.

[Q] Disable proximity sensor via terminal emulator

Hi @ all,
I have that following problem: My phones display turns off automatically while im receiving or doing a call. My proximity sensor is broken and i would like disable it and i found a good solution here in this formus:
http://forum.xda-developers.com/showthread.php?t=925814&page=5
# cd /data/local
# touch userinit.sh
# echo "#!/system/bin/sh" > userinit.sh
# echo "#" >> userinit.sh
# echo "chmod 0000 /dev/cm3602" >> userinit.sh
# echo "chmod 000 /dev/cm3602" >> userinit.sh
# chmod 777 userinit.sh
But there's a little problem. I'm not well in programming - now my question is: can someone cange the code that it fit's to my phone. It's a Desire S with CyanogenMod 10 Beta.
Would be very thankful!
our phone has a /dev/cm3602 as well, so it probably uses the same chip.
note: the following is untested
Code:
cat>/etc/init.d/98-disable-sensor<<EOF
#`which sh`
chmod 000 /dev/cm3602
EOF
run that through adb shell and if your kernel has init.d support it will automatically disable your proximity sensor every boot. disable the sensor for your current session by running a simple 'chmod 000 /dev/cm3602' through adb shell.
THX! I will try it out soon.
Sent from my Desire S using xda app-developers app
I've just figured out that those commands won't work as is -- I stupidly forgot you need to remount system r/w and make the file executable for it to run. This should work (still didn't test it) -- run it all in an adb shell:
Code:
mount -o remount,rw /system
cat>/etc/init.d/98-disable-sensor<<EOF
#!`which sh`
chmod 000 /dev/cm3602
EOF
chmod 755 /etc/init.d/98-disable-sensor
mount -o remount,ro /system
i just tried it out and it says
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # cat>/etc/init.d/98-disable-sensor<<EOF
cat>/etc/init.d/98-disable-sensor<<EOF
> #!'which sh'
#!'which sh'
> chmod 000 /dev/cm3602
chmod 000 /dev/cm3602
> EOF
EOF
sh: can't create temporary file /sqlite_stmt_journals/mksh.vXIer13043: No such file or directory
but simply 'chmod 000 /dev/cm3602' works fine for one session! thanks!
Ooh, joy, it's that bug in the android shell that I'd forgotten about.
Try this instead:
In an adb shell, run 'which sh'. Note the path it returns.
On your computer, copy the following to a text file named '98-disable-sensor'. Be sure to use an editor (e.g. Notepad++) that can save with LF newline bytes and make sure you tell it to do that! (Under Windows, a newline is marked by the bytes \r\n, which is wrong for Linux - it should be just \n. Save the file as 'Unix text file' or something like that when asked.)
Code:
#!/path/to/sh/you/wrote/down/earlier
chmod 000 /dev/cm3602
Push it to your device: 'adb remount' + 'adb push 98-disable-sensor /etc/init.d/'
Make it executable: 'adb shell chmod 755 /etc/init.d/98-disable-sensor'
Remount system r/o again: 'adb shell mount -o remount,ro /system'
Aquous said:
Ooh, joy, it's that bug in the android shell that I'd forgotten about.
Try this instead:
In an adb shell, run 'which sh'. Note the path it returns.
On your computer, copy the following to a text file named '98-disable-sensor'. Be sure to use an editor (e.g. Notepad++) that can save with LF newline bytes and make sure you tell it to do that! (Under Windows, a newline is marked by the bytes \r\n, which is wrong for Linux - it should be just \n. Save the file as 'Unix text file' or something like that when asked.)
Code:
#!/path/to/sh/you/wrote/down/earlier
chmod 000 /dev/cm3602
Push it to your device: 'adb remount' + 'adb push 98-disable-sensor /etc/init.d/'
Make it executable: 'adb shell chmod 755 /etc/init.d/98-disable-sensor'
Remount system r/o again: 'adb shell mount -o remount,ro /system'
Click to expand...
Click to collapse
Hi
Do you know what is the command to turn off all sensors ?
i want to execute the command when screen is off (by xposed edge)
and turn on again when screen is on
loopypalm said:
Hi
Do you know what is the command to turn off all sensors ?
i want to execute the command when screen is off (by xposed edge)
and turn on again when screen is on
Click to expand...
Click to collapse
I use the below command on low battery trigger via Tasker
Code:
cmd statusbar click-tile com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff
varunpilankar said:
I use the below command on low battery trigger via Tasker
Code:
cmd statusbar click-tile com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff
Click to expand...
Click to collapse
Thx but i don't want to use tasker or any extra app
loopypalm said:
Thx but i don't want to use tasker or any extra app
Click to expand...
Click to collapse
Us can use the via adb or shell script event trigger.
varunpilankar said:
Us can use the via adb or shell script event trigger.
Click to expand...
Click to collapse
what is the adb comand ?
loopypalm said:
what is the adb comand ?
Click to expand...
Click to collapse
Code:
adb shell cmd statusbar click-tile com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff
varunpilankar said:
Code:
adb shell cmd statusbar click-tile com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff
Click to expand...
Click to collapse
it work on PC but no luck in terminal/xposed edge
Edit : i found a way !
replace "adb shell" with "#!/bin/sh" work
If you have root then you can use Su directly
varunpilankar said:
If you have root then you can use Su directly
Click to expand...
Click to collapse
and the comand is ?
terminal - type
su
cmd statusbar click-tile com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff

Categories

Resources