Hi, Guest! Login / Register
Giveaway: Free Hovatek T-shirts, Hoodies & Cufflinks.. I WANT ONE! (Nov 25, 2017)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to install apps and push files to an Android phone using ADB

#1
(This post was last modified: 09-01-2015, 07:59 PM by hovatek. )

Here's a guide on installing and pushing files to an Android phone using Android Debug Bridge (ADB). This would come in handy when you're having launcher issues like "error com.android.launcher stopped working" (recall you cant use your phone without a functional launcher) or you accidentally deleted a core app or file(s) which has caused your phone to malfunction.

Requirement

* Setup ADB using this guide @ http://forum.hovatek.com/thread-588.html
* PC
* App / file to be sent to the phone
* USB cord
* USB Debugging enabled phone

Installing an application using ADB (where app name is hovatek.apk)


* Launch ADB and type the following command then press Enter

Code:
adb devices

* ADB should detect connected devices (ensure only one is connected at a time to avoid confusion)
* Copy the app to the same folder as ADB (adb.exe)

Note: to change installation location (where the app should be installed) to SD card, use the code below

Code:
adb shell pm set-install-location 2

Install location values are:

0: Auto—Let system decide the best location
1: Internal—install on internal device storage
2: External—install on external media


* Go back to the ADB command prompt and type the following command then press Enter
Code:
adb install hovatek.apk


Uninstalling an application using ADB (where package name is com.android.hovatek)


* Type the code below in ADB then press Enter

Code:
adb uninstall com.android.hovatek

This will uninstall hovatek


Pushing a file from PC to your phone (a file named file.txt to a folder named hovatek in SD card)

* Launch ADB and type the following command then press Enter

Code:
adb devices

* ADB should detect connected devices (ensure only one is connected at a time to avoid confusion)
* Copy the file to the same folder as ADB (adb.exe)
* In ADB command prompt, type the code below then press Enter

Code:
adb push file.txt sdcard/hovatek


Pulling a file from phone to your PC (a file named file.txt from a folder named hovatek in SD card)

* In ADB command prompt, type the code below then press Enter

Code:
adb pull /sdcard/hovatek/file.txt


Pulling a folder from your phone to your PC (a folder named fonts in system)

Code:
adb pull /system/fonts fonts/


Note: You can push or pull using other directories on the phone e.g /system ,  /data etc

How to set /change file permissions

To set / change file permission, run the code below

Code:
adb devices
adb shell
su
cd system
chmod 644 filename.apk

Replace
* system with the file path e.g system/apps
* 644 with the file permission
* filename.apk with the complete file or folder name


Need further assistance? Speak with a Hovatek Representative:
Working Hours: Mondays - Saturdays ; 09:00 - 18:00 (GMT +1:00)
Reply










Users browsing this thread:
1 Guest(s)