Folder "mtklog" on SDcard keeps getting full


Question

I have a Jiayu G3S android phone.
Its system is a rooted Android version 4.2.1.



I've noticed that a folder called "mtklog" on my SDCARD was getting full with files (log files, I guess) until there was no empty space left.



So I learned on the internet that there is a "MtkLogger" app. This app is accessible via the "Engineer mode" (or some MobileUncleTools app of sorts).
The solution found on internet was to check the "/etc/mtklog-config.prop" file on my cellphone.
I looked into it, and indeed it exists on my phone. It contains some tags like mobile.log.enabled=false.



The solution guided to set all to false. Much to my surprise, all of them were already set to false.
All the logs were disabled already.
(Another kind of line referred to was max log size=300, and I've already changed it to 0 and 1 with no effect)



After lots of tests and research, I opened the MTKLogger app, which I had never done before. I had never seen the app screen. It allows to log events of 3 types (network, disk and cpu).



Ever since, this app opens on startup with all logging options set to on. It even started appearing on running process accused by the terminal.



Now, when that happens, I open the app via the notification, and use the options to STOP all logs and Delete all logs.



But when that happens (That is, the MTKLOGGER is logging and showing me it is logging), the log files go to "SDCARD/mtklog/mdlog" or "SDCARD/mtklog/netlog". These folders refers to the different log types I mentioned earlier.



What is strange is that none of these is the folder that originally bothered me. (i.e. "sdcard/mtklog/aee_exp")
And this folder keeps getting filled even with mtklogger not logging anything.
So now I have 2 problems: 1) MtkLogger keeps opening by himself, showing on the notification bar, with all logs enabled.
2) I still haven't found out the cause for the aeeexp folder to get filled. My guess is that another app is using it.



I have a Terminal Emulator app (with busybox commands installed).



Here's what I've already tried:




  • I've tried to create a file with the same name of the folder, so whatever is trying to write there, won't be able to. With that, all the logs went directly to internal storage. (Didn't work well and I gave up on this approach)
    When I cleaned the internal storage, I cleared some *.zip files with random numbers as name.


  • I've tried to delete "/system/app/mtklogger.apk" and all the mtklog files that appeared as a find result on terminal.
    I've tried to check running processes on terminal but no logging one appeared to me.
    (The only one is Mtklogger, with started to run only after I opened it for the first time)
    Is there a way to check what app/process is writing on that folder?
    How can I really unninstall the mtlogger app once and for all? What files should I delete? It has no option on
    How can I investigate further on this?




I'm sorry for the long text and story-like question, I just couldn't sort clearly what informations would be useful or not.


Answer

After a while, and no valid answers, I have come up with the following workaround. The required steps are:




  • Have "Android Terminal Emulator" app installed, with busybox commands also installed (as described in question)


  • Make a list and check the folders that bother you. The list I've provided contains only files that I'm sure my phone won't need.


  • Create a bash script (.sh extension) with remove commands on that specific folders. Here is mine:




#!system/bin/sh
rm -rf /sdcard/mtklog
rm -f /data/log_other_mode/*
rm -f /data/core/*.zip
rm -rf /sdcard/DCIM/.thumbnails




mount -o rw,remount,rw /system


and to revert it back to read-only:



mount -o ro,remount,ro /system


Note: You probably will need super-user (sudo) privileges in order to do these commands.




  • The terminal emulator contains an "Widget" option which allows you to place a shortcut to a command in your phone home page. I've used that option with the following command:



su -c /system/etc/scriptName.sh; exit




  • Every once in a while I click on this icon to make a clean. This asks permission for the user, since it contains a su command. When clicking "allow" the terminal finishes and closes automatically.



It's not an optimal solution since it needs the phone to be rooted, and you have to manually click the widget button. However, it was the best one for me, since making it run automatically would require it to ask for permission. I didn't want also to give the terminal emulator permanent access to su-privileges. My guess is that a more complex script can be made (e.g. one that monitors the size of the folders with the Disk-Usage command), but I'm happy as it is.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes