sudo adb kill-server
sudo adb start-server
adb shell
su
mount -o rw,remount /system
pm list packages -f |grep "FileName"
#pull files to local to edit and push to the device after
adb pull /dir/Files .
adb push ...
Detailed procedure to remove some app( risky!) :
rm /system/app/your_app
rm /data/data/your_app
remove any entries in /data/system/packages.xml
remove any entries in /data/system/packages.list
edit AndroidManifest.xml and get rid of android:sharedUserId="android.uid.shared"
Pull multiple files to local:
adb shell ls /sdcard/gps*.trace | tr '\r' ' ' | xargs -n1 adb pull
#or, on Windows (since the newline characters are different),
adb shell ls /sdcard/gps*.trace | tr "\n\r" " " | xargs -n1 adb pull