How to add the ADB command for the Android SDK to environment variables on Mac Pro is explained here.
1, start terminal, enter the command:
CD $HOME
2, update the. bash_profile file (when the file exists), if it does not exist, you can create it by using the following command: Touch. Bash_profile
3, open the. bash_profile file, edit its contents, the command is as follows:
Open-e. Bash_profile
4, at this time the text editor will open a text, edited as follows:
Export Path=${path}:/users/lvxiangan/programfiles/adt-bundle-mac-x86_64-20130219/sdk/platform-tools
Export Path=${path}:/users/lvxiangan/programfiles/adt-bundle-mac-x86_64-20130219/sdk/tools
Can be modified according to the SDK installation directory
5, save the file, close. bash_profile
6, update the environment variables just configured, the command is as follows: source. bash_profile
7, verify the configuration is successful, the order is as follows: ADB devices, successful results:
lvxiangans-macbook-pro:~ lvxiangan$ ADB devices
List of devices attached
0123456789ABCDEF Device
lvxiangans-macbook-pro:~ lvxiangan$
Accidentally implemented the ADB shell chmod 6755/system/app/How to recover in Android.
chmod 755/system/app
The difference between the Android apk root and usb adb permissions
USB ADB Authority is when the ADB is connected to a cell phone, the daemon on the phone adbd as root, so its subprocess has root privileges, usually if the ADB shell sees:
Android version after 4.0:
C:\USERS\MTK29\DESKTOP>ADB Shell
root@android:/#
Android Version 2.3:
C:\USERS\MTK29\DESKTOP>ADB Shell
That means that the ADB connection is root, and conversely, if you see $, it's shell permissions.
Android APK itself does not have root permissions, if you want to enable root permissions, then must have access to the root of the process or have a file with S bit, the current more common approach is that the cell root after the built-in Su to System/bin, The general app can then use the SU command to achieve root permission switching.
There have been colleagues on the network who have modified the SU command and passed a apk to control the rights of the SU command.
such as the common superuser:http://androidsu.com/superuser/so you can artificially control the use of root permissions. ((because it hasn't been updated for a long time, only for ICS and previous versions)
supersu:http://forum.xda-developers.com/showthread.php?t=1538053 (fast update, recommended)
In summary, if the ADB already has root privileges, it would be easy to have apk exercise root privileges. For example, in the JB version or previous version:
ADB remount
ADB push Su/system/bin
ADB push Superuser.apk/system/app
ADB shell chmod 0644/system/app/superuser.apk
ADB shell chmod 6755/system/bin/su
ADB reboot
Information from the Internet