Android Real device debugging, something can not use USB debugging, or with USB debugging too troublesome, then need to use wireless debugging this way.Unlimited debugging sub-root and non-root two, the market's wireless ADB debugging app, basic needs root permissions, which makes no
To use the root permission in an Android Application, the device that runs the program must have the root permission.
public static boolean runRootCommand(String command) { Process process = null; DataOutputStream os = null; try { process = Runtime.getRuntime().exec("su"); os = new DataOutputStream(process.getOutputStream()); os.writeBytes(command+"\n");
DB_PATH_SD = Environment.getexternalstoragedirectory (). GetAbsolutePath () + File.separator + "TDR" +File.separator; Public Static classbasedb{ Public Static Final intVersion=1; Public Static FinalString dbname= "Base.db"; }3, where needed, call Copydbfile () The try { //Copy tool class gets the Basedbhelper.getinstance (). Copydbfile () by a single case (), a catch (FileNotFoundException e) { LOG.E (TAG, "Filenotfount");
An example of this article describes the Android phone to get root permissions and to achieve shutdown restart function is a very common in the Android design of the important function. We are now sharing it with you for your reference in the development of Android programs.
The specific function code is as follows:
From: http://hi.baidu.com/kenny_wju/item/c0e3177c030d38336e29f63b
Method:
Modify./Default. Prop
Set Ro. Secure to 0, persist. Service. ADB. Enable to 1, and the adbd process will start as the root user.
Principle:
You can take a look at the/init. RC fragment in the root directory of the Android system:
......
# Adbd is controlled by the persist. Service. ADB.
The last few days is really a variety of significance of the busy, busy exams, but also busy with curriculum design, hand and outsourced projects, the other side of the school project to do, their own things still in the document stage, it is really let people want to die Ah!!
Nearly half a month, C # This aspect of coding more, Android and Java here completely shelved, so take time to write a small example.
This is a very small example of a folder
from:
Http://bbs.gfan.com/android-2996211-1-1.html
Please go to the above address to download the students who need root.
A. Control the phone to create a temporary directory, and then write the Zergrush script to this directory, and modify the file permissions to enable it to run (this step without root permission);
ADB Shell Rm-r/data/loc
The Android system partition can be viewed through the shell command DF:For specific reference to my previous article:Android partition InterpretationThe Android root directory results as shown in:The main directories are system and data, as well as the directories described below./system/app/This directory holds the System program system original program handset
now the Android phone root privilege can be said to be easy to get, and about to determine whether the phone has root method, you understand? If the app has some special features that require root access, you'll need to determine if it's root. Don't know if
1 after executing adb shell [email protected]:/#是什么意思?This is a common format in Linux terminals.This shell is run as root , the hostname is Android, currently in the root directory/,#代table is the root permission.Typically, the ADB shell is started by default with a UID of $-a shell user , which requires the
Android DDMS connection to the real machine (root), with file explore to see the Data/data folder solutionThe problem is no permission, with 360 mobile phone helper or pea pod is also invisible. The easy way is to use the RE File manager (grant root permission), set data and Data/data to 777 permissionsNote: Open with the RE manager to see the default is not 777,
In Android development, if you use a database to store data, it is inevitable to look at the contents of the database, but for the root of the real machine, it is not so easy to view the database, if only to view the database and then put the phone root, a little more than the loss, So the following will provide a way to view the database without
When the Android system is started, "init =/init" is usually set in the kernel boot parameters. In this way, if the kernel is successfully mounted to the file system, the INIT program in the root directory is run first. What does this program do? We only have rfsc (readthe fucking source code )!!
The INIT program source code is in system/CORE/init of Android offi
1, for many users, root is not necessary, it is only when you install in the simulator, such as 360 phone guards-the security of the detection application to determine whether you can go to the phone, or the re file Manager-the easy way to call files between the win system and the Android system; Pancake Android Game Modifier- Modify the gold coins or experience
Start analyzing Android todayRoot file system startup process.When the Android system is started, "init =/init" is usually set in the kernel boot parameters. In this way, if the kernel is successfully mounted to the file system, the INIT program in the root directory is run first. What does this program do? We only have rfsc (readthe fucking source code )!!The IN
Premise: the phone has root;1. Connect the computer to the phone, open cmd, run the commandADB shell;//because of the Linux kernel for Android, many Linux commands can also be used on Android2. Use root permissions,Su; If you don't have root, you'll be prompted3. Add permissions to the file, the path to the db file is:
runtime = Runtime.getruntime ();The effect of this sentence in Java is to obtain a computer terminal, for example, under Window is a DOS window, such as: Runtime.exec ("Color 2D") and directly under DOS directly input color 2D effect.In wirelessly equivalent to get to the Linux terminal.To get root access for Android apps, the Android device must have
[Android] simple task manager (non-root)
Because it is not a system-level application and does not obtain the ROOT permission, it is not very significant to implement the task manager by yourself, just as the mobile assistant like LBE is installed on a mobile phone without a root phone, although it also provides a one-
We know that the Android mobile phone operating system uses the Linux kernel, and the highest system permission in Linux is Root, which is similar to the Administrator privilege in Windows, that is, the highest privilege in the operating system.
Because the Root permission is too high, mobile phone manufacturers generally do not allow users to directly use the
1. We in the computer Baidu search "Zhuo Master", and then download and installed in the computer.
2. Open the USB debug option in the phone settings. The specific operation is: Click on the mobile phone settings----developer options----USB Debugging---Open (Android4.2 click on the Android version of the mobile phone several times to enter the developer option, and then turn on USB debugging).
3. Connect the phone to the computer and wait for the ma
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.