Android Debug Bridge (adb) : Ionic adb

We can debug our android apps from the real device through wifi using adb command. First, both system and real devices should be in the same network.

$ adb devices
$ adb tcpip 5555
$ adb connect

Now we can use chrome and type chrome://inspect/#devices,

First we need to connect our android device to our system 
adb tcpip 5555
adb connect IP

1. $ adb shell
2. adb>>su
3. adb>> mount -o rw,remount /system
4. adb>> exit
5. adb>> exit
6. $ adb shell settings put secure install_non_market_apps 1 
7. We have to move our apk file from our system to android device, In android apk folder run 
   $adb push -p app-debug.apk /sdcard

8. $ adb shell
9. adb>>su
10. adb>> mv sdcard/app-debug.apk /system/priv-app/
11. adb >> chmod 644 /system/priv-app/app-debug.apk 
12. adb>>pm install -r -t /system/priv-app/app-debug.apk 

Uninstall the adb production app

1 $ adb connect <ip>
2 $ adb shell
3 >> su
4 >> mount -o rw,remount /system
5 >> rm system/priv-app/app-name.apk

/**after that (remove active-admin) if not log out/
6 dpm remove-active-admin com.test.sss/com.test.sss.DeviceAdminReceiver

7. /**Revert priv-apps permission(Simply remount as rw (Read/Only)/
  $  mount -o ro,remount /system
8 exit
9 $ adb shell pm uninstall com.test.sss
10 $ adb shell rm -rf /data/data/com.test.sss
11 $ adb reboot
Spread the love

Leave a Comment

Your email address will not be published.

Scroll to Top