The method can be useful if “nothing helps”, there is no access to the Root Explorer or the phone cannot boot at all. In my case, I had to restore SystemUI.apk deleted by silliness in a “combat” mode. At the same time, it was possible to do something on the phone only in a fraction of a second between pressing the “OK” button on the previous window with an error and the appearance of the next such window. I did not want to reflash, because I had to urgently master adb.
So, in order to connect your google phone to adb, you need:
1)
Android SDK for your system (here - on the example of GNU / Linux Ubuntu)
2) Android SDK Platform-tools (set by selecting the appropriate checkbox in the Android SDK)
3) In "Options - Programs - Debugging" there should be a tick on "Debugging via USB"
4) Connect your phone to USB
5) In my case, I had to do two more things:
specify the ID of the phone manufacturer idVendor (it can be found
here ):
#echo SUBSYSTEM=="usb", SYSFS{idVendor}==" 0bb4 ", MODE="0666" > /etc/udev/rules.d/51-android.rules
#chmod a+r /etc/udev/rules.d/51-android.rules
where 0bb4 is replaced with the code of your manufacturer, then restart adb
#adb kill-server
#adb start-server
So, everything is installed and connected, you added the path to the platform-tools to the $ PATH variable of your operating system, or you moved to this folder using the cd command. At the command "adb devices" should issue a certain number and to the right of it a "device". This means that adb sees the phone and can work with it. If instead of “device” there is something else or even “List of devices attached” - the problem is somewhere in step 4-5.
Next you need to put the system file that you want to install in the platform-tools folder. That is, a backup copy of the system file must be prepared in advance or copied from a similar phone.
')
After that, you can drop the system file in / system / app with the following sequence of commands:
$adb push YourFile.apk /data/Yourfile.apk
$adb remount
$adb shell
$su
#cp -f /data/YourFile.apk /system/app/Yourfile.apk
#chmod 644 /system/app/YourFile.apk
#exit
$exit
$adb reboot
where YourFile.apk is the name of your system file, and the case of letters matters.
After the last command, your phone should reboot with new files.
If you receive the answer “remount failed: Operation not permitted” to the adb remount command, then try instead of it after “su” enter "#mount -o rw, remount -t yaffs2 / dev / block / mtdblock3 / system".
PS: In Linux, if platform-tools is not added to $ PATH, instead of “adb” you need to write "./adb".
In this article, the commands that I ran on behalf of a regular user are indicated by the $ character at the beginning of a line, and by root, by the # character.