Push my apk to /system/app

前端 未结 14 2072
清酒与你
清酒与你 2020-12-02 07:16

How can I push my application package to Android emulator \"/system/app\" folder?

I\'ve already tried to use:
\"adb push myApk.apk /system/app\"
and it giv

14条回答
  •  既然无缘
    2020-12-02 07:33

    I have come across this situation multiple times while copying apk files to /system partition and could finally resolve it using the following steps:

    • Check the Free space in /system partition using df from adb shell. Most probably the Free space would be less than size of apk file.

      Filesystem               Size     Used     Free   Blksize
      /dev                         1.3G    80.0K     1.3G      4.0K
      /sys/fs/cgroup               1.3G    12.0K     1.3G      4.0K
      /mnt/secure                  1.3G     0.0K     1.3G      4.0K
      /mnt/asec                    1.3G     0.0K     1.3G      4.0K
      /mnt/obb                     1.3G     0.0K     1.3G      4.0K
      /system                      3.5G     3.5G    10.0M      4.0K
      /efs                        15.7M     2.8M    12.9M      4.0K
      /cache                     192.8M   736.0K   192.1M      4.0K
      /data                       25.5G    12.7G    12.8G      4.0K
      /persdata/absolute           4.9M   120.0K     4.8M      4.0K
      /sbfs                       10.8M     8.0K    10.7M      4.0K
      /mnt/shell/knox-emulated    25.5G    12.7G    12.8G      4.0K
      /mnt/shell/privatemode      25.4G    12.7G    12.7G      4.0K
      /mnt/shell/emulated         25.4G    12.7G    12.7G      4.0K
      /preload                     5.8M     3.3M     2.5M      4.0K
      
    • Use du /system to get sizes of each folder & file in /system partition. Arrange the output in descending order of size(s) to get (something similar):

      4091840 /system/
      1199416 /system/app
      964064  /system/priv-app
      558616  /system/lib64
      373320  /system/lib
      206624  /system/vendor
      170952  /system/app/WebViewGoogle
      148824  /system/app/WebViewGoogle/lib
      125488  /system/voice
      125480  /system/voice/embedded
      122880  /system/app/Chrome
      106520  /system/framework
      102224  /system/priv-app/Velvet
      96552   /system/app/SBrowser_3.0.38
      93936   /system/vendor/lib64
      93792   /system/vendor/lib64/egl
      92552   /system/tts
      92512   /system/tts/lang_SMT
      ...
      
    • Delete unnecessary files from /system/voice/embedded, /system/tts/lang_SMT (for language/locale support) and/or other folders to free enough space in /system partition to accommodate the new apk file. Deleting files in partitions other than /system may not help in this scenario. (N.B.: This step may require ROOT privileges and remounting /system partition in read-write mode using mount -o rw,remount /system)

提交回复
热议问题