{Tutorial} [How to use ADB] For Beginners (Part 1) - Sony Xperia P, U, Sola, Go

The purpose of this thread is to make u familiar with the ADB (Android Debug Bridge)
It is a tool that lets u communicate with ur android device that is connected to ur pc.
In the first tutorial we shall learn some basics of adb and then advance to use pro commands in further tutorials.
Requirements
1. Adb link - http://dl.google.com/android/adt/adt-bundle-windows-x86-20130219.zip
2. Windows based pc ( yes we will use windows and not linux as i dun want to communicate anything that i havent tried by myself )
1. Download and extract the zip ADB in any drive , lets say C:
2. Go to C:/adb/sdk/platform-tools and u will something like
View attachment 1937059
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3. Now press shift key + right click on mouse/keypad
http://forum.xda-developers.com/attachment.php?attachmentid=1936847&stc=1&d=1367732560
select open command window here
then type adb start-server
in order to ensure ur device is connected and recognized by adb , type adb devices , u will get something like this
View attachment 1940190
Now once your adb is setup up, lets play.....
GETTING LOGCAT THROUGH ADB​
Easiest of all
just type
adb logcat
u will see entire log ur phone,
use ctrl+c to skip it
To get logcat in a file
type
adb logcat > logcat.txt
u will see a file logcat which will save ur phone's realtime process log.
TO GET A BUGREPORT​
type adb bugreport
bt bt bt.. this will show info that wont b readable ..
so type
adb bugreport>result.txt
http://forum.xda-developers.com/attachment.php?attachmentid=1936973&d=1367737608
USING ADB WITH SUPERUSER PERMISSIONS
for this , u must be rooted
command
adb root
if it is success it will show something like
http://forum.xda-developers.com/attachment.php?attachmentid=1937056&stc=1&d=1367740210
INSTALLING AN APP VIA ADB​
to install any app, make sure there is no space in the name of the apk...
and u should know its location,
command that u use is adb install
i have installed a game papertoss via this command, if u get success u will get something like this
View attachment 1936893
View attachment 1940189
COPYING A FILE VIA ADB​
this is pretty easy
command u use is
adb pull
i have given a example by pulling the framework-res.apk from system/framework folder
View attachment 1940191
the file that u pull, u will see it in the platform -tools folder
PUSHING A FILE INTO YOUR PHONE​
very similar to pull, bt this copies file from ur pc to ur android .
command u use is
adb push
For eg,
i have pushed the papertoss.apk file from C:\sanket\apps to sdcard/nimbuzz folder through the command
adb push C:\SANKET\apps\papertoss.apk /sdcard/nimbuzz
if u get success u will see something like this
http://forum.xda-developers.com/attachment.php?attachmentid=1937039&stc=1&d=1367739756
this command is very powerful and u can shift an entire video or movie folder via a single command anywhere on ur android
more commands added
thanks to @Guich
Code:
adb remount
This command remount the /system partition in read/write
Code:
adb usb
Restarts the adbd daemon listening on USB
Code:
adb shell
Run remote shell interactively
The command set shall b updated within few days.
Feel free to drop ur comments, corrections, commands.
All commands have been verified by me..
once i learn more, i will share more.
criticism is welcomed if its healthy
Thread material is not copied and will never be.
Thread will be updated with newer and complex commands soon with pics.
For developers, this is just a piece of cake which they can do with their eyes closed
i have made this specially for beginners ( like me )
PS - make sure the path name has no spaces
Also take care of the upper and lower case letters
Thanks @hiratafabio

op modified
new commands added

Reserved just in case

drsanket_xperia_u said:
Reserved just in case
Click to expand...
Click to collapse
Nice tut doctor g...
Sent from my MT27i using xda app-developers app

thanx a lot for this, keep it up&going !

For windows fan qtadb is much better I prefer Linux but used qtadb :beer:
Sent from my Xperia P using Tapatalk 2

Thanks mate
Sent from my LT22i using xda app-developers app

Thanks Bro, Great Tuto !!!:victory:

There are a lot of command
However, nothing

Interesting

Just what i was looking for! Thank you mate, great work!

Great tuto, well explained

Nice done, good explained
..::[ Pandemic ]...:: Face The Insanity With My Xperia P
.....:::: Jelly Bean Moonbreakers Member 4 Ever ::::....

Good and simple tutorial, thanks!
I have a question, though. Today I pushed a file from my PC to my device and it went OK, but when I tried to push another, all I got was the adb command list, as if I typed 'adb help'. I killed adb server, restarted it, no luck. Restarted the phone, no luck either. Tried 'adb device' to see if listed the device and it did, do it was connected.
What can it be?

hiratafabio said:
Good and simple tutorial, thanks!
I have a question, though. Today I pushed a file from my PC to my device and it went OK, but when I tried to push another, all I got was the adb command list, as if I typed 'adb help'. I killed adb server, restarted it, no luck. Restarted the phone, no luck either. Tried 'adb device' to see if listed the device and it did, do it was connected.
What can it be?
Click to expand...
Click to collapse
Try
Adb start-server
Adb remount
Sent from my ST25i using Tapatalk 2

drsanket_xperia_u said:
Try
Adb start-server
Adb remount
Sent from my ST25i using Tapatalk 2
Click to expand...
Click to collapse
Will try, thanks!
Edit: No luck, when giving 'adb remount', system says 'Operation not permitted'

hiratafabio said:
Will try, thanks!
Edit: No luck, when giving 'adb remount', system says 'Operation not permitted'
Click to expand...
Click to collapse
Okay when u open cmd
Make sure u run it as administrator
Secondly
Try adb root
Which rom are u using???
Edit _ just saw ur signature

drsanket_xperia_u said:
Okay when u open cmd
Make sure u run it as administrator
Secondly
Try adb root
Which rom are u using???
Edit _ just saw ur signature
Click to expand...
Click to collapse
My user has administrator rights, so I guess it's OK, right?
Funny thing is that works for only one push, if I try another, it doesn't work.
adb root gives 'adbd cannot run in production builds' error.
I guess I figured it out: filenames can't have spaces, is this correct? I tried pushing files that have spaces and it didn't work. When I renamed them, it worked like a charm. First I thought the problem was the path, that adb couldn't push files that were two or more levels inside folders, but some I was able to push, others I wasn't, but I also figured out that the path can't have spaces on it.
So that's it, no spaces in both path and filenames do the trick. I think it's a good tip to have in the OP, so people get aware of it if they face a problem just like I did.
Thanks again!

Lol buddy yes files names cant have spaces and also u need to take care of upper n lower case
Edit _ I will add this to op @hiratafabio.. Thanks

Awaiting part 2
Free to choose....

Related

[TUTORIAL] How to Network Unlock Samsung Galaxy Ace Via ADB

Method outdated and risky.
Improved method: http://forum.xda-developers.com/show...5#post17148825
Hi Everybody, Im Jcmaster and im Kind of new in this forum, i have been following this forum for some time ind i think its time to give something to this comunity, i have been searched for a while and found nothing like this, i'dont know if this is ilegal (i dont think so) or if it is in the wrong section but i will continue any ways.
Ok this is to all the people who had they phones bricked while doing this, First of all, i succesfully Bricked my phone and bring it back to life by doing the following.
I was reading all the messages from people who bricked their phones by doing this tutorial and i did not understand how they did it so i tried to brick my phone to see how to fix it, but the only way i could do this was by skiping the last step, umount /efs, when i did not make this and restarted my phone, the phone get bricked, it onli lighted up the screen and do nothing.
Once i managed to brick my phone i just downloaded the KPN gingerbread rom, and the brazilian rom, y followed this tutorial to unbrick my phone: This is The Tutorial
I Installed the KPN with the OPS and the Modem files of the brazilian rom, once i got the rom running my phone was kinda messy, some random error messages and many more, so i did a wipe of the chache and dalvik and restarted the phone an it was ok, and the i installed the Fla.sh rom via odin and thats the rom im runing now and i dont have any problem, well thats how i bricked/unbricked my phone on purpose, and dont forget the last step, umount/efs. i hope it works for somebody because i worked with me.
Firts Things First, I'm not responsible for a, Brick or semibrick that may come with this tutorial i have succesfully unlocked 15 Phones and by the thime they dont have any problem, so i suggest to read the entire post as many times is needed to understand the entire procedure & clarify all the doubts that you may have.
If you have a cuestion, please ask it, its better to wait some time until you have an answer that brick your phone, and also your cuestions are usefull for other people.
Once this is understood lets proceed.
Ok ill start with the Requirements.
You Will Need:
Your Samsung Galaxy Ace (obviously)
The original Usb Cable that comes with the phone.
Your Computer (I will use Windows XP for the demonstration, because i dont know how to do it with other O.S)
Your Phone has to be Rooted
Samsung Kies Installed Wich can be found HERE
ADB wich comes with Android SDK and can be found HERE
Ok Once you have all that stuff we can continue.
I will not teach how to Root your device because custom roms are already rooted and if you have a stock rom there are plenty tutorialn on hou to root it, and also i will not teach you how to install Kies because its realle easy and anyone can do it, i will only teach you how to install Andoid SDK and the specific ADB Package OK lets start.
Once you have downloaded the Android SDK Run the Installer trough all the steps to install it, I recomend to Install it in "C:" disk so it makes easier to make al the further steps, if it ask for the Java SDK just download and install, restart the Android SDK Installer and continue, Once its Fully Installed open it and do this next steps:
1-Go to the "Available Packages" Option on your left Menu
2-Click on the "Refresh" Button ond the bottom Right and wait until it finish
3-From Items select the "Andoid SDK platform-tools, revision 6" Item
4-Click the "Install Selected" button on the botton right and wait until it finish
5-Now you can either close the SDK or leave it open.
Image:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​
Now that you installed the SDK and the ADB its time to set the Path so the cmd.exe recognizes the ADB, there are two methods, One With cmd.exe (console) and one with the My PC Properties, i will explain bot of them.
Cmd.exe (console) Method.
Click on your start button and select "Run" from the Start Menu, type cmd.exe on the box and press enter.
Once the CMD its open write the next Text: set PATH=%PATH%;C:\android\android-sdk-windows\platform-tools
The text Write in Bold means your SDK Installation Directory, thats why i told you to Installa the sdk In C: Disk, just check that your Installation Directory is the same as mine or modify the line according to your needs.
My PC Properties Method.
Open My PC, and Right click on a blank space,
Select "Properties" from the just opened contextual menu,
On My PC Properties select the "Advanced Options" Tab
On the "Advanced Options" tab click on the "Environment Variables" button.
Now Mark the "Path" Variable and click the "Edit" Button.
At the end of the line add this text:
;C:\android\android-sdk-windows\platform-tools
Remember that The text Write in Bold means your SDK Installation Directory, thats why i told you to Install the SDK In C: Disk, just check that your Installation Directory is the same as mine or modify the line according to your needs.
Ok now you have completly installed the android SDK and the ADB (Android Debugging Bridge) and you can now do the final steps to Unlock or Get the Unlock Code for Your Samsung Galaxy Ace.
Ok now that you have Installed all the necessary programs:
Connect your SGA to your Computer via the included USB Cable. (the drivers should be installed by now, Kies installs them automaticaly)
Click on you start button and open the "Run" option, on Run type cmd.exe and press enter.
Now on Cmd.exe type the next text to acces the ADB Shell:
cd C:\android\android-sdk-windows\platform-tools
Remember that this means your Android SDK Installation directory, so if you get an error, check that the route is well writed and if you installed it in a diferent directory just modify the line so it fits to your needs, just remeber to pur - instead of spaces and \ (not / ) to indicate folders.
Image:
​Now that you are in "C:\android\android-sdk-windows\platform-tools" type: adb shell
Image:
​Now That you are in adb shell type the next command: su
At this point you have to give root premission to adb shell on you Phone
Image:
​Ok now that adb shell has root premission and its inside you phone, type the next line:
cd /
Now be carefull and notice that there are spaces in the line and that we are using / instead of \
Image:
​Ok now that you typed cd / type the next line: mount -o remount rw /
Image:
​Ok Now type: mkdir /efs
Image:
​And now type: mount -o nosuid,ro,nodev -t vfat /dev/block/stl5 /efs
Image:
​And now type: cat /efs/mits/perso.txt
And you will get some strange characters on the screen and a 8 digit number, thats your unlock code, copy it in paper or in a Notepad file, but check it twice so you get the correct number, also the number provided is unique so dont try to use your number with other phones or use my number with yours.
Image:
​
Ok Now that you Have your Code just type: umount /efs
And disconnect your phone from your computer, turn off your Phone and insert a SIM from another company, it will ask for the Unlock Code, just type the code that you just get and you are done, your phone is now unlocked and without brick risk.
Image:
​Now you can check that your cellphone is unlocked by typing the next code on your numeric keyboard, like if you where doing a call: *#7465625#
Image:
​
And thats it, its really easy, and its really safe if you read everything, and clear your doubts.
All the images are mine and i learned this from a friend of my, but its tested in 15 Samsung Galaxy Ace Phones an none get hurt XD,
Well thats it, remember to comment and ask as many times you need, im glad to answer all of your questions, se you later
​
great tutorial. very detailed and easy to understand.lucky for me my phone is already unlocked out of the box
Sent from my GT-S5830 using XDA Premium App
Thank you Im gonna try it
This works with every android? or every samsung android?
Or its just ACE?
once again GREAT TUTORIAL
Gh0s7_Hun73r said:
Thank you Im gonna try it
This works with every android? or every samsung android?
Or its just ACE?
once again GREAT TUTORIAL
Click to expand...
Click to collapse
I havent tried, but maybe it can work i just tried with galaxy ace because one friend of my bought several of them to sell and i unlocked them all, well its just matter of trying
Just tried on mine. Works perfect!!!!!!!! Thank youuuuu
Sent from my GT-S5830 using XDA App
Thanks for ur contribution......... Luckily we dont have network lock in our country
Now thanks to you, I dont have it either
hehehehehe .... This may encourage other to buy ACE..... More Aces Strong community
ThanKS! i got the code.
I was denied access trying to go to into SU because I made a mistake in Cmd.exe (console) Method.
I then tried My PC Properties and it worked.
umount /efs did not do anything so i just used exit.
Deserves to be in development thread.
Did you follow the steps with the SIM installed and registered, or without SIM?
Even i use preunlocked ace, i have to admit that this tutorial is well writen. Straighforward and easy to understand. Good one will click that thanks button once i get on my pc later
Sent from your phone
I did it with my SIM on the phone lol. Then when i got the code, i switched the sim for another provider and after i put the pin it asked for the code. Put it and "phone not restricted" message apear
Sent from my GT-S5830 using XDA App
Very nice and easy to understand tutorial...thanks
rjtd said:
Did you follow the steps with the SIM installed and registered, or without SIM?
Click to expand...
Click to collapse
The first time i tried this i had the original telcel sim on the phone, then when i finished i restarted the phone with other company (movistar) sim, and for the tutorial my phone was already unlocked and the original telcel sim on
Sent from my GT-S5830 using XDA App
wow, just tryed it 5 min ago, and it WORKED
Thank you so muhc, you save me some euros
terminal
could i do this from terminal on my phone instead of thru ADB?
wow! it really worked
hats off to you my friend
dg1598 said:
could i do this from terminal on my phone instead of thru ADB?
Click to expand...
Click to collapse
I havent tried but you can give it a try, butt i dont thin it will work.
I have done the proces but after I type SU I receive a message permision dennied, I have updated my phone with the new Telcel Ginger version and rooted with the acegingeroot file, wht can I do??
thanks

[HOW-TO] Set up SDK/ADB on Ubuntu 11.10 | 32 & 64 bits

Video-Tutorial:
http://bit.ly/HzzmUn​
Step 1. Install JDK
Open Terminal and enter the following command(s), then enter your ubuntu login password followed by ‘y’ when prompted for yes/no.
Code:
$ sudo apt-get update
$ sudo apt-get install openjdk-6-jdk
Step 2. Install 32 bit libraries - Only for 64 bit users
On x64 systems you are required to install some 32-bit libraries or the android toolkit will not work. In a terminal write:
Code:
$ sudo apt-get install ia32-libs
Step 3. Download and Install Android SDK
Download the Android SDK. Choose the one for linux: android-sdk_r16-linux.tgz
Extract android-sdk_r16-linux.tgz and put the folder in your desired location. I recommend to put it under home/username/ | When using the terminal the same path is described as ~/
Step 4. Choose packages to install
First of all go to ~/android-sdk-linux/tools/
Right clic to android >> Properties >> Permissions
Make sure "allow executing file as a program" it's checked
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Once done close that window and doble click on the Android file, select Run in Terminal.
Download the tools as shown in the following picture:
Step 5. Check your device's permission
Now head over to the platform-tools directory
Code:
$ cd ~/android-sdk-linux/platform-tools
Check if you have permission for your device
Code:
$ ./adb devices
If you're getting the following, go on to Step 6.
Code:
List of devices attached
OR
List of devices attached
???????????? no permissions
If you're getting something like shown below or other random numbers with the word device next to it, congrats! You can now use ADB. Now go on to Step 7.
Code:
List of devices attached
0123456789ABCDEF device
Step 6. Adding USB Vendor ID of your device
Open HOME folder and enable Show Hidden Files:
Open .android folder >> right click >> Create New Document >> Empty Document, name it adb_usb.ini and open it. Put the following on it:
Save & close the window
Then unplug your NT and plug it again (From the NT usb port, not PC). Now to check if it works...
Code:
$ ./adb devices
You should be getting something similar to the following line:
Code:
List of devices attached
0123456789ABCDEF device
Congrats! Now you can use ADB in Ubuntu! Now hop on to Step 7!
Step 7. Create path for ADB
NOTE: while using adb on Linux you'll need to type ./adb to execute adb commands unless you create a path in ~/.bashrc. In a terminal write:
Code:
$ sudo gedit ~/.bashrc
Add the following line at the very end of the file. Once you're done, save and exit.
Code:
# Android tools
export PATH=~/android-sdk-linux/platform-tools:~/android-sdk-linux/tools:$PATH
Then in a Terminal run this command to reload your .bashrc:
Code:
source ~/.bashrc
Now you can just run adb without put ./ before every command.
~ Veronica
great
thank you very much!!!
Can this help with porting and building from source
______________________________________________
Sent from my SPH-D710-EPIC-4G-TOUCH-using Tapatalk
Anon9mouz said:
Can this help with porting and building from source
______________________________________________
Sent from my SPH-D710-EPIC-4G-TOUCH-using Tapatalk
Click to expand...
Click to collapse
this helps partly it just gives you the basics to make adb work but if you want to develop then you will need other tools, to setup ubuntu for development/theming then use this script.
~ Veronica
lavero.burgos said:
this helps partly it just gives you the basics to make adb work but if you want to develop then you will need other tools, to setup ubuntu for development/theming then use this script.
~ Veronica
Click to expand...
Click to collapse
O ok thanks ill check it out
______________________________________________
Sent from my SPH-D710-EPIC-4G-TOUCH-using Tapatalk
Update april/10
Added Video-Tutorial
~ Veronica
Followed your video tutorial, but ubuntu adb still doesn`t see my device, while at the very same time it perfectly works under windows. The only step i missed is step 2, terminal is saying ia32-libs no candidate for installation(translating from russian, might be smth different)
PS: USB debugging is enabled in my nook settings dev
Devol said:
Followed your video tutorial, but ubuntu adb still doesn`t see my device, while at the very same time it perfectly works under windows. The only step i missed is step 2, terminal is saying ia32-libs no candidate for installation(translating from russian, might be smth different)
PS: USB debugging is enabled in my nook settings dev
Click to expand...
Click to collapse
cd to the folder where adb is located and type:
$ sudo ./adb devices
~ Veronica
I followed your video, so i`ve tried sudo aswell...may be i can just go on with windows adb?
Actually i`ve tried it already, there are only 7 files for 8gb partitions, i`ve copied one of them to my 4th big sdcard partition, and tried to dd if...bla bla bla... = writes error: no space left on device
Devol said:
I followed your video, so i`ve tried sudo aswell...may be i can just go on with windows adb?
Actually i`ve tried it already, there are only 7 files for 8gb partitions, i`ve copied one of them to my 4th big sdcard partition, and tried to dd if...bla bla bla... = writes error: no space left on device
Click to expand...
Click to collapse
hmm did you mount /sdcard in CWM? the cwm recovery by @meghd00t works now for 8GB NT... anyways that's ok you can copy it to /data instead of sdcard go one by one, i don't know what exactly you have done to your device but i recommend to just use the necessary partitions.
~ Veronica
No, i`m booting of cm7 sd card, used a file manager to go to internal emmc, looks like alot of files there...most 0kb, my mmc0p7 is in dev\block, but not copied fully, only around 208mb(full size is 300mb somthing)...file manager doesn`t allow to delete anything...
Devol said:
No, i`m booting of cm7 sd card, used a file manager to go to internal emmc, looks like alot of files there...most 0kb, my mmc0p7 is in dev\block, but not copied fully, only around 208mb(full size is 300mb somthing)...file manager doesn`t allow to delete anything...
Click to expand...
Click to collapse
no, you can't copy from a file manager the partition images neither remove them for security it is why you use dd from CWM to copy the partition images while non of them are IN USE!!!
advice don't be playing around with the partition table, please use @meghd00t recovery he has posted zip with all you need. Boot into CWM from sdcard run the commands.
PS: we're going offtopic in this thread
~ Veronica
Nope, it(meghd00t Repartition, Reformat, Restore and Rescue SDcard) also stops at 25% while restoring factory defaults at the last step...(
Ok, my actions that lead to this situation: rooted nook with sd card method for 8gb, installed recovery flasher apk, flashed cwm, followed steps(wiping data, daviks - here it hang up, then rebooted, after that tried flashing cm7 which was a big mistake, wish guys had a word in the topic that it`s not meant for 8gb...and the result is i cant boot from internal mem, only sd. btw, cwm acted strangly, it could hang on all of a sudden, or work for a while, cwm was internally installed, now i`ve removed it)
If we are offtoping, lets move to some other thread...
PS: for some reason nook doesn`t boot from cwm sd(cable plugged, part active fat32)...basicly it will boot only from cm7 rom and meghd00t recovery images.
@Devol i replied to you here
~ Veronica
Great Work!
Thanks a lots for such a detailed guide.
You can also drop the adb and fastboot binaries into /usr/bin and use both commands without needing to CD to the /tools folder in the SDK. Just don't forget to change the permissions.
cant get past the checking phone permission stage! keeps saying no permissions. if it helps any, im using ubuntu 12.04. im gonna reboot and try in windows. is there any benefit to using adb in linux over windows anyway?
ridleyj329 said:
cant get past the checking phone permission stage! keeps saying no permissions. if it helps any, im using ubuntu 12.04. im gonna reboot and try in windows. is there any benefit to using adb in linux over windows anyway?
Click to expand...
Click to collapse
For when you hard brick your device your device yes, you need linux and adb working or for those like me that prefer to use linux over windows daily.
~ Veronica
http://www.omgubuntu.co.uk/2012/05/...m=feed&utm_campaign=Feed:+d0od+(OMG!+Ubuntu!)
A little off topic but awesome. Any one know how to switch between java 6 and 7 on ubuntu? I need 7 for minecraft and 6 for android sdk. Im on 12.04.
Sent from my DROID RAZR using xda premium
Thanks alot just got this working on ubuntu 12.04 with no issues. Just make sure you complete a:
apt-get update && apt-get upgrade
apt-get dist upgrade prior to any of the steps

[APP] Remote Terminal - (Execute Any Shell Command by SMS) - Update 05/07/2013

REMOTE TERMINAL
Execute any shell command by SMS
Introduction:
This app will read receiving sms and executes shell commands in them. It is very useful in many ways. You can delete your private data from your device in case you lost your phone. You can even turn off your device by this method. Every command that you execute in terminal emulators in your devices can be executed by this method. Every command is executed with super user permissions. So you have full control over your device by a simple sms. To stop any other people using this other than the owner, I added password protection for it.
Instructions:
1. Open the app (Remote Terminal)
2. Enter "null" as the current password. (case sensitive)
3. Enter anything as you wish as your password. (case sensitive)
4. Start typing a sms from any device, anywhere in the world starting with your password. (CASE SENSITIVE)
5.Enter your set of commands - each command in a NEW line
(when starting terminal session it's in the root folder)
Example: making a folder in sdcard named ravindu
Code:
yourpassword
cd sdcard
mkdir ravindu
or
Code:
yourpassword
mkdir sdcard/ravindu
6.Send the sms to your device.
7. You will be asked to grant SuperUser access to the app. Give permanent superuser permissions (only for the first time)
You don't have to waste your sms by sending 1 sms for 1 command. Send all commands in 1 sms
Requirements:
A ROOTED device
NOTE:
Password is case sensitive in every place.
Give me your comments and suggestions about this app. If I have any time, I will try to develop this app.
See the 2nd post for a list of some useful commands
SCREENSHOT:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Flash it & enjoy!!!
If you like my work, hit the THANKS button!!!
Donate me if you think my work is valuable
List of Useful Commands
1. reboot - reboot your device
2. reboot -p - turn off your device
3. rm data/dalvik-cache/*.* - clear dalvik cache
4. rm sdcard/pictures - delete entire pictures folder from sdcard ( change the path to your desired folder to delete it )
5. rm data/system/gesture.key - reset your pattern lock ( accepts any pattern you input )
6.rm data/system/password.key - reset your password lock
I'll update the list when I get more free time
U are determined to make some remote apps...
Good going..
Sent from my Sk17i using xda premium
sandy7 said:
U are determined to make some remote apps...
Good going..
Sent from my Sk17i using xda premium
Click to expand...
Click to collapse
Thanks bro!!
Broadcast receivers! I love playing with them
keep it up bro!!! I love that GUI
codfx said:
keep it up bro!!! I love that GUI
Click to expand...
Click to collapse
Thanks bro!!!
This sounds....secure
Use a strong password... then send it via SMS. Hmmmmm...
question....
Is it compatible with gryphon secure messaging platform? Or does it listen to default SMS app only...?
I use gryphon a lot, and would prefer to use it to send the commands; just as an extra precaution...
when you loss your phone, your SIM card was replaced! and you can not know Phone number, can we control by 3G or wifi?
and can you give us all command of emulator?
dynamic503 said:
when you loss your phone, your SIM card was replaced! and you can not know Phone number, can we control by 3G or wifi?
and can you give us all command of emulator?
Click to expand...
Click to collapse
By default the only available commands for the emulator are :-
Code:
echo -- prints text to stdout.
set -- sets shell variables
export -- makes shell variables available to command-line programs
cd -- change the current directory.
pwd -- print name of the current directory.
But if you have busybox installed on your device then you have many more commands like cp, rm and many more Linux commands
@RavinduSha- Nice work bro. Happy programming
super user request?
(deleted post as i figured out i had a setting on go sms pro interfeering with it opps both apps work now)
abcdjdj said:
By default the only available commands for the emulator are :-
Code:
echo -- prints text to stdout.
set -- sets shell variables
export -- makes shell variables available to command-line programs
cd -- change the current directory.
pwd -- print name of the current directory.
But if you have busybox installed on your device then you have many more commands like cp, rm and many more Linux commands
@RavinduSha- Nice work bro. Happy programming
Click to expand...
Click to collapse
thanks bro!
How should i turn off my phone using shell command?
Which command should i use?
Sent from my SK17i using xda premium
mdsohail98 said:
How should i turn off my phone using shell command?
Which command should i use?
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
"reboot -p" command will work or you can just use my other app "Remote Turn Off"
Thanx.....
Can you provide me commands for better use of this app because i want some new commands apart from cd,cp,mkdir,dd,df,rm,mv.....
Is there any command from which I can open an app which is installed in my phone....
Sent from my SK17i using xda premium
mdsohail98 said:
Thanx.....
Can you provide me commands for better use of this app because i want some new commands apart from cd,cp,mkdir,dd,df,rm,mv.....
Is there any command from which I can open an app which is installed in my phone....
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
Bro there are many guides for using shell commands. Just search.
I can give the code for opening an app. For that you have to provide me the AndroidManifest.xml file from that package. If it's a stock app tell me the package name.
(AndroidManifest.xml file is needed for identifying the package name and the main activity)
Can you try for stock walkman app??
I want to play music remotely.....
Sent from my SK17i using xda premium
mdsohail98 said:
Can you try for stock walkman app??
I want to play music remotely.....
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
here is the code
am start -n com.sonyericsson.music/.PlayerActivity
this will open your walkman app.
Hey thanx allot.....
Can do me one more favour????
I just want to know, how to delete messages using remote terminal?????
Please do me this as a last favour
Sent from my SK17i using xda premium

[APP][ROOT] WearToolbox V1.54 (16-04-2016)

DISCLAIMER:
I'm not responsible for damage to your phone or watch.
You are using this app at your own responsibility
WearToolbox was just an idea to make life easier.
With WearToolbox you can connect from your phone to your watch through adb, with this it's possible to send commands or sideload apps etc. (see features).
For now design doesn't matter for me, functionality does. Design will be better when app is in a further stage.
When enough people have tested it and provided me feedback, it will be released in the Play Store for easier updating.
The app is in DEVELOPMENT and TEST stage and can have BUGS.
Tested on LG Watch R with Android Wear 5.1.1 and LG G2 5.0.2
Have fun with it and let me know if it works or not!
FEATURES
- Automatic installation of necessary binaries (adb -> /system/bin/)
- Automatic connection
- Reboot (system, recovery, bootloader)
- Sideload apps (/sdcard/WearToolbox/sideload/)
- Uninstall apps
- Push files to /sdcard/
- Send adb commands (adb command)
- Send shell commands (adb shell command)
- ADB and shell command history
- Script parser for own created scripts
TODO:
- Make a nicer UI
IDEAS:
- Pull files
- ADB filebrowser
REQUIREMENTS
- Enabled debug and bluetooth debug on android watch, developer options (youtube)
- Enabled debug on phone, developer options
- Enabled debug in Android Wear app, under settings
- Rooted phone
FAQ:
Q: How to use root with shell:
A:
Code:
"su -c '[COMMAND]'"
Snippets:
Code:
"su -c 'echo 85 > /sys/class/timed_output/vibrator/amp'"
Code:
"su -c 'echo 120 > /sys/class/timed_output/vibrator/driving_ms'"
Code:
wm density 200
Q: How to sideload apps:
A: Place apk in the folder /sdcard/WearToolbox/sideload/, restart WearToolbox, choose right apk, click sideload, wait a long time
Q: How to use scripts:
A: Make for example a dummy.txt file in /sdcard/WearToolbox/scripts/ with shell commands in it. Each command on a newline. Save it, restart WearToolbox, test it.
Example (vibrate.txt):
Code:
cat /sys/class/timed_output/vibrator/amp
cat /sys/class/timed_output/vibrator/driving_ms
"su -c 'echo 85 > /sys/class/timed_output/vibrator/amp'"
"su -c 'echo 120 > /sys/class/timed_output/vibrator/driving_ms'"
cat /sys/class/timed_output/vibrator/amp
cat /sys/class/timed_output/vibrator/driving_ms
DOWNLOAD
https://play.google.com/apps/testing/com.diechel.xda.weartoolbox
I might go ahead and try this. Having something like this would be very very useful. (fyi, I believe you initial change log date has the wrong month. Unless it is June 31st already)
Rennat said:
I might go ahead and try this. Having something like this would be very very useful. (fyi, I believe you initial change log date has the wrong month. Unless it is June 31st already)
Click to expand...
Click to collapse
Haha yes youre right about the changelog Will change.
Let me know if it works and what you think about it.
What features would you like etc etc.
stuck on "Checking Connection" for me Sammy 5.1.1 S6 Edge (arm64) and LGWR 5.1.1
EDIT - seems to download binaries every time I open the app, still won't connect - perhaps something to do with arm64 architechture ???
EDIT2 - in Android Wear Manager bluetooth debugging ON, it says HOST disconnected, TARGET connected
kashortiexda said:
stuck on "Checking Connection" for me Sammy 5.1.1 S6 Edge (arm64) and LGWR 5.1.1
EDIT - seems to download binaries every time I open the app, still won't connect - perhaps something to do with arm64 architechture ???
EDIT2 - in Android Wear Manager bluetooth debugging ON, it says HOST disconnected, TARGET connected
Click to expand...
Click to collapse
- Can you check if the files 'adb' and 'fastboot' are present in /system/bin/
- What is there permission? should be 755
- Are the files 'adb' and 'fastboot' on your root of your /sdcard/
- Can you type 'adb' and 'fastboot' in terminal and post output
- Can you type 'mount -o remount, rw /system' in terminal and post output
For me HOST and TARGET are connected in Android Wear App
@Diechel , I have adb but not fastboot in /system/bin
Okay copied adb and fastbook to /system/bin and 755'd them.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
kashortiexda said:
Okay copied adb and fastbook to /system/bin and 755'd them.View attachment 3343013
Click to expand...
Click to collapse
i see something weird
Code:
localhost:4444:4444
should be
Code:
localhost:4444
Will look if i can find something.
Also wondering why copying didnt work, was searching all over the internet how to correctly remount /system
My output is as follows, see attachment. Of course a newer version but nothing changed to adb init
@Diechel am I supposed to have my watch or phone plugged into my PC by USB when doing all this / running weartoolbox ?
kashortiexda said:
@Diechel am I supposed to have my watch or phone plugged into my PC by USB when doing all this / running weartoolbox ?
Click to expand...
Click to collapse
No just bluetooth connected to each other.
And all the 3 debugging option on as stated in the OP
Edit:
Build 21 online
Yip got all that but no adb devices and the localhost:4444:4444 is clearly wrong
Would a logcat help
kashortiexda said:
Yip got all that but no adb devices and the localhost:4444:4444 is clearly wrong
Would a logcat help
Click to expand...
Click to collapse
I dont know if logcat helps, what you can try is manually connect with terminal on your phone.
Code:
su
adb kill-server
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
adb devices
Each line need to be filled in, not all together.
And try build 21
Did the manual Terminal stuff and it FIXED the 4444 problem, installed v21 and.....[emoji1]
kashortiexda said:
Did the manual Terminal stuff and it FIXED the 4444 problem, installed v21 and.....[emoji1]
View attachment 3343080
Click to expand...
Click to collapse
TADAAAAAA
GOOD!
Let me know if you have ideas to implement. First i go for functionality then change the user interface a bit
@Diechel
EDIT: I tried sideloading es file explorer apk ... worked !!! [emoji1]
kashortiexda said:
@Diechel I tried sideloading es file explorer apk ...it says done but nothing on watch.
Have you successfully sideloaded any apks ?
Click to expand...
Click to collapse
Yes i had, will try again.
It takes some time for the watch to install, will try now and report back!
Edit:
From what i see now is that the message done comes too fast.
Bluetooth is slow and is still transferring after the done message, can see that in my top bar.
Seems not working indeed, will check thanks
EDIT:
It got installed after a while
Good that it is working! Will see how i can report in log
I got it installed too, yes the done is misleading .... GREAT app btw, well done [emoji106] [emoji106]
kashortiexda said:
I got it installed too, yes the done is misleading .... GREAT app btw, well done [emoji106] [emoji106]
Click to expand...
Click to collapse
Haha thank you, now there is a message that you need to wait untill it arrives on your watch, bluetooth is slow
@Diechel are you planning on adding the trickier "adb remove sideloaded app" but I think it may not be possible. .
kashortiexda said:
@Diechel are you planning on adding the trickier "adb remove sideloaded app" but I think it may not be possible. .
Click to expand...
Click to collapse
Can try at least, I think it's possible. Maybe a lot of work

[Split Screen] Multi-window on moto G4 plus.

Hello people. After successful root and installing xposed module n-ify you still don't get a multi window feature. Though many of you must be familiar with it but those who ain't. This is just the right place.
Here's something new .... U can do it without root too.
Enable Multiwindow WITHOUT ROOT
Requirements:
1. Working adb and fastboot on PC
2. Notepad++ or anything to edit the build.prop
3. TWRP on your device
4. Cool Attitude
Let's begin.
(Note: The commands in command prompt are to be give without the Quotes)
1. Boot your Android device into TWRP recovery.
2. Select Mount and then select System from the list of partitions to mount the system partition and then go back.
3. Connect your device to the PC.
4. Open minimal adb and fastboot or just open command prompt if u have adb shell installed separately
5. Type command, "adb devices" and if adb is properly installed, your device will be listed.
Then type command,
"adb pull /system/build.prop"
The above command will download the build.prop file to your PC in the same directory where your command prompt is running from. (Tip: Make a copy of your build.prop)
6. Open the build.prop file on your PC using the Notepad++ program.
7. Find the line "ro.build.type=user" and change it to "ro.build.type=userdebug" and save the changes
8. Now again in command prompt, type the command
"adb push build.prop /system/"
9. Now set the correct permissions for the build.prop file with following commands (issue them one-by-one):
"adb shell"
"cd system"
"chmod 644 build.prop"
10. Now reboot your device.
11. Go to Developer options in settings and you'll see a "Multi-window mode" just toggle it on and voila.
Enable Multiwindow on Rooted device...!
Requirements:
1. Root access
2. Any root explorer (es explorer is very good and I'm using it in this tutorial)
Let's begin.
1. After rooting your Moto G4 plus, download and install any root explorer and grant it superuser access. (I'm using es explorer)
2. In the explorer, go to Device\ System\ Build.prop.
3. Copy the build.prop to any other location (incase you wish to revert this, this is kinda backup step)
4. Now again go to original build.prop (Device\ System\ Build.prop)
5. Open it with the es note editor (I'm using es explorer here)
6. Find the line "ro.build.type=user" and click on the 3-dot menu on top right side (es explorer) and click edit.
7. Now edit the line and change "user" to "userdebug" (without quotes)
8. Save it and Reboot your device.
9. Go to Developer options in settings and you'll see a "Multi-window mode" just toggle it on and voila.
You have the Working multi window. Screenshots attached.
[To get other Android Nougat features, just get working xposed on your device and install n-ify module. Activate it and there you are!]
Screenshots here,
https://drive.google.com/folderview?id=0Bya7b1JXXZycS2pHT3d4alhxaWc
A thanks would be really appreciated
Tested and it works
Added screenshot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It's an old trick. I know but it's really cool
Would this work on the regular G4? Noob question but I don't wanna mess up my phone.
NexusFan9219 said:
Would this work on the regular G4? Noob question but I don't wanna mess up my phone.
Click to expand...
Click to collapse
Yeah sure it would. Go ahead. Just make a copy of Build.prop. Incase u desire to revert it or Incase u edit something else in build.prop
If u are not rooted and still want to have multiwindow...... Then u can pull the build.prop via adb and edit it and then push it again into the system via adb.......
If u do not get it or want a detailed explanation then comment below..... I'll update the OP
cool_sid said:
If u are not rooted and still want to have multiwindow...... Then u can pull the build.prop via adb and edit it and then push it again into the system via adb.......
If u do not get it or want a detailed explanation then comment below..... I'll update the OP
Click to expand...
Click to collapse
Pl update process for non-root, dont think its a noob question..
sirtbhopal said:
Pl update process for non-root, dont think its a noob question..
Click to expand...
Click to collapse
OP has been updated with the Non Root method.
N buddy..... It's just question...... Never a noob or a silly question.....
U don't know guys..... Some simple questions teach lot to us.....
Just like I learned that I can edit system without root too just by mounting the system in twrp....
So guys now u can do this without even having root access on your device....
Multiwindow on Moto G4 Plus and that too without root.....
Rush it guys....
So I hear you can't do OTA updates with TWRP installed? Is there a way to do the non root method without TWRP? If not, is there a quick way to install TWRP, make the fix and then return to normal recovery? I can't see much in the way of guides?
Thanks
damonsmith666 said:
So I hear you can't do OTA updates with TWRP installed? Is there a way to do the non root method without TWRP? If not, is there a quick way to install TWRP, make the fix and then return to normal recovery? I can't see much in the way of guides?
Thanks
Click to expand...
Click to collapse
Use recovery switcher app from XDA..... It also is great to quickly switch recoveries....... Then u can easily switch between stock recovery n twrp
To apply ota..... Flash fire can also be used.... (Never used it though)
And u can modify system without root or a custom recovery at least...... Hope u can understand that......
Rest I'll see if there is any other possible way
cool_sid said:
Use recovery switcher app from XDA..... It also is great to quickly switch recoveries....... Then u can easily switch between stock recovery n twrp
To apply ota..... Flash fire can also be used.... (Never used it though)
And u can modify system without root or a custom recovery at least...... Hope u can understand that......
Rest I'll see if there is any other possible way
Click to expand...
Click to collapse
What he said, plus you can just boot TWRP instead of flashing it if you want to use features of TWRP without flashing it.
Tel864 said:
What he said, plus you can just boot TWRP instead of flashing it if you want to use features of TWRP without flashing it.
Click to expand...
Click to collapse
Yeah instead of giving command.
fastboot flash recovery twrp.img
U can use
fastboot boot twrp.img
I guess......
On my N5, with TWRP I can flash Google OTA files just fine. Maybe with TWRP for Moto G4 that can be possible...
Recently picked up this phone up, sucks there isn't much for the G4's compared to the Nexus/Pixel devices, even tho they basically run stock AOSP. But I have an Nexus 5 still too
Anyway, I tried out your little tip and it worked like a charm ?
Thanks for this!
My device = Moto G4 XT1625_retail_non-amazon_garbage lol
Thanx

Categories

Resources