I'm currently an Android developer and I would like to make an application that will enable and disable logcat.
The purpose would basically be to save battery for the standard user, and to fix logcat not working for developers.
I know of one method to disable/enable logcat which is:
logcat-disable
logcat-enable
Unfortunately, this does not work on all devices since it is based on the kernel.
Also, most (I believe all) devices have a /dev/log/main/ folder in which there is a file that has logs printed into it. I could also possibly attempt to delete the folder (which it will likely be re-created at reboot) or MAYBE change the file permissions for it to prevent the system from writing to it. This option may or may not work.
So, my question is more for kernel developers or those very familiar with kernel development/file structure.
Does anyone have any idea what file is generally modified when a kernel enable/disables logcat?
P.S. I was able to figure out the answer to my question on one kernel, but I doubt if it applies to all.
P.P.S. I'm aware that this is probably a pointless question since every kernel is different, but I'm not sure, so that's why I'm asking.
Thank you!
Here's the victim, I believe it's a Wopad V7+ ..
7" /Capacitive 5 point Touch Screen/ Android 2.3 / HDMI /
vimicro VC882 ARM Cortex-A8 1GHz
It seems to be AKA: HAIPAD M8 /Zixoon V78c / McPad V7+ /
MOMO 1000 (BUT Resistive touchscreen)
I bought it at dealextreme. sku104916
You can see it at wopadusa.com store
I rooted it , confirmed via rootcheck, modified the build.prop to make it appear as a nexus s. All went good for many days...
I realised a few days ago that my tablet was unable to PERMANENTLY install an apps... or install a new one... Or change internal parameters or flash it(wallpaper won't be different after flashing)
In fact the weirder part is that the change appear as being applied but when it reboot, it returns to the same state (uninstalled apps still appear as installed) . The tablet indicate it's low on disk space , I uninstalled most application I could but it won't go away since the apps still appear as installed after a reboot.
I tried to flash it. The apps to flash it via Win7 confirmed the flash was successful... but I didn't notice any change. I flashed it with Zixoon and wopadusa and it didn't change anything. I tried different apps to flash it including those: chinadigitalcomm.com/flashtool-packtool-for-m8-incl-latest-1028-firmware-v3-0-update-23-11-2011-t11091
I'm not sure when the problem appeared... I believe it's after I followed the following procedure: ClockworkMod Recovery 5.0.2.6 unofficial port v1.0 alpha by mikeNG chinadigitalcomm.com/post23360. .
Because when i tried to enter in recovery mode the screen became ''fuzzy'' unreadable... but I confirm i was able to select the menu at that moment. Maybe i did something wrong. And I dont' know how to undo the change.
I believe it may be related to read/write/chown permission via adb... I dont' know.
I may have to correct via adb shell chmod ?SOMETHING? /system / at different place of the filesystem but I don't know what and where to look for...
I'm not very teck savvy. But I have good will. Please help me.
I don't want to send the tablet back to china. I use it to study. I really like android.
BONUS: By any chance, can someone tell me where to buy the power adapter for that tablet ? It doesn't recharge via USB and my actual charger have a shortcut and this adapter have a very RARE tiny pin connector, slightly larger than some nokia. it's 5v 2amps.
English isn't my first language but I believe I amde myself understandable. I'll clarify anything i'm able to.
Thanks.
I can't post outside links in my message as per forum rules. After approximately eight posts, I'll be able to post outside links. Thanks for understanding!
Hi, I have a problem changing my device model from "ONE E1003" to "X" on Nougat.
Some ROMs like AOSIP,Tesla,Citrus can just simply add/edit "ro.product.model=X" on build.prop and the device name will change just like that.
But on another ROMs like RR,AICP,AEX(my current rom), editing like that won't change the device model. I also tried to use adb command, (adb shell settings put global device_name "X") but it still won't change anything.
Actually it is not really important but seeing my device name on certain apps and in the google play as "OnePlus ONE E1003" sometime really annoy me
If anyone have a better solution, feel free to share with me. Thank you.
Hello guys,
Been lurking here for ages and already benefited tons from the help posted here. However, this is one issue that I can't seem to figure out.
I have the MTK variant of the RN4 and I'm trying to enable the Camera2 API so that I can take RAW pictures, use Google HDR+ etc.
I am rooted on MIUI 9 (though as it's MTK, it is still Android 6.0) and I edited the build.prop file using ES Explorer (I added the persist.camera.HAL3.enabled=1 line). I've rebooted the device, used checker apps and Lightroom to check if there's RAW support, but without luck.
Do you guys have any other ideas as to how I can enable Camera2 API support?
I don't have bootloops, I don't have any issues other than the fact that there's no Camera2 API support. Restarting the device does not erase my mods to the build.prop file.
Any help is appreciated!
Forget about it since GCam is supposed to work on Snapdragon devices only.
Kavute said:
Forget about it since GCam is supposed to work on Snapdragon devices only.
Click to expand...
Click to collapse
I wouldn't mind using other apps such as Lightroom if I can get RAW to work. Any ideas as to whether that's possible?
I've had a similar problem before, but MIUI would revert my changes to the build.prop. I solved it by using a systemless root via Magisk.
What I did:
1. Unroot your phone
2. Flash Magisk using TWRP (link to Magisk thread).
3. Download the "camera2api-enabler.zip" from this thread
4. Add the zip (Module) using the Magisk Manager app that comes installed after you flash Magisk
5. Reboot, and you should see the camera2api enabled.
If you do run into a boot loop after installing Magisk, you may need to flash the LazyFlasher zip file after Step 2.
yohyah said:
I've had a similar problem before, but MIUI would revert my changes to the build.prop. I solved it by using a systemless root via Magisk.
What I did:
1. Unroot your phone
2. Flash Magisk using TWRP (link to Magisk thread).
3. Download the "camera2api-enabler.zip" from this thread
4. Add the zip (Module) using the Magisk Manager app that comes installed after you flash Magisk
5. Reboot, and you should see the camera2api enabled.
If you do run into a boot loop after installing Magisk, you may need to flash the LazyFlasher zip file after Step 2.
Click to expand...
Click to collapse
Thank you! I'll look into Magisk. I have to admit that I'm tempted if only to get this and Super Mario Run working.
But I do like having sys root access, I've just fixed the Cell Standby battery drain with an edit to the build.prop file, as MIUI 9 doesn't have the option to disable VoLTE.
So I'll give it a thought.
Thank you! and if anyone has any other tips, preferably something that doesn't alter my setup too much, it'd be ace.
rottensong said:
Thank you! I'll look into Magisk. I have to admit that I'm tempted if only to get this and Super Mario Run working.
But I do like having sys root access, I've just fixed the Cell Standby battery drain with an edit to the build.prop file, as MIUI 9 doesn't have the option to disable VoLTE.
So I'll give it a thought.
Thank you! and if anyone has any other tips, preferably something that doesn't alter my setup too much, it'd be ace.
Click to expand...
Click to collapse
Hi!
If it isn't work, you should try out this:
Go in Engineer mode https://forum.xda-developers.com/showthread.php?t=2313812 or download the Engineer mod apk from play store. (It's working just on stock ROM)
Swipe left to Hardware testing, and there will be the Camera option.
I think, after you find this, you can get through the settings (where will be a raw capture option)
Hello all,
Mirroring through miracast works fine now! I managed to fix the issue I faced with trying to mirror the phone with miracast.
The phone I bought from China came with apparently some manually altered rom. It didn't have much of the bloatware of the Nubia stock firmware. Also, it did not come with the "screen projection" app of Nubia. This app seems to be integrated into the phone. I couldn't find any .apk of it online. I tried a bunch of different apps, none worked. Also, factory resets, did not reinstall that app either.
The solution was simple. I used TWRP to wipe the phone and install the latest (v2.23) rom from the official nubia website: http://ui.nubia.cn/rom/detail/56
After installing it, the app was there and worked instantly.
At the moment now I have some issues with TWRP. I will fix it and see if the build.prop presisted through all of this, I doubt it.
If it did, and any changes are still required, I will update the post.
Kind regards,
Rup7ur3
---- initial post ----
Dear folks,
I'm trying to fix miracast on the Nubia Z18 (NX606J). Currently when I try mirror with the use of wi-fi direct, it doesn't show the miracast dongle I use (anycast).
I've not any experience in this and am trying to google for solutions. Online I have found some answers, but it's not yet working.
Hopefully I'm on the right path, but if anyone can help, it's greatly appreciated.
Why
The reason I want to use miracast, is to stream content to a portable display without the use of internet (so by cable or with WIDI). I don't think this phone supports hdmi/display port. If someone manages to get mirroring to work over cable, please let me know. As for WIDI, I think miracast is the only option? So, my bets are on this horse and I'm trying to make it run. Also, I'm new to this forum. If I post this at the wrong place, please forgive me. I created this thread for this specific model, because the manufacturer, Nubia, creates it's own (quite elaborate) UI on top of stock android. I suspect this could be part of the issue.
Summary so far
What I tried so far, is to install the custom recovery image of TWRP on my smartphone and adb + drivers on my windows 10 pc. Next I used the "mount" option in TWRP to enable adjustments of system files. The file I changed is the /system/build.prop file. I pulled the file using adb commands. Then changed the file on my pc and pushed it back to the phone. I will describe it in detail below. Yet, the sad thing is: it does not work. On another, older, model of the Nubia Z line, the Z9 mini, it did work.
Details
I installed drivers & adb/fastboot and twrp.
TWRP: https://forum.xda-developers.com/nubia-z18/development/recovery-twrp-nubia-z18nx606j-t3882098
Drivers & adb/fastboot: https://bbs.app.nubia.cn/forum.php?mod=viewthread&tid=1412934 (in chrome download didnt start for me, had to use firefox)
Once the above were installed, I connected my phone with the pc. I put phone settings in developer options to enable usb debugging. I got a notification to let my pc debug the phone, and accepted. Next I enabled "wireless display certification", "OEM unlocking" and set usb configuration to "MTP" instead of charging.
The adb on my pc was installed on my C:\adb\ folder. In the folder hold shift & right click, select open powershell or adb. I checked if my phone was connected using "adb devices". It listed my phone. So I went on and put it in fastboot mode (hold power + decrease volume). I checked if adb recognized fastboot with "fastboot devices". It listed my phone. Then next I unlocked the phone and installed TWRP with the help of this guide, from step 2 onwards: https://bbs.app.nubia.cn/forum.php?mod=viewthread&tid=1412934
Once TWRP installed. I created a backup of the phone through there. Then I selected the tab "mount" and enabled the system folder. Back to adb, I ran the command "adb devices" to see if my phone was listed, it was. Then I ran the command "adb pull /system/build.prop" that copied the build.prop file to my c:\adb folder. I made a reserve copy of the file and adjusted it with notepad++. These are the lines I added or enabled:
ro.hdmi.enable=true
ro.hdmi.mirror.enable=true
persist.adb.notify=0
net.tethering.noprovisioning=true
persist.debug.wfd.enable=1
persist.sys.wfd.virtual=0
Click to expand...
Click to collapse
Then I pushed it back with the adb command: "adb push build.prop /system/build.prop". Rebooted the phone, tested the mirroring option, no luck. The phone runs on android 8.1.0, has the nubia V6.0 UI and the build number is NX606J_CNCommonV2.23. Any app whatsoever with a miracast option, will redirect to the system miracast settings. The following screen will appear: https://imgur.com/a/Otf1YO0
The Struggle
I read online several forums where they claimed that setting these was helping other phones to enable miracast. For the Z18 it did not work. I tried this with the Nubia Z9 mini. Miracast did not work on there before, now it does. The build.prop seems to persist fine now. For some reason, the first few attempts (attempt 1 & 2) wiped TWRP and the adjustments on the build.prop. Third time it kept working. TWRP however, still is wiped after a few reboots, but the build.prop file remains intact with the changes I made.
The Nubia Z9 mini has a few stock apps: "screen projection", "screen projection services" and "projection sink". It loads the screen projection app and allows to chose from project/receive and works flawlessly after the build.prop changes. The Z9 mini runs on android 5.1.1 and as Nubia UI V4.0 with build number: NX511J_INCommon_V4.0.4.
I read online that:
Miracast is available on Android devices with Android 4.2 Jelly Bean
Click to expand...
Click to collapse
and
no more supported by Android since 6.0
Click to expand...
Click to collapse
Yet, I've seen people make it work, by adjusting the build.prop, for later versions also. Not seen one working with android 8.0 or 8.1. Is it impossible for some reason / a hardware thing? If it's a software issue, surely it can be overcome?
I found that the build.prop in the Z9 mini contained the following lines:
#property to enable VDS WFD solution
persist.hwc.enable_vds=1
# Add by ztemt for ZWfd begin
#property to set wfd output resolution is 1080P(0) / 720P(1) / 960*540(2) / 800*480(3)
persist.sys.wfd.zte_resolution=0
#property to show wfd sink false(0) / true(1)
persist.sys.wfd.zsink_support=1
#property this is device support wfd 1080p output support(true) not support(false)
persist.sys.wfd.1080p_support=false
# Add by ztemt for ZWfd end
Click to expand...
Click to collapse
I believe it's coupled to those apps I mentioned screen projection apps which are on the z9 mini. It had no effect adding these on the Z18. Now I'm attempting to find those apps and install them on Z18. Or looking for ways to downgrade the Z18 to android 5x. Ideally I do not want to downgrade the android. Any help, advice or questions are greatly appreciated.
rup7ur3 said:
Dear folks,
I'm trying to fix miracast on the Nubia Z18 (NX606J). I've not any experience in this and am trying to google for solutions.
I have found some answers, but it's not yet working. Hopefully I'm on the right path, but if anyone can help, it's greatly appreciated.
Why
The reason I want to use miracast, is to stream content to a portable display without the use of internet (so by cable or with WIDI). I don't think this phone supports hdmi/display port. If someone manages to get mirroring to work over cable, please let me know. As for WIDI, I think miracast is the only option? So, my bets are on this horse and I'm trying to make it run. Also, I'm new to this forum. If I post this at the wrong place, please forgive me. I created this thread for this specific model, because the manufacturer, Nubia, creates it's own (quite elaborate) UI on top of stock android. I suspect this could be part of the issue.
Summary so far
What I tried so far, is to install the custom recovery image of TWRP on my smartphone and adb + drivers on my windows 10 pc. Next I used the "mount" option in TWRP to enable adjustments of system files. The file I changed is the /system/build.prop file. I pulled the file using adb commands. Then changed the file on my pc and pushed it back to the phone. I will describe it in detail below. Yet, the sad thing is: it does not work. On another, older, model of the Nubia Z line, the Z9 mini, it did work.
Details
I installed drivers & adb/fastboot and twrp.
TWRP: https://forum.xda-developers.com/nubia-z18/development/recovery-twrp-nubia-z18nx606j-t3882098
Drivers & adb/fastboot: https://bbs.app.nubia.cn/forum.php?mod=viewthread&tid=1412934 (in chrome download didnt start for me, had to use firefox)
Once the above were installed, I connected my phone with the pc. I put phone settings in developer options to enable usb debugging. I got a notification to let my pc debug the phone, and accepted. Next I enabled "wireless display certification", "OEM unlocking" and set usb configuration to "MTP" instead of charging.
The adb on my pc was installed on my C:\adb\ folder. In the folder hold shift & right click, select open powershell or adb. I checked if my phone was connected using "adb devices". It listed my phone. So I went on and put it in fastboot mode (hold power + decrease volume). I checked if adb recognized fastboot with "fastboot devices". It listed my phone. Then next I unlocked the phone and installed TWRP with the help of this guide, from step 2 onwards: https://bbs.app.nubia.cn/forum.php?mod=viewthread&tid=1412934
Once TWRP installed. I created a backup of the phone through there. Then I selected the tab "mount" and enabled the system folder. Back to adb, I ran the command "adb devices" to see if my phone was listed, it was. Then I ran the command "adb pull /system/build.prop" that copied the build.prop file to my c:\adb folder. I made a reserve copy of the file and adjusted it with notepad++. These are the lines I added or enabled:
Then I pushed it back with the adb command: "adb push build.prop /system/build.prop". Rebooted the phone, tested the mirroring option, no luck. The phone runs on android 8.1.0, has the nubia V6.0 UI and the build number is NX606J_CNCommonV2.23. Any app whatsoever with a miracast option, will redirect to the system miracast settings. The following screen will appear: https://imgur.com/a/Otf1YO0
The Struggle
I read online several forums where they claimed that setting these was helping other phones to enable miracast. For the Z18 it did not work. I tried this with the Nubia Z9 mini. Miracast did not work on there before, now it does. The build.prop seems to persist fine now. For some reason, the first few attempts (attempt 1 & 2) wiped TWRP and the adjustments on the build.prop. Third time it kept working. TWRP however, still is wiped after a few reboots, but the build.prop file remains intact with the changes I made.
The Nubia Z9 mini has a few stock apps: "screen projection", "screen projection services" and "projection sink". It loads the screen projection app and allows to chose from project/receive and works flawlessly after the build.prop changes. The Z9 mini runs on android 5.1.1 and as Nubia UI V4.0 with build number: NX511J_INCommon_V4.0.4.
I read online that:
and
Yet, I've seen people make it work, by adjusting the build.prop, for later versions also. Not seen one working with android 8.0 or 8.1. Is it impossible for some reason / a hardware thing? If it's a software issue, surely it can be overcome?
I found that the build.prop in the Z9 mini contained the following lines:
I believe it's coupled to those apps I mentioned screen projection apps which are on the z9 mini. It had no effect adding these on the Z18. Now I'm attempting to find those apps and install them on Z18. Or looking for ways to downgrade the Z18 to android 5x. Ideally I do not want to downgrade the android. Any help, advice or questions are greatly appreciated.
Click to expand...
Click to collapse
Never try downgrading this phone. It's a nightmare because it's using AVB2.0 which was introduced with Android 8 I think. So getting that to work would be extremely difficult. What I'm not sure about is if nubia is doing anything different from other vendors as, judging by the source code, it looks the same as Sony for example (actually that's no wonder since they got 70% of their code from Sony).
What's difficult about this is that they define custom, vendor and device specific values as you can see with the Z9 build.prop. I'm not that well versed in Android actually and mostly just learning all this stuff by experimenting right now, but I would say your best bet would be some tool that scans a system for possible values in build.prop. However I'm unsure if such a tool exists unfortunately..
Sorry I can't be of more help as of now. I think Lineage is supporting Miracast though? So once I got that to work, it might be an option for you
Nubia z18 support screen cast without internet.
I use with EZcast 2.4g/5g without any internet and wifi hotspot.
I buy from Aliexpress " EZCAST 1080P TV Stick Dongle 5G Wifi Support HDMI DLNA Miracast Airplay DLNA Stick For IOS Android Windows Smartphone"
jagdishgeb said:
I use with EZcast 2.4g/5g without any internet and wifi hotspot.
I buy from Aliexpress " EZCAST 1080P TV Stick Dongle 5G Wifi Support HDMI DLNA Miracast Airplay DLNA Stick For IOS Android Windows Smartphone"
Click to expand...
Click to collapse
Thank you for the response, great to hear that it is possible! Did it work immediately?
Also, if you don't mind me asking. Could you maybe check if there are any default screen projection / sink apps pre-installed on your z18?
Mine came without any. I will try reinstall stock to see if that helps. All apps I use go to this screen: https://imgur.com/a/Otf1YO0
Online I read there are supposed to be options to enable wireless display in there. However, I think Nubia disabled it in their UI.