Need help to write a script which writes /change a value in /sys/ on startup - Magisk

Hi,
i'm not an android developer so i need a little help to make a module which writes in "/sys/class/dual_role_usb/otg_default/power/wakeup" and change the value there from "enabled" to "disabled".
i already tried it myself but got it not working. i attached the current state of my work.
i hope someone can help me to got it working
and sorry for the bad english. its not my native language.
//Edit: With https://forum.xda-developers.com/apps/magisk/magisk-sweep2sleep-disabler-t3681631 as Template i finally got it working. Will attach it tomorrow in case someone else need this.

Related

Challenge for the xda-gurus-Solution for Intern.SmartDialing

I have uploaded a greek rom file for the htc wizard.
This ROM has a second level of protection that can not be bypassed only by CIDunlocking a phone.
After installing the ROM, uppon second boot (first boot installs ext rom then restarts) it displays a message
"This rom is intended only for devices sold by ace hellas" and freezes.
I think it searches for a valid IMEI range but I am not sure.
I am trying to find the exe file responsible for locking up the phone (using WM5 editing tools my maimach) but I have no luck yet. If someone could lend a hand I would be gratefull. Even giving me a hint (like how to edit the registry from a dumped ROM etc.)
Anyway, the file is located here.
http://dcom.teipir.gr/RUU_Prodigy_10107105_Qtek_WWE_ship_GR1.04.exe
Thanks in advance
Below, you can find instructions to customize smartdialing for recognizing characters for any language
My best man has the EXACT same problem with his Universal.
We haven't uploaded the firmware yet but can easily be downloaded through qtek.gr.
Can someone help?
It's a pitty not to be able to use the device just because he bought it outside Greece.
It's an interesting challenge after all.
Andrew, maybe you can send me a PM with what you have tried yet.
Re: I have a challenge for the xda-gurus
andrew_sh said:
After installing the ROM, uppon second boot (first boot installs ext rom then restarts) it displays a message
"This rom is intended only for devices sold by ace hellas" and freezes.
Click to expand...
Click to collapse
Check your Extended_ROM files. They might be what you are looking for. Probable workaround might be soft-resetting your device before extended_rom files are being installed, i.e. hard-reset your device now and immediately soft-reset it when you will see message "Customizing will start in 3 sec..." or something like that...
I think it searches for a valid IMEI range but I am not sure.
Click to expand...
Click to collapse
The IMEI is stored in registry within "RIL" branch, but your IMEI is not touched within traditional flashing/reflashing
A Russian fellow had done this job last year, for the S100 Greek Rom (Anansky i think was his name). The lock is not on the extended rom, but on the main OS. And if i remember well, it has an IMEI checking ytility, and another one which checks Language settings for the Language selection utility to work, but this can be changed with registry hack. Well, we are all waiting...
Re: I have a challenge for the xda-gurus
IMate->WM2k5 said:
andrew_sh said:
After installing the ROM, uppon second boot (first boot installs ext rom then restarts) it displays a message
"This rom is intended only for devices sold by ace hellas" and freezes.
Click to expand...
Click to collapse
Check your Extended_ROM files. They might be what you are looking for. Probable workaround might be soft-resetting your device before extended_rom files are being installed, i.e. hard-reset your device now and immediately soft-reset it when you will see message "Customizing will start in 3 sec..." or something like that...
I think it searches for a valid IMEI range but I am not sure.
Click to expand...
Click to collapse
The IMEI is stored in registry within "RIL" branch, but your IMEI is not touched within traditional flashing/reflashing
Click to expand...
Click to collapse
no it's not in extended ROM at least for the Universal (and sorry for posting in Wizard forum) - we tried your method from the first moment
1. No, extended rom has nothing to do with it , for sure.
2. Yes, anansky has done it before for the htc magician (my previous phone) but never revealed a howto.
@NLS
I have found a suspicious file called langbootcheck.exe which I tried deleting (with WM5 edit tools) prior to flashing my device. But then the device won't boot at all. Maybe this file is needed, or maybe I did something wrong?
If someone could at least tell me, how to edit the registry hives with the wm5 editing tools. This way I could see wich applications are executed on startup.
Re: I have a challenge for the xda-gurus
NLS said:
no it's not in extended ROM at least for the Universal (and sorry for posting in Wizard forum) - we tried your method from the first moment
Click to expand...
Click to collapse
Did you try to play with HKLM\Comm\BootCount value? To put it as 0 so it is always thinking of a just hard-resetted device?
no I didn't try that, nor the device is mine (to try)
andrew try having a 0 byte file in place of the exe - maybe it needs the file to be there but nothing to happen when it is called
maybe Ace (since I am 99.5% sure that they read xda-developers), could give us a hint on why they have done this (when nobody else did on the whole planet)...
Re: I have a challenge for the xda-gurus
IMate->WM2k5 said:
Did you try to play with HKLM\Comm\BootCount value? To put it as 0 so it is always thinking of a just hard-resetted device?
Click to expand...
Click to collapse
No, but it sounds like a good idea. That would explain why it doesn't lock up during the first boot process. But then again there is no way to change it because the os automatically reboots itself. Unless it installs a cab file from ext rom that does the trick. Do you think this might work?
NLS said:
maybe Ace (since I am 99.5% sure that they read xda-developers), could give us a hint on why they have done this (when nobody else did on the whole planet)...
Click to expand...
Click to collapse
i realy doubt it! I mean giving us a hint
I will try to replace the file with a zero-sized one. But then again I'm not even sure if it is the file responsible. I mean, that I just guessed (because the name sounded suspicious). It could be any other file. The file name could be desguized. Thats why I need to know 2 things:
1) How to edit the registry with maimach's WM5 editing tools.
2) Where is the startup configuration located i the registry
I didn't say tell us "how", I said for the to tell us "why"...
anyway...
Yeah ACE sux, well it's been really disgusting to lock the roms so we anyone who want Greek language to buy only from em. ACE think theirselves smart enough and all the other like Russian, italian, norwegian, dutch and many more who have their Qtek rom unlocked are the "stupid"...
Anyway this is a different story..
I am available to help in any way but i'm not such an expert user as you to play with the editing tools.
P.S:I see the rom is uploaded on a TEI of Piraieus server, you have any connection with teipir? I'm in the Automation.
bill_viper said:
P.S:I see the rom is uploaded on a TEI of Piraieus server, you have any connection with teipir? I'm in the Automation.
Click to expand...
Click to collapse
I'm in automation dept too! PM me!
NOone? :!: Buzz? Come on, you will make many people happy!!!!
I don't want to sound nagging but it must be very easy for you!!
I found another approach to our problem.
Instead of trying to hack the rom, I extracted some dll files needed for the greek smartdialing.
I dumped the Greek rom and followed the instructions here.
http://www.buzzdev.net/index.php?option=com_simpleboard&Itemid=59&func=view&id=10204&catid=45
but used the Greek smartdialing.dll instead of the one posted above.
It worked very well. I even edited the smartdialing cab found on the ext rom and included the dll. So each time I hard reset the device, the smartdialing feature works for greek characters. I think the smartdialing can be customized just as easily for any other language, just as long as you find the .dll in your language. (For this, download a rom containing the language, and user WM5 editing tools found on xda-devs).
If someone needs it, I can upload the greek smartdialing cab to overwrite the one in your ext rom (for wizard only).
I also use AEKMAP for the internal qwerty and I find it very stable, simple and small.
So I guess there is no much point in hacking the greek rom (unless someone wants the menus customized - I don't).
how did you dumped the greek rom ?
andrew_sh said:
I found another approach to our problem.
Instead of trying to hack the rom, I extracted some dll files needed for the greek smartdialing.
I dumped the Greek rom and followed the instructions here.
http://www.buzzdev.net/index.php?option=com_simpleboard&Itemid=59&func=view&id=10204&catid=45
but used the Greek smartdialing.dll instead of the one posted above.
I also use AEKMAP for the internal qwerty and I find it very stable, simple and small.
So I guess there is no much point in hacking the greek rom (unless someone wants the menus customized - I don't).
Click to expand...
Click to collapse
Awesome idea.... is there any way i can get my hands on that .cab file? And maybe on your .aek greek layout? because mine kinda sucks
Anywho, i see we are off to a good start here fellas, don't worry answers will come soon enough.

[NEED HELP]Patch of sending SMS in unicode, solution found, compile and patch fail.

I cann't recall since which build that I can not send SMS by Android correctly, which will display in strange codes. So far, Chinese, Japanese, Arabic have been tested and non of one seems to be normal. But it was working perfectly in era of kernel builds that doesn't enable speakers.
In days of searching, I found solutions on a Chinese forum discusing Android customize on Raphel. One of the guys released a modified version based on the builds orignaled here:
http://forum.xda-developers.com/showthread.php?t=601751
With a single rootfs.img replacement that the SMS problem solved, and SMS can be sent correctly and recieving correctly.
The modified rootfs.img file can be downloaded by this link:
http://www.multiupload.com/NEVY10ZCW5
The guy also released his source code at:
http://www.panshisoft.cn/bbs/viewFile.asp?BoardID=3&ID=19
and the compiled file "libhtcgeneric-ril.so":
http://www.panshisoft.cn/bbs/viewFile.asp?BoardID=3&ID=35
BUT, since this rootfs.img is dedicated to Raphel not Kovsky, while testing, I found it slow, not really stable and not enabled swapfile. And for the latest Kovsky, we can use out hardware keyboard.
I tried to port the libhtcgeneric-ril.so to rootfs.img of Kovsky owned, which comes from fatsal and the build of 20100221. But I failed.
So, please, can any one help me or giving me some tips of how to apply this patch on kovsky build correctly? There was a large amount of users with eastern character usage, and I think all of those will show their sincerely thankful like me to those who would wanna help.
Thx, B.rgds.
neock said:
it was possible to send sms through out system's built-in sms program in unicode, but some how i don't know why it couldn't now. some time ago i sent sms in chinese and it was ok, but now only strange characters, symbols instead.
i tried wiping out data.img swapfile, deleting cache folder, but no hope. and i turned to search for options or settings relate to sms characters or coding, and found nothing. i also tried third party sms program and still no luck. and google returns no useful infomations about "unicode sms", "character sms" and "android 短信 乱码".
any tips or solutions?
PS: using the latest zimage that enable speaker, not the one in topic of HERO build.
Click to expand...
Click to collapse
I can't surf the internet now………………
neock said:
it was possible to send sms through out system's built-in sms program in unicode, but some how i don't know why it couldn't now. some time ago i sent sms in chinese and it was ok, but now only strange characters, symbols instead.
i tried wiping out data.img swapfile, deleting cache folder, but no hope. and i turned to search for options or settings relate to sms characters or coding, and found nothing. i also tried third party sms program and still no luck. and google returns no useful infomations about "unicode sms", "character sms" and "android 短信 乱码".
any tips or solutions?
PS: using the latest zimage that enable speaker, not the one in topic of HERO build.
Click to expand...
Click to collapse
are you chinese?
no one knows how? or no one using non-english characters encounters problem but me?
@likuncheng1987
yes
NO IDEA!! aLTHOUGH I MYSELF WOULD LIKE URDU OR ARABIC KEYBOARD
哥们你不错了~~我根本就发不了短信`.....
每次都是发送失败
a little break through, but still not appliable. i faild my modding, and may need some help/
neock said:
...
I tried to port the libhtcgeneric-ril.so to rootfs.img of Kovsky owned, which comes from fatsal and the build of 20100221. But I failed.
So, please, can any one help me or giving me some tips of how to apply this patch on kovsky build correctly? There was a large amount of users with eastern character usage, and I think all of those will show their sincerely thankful like me to those who would wanna help.
Thx, B.rgds.
Click to expand...
Click to collapse
I'm not linux user but hope this could help How to make my own rootfs.img, some hints on post2
The libhtcgeneric-ril.so is a android library, so the direct way would be to put it into the system.sqsh (unsquash, copy to /lib, then squash it).
I took a quick look into the rootfs.img you mentioned. The init script does use the mount --bind command to "link over" existing files/dirs in the mounted system.sqsh, effectivly replacing them during boot with files from the rootfs.img. Quite clever. I did not find the part where your libhtcgeneric-ril.so is linked or copied, but i assume, that it is done.
So another way can be putting the libhtcgeneric-ril.so in the fatsal-rootfs.img and modifying the init script adding something like mount --bind /path/to/libhtcgeneric-ril.so /lib/libhtcgeneric-ril.so. Not sure about the command, i never tried that
Hope this helps.
good 支持你、、、

[DEV] Edited build.prop crashes network connection

Hello Guys,
I want to edit the ro.romname Part in the buil.prop file.
When I pull the File via adb to the computer and edit the Romname to what I want and save it and push it back to the Phone it has no network connection after reboot. And there are some other issues too.
I tried it with RootExplorer too, but the same problems.
What is my problem or what I´am doing wrong?
Has anyone sucsessfully edited the build.prop ?
Please help me!
Thanks
Can nobody help me ?
I've had the same problem as well, I think there's some code that checks the build name and then disables the radio if it has been changed.
Imperticus said:
I've had the same problem as well, I think there's some code that checks the build name and then disables the radio if it has been changed.
Click to expand...
Click to collapse
Yes I think so, but I couldn´t find something that checks the name. I hope someone can help us.
It´s good to hear that I´am not the only one who has this broblem
I tested what else happens when I change this code:
- Android Market is deleted
- All apps which need a internet connection crash at start
- google accounts are deleted from phone
- network connection is disabled
But my quiestion is now whick .apk or File could cause this problems ?
can someone upload the build.prop for me? would like one from android 2.3.4 thanks
the permissions has to be set!
only change name of rom. "ro.modversion="
is your ROM CM7 based? If so, as already mentioned, there is functionality that shuts off the radio once the ROM Version was changed to prevent KANGing the releases without crediting them

[Q] supersu no prompt(Attach recoverylog.txt and sulog.txt)

hi ,My English is poor, please forgive me.
I flash the UPDATE-SuperSU-v2.37.zip on my device hwawei chei-cl10(rongyao 4x),and it is android4.4.4.
i can enable and disable superuser.if i set default access :grant. ican get su,and delete some file in /system/app.if i set default access:deny, i can't get su.
Unfortunately,if i set default accessrompt, i can't get any prompt and i can't get su
I do not know I have not expressed clearly?Know what I mean?
please help me. thank you.
then,i Attach recoverylog.txt and sulog.txt,please help me ,thanks.
ncywind said:
hi ,My English is poor, please forgive me.
I flash the UPDATE-SuperSU-v2.37.zip on my device hwawei chei-cl10(rongyao 4x),and it is android4.4.4.
i can enable and disable superuser.if i set default access :grant. ican get su,and delete some file in /system/app.if i set default access:deny, i can't get su.
Unfortunately,if i set default accessrompt, i can't get any prompt and i can't get su
I do not know I have not expressed clearly?Know what I mean?
please help me. thank you.
then,i Attach recoverylog.txt and sulog.txt,please help me ,thanks.
Click to expand...
Click to collapse
Hi,
I have exactly the same problem with a Huawei Y550 stock ROM (Android 4.4.4, EMUI 2.3). I tested SuperSU 2.79 and 2.46. Did you find a solution to this problem ?

Network speed display EMU 3.1

Hello!
I want to switch on the network connectivity speed display. It was in the settings panel earlier, but now it disappeared.
Or maybe not completely. If I search in the settings I can see that the option exists, but when I click on it, it's hidden... (See the PIC attached)
I'm guessing there is a option in a deeper level where I can set it.
Does anyone know a solution? My phone is rooted, so if it requires editing some config files, I'm all for it.
Thanks.
Mines the same except I got no root.. how did you do yours?
I managed to root with the recovery version.
More details here: http://forum.xda-developers.com/ascend-p7/general/guide-root-b803-recovery-version-t3157477
Thanks for the reply ... I will downgrade mine to 2.3 and root it and then upgrade again if that setting becomes available again ill let you know
So i have rooted my device via your method and after reinstalling lolipop i found that the setting was stil missing. I however noticed that if you installed the lolipop update from the vodacom version posted here (http://forum.xda-developers.com/ascend-p7/general/huawei-p7-l10c02b817-android-5emui3-1-t3207363) it was there again. Unfortunatly for me there is some bugs in that update, there is no keybord app. I then started searching for a way to edit the system wide prefrence database file, where i also found the entry located inside the settings.db file , but it is not possible to edit it without corrupting the data for further use by the phone.
here are some screenshots from my findings
https://mega.nz/#!v9VjASBY!qRxEwBDQN59_fK-WRNHIfq6hJO8rKUY8rYYfpTZoCo0
https://mega.nz/#!GhtGzArS!RGP947yCgch1Ema6-g72o3lz5nrXlcth1OEhYbjRmDM
https://mega.nz/#!as921b6A!3QOG-xgwXZrADFQEHqKm7_bQSDNg-R4o-8cNW7svCkE
https://mega.nz/#!S09VFDoa!R7ccks6CnqlLgD5QyuQDMaNuDc7GHr-UOLipc6P33-k
@Unified21 @DomeNet
with root edit data/cust/prop/local.prop
find this line:
ro.config.hw_hideNetworkSpeed=true
and change it to
ro.config.hw_hideNetworkSpeed=false
reboot
Now there is a new setting entry in display section
Great it works!
Thank you!

Categories

Resources