I Need Help With ADB & ADB Shell - General Questions and Answers

I've searched everywhere and no one seems to have the same problem as me so I can't find anything to reference for help.
Here's my problems...
I've reinstalled ADB several times and am getting the same result...
I can't uninstall apk's, i get a failure, but I can perform other things like pull for instance as I show in my example...
device is not recognized when I'm in adb shell...
here is a graphic, and code, can someone tell me what's wrong?
{
"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"
}
Code:
C:\ADT\sdk\platform-tools>adb version
Android Debug Bridge version 1.0.31
C:\ADT\sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
9####### device
C:\ADT\sdk\platform-tools>adb pull /system/app/YouTube.apk
2086 KB/s (6526612 bytes in 3.055s)
C:\ADT\sdk\platform-tools>adb uninstall /system/app/YouTube.apk
Failure
C:\ADT\sdk\platform-tools>adb shell
/ # ?[6nsu
su
[email protected]:/ # adb devices
adb devices
List of devices attached
[email protected]:/ # adb pull /system/app/YouTube.apk
adb pull /system/app/YouTube.apk
error: device not found
1|[email protected]:/ # su
su
[email protected]:/ # **** ADB

There could be something wrong with the USB drivers. It looks like adb is recognizing the device when you first start the daemon, but loses the connection after you initiate the pull command. Have you tried reinstalling the USB drivers? There could also be something wrong with the actual USB cable, since some devices seem to prefer that you use the OEM cable provided when you first received the device.

You're doing it all wrong, but that's okay. It's an understandable mistake to make. You cannot send adb commands while in the adb shell and you cannot uninstall system apps using 'adb uninstall' because you don't have sufficient permissions. Instead, use the following:
Code:
adb shell pm uninstall -k /path/to/apk
Example: If you want to remove the calendar.apk, the command would be written like so...
Code:
adb shell pm uninstall -k /system/app/calendar.apk
In your case, since you have to enter 'su' to get root permissions after logging into the shell, you'll want to modify the code a bit (don't forget the quotes):
Code:
adb shell su -c "pm uninstall -k /path/to/apk"

soupmagnet said:
You're doing it all wrong, but that's okay. It's an understandable mistake to make. You cannot send adb commands while in the adb shell and you cannot uninstall system apps using 'adb uninstall' because you don't have sufficient permissions. Instead, use the following:
Code:
adb shell pm uninstall -k /path/to/apk
Example: If you want to remove the calendar.apk, the command would be written like so...
Code:
adb shell pm uninstall -k /system/app/calendar.apk
In your case, since you have to enter 'su' to get root permissions after logging into the shell, you'll want to modify the code a bit (don't forget the quotes):
Code:
adb shell su -c "pm uninstall -k /path/to/apk"
Click to expand...
Click to collapse
Thank you sooooooooo much for ur time and help!!!!! I can't seem to find any type of commands list or whatever, for when ur in "adb shell". I noticed a lot of folks refer to the first part of my example as being in adb shell, if you understand what I am saying. It was weird because I would type ls or l and it would list my root directory, etc, when I was in "adb shell" so I knew I was connected.
edit: btw this is my first smartphone/android ever and I learned android, how to root, use apktool to decompile/recompile apks and sys apks properly, flash stuff like roms, odin, all since may 9th, 2013, so forgive my newbiness, as I do search like a madman before posting for help, thanks again

@norml
Using the 'adb shell' is not much different from a standard Linux shell. A lot of the commands have basically the same function, and having busybox installed gives you a lot more commands to use with a little more functionality added. The busybox website will give you a list of these commands, and doing a Google search of that command's "man" page will give you information on proper usage.
Example: If you want to find information on the 'ls' command, just Google "man ls".
A Google search for "essential Linux commands" is a good start for those wanting to get familiar with using the command line interface on Android because, in nearly every case, even stock Android without busybox will have those commands available.
Some of the commands, such as the 'du' command, work the same way as their Linux/Unix counterparts, but will have fewer options on Android. You can usually get a list of the available options for that command on Android by entering the command without an argument or appending ' -help' to the end.

Related

[Q]How to install apps to android sdk emulator

Forgive my noobness, but can domeone explain step by step how to install an app on the Android sdk? For example, I want to test doing this with launcherpro, so please explain how.
Sent from my always stock, EB13 Epic, awaiting EC05.
Two things first.
Your thread title, well sorry to say it sucks . Thread titles should give information about thread. Every second thread is called "please help" people get bored by that and don't even look into them anymore. A good title enables people to take one look and know wether they can help or not.
This should probably go to Questions&Answers too .
Now that i ranted a bit lets get to your question.
You can't install anything on the android sdk.
You can install something on the emulator provided by the sdk.
I guess thats what you meant?
typing "adb -help" into the console gives us this:
Code:
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 storage)
You could try that command to install LauncherPro on the emulator.
Is this what you wanted to know?
Dark3n said:
Two things first.
Your thread title, well sorry to say it sucks . Thread titles should give information about thread. Every second thread is called "please help" people get bored by that and don't even look into them anymore. A good title enables people to take one look and know wether they can help or not.
This should probably go to Questions&Answers too .
Now that i ranted a bit lets get to your question.
You can't install anything on the android sdk.
You can install something on the emulator provided by the sdk.
I guess thats what you meant?
typing "adb -help" into the console gives us this:
Code:
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 storage)
You could try that command to install LauncherPro on the emulator.
Is this what you wanted to know?
Click to expand...
Click to collapse
Yes, I meant the emulator, and where do I type this exactly? Thanks for the help.
Sent from my always stock, EB13 Epic, awaiting EC05.
try command prompt
johnston9234 said:
try command prompt
Click to expand...
Click to collapse
Wow, I didn't realize how much I didn't know about windows. Command promt?
Sent from my always stock, EB13 Epic, awaiting EC05.
Alright do this:
Windows Key + R
type cmd
press enter
navigate to your android sdk directory for example on my computer c:\android\
here is an extract from my cmd:
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\darken>cd c:\android\platform-tools
c:\android\platform-tools>adb install
Android Debug Bridge version 1.0.26
/... here goes some information .../
Any questions left ?
Dont think so, will try this later. Thanks guys.
Sent from my always stock, EB13 Epic, awaiting EC05.
K I typed this minus the quotes
"C:\users\(user name retracted)>c:\android\platform-tools\adb install [-l] [-r] [-s] c:\android\launcherpro-0.8.3.apk"
It says; "* daemon not running. Starting it now on port 5037 *
* daemon started successfully*
Error: device offline"
What should I do?
Sent from my always stock, EB13 Epic, awaiting EC05.
--creating a virtual devices (recommended froyo) and enter the following commands in sequence
CD C:\android-sdk-windows\tools--> go to directory and check here .apk file
Code:
adb start-server
android list avd
emulator -avd [emu name]
--refresh command window and enter the following command
Code:
adb install [apk name].apk
--or
CD C:\android-sdk-windows\tools--> go to directory
following command
Code:
adb start-server
adb devices
adb remount
adb install [.apk name].apk
{
"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"
}
sorry bad english...
ALPTEKİN_ said:
--creating a virtual devices (recommended froyo) and enter the following commands in sequence
CD C:\android-sdk-windows\tools--> go to directory and check here .apk file
Code:
adb start-server
android list avd
emulator -avd [emu name]
--refresh command window and enter the following command
Code:
adb install [apk name].apk
--or
CD C:\android-sdk-windows\tools--> go to directory
following command
Code:
adb start-server
adb devices
adb remount
adb install [.apk name].apk
sorry bad english...
Click to expand...
Click to collapse
Edit: it didn't work, the list of devices won't show, its just an empty space.
Its ok about the English, I'm pretty sure I can do what you said, I just have to replace the names of your folders with mine.
Sent from my always stock, EC05 Epic 4G
Add the first post if you can get a positive result
ALPTEKİN_ said:
Add the first post if you can get a positive result
Click to expand...
Click to collapse
Will do. I figured out I could just use the android browser within the emulator to download apps and I can install them just like on my phone. I still want to know how to do this.
Sent from my always stock, EC05 Epic 4G

[Q] Help donwgrade HTC flyer HC to GB

Hello everyone,
I hope you can help me in my journey to downgrade HTC P510e flyer is in HC official to turn on the GB-S to put off then install rom more stable and http://forum phone activation. xda-developers.com/showthread.php t = 1314334
My HTC flyer is in S and not be naked and Roote of any operator.
But when I downgrade to GB method according http://forum.xda-developers.com/showthread.php?t=1428104
I created a folder on my PC and put the UCP selected and android-win-tools.zip and unzipped misc_version_universal.zip tacorot.bin
If error, let me know!
How to debug USB?
When I want to run the following commands via CMD / windows: adb push tacoroot.bin / data / local / adb push misc_version / data / local / adb shell chmod 755 / data / local / tacoroot.bin adb shell chmod 755 / data / local / misc_version adb shell / data / local / tacoroot.bin - setup
{
"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"
}
[/url][/IMG]
it tells me: adb is not recognized as internal or external command, operable program or batch file.
Can you tell me how to run this operation until the end.
@ + Kacaouet ...
Try adb.exe then, adb devices.
Oh and, start command line from c: promt! There are different places to begin the command line, Google itS
The above possibly won't help but, you never know
Sent from my HTC Flyer P510e using xda premium
Kacaouet said:
it tells me: adb is not recognized as internal or external command, operable program or batch file.
Can you tell me how to run this operation until the end.
@ + Kacaouet ...
Click to expand...
Click to collapse
install Android SDK if you already have it add SDK folder to system path
or just start working from adb.exe folder -open cmd.exe in this folder usually ~\android-sdk\platform-tools\ don't forget to enable usb debugging on your phone
i.e.
I installed sdk in C:\Android so output from adb devices is something like that (look at the picture)
also check in Device Manager (start/run/devmgmt.msc) if you see ADB Interface when connected if not something is wrong make sure when phone is connected you see something like that in attached pict. (if not install HTC sync to get phone drivers )
adb devices is a vital check to see if pc connection is working well don't do anything until you get output from adb !
Get fastboot and adb tool for windows here OK
Download my universal misc_version and unzip to obtain the misc_version file. OK
Download tacoroot OK
Place both the misc_version and tacoroot.bin files in the same directory as adb OK
Procedure
Check the version number for your gingerbread RUU
my example : RUU_Flyer_HTC_WWE_2.23.405.3_R_Radio_20.3501.30.08 9BU_3809.05.04.10_M_release_194964_signed.exe
Boot your flyer up to android if it's not already on, with usb debugging enabled and connect it to the PC. OK
Run the following adb commands
Code:
adb push tacoroot.bin /data/local/
adb push misc_version /data/local/
adb shell chmod 755 /data/local/tacoroot.bin
adb shell chmod 755 /data/local/misc_version
adb shell /data/local/tacoroot.bin --setup So far so good
At this point your device will reboot to recovery
Simultaneously press Volume Up, Volume Down and Power
Reboot your device
Run the following command OK
Code:
adb shell /data/local/tacoroot.bin --root
Your device will reboot, do not worry if it does not boot fully, it doesn't matter for this procedure, and it is a side effect of this root exploit.
For my part, nothing happens at this time when I made...
Run the following command:
Code:
adb shell /data/local/misc_version -s 2.23.405.3
Reboot to fastboot:
Code:
adb reboot bootloader OK
Relock the bootloader:
Code:
fastboot oem lock OK
Go back to fastboot mode ( lock causes the device to reboot )
Run your RUU The progress bar appears but stops and says "error 140"...
What shall I do to solve this problem?
May be a concern of the RUU!
How to execute the command to see if adb is well connected with flyer
If android sdk installation that I have updated to ensure proper operation?...

[Q] Wolfgang AT-AS43D Root

Hi Guys
{
"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"
}
What I'm going to describe is the way how I rooted my phone, in a way I found the least radically and still reversibly, since rooting your mobile could void your warranty. In the case of the Wolfgang AT-AS43D it is very easy to root, simply replace the "su" command with a new one. The "su" command is a Linux/Unix program, when it's invoked without a argument the current user becomes superuser.
Disclaimer: Rooting your device will void its warranty. In addition, performing the rooting procedure incorrectly may have unexpected consequences. Please follow this guide at your own risk. I will not be liable if your device gets damaged or bricked during the process.
These instructions are writen for Windows and Linux machines, I don't have a Mac but I think the instructions should be similar.
Preparations
Download the Android SDK (choice the appropriate operation system). Windows users can also use this, which is just the tooling you will need.
Install the downloaded Android SDK. Remember where you install the Android SDK, you will need it later on.
On your mobile, go to "Menu->Settings->Applications" and select the option "Unknown sources" (not sure if this is needed).
On your mobile, go to "Menu->Settings->Applications->Development" and select the option "USB Debugging".
Connect your mobile to your PC using the USB cable which came with the phone, do not activate "USB Connect/Turn on USB storage".
Windows users need to download some additional drivers, which can be found here (64 bits) or here (32 bits). Additional instructions can be found here (in dutch), skip de "PDANet tool" installation.
Download the "su" application from here and save it somewhere on your computer (e.g ~/Downloads on Linux or C:\temp on Windows), remember this location.
Check before act
Open a terminal or DOS-Box
On Linux: Ubuntu: <ctrl+alt+t> or read here for other ways
On WIndows (7?):
Click on Start and type CMD in search bar
Now press Ctrl+Shift+Enter
This should bring elevated command prompt with full Administrators rights.
Go to the directory "platform-tools" which is a subdirectory of the directory in which you installed the Android SDK (see Preparations step 2). You can do this using the "cd" command.
For example on Linux: "cd /home/<username>/<android-sdk-install-directory>/platform-tools" (without the quotes)
For example on Windows: "cd \Program Files (x86)\Android\Android-sdk\platform-tools" (without the quotes)
To check if everything is all right type:
On Linux: "./adb devices" (without the quotes)
On Windows: "adb devices" (without the quotes)
The message "List of devices attached" should appear and some questions marks (?) followed by the text "device". If this is not the case then stop and seek some help (google or mail me). On Linux I had on one machine of mine a problem regarding rights when executing the command.
Be save or be ....
To backup the original "su" on the mobile, type at the command prompt:
On Linux: "./adb shell mv system/xbin/su system/xbin/su.original" (without the quotes)
On Windows: "adb shell mv system/xbin/su system/xbin/su.original" (without the quotes)
if you like to pull the original "su" from you mobile and store it on your computer (e.g. a folder named "SU-Original"), type at the command prompt:
On Linux: "./adb pull system/xbin/su SU-Original/su" (without the quotes)
On Windows: "adb pull system/xbin/su SU-Original\su" (without the quotes)
On Linux if the backup directory (SU-Original) does not exists, it will be created, in the directory from which you execute the command. I don't know if this is also the case on Windows.
Replacing the su
To put the downloaded "su" in place type at the command prompt (replace the directory in <> signs with your directory, see Preparations step 7):
On Linux: "./adb adb push <directory-with-su-downloaded>/su system/xbin/su" (without the quotes)
On Windows: "adb push <directory-with-su-downloaded>\su system/xbin/su" (without the quotes)
The "su" need some permissions (e.g. executable), so type:
On Linux: "./adb shell chmod 6755 system/xbin/su" (without the quotes)
On Windows: "adb shell chmod 6755 system/xbin/su" (without the quotes)
You are done at the command prompt, to leave it type:
On Linux and on Windows: "exit" (without the quotes)
Install some apps from Google Play
Install Superuser made by ChainsDD.
This app notifies and asks permission when a app wants root access.
Install BusyBox installer made by Stephen (Stericson)
This app makes it easy to install busybox.
Install BusyBox using the BusyBox installer.
Busybox is a collection of simple, but powerful, Linux utilities, that android doesn't come with by default. It is used by some apps like Titanium backup in order to do special operations
Install Root Checker made by Burrows Apps.
Small and simple app to verify root access is properly configured.
User Root Checker to check whether your mobile is correctly rooted.
Cleaning up (optional)
Uninstall Root Checker since you don't need it any more.
On your mobile, go to "Menu->Settings->Applications" and de-select the option "Unknown sources".
On your mobile, go to "Menu->Settings->Applications->Development" and de-select the option "USB Debugging".
Remove the downloaded "su" from your computer.
Uninstall Android SDK (I suggest you leave it installed).
I tried your method, but on my phone "system/xbin/su" does not exist.
Specs:
Android 4.1.2
Kernel AT-AS43D3
Build: TUNA-S17A_AT_L26NL_205_130416
Any ideas?
Maurice
M-VW said:
I tried your method, but on my phone "system/xbin/su" does not exist.
Specs:
Android 4.1.2
Kernel AT-AS43D3
Build: TUNA-S17A_AT_L26NL_205_130416
Any ideas?
Maurice
Click to expand...
Click to collapse
It is for the AT-AS43D and not for AT-AS43D3
But for the AT AS43D3 you can try this out
http://www.mediafire.com/view/?8mxvy0ey5yfdu59

[ADB]ADB v1.0.31 - Fix For ADB Staying Offline in Android 4.2.2

Seems some of the user unable to get the ADB working on Android 4.2.2 as the command prompt always stated that the device is offline so now I open my first thread after I found out the solution
What is ADB?
ADB, or the Android Debug Bridge, is a development tool included with the Android SDK (Software Developer Kit), which allows for communication from an Android device (such as a phone or tablet) to a personal computer, and vice-versa. This communication can be made over a wifi connection. However more commonly, it is made via a USB cable. adb can also be used by developers for communicating from a computer to a virtual android machine that is also running on the computer.
Click to expand...
Click to collapse
Android 4.2.2 now enforces RSA authentication via ADB and this is only supported in the latest versions of ADB.
In Android 4.2.2 (which corresponds to CyanogenMod 10.1), Google implemented some new security features for using ADB. The new "secure debugging" feature requires that you manually approve your computer for an ADB connection. This approval must be done from within the device, and only after any screen lock has been bypassed.
To access your 4.2.2 or higher device via ADB, you MUST ensure you are using a recently-updated Android SDK. Once the SDK (and therefore ADB) has been updated, you must ADB kill-server and ADB start-server any existing ADB daemon running on your computer. The first time you try to connect via ADB, you should receive a prompt on your device to Allow USB debugging? for this device (along with an RSA fingerprint identifying the computer). You may select the Always allow from this computer check box if you want the device to remember this computer, in which case you will not be prompted again when connecting your device to that specific PC.
Click to expand...
Click to collapse
Information from GitHub
ADB with version of 1.0.31 or later will works for Android 4.2.2
In order to use ADB :
Go to the ADB directory. Example C:\android-sdk-windows\platform-tools
Shift + Right click and then click "Open command window here"
{
"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"
}
OR use the command in command prompt
Code:
cd C:\android-sdk-windows\platform-tools
NOTE : You can change the directory based on where you placed the ADB files in your computer by simply changing the command to :
Code:
cd <your directory>
To check for ADB version :
Code:
adb version
There are two ways of upgrading your ADB version
Upgrade through Android SDK Manager
Extract the ZIP file that I attached below to the directory you want (example C:\ drive) and redirect your command prompt to the specific directory using "Shift + Right click" or by using the command in command prompt :
Code:
cd <your directory>
Before upgrading your ADB :
After upgraded ADB :
If your ADB is working correctly, you will see this when you plug in for the first time.
NOTE : Cyanogenmod (based) ROMs require the following setting to export kernel logs via adb: Settings >> Developer Options >> Root access >> select "Apps and ADB"
NOTE : The RSA key for the host computer is stored in directory /data/misc/adb/adb_keys
After you press the OK button, in command prompt :
Code:
adb devices
NOTE : Some user reported that the ADB over network doesn't works if the option "Always allow from this computer" is not checked. So make sure you select the option if you want to use ADB over network
now you will get something like this and you are done...ENJOY
Some useful ADB command
Code:
adb shell
Code:
adb logcat
To get a normal logcat
Code:
adb logcat -v long > logcat.txt
OR
Code:
adb logcat -v time -d > logcat.txt
OR
Code:
adb logcat > logcat.txt
To get a radio logcat
Code:
adb logcat -b radio -v time -d > logcat_radio.txt
To get a kernel log
Code:
adb shell su -c dmesg > dmesg.txt
To get a last_kmsg
Code:
adb shell su -c "cat /proc/last_kmsg" > last_kmsg.txt
Reserved
ADB over network
Thank you for this great tutorial.
I've got ADB saying device is offline with ADB over network even with the latest version of ADB. See my post
In fact, if you try to connect over network for the first time, you won't get the popup.
So, make sure you connect with USB and check "Always allow from this computer" before connecting over network.
And if you are using Ubuntu you can get the latest adb via:
Code:
sudo apt-get install android-tools-adb

[Guide][Win-Linux-Script] The Easiest Ways For Getting All Device's Mounting Points

For Non-Rooted Devices and Rooted Devices​
Here is a summary on how to get mounting points without rooting or extracting recovery.img.
The different procedures only needs to have adb shell or terminal emulator.. I will explain using adb shell through pc.
After establishing adb connection to your device, you can choose any of the following procedures to get your mounting points:
#1
Code:
adb shell
cat /proc/mounts
This will give you info about device, the mount point, the file system type, and how it is mounted.
Limitation: This method, however, will not give you all mounting points.!!!
{
"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"
}
#2
Code:
adb shell
cat /proc/partitions
This is more neat, it will give you info about ALL dev blocks and their names (not the familiar name!), and block size
Limitation: Needs from you to figure out which block belong to which partition name.!!
#3
Code:
adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
This one is the command that I like on non-rooted device..! It will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc) :laugh:
This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).
How?
- In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).
- Go to "/dev/block/platform/" folder
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.
- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)
- Now open adb shell and put the command..
***​
For Rooted Devices Only​
There are different ways to get mounting points in rooted device (including the non-rooted devices way), but the easiest way to get all device mounting points is to push parted binary to /system/bin folder and run it.
Code:
adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print
Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.
example:
The preload partition mounting point will be mmcblk0p12
The modem partition mounting point will be mmcblk0p8
The system partition mounting point will be mmcblk0p9
The Kernel partition mounting point will be mmcblk0p5
and so on
Don't forget to "quit" the parted action after grasping your device mounting points.
N.B:
- You may need to run first:
Code:
adb shell
cat /proc/partitions
to know what is the initial name for your device partition.. In the example above, it was mmcblk0.
- Also to be able to do adb push to /system partition, you will need adbd insecure installed in your device (Check this thread for that app), or to push it manually by any root explorer and then fix permissions to 755.
***​
Pre-made Scripts​Windows users
Here is a script I wrote for both non-rooted (way #3) and rooted devices for windows users.
Just extract the content in any folder and run the script that you want ("Non-Rooted and Rooted.cmd" or "Rooted Only.cmd")
Don't forget to install adbd insecure in rooted device in order to use Rooted Only.cmd script.
Linux users
As same, here is a script I wrote for both non-rooted (way #3) and rooted devices for linux users.
Just extract the content in any folder and run the script that you want ("non-rooted" or "rooted")
Don't forget to install adbd insecure in rooted device in order to use rooted script.
N.B: The linux scripts are tested with cygwin emulator on windows machine.. So needs feedback on actual machine.!!
Cheers
reserved
Thank you, I go to try.
Linux script added to OP
Thanks
Thank you You are the best one

Categories

Resources