Mtknoled.apk - Android Q&A, Help & Troubleshooting

Hi guys,
i have a problem. I did execute the mtknoled.apk becoause oft some battery issues.
And the result was not gold, because my battery Problem still was not fixed, and the notification light was disabled.
Now I want my led notification work again.
Can someone help me out, with an apk which enables the led again?! Would be great!
THX in advance

Not sure if this is still needed but here's what worked for me:
1) install and launch Minimal ADB and Fastboot;
2) once the phone is connected and recognized, execute
Code:
adb shell settings put system notification_light_pulse 1
You can verify the result with:
Code:
adb shell settings get system notification_light_pulse
It will give "0" if disabled and "1" if enabled.

Related

[BUGLIST] AOSP 2.2 ROM Bugs and Fixes | Post questions here

If you ...
find a bug or problem on 2.2, post here
find a solution on how to fix the bug, post here
want to get help on how to fix the bug, post here
anything else, goes here
This thread are meant for bug/problem solution and reported bug list of 2.2 custom ROM which i will try to manage, so people are not posting same bug, and asking for same solution all over again in X10 Custom ROM AOSP thread.
Limitation
Cannot Mount via USB
2.2 Custom ROM put the SYSTEM partition on your phone memory and the DATA partition in your SD card. That is why you cannot dismount the SD card from Android to mount to your PC.
No App2SD
2.2 Custom ROM is still running on 2.1 Custom Kernel which not supporting this.
Bug list
#0001 - WiFi not working - Fixed on 2.2
#0002 - Random android.process.media force close - Fixed on 2.2
#0003 - Home button not working, and no Lock Screen - Fixed on 2.2
#0004 - Cannot install certain APK (Angry Bird)
#0005 - No radio, no network and flashing Home - New on 0.0.2
#0006 - ADB shell have SU access, but Titanium Backup cannot work - New on 0.0.2
#0007 - SD Card non-ascii folder show as ???
#0008 - Facebook Contact Sync not available
#0009 - CPU Governor set to performance by default
Solutions for bugs
#0001 - How to enable WiFi on 2.2 Custom ROM
1. Try to enable WiFi, of course it will not work.. just do it.
2. WiFi will goes off automatically
3. Run
Code:
adb shell /system/bin/wlan_tool
4. If the adb stucks, just press CTRL+C
5. Repeat step 4 until you crash the phone
6. After reboot, your WiFi will work.
or
Code:
adb shell killall servicemanager
Post Reference
#0002 - android.process.media FC solution
0.0.1 compiled with prefilled databases which invalid for your phone
Code:
adb shell
cd /data/data/com.android.providers.media/databases
rm *
reboot
or this will ensure no invalid data anymore but will remove fixes for bug #0003
Code:
adb shell
cd /data/
rm -r data
mkdir data
reboot
Post Reference
#0003 - Fix Home Button & Lock Screen
Download sqlite here
First pull the db file first.
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
Then add value to its content
Code:
sqlite3.exe settings.db
sqlite> INSERT INTO "secure" VALUES(67,'device_provisioned','1');
sqlite> .exit
Then push back the db
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Then reboot.
Post Reference
#0004 - Solving installing APK problems
Currently the 2.2 Custom ROM does not support app2sd, and some APK may configure it self to be installed in sdcard.
So we force it to install on internal with code below
Code:
adb shell pm setInstallLocation 1
adb install -l com.rovio.angrybirds.apk
Post Reference
#0005 - Fixing radio, wifi and home screen flashing problem
Run this command
Code:
adb shell killall servicemanager
Post Reference
#0006 - Fixing SU access for Titanium Backup
Run this command
Code:
adb shell chmod 4755 /system/bin/su
Post Reference
#0007 - Fixing SD card mount command to show unicode letters
Modify your chargemon file so its enables utf8 for non ascii letter.
You need to do this on 2.1 ROM, not 2.2 ROM. The file is located in /system/bin
look for this
Code:
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sd
and change into this
Code:
mount -t vfat -o rw,noatime,nodiratime,utf8 /dev/block/mmcblk0p1 /sd
Notes:
You must use a Unix/Linux format capable text editor for this. Notepad will not work.
You can try ultraedit for it.
Post Reference
#0008 - Fix Facebook Sync
Download the ContactsProvider.apk here, then install to your Android using push command
Code:
adb push ContactsProvider.apk /system/app/ContactsProvider.apk
adb reboot
Post Reference
#0009 - Using SetCPU
By default is Performance, fast but wasting too much battery.
Use SetCPU and set to OnDemand.
Post Reference
2.2 Custom ROM FAQ
How and what happened if upgrade from 0.0.1 to 0.0.2?
Just copy data.img and system.img replacing your current one in FreeX10 folder.
This will replace all your 0.0.1 data, be sure to back up first with Titanium Backup
WiFi is running and connected, but cannot browser
This problem seems to be occurring on selected few.. You can set static IP to your android.
Go to Settings -> Wireless ... -> WiFi, then press menu button. From there you can se static IP
Is there a possibility of Timescape and Mediascape for 2.2 Custom ROM
The answer is yes, its possible.
I managed to install Mediascape.apk into 2.2 Custom ROM, but cannot run.
The reason it cannot run is because UX is using a lot of things in Framework-res.apk, images, layout, styles, and etc which cannot be copied directly from SE 2.1 into 2.2 AOSP. It requires someone to properly put all values, resolving conflicts inside Framework-res.apk before the UX can run, which will take months or at least weeks if someone dedicated his or her day job for it. Then after that we still need to deal with external files. So in conclusion, while it still possible, i don't think anyone will do it because of the time demanding process.
I want to help devs solving bugs, i found one but i don't know what actually happend.
While usb connected, from command prompt, type
Code:
adb logcat > logcat.txt
This will output a lot of debugging info into logcat.txt file, later if you find bug, you take a look inside the file.
See anything error or info related to the bug, and post here.. When writing the logcat.txt output, but them inside
Code:
brackets.
Do not post everything.. post few lines related to the bugs.
2.2 Custom ROM Testing Tools
Service Menu
WARNING: DO NOT INSTALL THIS UNLESS YOU DO DEVS, END USER DO NOT INSTALL
PURPOSE: MAYBE FOR TESTING DEVICE FEATURE, MIGHT BREAK SYSTEM APPS
Enable SE Service Menu for device testing. For devs only. You need to put adb stuff in the directory for install.bat to run.
Install framework
Code:
adb push permissions /system/etc/permissions
adb push lib /system/framework
adb reboot
Install applications
Code:
adb install app\bootinfo3.apk
adb install app\ServiceMenu2.apk
adb install app\com.laac.launcher.servicemenu.apk
Nice work. THis is handy
As i posted in the Main thread!
I think some of the force closes, (mainly acore and google framework) and the fact that the market crashes, come down to importing a vcard!
I imported vcard, get many force closes, market stops working, I clean install and don't install the vcard. Everything functions fine.
I do believe this is the reason!
Greeet ~~!! but can u tell me the seloution of this proplem :
i was run 2.2 001 ok ? then i back to to SE 2.1 to change old system.img & data.img by the new on FreeX10_alpha-release_0.0.2-UPDATE , ok ? then i reboot my phone into 2.2 , it run but like u make a refresh on computer ! evry 3 second !
thnx
Ahmed radi said:
Greeet ~~!! but can u tell me the seloution of this proplem :
i was run 2.2 001 ok ? then i back to to SE 2.1 to change old system.img & data.img by the new on FreeX10_alpha-release_0.0.2-UPDATE , ok ? then i reboot my phone into 2.2 , it run but like u make a refresh on computer ! evry 3 second !
thnx
Click to expand...
Click to collapse
Please read the main post!
sorry but no one answer me there
Thanks
Thanks for this ,hopefully a post like this is made for the 1st post on 2.1
http://forum.xda-developers.com/showpost.php?p=9134882&postcount=1
awesome thread, very helpful. Hopefully more people will read this rather than constantly posting the same bugs in the main thread.
Ahmed radi said:
sorry but no one answer me there
Click to expand...
Click to collapse
hey ahmed
grb el solution da
#0005 - Fixing radio, wifi and home screen flashing problem
Run this command
Code:
adb shell killall servicemanager
i think en da el 7l
bye
bsthost said:
hey ahmed
grb el solution da
#0005 - Fixing radio, wifi and home screen flashing problem
Run this command
Code:
adb shell killall servicemanager
i think en da el 7l
bye
Click to expand...
Click to collapse
i dont know how to use adb shell is there anythread for newbie user how to use adb ?
angry birds on my x10 is working well....i take it from a previous backup and restrored on 2.2 with mybackup pro
Please post to http://forum.xda-developers.com/showthread.php?t=835308&page=9999 thread instead.
We don't need to create two discussion thread.
i fixed the wifi and flashing problem and i have connected to wifi but i cant access internet or market any it seems i have connected to my modem netwok still cant access to internet any idea how to fix this?
17mayis said:
i fixed the wifi and flashing problem and i have connected to wifi but i cant access internet or market any it seems i have connected to my modem netwok still cant access to internet any idea how to fix this?
Click to expand...
Click to collapse
Code:
setprop ro.kernel.android.ndns 2
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 8.8.4.4
New crash this morning : i tried to connect my BT headphone after that i've activated BT => BT has desactivated itself then the phone reboots.
zephyrix said:
Code:
setprop ro.kernel.android.ndns 2
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 8.8.4.4
Click to expand...
Click to collapse
i appreciate your answer man if you could tell me how to do this ? through adb shell or something else?
17mayis said:
i dont know how to use adb shell is there anythread for newbie user how to use adb ?
Click to expand...
Click to collapse
Google is your friend!
i have flashPlayer10.1 problem it,s to slow when i play on any website any solution what might be ?

[Guide][17-5-2017]Hide Navigation Bar, Status Bar or both(Immersive Mode)-No App

Hi guys, i was searching for a way to hide the navigation bar without any app that will require you buying it or it consuming battery and after finding a couple of threads on the topic i thought of sharing my findings and also as a reference to go back to in case i forget how to. This is also good for eliminating or reducing screen burn caused by the bars on Amoled screens.
Credits go to @jplempka @cabegol @SmartPhoneLover
Type the following commands in adb/fastboot environment (adb shell) on your PC after connecting the phone in file transfer mode and usb debugging is on:
· Hide Status Bar only type:
adb shell settings put global policy_control immersive.status=*
· Hide Navigation Bar only type:
adb shell settings put global policy_control immersive.navigation=*
· Hide Both Bars type:
adb shell settings put global policy_control immersive.full=*
· Back to normal/default state:
adb shell settings put global policy_control null*
--------------------------------------------
Updates: (15/5/2017):
+ Immersive in all apps except certain apps
adb shell settings put global policy_control immersive.full=apps,-"app location",-"another app location"
Notes:
1. You can get the app location by going to "system/data/data" using any file browser with root, the location should start with the app folder name "com.appname"
Ex: com.whatsapp
2. Remove quotation marks(" ")when adding the location of the app also add an apostrophe(,) if you are adding more than one app and when typing the code there is no space after the apostrophe.
Ex: https://forum.xda-developers.com/showpost.php?p=71987561&postcount=5
Credits: @wilhexm, @rizalkhoiruddin
+ Immersive in all apps but with certain apps having Status bar not hidden
adb shell settings put global policy_control immersive.navigation=apps,:immersive.status=apps,-"app location",-"second app location"
Ex: adb shell settings put global policy_control immersive.navigation=apps,:immersive.status=apps,-com.whatsapp
Notes:
1. You can get the app location by going to "system/data/data" using any file browser with root, the location should start with the app folder name "com.appname" ex: com.whatsapp
2. Remove quotation marks(" ")when adding the location of the app also add an apostrophe(,) if you are adding more than one app and when typing the code there is no space after the apostrophe
Credits: @beatschubser https://forum.xda-developers.com/showpost.php?p=72300666&postcount=54
+ Immersive in all apps but with certain apps having Navigation bar not hidden
adb shell settings put global policy_control immersive.status=apps,:immersive.navigation=apps,-"app location",-"second app location"
Ex: adb shell settings put global policy_control immersive.status=apps,:immersive.navigation=apps,-com.whatsapp
Notes:
1. You can get the app location by going to "system/data/data" using any file browser with root, the location should start with the app folder name "com.appname" ex: com.whatsapp
2. Remove quotation marks(" ")when adding the location of the app also add an apostrophe(,) if you are adding more than one app and when typing the code there is no space after the apostrophe.
By the way this method works on all rom versions i have tested it on Nougat and all commands work. Good
luck:highfive:
-------------------------------------------------------------------
Updates: (17/5/2017):
Apps Identified to not play well with navigation and status bar hidden and how to exclude them(To be updated accordingly):
Apps List:
*Whatsapp(When typing the status bar needs to be there to see what others wrote at the same time)
*Wechat(When typing the status bar needs to be there to see what others wrote at the same time)
*Youtube(When typing the status bar and navigation bar need to be there)
*Hangouts(When typing the status bar needs to be there to see what others wrote at the same time)
---------------
Code: adb shell settings put global policy_control immersive.navigation=apps,-com.google.android.youtube,:immersive.status=apps,-com.whatsapp,-com.tencent.mm,-com.google.android.youtube,-com.google.android.talk
---------------
P.S: If you want to use these commands directly on your phone without a PC you need first to be rooted, next use any shell terminal to insert the code but remove the "adb shell" part.
So in the terminal app for example if you wanted to hide both bars you type the following:
>su
>settings put global policy_control immersive.full=*
Thank you for this info, also I just tested it using Android terminal and it works well. I don't always have PC nearby to test things, very nice.
Fe Mike said:
Thank you for this info, also I just tested it using Android terminal and it works well. I don't always have PC nearby to test things, very nice.
Click to expand...
Click to collapse
Cool that's another way. I don't know why we need to do it manually instead of google offering it as an option.
I would love it on as a Google option.
Sent from my Pixel XL using XDA-Developers mobile app
Rashad83 said:
Hi guys, i was searching for a way to hide the navigation bar without any app that will require you buying it or it consuming battery and after finding a couple of threads on the topic i thought of sharing my findings and also as a reference to go back to in case i forget how to. This is also good for eliminating or reducing screen burn caused by the bars on Amoled screens.
Credits go to @jplempka @cabegol @SmartPhoneLover
Type the following commands in adb/fastboot environment (adb shell) on your PC after connecting the phone in file transfer mode and usb debugging is on:
· Hide Status Bar only type:
adb shell settings put global policy_control immersive.status=*
· Hide Navigation Bar only type:
adb shell settings put global policy_control immersive.navigation=*
· Hide Both Bars type:
adb shell settings put global policy_control immersive.full=*
· Back to normal/default type:
adb shell settings put global policy_control null*
By the way this method works on all rom versions i have tested it on Nougat and all commands work. Good
luck:highfive:
Click to expand...
Click to collapse
Thank you for the post, this is cool! Can I choose only certain apps to be immersive? or set full immersive except some apps?
---------- Post added at 03:43 AM ---------- Previous post was at 03:36 AM ----------
rizalkhoiruddin said:
Thank you for the post, this is cool! Can I choose only certain apps to be immersive? or set full immersive except some apps?
Click to expand...
Click to collapse
Just found the answer from https://forum.xda-developers.com/pixel-xl/themes/how-to-enable-true-immersive-modes-t3554299
wilhexm said:
Sure!
for example, if u want to enable some apps
Code:
settings put global policy_control immersive.full=com.chrome.beta,com.google.android.apps.magazines,com.medium.reader
or if u want immersive full except some apps
Code:
settings put global policy_control immersive.full=apps,-com.google.android.apps.nexuslauncher,-com.twitter.android,-com.google.android.apps.photos,-com.google.android.GoogleCamera,-com.google.android.keep,-com.android.settings
The difference is the "-" before [app full name]
Click to expand...
Click to collapse
In this case you can add app names or 'apps,-*app name* to enable or set full immersive except some apps
Hi could you explain in more detail how one does this? Thank you. I have no knowledge of adb within Android.
Permission denied
Hi
I'm trying this directly from the phone but I got the message "setting permission denied"
I'm in debug and dev mode
Any idez please
fredrik0612 said:
Hi could you explain in more detail how one does this? Thank you. I have no knowledge of adb within Android.
Click to expand...
Click to collapse
Sorry, there are a lot of threads about Adb. If you are not familiar with rooting, flashing a rom. Then i suggest you don't do this. Please don't take offense but it's better to read on those topics before attempting this.
Cookiemonster51 said:
Hi
I'm trying this directly from the phone but I got the message "setting permission denied"
I'm in debug and dev mode
Any idez please
Click to expand...
Click to collapse
You need to be rooted to execute the command within the phone.
@ashad83
hello friend and thanks for you post.
Is possible desactivate(delete) navbar without immersive mode. For use pie etc.....my nexus 6p no root. thanks in advance.
I can´t use the code qemu.hw.mainkeys = 1....or is possible make with adb and how?
Thanks in advance....
$ su
put global policy_control immersive.status=* <
sush: adb: not found
127|angler:/data/data/com.termux/files/home # exit
$ adb shell settings put global policy_control immersive.status=*
No command 'adb' found, did you mean:
Command 'gdb' from package 'gdb'
$
This works perfect for my stock nonrooted Samsung Galaxy S8+.
Thank you
/CK
This command work on non-rooted devices?
[email protected]:/ # setprop qemu.hw.mainkeys 0 //to turn ON soft keys
[email protected]:/ # setprop qemu.hw.mainkeys 1 //to turn OFF soft keys
isaakmg said:
@ashad83
hello friend and thanks for you post.
Is possible desactivate(delete) navbar without immersive mode. For use pie etc.....my nexus 6p no root. thanks in advance.
I can´t use the code qemu.hw.mainkeys = 1....or is possible make with adb and how?
Thanks in advance....
Click to expand...
Click to collapse
Hi isaak, to remove the navigation bar without root you need to take the build.prop file from the System folder using adb commands "Pull" and "Push" (If you search online you will find alot of threads on how to use the command) edit the file by adding the code: " qemu.hw....." to it on your PC and then returning the file to it's place on the phone. I am sorry i can't give you a step by step on how to do this because i am travelling, if i have time i might right a tutorial on how to do this. Good Luck
DEVILOPS 007 said:
$ su
put global policy_control immersive.status=* <
sush: adb: not found
127|angler:/data/data/com.termux/files/home # exit
$ adb shell settings put global policy_control immersive.status=*
No command 'adb' found, did you mean:
Command 'gdb' from package 'gdb'
$
Click to expand...
Click to collapse
Hi, first you need to be rooted then in the terminal type this:
>Su
>settings put global .......... (Just type the command without "adb shell")
Café King said:
This works perfect for my stock nonrooted Samsung Galaxy S8+.
Thank you
/CK
Click to expand...
Click to collapse
Your welcome, thanks for the feedback i also wanted to know if this worked on Samsung S8+. I am thinking of getting the Note 8 when it comes out.
wixvdj said:
This command work on non-rooted devices?
[email protected]:/ # setprop qemu.hw.mainkeys 0 //to turn ON soft keys
[email protected]:/ # setprop qemu.hw.mainkeys 1 //to turn OFF soft keys
Click to expand...
Click to collapse
Not sure mate, you let us know if it does.
Rashad83 said:
Your welcome, thanks for the feedback i also wanted to know if this worked on Samsung S8+. I am thinking of getting the Note 8 when it comes out.
Click to expand...
Click to collapse
Thank you Works absolutely perfectly. I'm thinking about working on a project in the future if people are interested where I make a flashable zip for different roms that will add immersive mode as a feature.
What's the benefit of on nav bar? If no nav bar how do you guys navigate around the OS?
hinds90 said:
What's the benefit of on nav bar? If no nav bar how do you guys navigate around the OS?
Click to expand...
Click to collapse
Good question, we use apps like LMT launcher or GMD gesture control instead of the navigation bar which wastes a good portion of the screen. I used both and i love both of them but i think gesture navigation is the future. Now since Nougat update i stopped using both of these apps because it's a headache to simply root and change the build.prop to simply use both apps, instead i opted to hide the status and navigation bar. You should try both apps you will enjoy your phones' screen more. :good:

Starting adb on boot process? For debugging purposes...

Hi guys, i successfully build from scratch a device and vendor tree for my rom, and compile CM13 with no problems.
The roms boots but i get a bootloop when it come into "starting apps". My idea is get adb working on boot proccess.
I was googling but i couldn't get working....
This is my init.qcom.rc: https://drive.google.com/open?id=0ByjBTzGuQ9FIQldHTGxBWjdtczQ
And init.usb.rc generated by CM13: https://drive.google.com/open?id=0ByjBTzGuQ9FIc1ZVNnVpTVExOE0
Thanks
Well guy i was digging around and testing ALOT with no luck. Still can't enable adb at boot.
I try adding this properties on default.prop:
Code:
ro.adb.secure=0
ro.secure=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb
An this in build.prop:
Code:
ro.default_usb_mode=0
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
My device is a Forge TV, and it have a single usb port and no sdcard slot, so the only way to get a log is via usb...
In the stock rom, by default, starts in host mode (storage) and you have to go into config to change it into "device mode" to get usb adb working....
Probably i need to manage how the usb port starts at boot, i thought that "ro.default_usb_mode=0" was the solution...but no
Any help will be appreciated!
PS. lsusb doesn't recognize any device....only in fastboot mode
So i found out something interesting...in stock rom if i execute the command echo 0 > /proc/usb_device the device put itself in device mode and i can debug, putting that value to 1 reverts to storage.
I try to put that on init.d, or even on init.qcom.rc in the boot image with no luck....it's so frustating...
Ususally adbd should already be running this late during the boot.
Can you at least get an usb connection during boot? (check lsusb)
If you want to get at least a dmesg output during boot you could try the following:
set this in the build.prop
Code:
debug.sf.nobootanimation=1
set the following in your kernel defconfig
Code:
CONFIG_VGA_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
(not all of them are needed but I forgot which ones are and which ones are not)
add this to the kernel command line
Code:
console=tty1 loglevel=7
This should at least show some output on the phone screen itself.
To run something in the console, you could try to connect an usb keyboard or use something like a scriptable virtual keyboard.
You might need to set loglevel to 1 or 0 if you don't want it to spam your console while working on it.
ruleh said:
Ususally adbd should already be running this late during the boot.
Can you at least get an usb connection during boot? (check lsusb)
If you want to get at least a dmesg output during boot you could try the following:
set this in the build.prop
Code:
debug.sf.nobootanimation=1
set the following in your kernel defconfig
Code:
CONFIG_VGA_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
(not all of them are needed but I forgot which ones are and which ones are not)
add this to the kernel command line
Code:
console=tty1 loglevel=7
This should at least show some output on the phone screen itself.
To run something in the console, you could try to connect an usb keyboard or use something like a scriptable virtual keyboard.
You might need to set loglevel to 1 or 0 if you don't want it to spam your console while working on it.
Click to expand...
Click to collapse
Hi, thanks alot for your answer! My device is a Razer Forge TV wich is an Android TV device. It's equiped with a single full usb 3.0 port and no sdcard slot. The port works in 2 ways, by default in host mode and device mode (the mode i need to get some debug output). In the stock rom executing "echo 0 > /proc/usb_device" enable this mode and remains on reboot. But doesn't seems to work on CM (i put the command on an init.d script). lsusb reports nothing (equal in stock rom when the port is in host mode).
I test the soluton you provided, but instead of bootanimation i get a black screen then optimizing apps, starting apps and reboot (wich is my main problem)....there's no output on screen...i'm stuck on this like 10 days or more...is so annoying...thanks again
achaw said:
Hi, thanks alot for your answer! My device is a Razer Forge TV wich is an Android TV device. It's equiped with a single full usb 3.0 port and no sdcard slot. The port works in 2 ways, by default in host mode and device mode (the mode i need to get some debug output). In the stock rom executing "echo 0 > /proc/usb_device" enable this mode and remains on reboot. But doesn't seems to work on CM (i put the command on an init.d script). lsusb reports nothing (equal in stock rom when the port is in host mode).
I test the soluton you provided, but instead of bootanimation i get a black screen then optimizing apps, starting apps and reboot (wich is my main problem)....there's no output on screen...i'm stuck on this like 10 days or more...is so annoying...thanks again
Click to expand...
Click to collapse
You could try to insert a usb stick, mount it, and then write dmesg and/or adb output to it using init.rc.
Alternatively you could try to enable adb over tcp and connect that way to it.
Alos try to chose a different tty in the kernel command line.
(btw are the following three lines present in your kernel defconfig?)
Code:
CONFIG_VT_CONSOLE=y
CONFIG_TTY=y
CONFIG_VT=y
ruleh said:
You could try to insert a usb stick, mount it, and then write dmesg and/or adb output to it using init.rc.
Alternatively you could try to enable adb over tcp and connect that way to it.
Alos try to chose a different tty in the kernel command line.
(btw are the following three lines present in your kernel defconfig?)
Code:
CONFIG_VT_CONSOLE=y
CONFIG_TTY=y
CONFIG_VT=y
Click to expand...
Click to collapse
I can't mount usb or enable adb over tcp becasuse the system reboot itself at starting apps...
Right now i'm testing with your new config, switching ttys because i'm still getting black screen instead some output...
Well after some days i remember that the Forge iss equipped with a ethernet port...i feel so stupid lol...
So i was able to debug via adb over tcp.... @ruleh thanks alot for your time!
I think "starting apps" happens when zygote is started.
If it is really the case then it should be possible to mount an usb stick and write the logs to it before everything reboots.
According to the init files I have, init.${ro.hardware}.rc would be the place to do the mount+write.
Ideally /system is mounted and /system/bin is in the path to access tools like logcat and dmesg.
Otherwise you could include them in /sbin which is (in most cases) part of the ramdisk.
It would probably be something like this:
Code:
on early-boot
#mkdir /mnt/usb
mount /dev/(usb_stick) /mnt/usb
exec /system/bin/dmesg > /mnt/usb/dmesg.log
exec /system/bin/logcat > /mnt/usb/logcat.log
(I have never used the init.rc files directly so I am not too sure.)
Also did you try "write /proc/usb_device 0" instead of "echo 0 > /proc/usb_device" in the init.rc files? (preferably before zygote starts...maybe init.usb.rc?)
Or you could try to remove the lines referencing zygote from the init.rc files and see if adbd starts then or not.
---------- Post added at 20:17 ---------- Previous post was at 20:16 ----------
achaw said:
Well after some days i remember that the Forge iss equipped with a ethernet port...i feel so stupid lol...
So i was able to debug via adb over tcp.... @ruleh thanks alot for your time!
Click to expand...
Click to collapse
I wish I read this a bit earlier...... oh well

[THEME][NO ROOT][ANDROID 10] Enable Pixel themes and more with adb

Hi folks,
I've just received my brand new Xperia 1 II and I don't want to unlock the bootloader and root it.
So, I've figured out that Sony haven't removed the Pixel themes overlays from the system.
IT WORKS WITH ALL XPERIA using android 10
Here's how to activate Filled, Rounded and Circular themes.
Code:
adb shell cmd overlay enable com.android.theme.icon_pack.filled.android
adb shell cmd overlay enable com.android.theme.icon_pack.filled.systemui
adb shell cmd overlay enable com.android.theme.icon_pack.filled.settings
Code:
adb shell cmd overlay enable com.android.theme.icon_pack.rounded.android
adb shell cmd overlay enablecom.android.theme.icon_pack.rounded.systemui
adb shell cmd overlay enable com.android.theme.icon_pack.rounded.settings
Code:
adb shell cmd overlay enable com.android.theme.icon_pack.circular.android
adb shell cmd overlay enable com.android.theme.icon_pack.circular.systemui
adb shell cmd overlay enable com.android.theme.icon_pack.circular.settings
If you want to apply a new theme or come back to default theme, you have to disable previously enabled one with:
Code:
adb shell cmd overlay disable com.android.theme.icon_pack.circular.android
adb shell cmd overlay disable com.android.theme.icon_pack.circular.systemui
adb shell cmd overlay disable com.android.theme.icon_pack.circular.settings
Reboot is needed to apply the theme on lockscreen.
You can also change the color accent with this:
Code:
adb shell cmd overlay enable com.android.theme.color.purple
and disable it with
Code:
adb shell cmd overlay disable com.android.theme.color.purple
Replace "purple" with black, cinnamon, green, ocean, orchid or space for other colors
If you want to change icon shape, use this:
Code:
adb shell cmd overlay enable com.android.theme.icon.roundedrect
and disable it with:
Code:
adb shell cmd overlay disable com.android.theme.icon.roundedrect
Replace "roundedrect" with squircle or teardrop for other shapes.
If like me you don't like headsup notifications, you can turn them off with:
Code:
adb shell settings put global heads_up_notifications_enabled 0
Replace "0" by 1 to enable them back
Epic bro ??
wow! that's pretty cool, thank you for this
niaboc79 said:
Hi folks,
I've just received my brand new Xperia 1 II and I don't want to unlock the bootloader and root it.
So, I've figured out that Sony haven't removed the Pixel themes overlays from the system.
IT WORKS WITH ALL XPERIA using android 10
Here's how to activate Filled, Rounded and Circular themes.
Code:
adb shell cmd overlay enable com.android.theme.icon_pack.filled.android
adb shell cmd overlay enable com.android.theme.icon_pack.filled.systemui
adb shell cmd overlay enable com.android.theme.icon_pack.filled.settings
Code:
adb shell cmd overlay enable com.android.theme.icon_pack.rounded.android
adb shell cmd overlay enablecom.android.theme.icon_pack.rounded.systemui
adb shell cmd overlay enable com.android.theme.icon_pack.rounded.settings
Code:
adb shell cmd overlay enable com.android.theme.icon_pack.circular.android
adb shell cmd overlay enable com.android.theme.icon_pack.circular.systemui
adb shell cmd overlay enable com.android.theme.icon_pack.circular.settings
If you want to apply a new theme or come back to default theme, you have to disable previously enabled one with:
Code:
adb shell cmd overlay disable com.android.theme.icon_pack.circular.android
adb shell cmd overlay disable com.android.theme.icon_pack.circular.systemui
adb shell cmd overlay disable com.android.theme.icon_pack.circular.settings
Reboot is needed to apply the theme on lockscreen.
Click to expand...
Click to collapse
that´s briliant work, thans a lot!!!
the phone doesn´t come a trully and extended dark mode
is more grey than black in the settings menu
can you change that with ADB commands?
Again, congratulations, and thanks a lot
Guys how and where do I type these codes?
Do I need to unlock my phone or can I just do it using and ADB app?
And do you know how to get rid and/or edit the text on the apps? I could do all this easily on my OnePlus but it's nowhere to be seen in the 1ii
Ricardo_G said:
that´s briliant work, thans a lot!!!
the phone doesn´t come a trully and extended dark mode
is more grey than black in the settings menu
can you change that with ADB commands?
Again, congratulations, and thanks a lot
Click to expand...
Click to collapse
With root you can change everything, when I'll do my rom you'll get 8 various background colors.
eskimosound said:
Guys how and where do I type these codes?
Do I need to unlock my phone or can I just do it using and ADB app?
And do you know how to get rid and/or edit the text on the apps? I could do all this easily on my OnePlus but it's nowhere to be seen in the 1ii
Click to expand...
Click to collapse
Enable usb debugging, use minimal adb (Google)
You can't removed application name. Use an other launcher.
niaboc79 said:
Enable usb debugging, use minimal adb (Google)
You can't removed application name. Use an other launcher.
Click to expand...
Click to collapse
Thanks will have a go..
niaboc79 said:
If like me you don't like headsup notifications, you can turn them off with:
Code:
adb shell settings put global heads_up_notifications_enabled 0
Replace "0" by 1 to enable them back
Click to expand...
Click to collapse
Just came for curiosity and found and amazing command
Applied to my Xperia 10 II.
Thanks @niaboc79!!!!
Just curiosity, if I reboot my phone heads up notification will be enable = 1 or will keep 0?
Meloferz said:
If like me you don't like headsup notifications, you can turn them off with:
Just came for curiosity and found and amazing command
Applied to my Xperia 10 II.
Thanks @niaboc79!!!!
Just curiosity, if I reboot my phone heads up notification will be enable = 1 or will keep 0?
Click to expand...
Click to collapse
It will keep 0 mate
niaboc79 said:
Hi folks,
I've just received my brand new Xperia 1 II and I don't want to unlock the bootloader and root it.
Click to expand...
Click to collapse
Hello. Sorry if unrelated, but have you thought about porting gcam to Xperia 1 II, since there's only very few people on XDA having access to this phone.
The Xperia 1 II camera hardware and the photopro manual camera is excellent. But the stock camera app is very lacklustre. Seeing that this phone is S865 with sensor similar to S20 Plus, it should theoretically doable. Most people just want to point and shoot and get images with great dynamic range.
Hi @niaboc79, reeeeaaaaaally good work. Thanks alot for that.
What commands do I have to type in to get a full stock Pixel experience?
And is there a way to activate an overlay that gives me an OLED black settings panel?
Onepunchbro said:
Hello. Sorry if unrelated, but have you thought about porting gcam to Xperia 1 II, since there's only very few people on XDA having access to this phone.
The Xperia 1 II camera hardware and the photopro manual camera is excellent. But the stock camera app is very lacklustre. Seeing that this phone is S865 with sensor similar to S20 Plus, it should theoretically doable. Most people just want to point and shoot and get images with great dynamic range.
Click to expand...
Click to collapse
No since stock or photo pro auto mode works perfectly, I haven't missed one picture since day one.
churchner420 said:
Hi @niaboc79, reeeeaaaaaally good work. Thanks alot for that.
What commands do I have to type in to get a full stock Pixel experience?
And is there a way to activate an overlay that gives me an OLED black settings panel?
Click to expand...
Click to collapse
You'll get everything with my rom later.
But to let you know, you can't install an overlay without original signature key.
niaboc79 said:
You'll get everything with my rom later.
But to let you know, you can't install an overlay without original signature key.
Click to expand...
Click to collapse
That's nice but I won't unlock my Xperia 1 II. Thanks anyway
Can I use adb to get 2 button navbar like android9?
bkk99213 said:
Can I use adb to get 2 button navbar like android9?
Click to expand...
Click to collapse
No the needed overlay isn't there.
@niaboc79 Just got my Xperia 1 II. There is one thing that really sets me up... When I connect my phone to my Wifi 6 mobile hotspot from my computer which I use most of the time the phone connected but no internet access. Any other Wifi netfork is absolutely fine. Any ideas? I am on the latest Sony firmware flashed with newflasher v20 and then with performed a software repair with Xperia Companion. Any ideas what the problem could be?

Question Managing battery charge

Hello!
My Nord 2 will be plugged in 24/7 because I use it for E2E testing. I need to optimize battery so it wont swell up.
Is there any working solutions for doing it? Or is there a way to put battery charging to idle so main power will be drawn from usb.
I tried Magisk ACC plugin, but it seems it is not running. Shell has supperuser power on magisk
ADB shell:
"acc
/system/bin/sh: <stdin>[2]: acc: inaccessible or not found
accd,
/system/bin/sh: <stdin>[3]: accd,: inaccessible or not found"
Also same error in ACC app, magisk have given supperuser access for that app:
"/system/bin/sh: <stdin>[3544]: acc: inaccessible or not found"
when i execut acc.sh in /data/adb/vr25/acc/ folder then i cant get ACCD running there. Well it runs for a minut then turns off
"
Advanced Charging Controller v2021.8.31 (202108310)
Copyright 2017-2021, VR25
GPLv3+
(i) accd is not running
1) Language
2) All commands
3) Documentation
4) Start/restart daemon
5) Stop daemon
6) Export logs
7) Charge once to #%
8) Uninstall
9) Edit config.txt
a) Reset battery stats
b) Test charging switches
c) Check for update
d) Flash zips
e) Battery info
f) Exit
#? b
(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...
(!) [/proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0] won't work
(i) Press any key to continue..."
Hi, I'm the developer of acc.
Have you tried a slow charger or USB charging?
Refer to README > Troubleshooting.
This is a kernel/adapter issue.
Edit
Just noticed that you're not using the latest acc release.
Since you're facing issues, upgrading is a must.
Regardless, don't skip the documentation.
I am using PC USB connection for charging. Should ACC daemon allways run? It works for a minute and then stop. Do you mean oneplus nord 2 battery charging management have same kernel issue as you mentioned in ACC thread?
I have tested different versions to be sure. v2021.8.31 came from Magisk for first.
AccA is latest 1.0.35 Daemon/API 202109200
New ver.:
Advanced Charging Controller v2021.9.20 (202109200)
Copyright 2017-2021, VR25
GPLv3+
(i) accd is not running (PID 12046)
1) Language
2) All commands
3) Documentation
4) Start/restart daemon
5) Stop daemon
6) Export logs
7) Charge once to #%
8) Uninstall
9) Edit config.txt
a) Reset battery stats
b) Test charging switches
c) Check for update
d) Flash zips
e) Battery info
f) Undo upgrade
g) Exit
#? b
(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...
(!) [/proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0] won't work
This is usually a kernel and/or power adapter issue.
The daemon should be running to control charging.
The #1 reason for it to stop is total charging switch failure.
That is, all charging switches fail to respond.
In that case, it finds no reason to keep running.
Share a log archive (acc -le) and the output of acc -p.
Where can i get those logs? From /data/adb/vr25/acc-data/logs/ ? Might it be acc-logs-OP515BL1.tar.gz file?
Somehow "pull" and "cp" are not working on me with adb shell. Is there any better tools for pulling files and logs? There is many tools witch are not working with my phones and cant find root folders, google is to big.
@VR25 Hi! I attached all logs from ACC-data logs folder. Will it help?
CapnRene said:
@VR25 Hi! I attached all logs from ACC-data logs folder. Will it help?
Click to expand...
Click to collapse
Perfect!
I found potential charging switches.
Test the following commands one by one and report the ones that work:
su -c acc -t /sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0
su -c acc -t /sys/devices/platform/charger/enable_sc 0 1
su -c acc -t /sys/devices/platform/charger/enable_sc 1 0
su -c acc -t /sys/devices/virtual/oplus_chg/battery/stop_charging_enable 0 1
su -c acc -t /sys/firmware/devicetree/base/charger/usb_charger_current_suspend 0 1
Note
One/some of the commands may trigger a reboot.
That's not a big deal. Just move to the next on the list.
First line got response:
OP515BL1:/ # su -c acc -t /sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0
(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...
(i) [/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0] works
- battIdleMode=true
As i understand i need to change switch now to get it working?
su -c acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
You should be all set after running that.
The next release will include the new switch.
Edit
Since the device will be plugged in 24/7, you may want to run `acc 3920` to set it up.
Essentially, this will keep the battery voltage between 3870-3920 millivolts.
3920 is said to be the sweet spot for longevity.
Not 100% sure did it work, need to test it a litte to be sure. It seems it updated log
OP515BL1:/ # su -c acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
/system/bin/acc[580]: export: 1: is not an identifier
(i) Alright, this may take a minute or so...
(i) /data/adb/vr25/acc-data/logs/acc-logs-OP515BL1.tar.gz
My bad
It should have been
su
acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
VR25 said:
My bad
It should have been
su
acc -s s="/sys/devices/virtual/oplus_chg/battery/mmi_charging_enable 1 0"
Click to expand...
Click to collapse
It worked! Ty! I set my swich to turn on 59% and off 60% for optimal ressult.
It seems that those are not working or maybe i have made some mistake somewhere:
shutdown capacity
charge current
charge voltage
CapnRene said:
It worked! Ty! I set my swich to turn on 59% and off 60% for optimal ressult.
It seems that those are not working or maybe i have made some mistake somewhere:
shutdown capacity
charge current
charge voltage
Click to expand...
Click to collapse
From the documentation:
# shutdown_capacity (sc) #
# When the battery is discharging and its capacity/voltage_now_millivolts <= sc and phone has been running for 15 minutes or more, acc daemon turns the phone off to reduce the discharge rate and protect the battery from potential damage induced by voltage below the operating range.
# sc=-1 disables it.
# [Beta] if the file /data/adb/vr25/acc-data/warn exists, accd posts Android shutdown warning notifications at sc + 5% or sc + 200 mV.
The last two features are not supported by all devices.
I'm yet to see a MediaTek device that supports at least one of the those.
Please ask further questions in the actual forum, so that other users can help you whenever I'm unavailable.

Categories

Resources