How to open an "adb shell"? - G3 Q&A, Help & Troubleshooting

On the official cyanogen mod guide for the LG G3 this is stated:
Now, open a command prompt window or terminal window and open an "adb shell"
How is this done / what is meant by it?
https://wiki.cyanogenmod.org/w/Install_CM_for_d855

LennartFuchs said:
On the official cyanogen mod guide for the LG G3 this is stated:
Now, open a command prompt window or terminal window and open an "adb shell"
How is this done / what is meant by it?
https://wiki.cyanogenmod.org/w/Install_CM_for_d855
Click to expand...
Click to collapse
Download the drivers for LG G3, download the adb from Google, connect your device to computer, open command prompt, navigate to adb.exe or make a path in computer settings, verify that device is connected with command: adb devices, if your device is listed continue with command: adb shell, copy whats written in the guide you found.
Or save yourself the trouble if you aren't good with cmd and download flashify from Google Play, download the latest TWRP and flash it. Of course this will work only if you used the benders autorec app on lollipop otherwise you will get secure boot error.
But if you are on kitkat you don't need to install benders autorec, just download TWRP and flash it either with flashify or with adb.
Also if you dont want to use computer you could install terminal emulator from Google Play and you wouldn't need to use adb shell at all. Just write the stated commands, that is:
su
dd if=/sdcard/twrp-d855.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Happy flashing.

Related

adb shell

ok so i tried to follow the instructions to get my phone rooted!
but im running into a snag....
im here roughly
Check if your phone is detected by ADB
Open up Command Prompt (Go to run, type in cmd, press enter)
Type in
Code:
cd C:\android-sdk-windows\tools === Press Enter
adb devices === You should see your device listed
adb shell === you should see # in the next line
Now you are all set to run adb commands
Note: for a list of commands type in 'adb' in cmd
CONGRATS YOU NOW HAVE ADB FULLY RUNNING!
except when i type adb shell i get a "$" instead of a "#" in the next line
im not sure if i did something wrong/installed drivers wrong or what??!! any help would be appreciated!
to get your phone rooted, read the rooting tutorial in the development section.
but, in answer to your question, you are getting the '$' instead of the '#' because you do not have root access in your shell.
to have root access in shell, you need to have installed the rooted img, which will then allow for temporary installation of a custom recovery, which must be pushed while the phone is in recovery mode already. then, you can adb shell to the root prompt
ok im very very new too all this! so i apologize up front for not knowing exactly what your talking about! i have been following this guide to root my phone-
forum.xda-developers(DOT)com/showthread.php?t=532719
(take out the (DOT) and make it .com
some1 on this site refereed it to me because i needed to know how to do EVERYTHING from start to finish!
so i am still stuck any help(detailed very detailed help) would be appreciated!

[Q] ADB not working

Hello everyone i am having troubles installing adb on my laptop and i need it to flash a splash screen on my mytouch slide so it can match the rom i have made for it. I installed the adnroid sdk to where it needs to be by downloading adb for dummies lol. Except when i open cmd and run adb it says its not an internal batch orrecognized file or whatever but when i type adb.exe on command prompt it shows everything about adb. So can anyone please help me thanks.
Nerd019 said:
Hello everyone i am having troubles installing adb on my laptop and i need it to flash a splash screen on my mytouch slide so it can match the rom i have made for it. I installed the adnroid sdk to where it needs to be by downloading adb for dummies lol. Except when i open cmd and run adb it says its not an internal batch orrecognized file or whatever but when i type adb.exe on command prompt it shows everything about adb. So can anyone please help me thanks.
Click to expand...
Click to collapse
I'm trying to piece together information here. ADB for me is in my C:\, so when opening CMD prompt, I first type "cd/" (without quotes) then "cd AndroidSDK/tools". To get a list of ADB's commands, type "adb help". Maybe you're not using the proper syntax. I base this off the statement you made that when you type adb.exe it shows the adb commands, and command syntax usage.
Also note that changing your splash screen you must first S-OFF your phone. Here's a guide on how to do so
http://forum.xda-developers.com/showthread.php?t=798168
That's the tricky part though, easy part is flashing your custom boot image.
File you will need: View attachment Boot_images.zip
Once you have the 320x480 boot image you want, open "CreateG1Splash", select your boot image, and convert it with this program. Once converted the new file will show in the same folder as CreateG1Splash, named mysplash.rgb565. Move this file to your ADB tools folder. Open CMD prompt and point CMD prompt to your AndroidSDK\tools folder.
Then boot phone into bootloader, then select fastboot. Plug the phone to CPU via USB, and type, "fastboot flash splash1 mysplash.rgb565". Reboot phone to see change.
Hope this helps!

hot to install kernel using mac lion?

i read through all the posts and am having trouble. i have a macbook now and my htc one v is stuck in a boot loop. i need some simple instructions or a link to how to flash a kernel on mac. i have googled it ect and i may be dumb or i cant seem to find the answer and everyone is always so helpful here and im getting frustrated. thank you so much. my phone is already rooted with a custom recovery. its a virgin mobile us
Go developer.android.com and download the SDK & move it to your home directory ("~" or /Users/<username>)
Go to <sdk-location>/tools and launch "Android"
Download the platform tools
Open terminal
Open Finder to <sdk-location>/platform-tools
In terminal, type "sudo cp"; drag adb from the Finder window into the Terminal window; type "/usr/bin/"; hit enter
Enter your password
Repeat the above three steps, but drag "fastboot" instead of "adb"
Close terminal
Open terminal (it sounds weird, but just do it)
Now, and forever, do this to install a kernel:
Download kernel
Connect phone to computer
Make sure USB Debugging is enabled (Settings>Development>USB Debugging)
In terminal, type "adb reboot bootloader"
In terminal, type "fastboot flash boot"; drag in the kernel from finder; hit enter
Examples:
Code:
sudo cp /Users/Username/android-sdk-mac/platform-tools/adb /usr/bin/
sudo cp /Users/Username/android-sdk-mac/platform-tools/adb /usr/bin/
adb reboot recovery
fastboot flash boot /Users/Username/Downloads/boot.img
kalaker said:
Go developer.android.com and download the SDK & move it to your home directory ("~" or /Users/<username>)
Go to <sdk-location>/tools and launch "Android"
Download the platform tools
Open terminal
Open Finder to <sdk-location>/platform-tools
In terminal, type "sudo cp"; drag adb from the Finder window into the Terminal window; type "/usr/bin/"; hit enter
Enter your password
Repeat the above three steps, but drag "fastboot" instead of "adb"
Close terminal
Open terminal (it sounds weird, but just do it)
Now, and forever, do this to install a kernel:
Download kernel
Connect phone to computer
Make sure USB Debugging is enabled (Settings>Development>USB Debugging)
In terminal, type "adb reboot bootloader"
In terminal, type "fastboot flash boot"; drag in the kernel from finder; hit enter
Examples:
Code:
sudo cp /Users/Username/android-sdk-mac/platform-tools/adb /usr/bin/
sudo cp /Users/Username/android-sdk-mac/platform-tools/adb /usr/bin/
adb reboot recovery
fastboot flash boot /Users/Username/Downloads/boot.img
Click to expand...
Click to collapse
kalekar, mid if i take this instructions and put them in my thread?
cybervibin said:
kalekar, mid if i take this instructions and put them in my thread?
Click to expand...
Click to collapse
No problem! You may want to clean them up a bit; I was in a hurry when I typed those.
sure thanks ill credit u for it
Moved to Q&A
Moderating from my One Xl
It's very simple. Follow whatever instructions are for the kernel, rom, whatever, but add "./" in front of the commands. So "fastboot flash boot" becomes "./fastboot flash boot"
Sent from Hoth.
MonsterNo7 said:
It's very simple. Follow whatever instructions are for the kernel, rom, whatever, but add "./" in front of the commands. So "fastboot flash boot" becomes "./fastboot flash boot"
Sent from Hoth.
Click to expand...
Click to collapse
No! That only works if he has done
Code:
cd <sdkdir>/platform-tools
other wise, it will fail and confuse him even more. Doing cp to /usr/bin/ will allow him to never have to do "./" before the command.
kalaker said:
No! That only works if he has done
Code:
cd /platform-tools
other wise, it will fail and confuse him even more. Doing cp to /usr/bin/ will allow him to never have to do "./" before the command.
Click to expand...
Click to collapse
Ok ok calm down. I do it my way multiple times a week, I've never had an issue. Sure I have to cd into the directory, but that's only one more line of code. If your way will be easier then cool.
Sent from Hoth.

[Q] Help Running Command with ABD

I have a problem. I'm running ViperOne and I've been told I need to run this command
adb shell su restorecon -FR /data/media/0
Here is the issue, I don't know how. This is because 1) I'm inexpierenced and 2) I think there is an issue.
When I open up my android folder with my htc plugged in and run that command I keep getting the "error:closed"
I'm told I need to update adb, but I thought I did. I can't get this to work. Someone help?
Hey there, to update ADB through the console, go to the tools folder, its on the same level as platform-tools, run a command prompt from there, by shift-right clicking and hitting open command window here, then type;
android update adb
after that it should tell you to restart the server, and you should be good.
Good Luck!

[root] for those have unlocked bootloader

May you install Magisk Manager and export the "patched" kernel, and flash the patched kernel through fastboot?
Hi mingkee.
This works whit G3311 confirmed. Build: 43.0.A.6.49 Android 7.0 Baseband MOLY.LR9.W1444.MD.LWTG.MP.V166..5, Kernel 3.18.35+
Kernel is for G3313 magisk patch.
Everything works with this for G3311 as I've tested. Try it at you're own risk.
In linux in (debain, Ubuntu, Linux Mint and all) you need tools
Terminal "sudo apt-get install android-tools-adb android-tools-fastboot"
1. Unlock bootloader https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/#unlock-code. Get the code
2. Go to settings/ about phone/ build number/ click 7 times. Go back to settings. Developer options/ USB debuggning ON. OEM unlock ON. And try "adb devices" in terminal GNU/Linux. Should popup a allow PC on the phone" tranfer files is necessary "MTP", on the phone.
3. In terminal "adb reboot bootloader" this is where "allow access to computer" if it's haven't appeared allow on the phone.
4. In terminal "fastboot oem unlock x0(the code). no space. Don't know why x0 doesn't exist in the code. Don't know why. It's my first Sony with the openness they got now (thank god for Lund, sweden and Jolla, Finland). But it seems pretty easy to unlock. Honor 8 have closed bootloader unlock since 8 Month. So be at ease. And maybe save you're unlock code. But it doesn't seems like you need it.
5. I did it this way.
5/1 Download https://serv8.asuscomm.com/owncloud/index.php/s/t3N4iYNUoAMnwqI "latest I think" otherwise you can look at this link https://forum.xda-developers.com/apps/magisk. A bit messy I think.
6. Terminal command "adb install (this apk) drag it from dir. Of course ADB-debugger ON. I don't know instructions for Windownsyndrom. If you need it, I can guide you or somebody else that need it. Just ask.
7. Download https://serv8.asuscomm.com/owncloud/index.php/s/QXkxRkBezJXLlQE. And the easiest way are with ADB "adb reboot bootloader". Or use buttons and cable. Blue LED should be on and black screen.
8. Teminal "fastboot devices" Permission denied. Then you need sudo. Try "sudo fastboot devices"
8/1 If you need ROOT remember
------------------------------------------------------------------------------------------------------------------------------------------------------------
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Terminal
[email protected] ~ $ sudo fastboot devices
[sudo] password for johan:
WUJ01R6*** fastboot
----------------------------------------------------------------------------------------------------------------------------------------------------------
When you see a number then you know the GNU/Linux recognize the phone and back.
So after that "fastboot flash boot "this boot patched_boot_G3313.img" or if you need root "sudo fastboot flash boot "this boot patched_boot_G3313.img" drag is the lazymans work from dir. Or cd to the dir and find the file. Works whit both ROOT and user.
Terminal
"fastboot restart"
Then you should see in the magisk app that you are rooted systemless. And can use modules.
Haven't tried any modules yet.
Just try too break it down to simple language.
This is the origin of https://forum.xda-developers.com/xperia-l1/how-to/root-l1-g3313-magisk-t3693350.
Need help at 5.
purjolini said:
Hi mingkee.
This works whit G3311 confirmed. Build: 43.0.A.6.49 Android 7.0 Baseband MOLY.LR9.W1444.MD.LWTG.MP.V166..5, Kernel 3.18.35+
Kernel is for G3313 magisk patch.
Everything works with this for G3311 as I've tested. Try it at you're own risk.
In linux in (debain, Ubuntu, Linux Mint and all) you need tools
Terminal "sudo apt-get install android-tools-adb android-tools-fastboot"
1. Unlock bootloader https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/#unlock-code. Get the code
2. Go to settings/ about phone/ build number/ click 7 times. Go back to settings. Developer options/ USB debuggning ON. OEM unlock ON. And try "adb devices" in terminal GNU/Linux. Should popup a allow PC on the phone" tranfer files is necessary "MTP", on the phone.
3. In terminal "adb reboot bootloader" this is where "allow access to computer" if it's haven't appeared allow on the phone.
4. In terminal "fastboot oem unlock x0(the code). no space. Don't know why x0 doesn't exist in the code. Don't know why. It's my first Sony with the openness they got now (thank god for Lund, sweden and Jolla, Finland). But it seems pretty easy to unlock. Honor 8 have closed bootloader unlock since 8 Month. So be at ease. And maybe save you're unlock code. But it doesn't seems like you need it.
5. I did it this way.
5/1 Download https://serv8.asuscomm.com/owncloud/index.php/s/t3N4iYNUoAMnwqI "latest I think" otherwise you can look at this link https://forum.xda-developers.com/apps/magisk. A bit messy I think.
6. Terminal command "adb install (this apk) drag it from dir. Of course ADB-debugger ON. I don't know instructions for Windownsyndrom. If you need it, I can guide you or somebody else that need it. Just ask.
7. Download https://serv8.asuscomm.com/owncloud/index.php/s/QXkxRkBezJXLlQE. And the easiest way are with ADB "adb reboot bootloader". Or use buttons and cable. Blue LED should be on and black screen.
8. Teminal "fastboot devices" Permission denied. Then you need sudo. Try "sudo fastboot devices"
8/1 If you need ROOT remember
------------------------------------------------------------------------------------------------------------------------------------------------------------
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Terminal
[email protected] ~ $ sudo fastboot devices
[sudo] password for johan:
WUJ01R6*** fastboot
----------------------------------------------------------------------------------------------------------------------------------------------------------
When you see a number then you know the GNU/Linux recognize the phone and back.
So after that "fastboot flash boot "this boot patched_boot_G3313.img" or if you need root "sudo fastboot flash boot "this boot patched_boot_G3313.img" drag is the lazymans work from dir. Or cd to the dir and find the file. Works whit both ROOT and user.
Terminal
"fastboot restart"
Then you should see in the magisk app that you are rooted systemless. And can use modules.
Haven't tried any modules yet.
Just try too break it down to simple language.
This is the origin of https://forum.xda-developers.com/xperia-l1/how-to/root-l1-g3313-magisk-t3693350.
Click to expand...
Click to collapse
Hi, I've unlocked my phone but I don't uderstand at the 5 can you explain please ? Because I'm on Windows.
Cordially,
Atomiikz.
AtomiiKz said:
Hi, I've unlocked my phone but I don't uderstand at the 5 can you explain please ? Because I'm on Windows.
Cordially,
Atomiikz.
Click to expand...
Click to collapse
Ok Atomiikz. So download and install adb and fastboot tools. From here https://forum.xda-developers.com/showthread.php?t=2588979 install system wide. Otherwise you need to open CMD in the folder whith adb and fastboot.
The open CMD and write "adb devices" and allow on the phone. This should come upp in the command promt "CMD"
--------------------------------------
C:\Users\Mr.J>adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
WUJ01R**** device
--------------------------------------
Then " adb install (drag the apk here)" and ENTER. That installs magisk app on you're phone.
Or download the apk. Transfer to the phone. Then use some file explorer like https://play.google.com/store/apps/details?id=com.mi.android.globalFileexplorer https://play.google.com/store/apps/details?id=nextapp.fx https://play.google.com/store/apps/details?id=com.estrongs.android.pop and find the apk. Then install it.
And a heads up if you never used fastboot in windows 10, in my case. I used this application http://zadig.akeo.ie/ to install fastboot drivers for (s1boot fastboot)
Good luck. Write if you have more questions.
I have a question Does the camera or screen or performance get damaged with this proccess ?

Categories

Resources