[Record:IT][ADB][APK] Install APK to Android Phone via ADB | 利用ADB安裝APK到Android電話

TN.HK
Messages From Irresponsible Fat Boy
3 min readAug 8, 2021
Kyocera Digno NP903KC

(Short Clip showing the processes is embedded at bottom|示範片段在文末)

Some days ago, a lovely Japanese phone, Kyocera DIGNO 903KC was got on hand, the appearance is like a feature phone that running Android 8.1.0, but since there is no Google Play Store, and the system environment is not like the Android environment that I use with my Sony / ASUS mobile, studying a bit of time and find that if APK can be get, install the app to the phone may not impossible.
早幾天,得到了一部十分可愛,外表像是功能電話的Android日本手提電話,Kyocera DIGNO 903KC,它運行Android 8.1.0,但因為不似得用慣了的Sony或是華碩電話,內裡並沒有Google Play Store在內,所以花了一點時間,看看怎樣在能得到應用的APK檔後,安裝到電話上使用。

After searching from the web, the most easier way is install via ADB, Android Debug Bride, which can be find at the SDK of Android Studio. Since I had tried writing some app with Cordova, SDK is already in my computer as Android Studio is needed for compiling the Cordova apps. To get SDK, either direct download from the Developer page or install the Android Studio seems are OK!
在網上找了一會,發覺最簡單的方法似乎是用ADB - Android Debug Bridge,在Android SDK就能找到。因為之前利用Cordova去寫Android的應用,我的電腦上已安好了Android Studio,SDK已有了;如未有的話,從開發者頁面下載Android Studio來安裝或只下載SDK工具似乎也可以!

The next step after the SDK been installed / put to the computer is setup the phone! Since the phone is not ready for any “non-offical way” to install anything, the following steps are needed to be done before connecting the phone to the computer:
Step 1: enable the delveloper mode of the phone (go to the Settings > About phone, then click the ‘Build number’ for 7 times for enable Developer Mode); and
Step 2: enable USB-debugging of the phone (go to Settings > More Settings > Developer options, enable ‘Stay awake’ and ‘USB debugging).
After that, the phone is ready for connecting to the computer!
在安裝/安置好SDK後,電話將要設定一下!因為電話買回來不會給你用"非官方方法"去安裝任何東西,以下兩步便是在連接電腦前必做動作:
第一步,啟用開發者選項(設定>有關電話,然後在版本號碼上按七次,開發者選項便會啟動)
第二步,啟用"USB-debugging” (由設定>更多設定>開發者選項,剔選"保持畫面開啟"及"USB除錯")。
完成後手提電話便準備好連接電腦了。

When the phone connect to the computer, the phone will ask you allow to use USB debug mode, and your answer will not other than ALLOW! Then, you can focus on your computer!
當連接電話到電腦時,電話會詢問是否允許用USB除錯模式,應該不會是不允許吧?!之後,便回到電腦作業吧!

The tool used for the install apk(s) is ADB, Android Debug Bridge, if the Android Studio had been installed, goto the platform-tools directory; if the Android Studio hasn’t been install and just wanna use the SDK, download the SDK-platfrom-tool only from this page is another way! After download it, extract the “platform-tools” folder to anywhere you like!
用作安裝apk的ADB- Android Debug Bridge會在安裝Android Studio時一併安好,只要找到platform-tools資料匣就可以;如未安裝Android Studio但只想使用ADB時,只需到這網頁下載便可以。下載後,解壓並放到你喜歡的位置即可!

Then, is the COMMAND-LINE time! Go to command-line (terminal?) by pressing WIN+R to open RUN, type in “CMD” and press ENTER to open the CMD window (termainal?).
Change to the directory of the platform-tools, then check the phone is connected or not by:
跟著便是”指令時間”!同時按下WIN+R打開RUN,輸入”CMD”進入指令視窗。
將目前位置轉移到"platform-tools"的位置,輸入以下指令看看電話是否已連上了:

...\platform-tools>adb devices

Then, you will see the a number represent the phone showing! If there is no device shown, unplug and replug the phone then wait a few seconds for windows to use suitable driver for connection.
Next, is the time for finding and download the apk(s) you want, for example: Whatsapp, and store the apk file to the folder / directory easy to access, and suggested you create a folder just inside the platform-tools folder, naming for example: “apks”.
跟著,有一組代表連接了電腦的電話的數字便會出現!如沒有任何裝置連接,嘗試拔除電話再接上,再等待一點時間,讓視窗為你使用最合適的驅動程式連接電話。
接著,你便可以下載你喜愛的應用APK,例如WhatsApp,然後放到一個方便存取的位置,例如在platform-tools下建立一個"apks"資料匣。

Since the phone is connected to the computer, and the apk had been downloaded to ‘apks’ folder, using the install command to install is the last step, for example install the Whatsapp:
因為電話已連接上電腦,應用的apk亦放到apks資料匣,現在只需要輸入以下指令便可以安裝應用程式了(例:WhatsApp):

...\platform-tools>adb install apks\WhatsApp.apk

Wait for a while, SUCCESS is shown and the app had been installed!!!
等待一會,SUCCESS字樣便會出現,你的應用程式亦已安裝完成!

video post on Twitter

[TN-20210809]

--

--

TN.HK
Messages From Irresponsible Fat Boy

Record and share something that are found interesting when roaming at the internet or real life!