Saturday, November 24, 2018

linux - Android Studio Code not updating with install of new APK in system/priv-app

A little background:



  • Android Studio project compiled with a submodule

  • Module imported from .aar package

  • Working code, freshly cloned from Git. Main app operates as intended

  • Single line addition to the module


    Log.d("DemoModeManager", "stuff is happening here");


  • From the imported module, the decompiled .class file shows the new line of code as it should



Before the above addition is a second Log statement which appears in Logcat with expected values. Immediately after is the new line, which is never seen in Logcat (checking both in terminal and in android studio)


This is an extension of a larger problem in which ANY change/addition is not updated in the apk.


APK is installed as priveledged app in system/priv-app directory. Installation is the same as every other time I have had it working.


Install method (which has worked every other time)
rename and unzip apk file
adb root
adb remount
Delete all old files
adb push /app.debug.apk /system/priv-app
adb push /app.debug/lib/arm64-v8a/* /system/lib64/app.debug


This leads me to believe one of three things is happening:



  1. Software issue in which the APK is being overwritten somehow

  2. Hardware issue in which the APK never updates from an old version (despite being fully deleted from the device)

  3. Hardware problem which is unrelated to the APK


Some attempted fixes (in no particular order):



  • Rebuild project

  • Clean project

  • Refresh linked C++

  • Sync project with gradle files

  • Re-import gradle project

  • Sync with file system

  • Invalidate cache and restart

  • Wipe and reclone Git project

  • Uninstall and reinstall Android Studio

  • Disable instant run


Any thoughts or ideas to try would be much appreciated.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...