[Overlay] Dil3mm4's Overlays for Huawei Prague Series devices (all variants) - Treble-Enabled Device Development A/AB ROMS

This overlay APK it's "born" because of the necessity to overcome missing overlays (thanks Huawei, love ya xoxo) under /vendor/overlay .
What it does exactly?
Nothing more than adding AOSP overlay matching our device capabilities and also, inherits Prague power profile.
Do I need it?
Well, better having than don't.
This will conisderably enhance your experience on every GSI ROM giving better functionality overall.
Why you did that?
Because I'm sick of inheriting stuff that belongs to /vendor, in system.
Project Treble it's all about separating vendor implementation from system.
So why we should keep adding OEM stuff in that doesn't belong no more in /system
I have XYZ device with ZYX firmware can I use it?
As long as you're on a PRA-*** device (with a non-EMUI firmware), you're good to go.
Otherwise DO NOT USE IT FOR THE LOVE OF MANKIND.
I don't have PRA, but I want it on my Huawei device !
Well, that's fine, join the Telegram group @GSI_HI6250, so that you could help me with stock files grabbing to make an overlay for your device.
Overlay configs (aka "what does dis do, ser tell pl0x"):
Allows all rotations;
Configs autobrightness levels;
Configs autobrightness Lcd values;
Configs BLE;
Sets Doze Component;
Sets Doze After screen off;
Configs autopowermodes (doze related);
Configs power management on:
screen off due to proximity sensor interaction;
decouple on suspend state;​
Configs brightness doze value;
Configs Intrusive led;
Configs dual band wifi support (where available);
Configs hotswap (where available);
Configs Color Transform on HWC;
Configs VoLTE available (even tho it needs support on GSI side);
Configs WFC over IMS;
Configs wifi background scanning support.
Installation Instructions
Download the attached overlay
With root, push the overlay to /vendor/overlay. Create the folder if it doesn't exist.
Run the following command in a rooted terminal or ADB shell:
Code:
chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/dil3mm4_overlay_PRA.apk

Does it has something related to the other thread?-Enable Night Light, Auto-Brightness-​
I just ran the following command, it seems to be installed properly.
for what exactly is this overlay?
Thank you!

osk4rin said:
Does it has something related to the other thread?-Enable Night Light, Auto-Brightness-​
I just ran the following command, it seems to be installed properly.
for what exactly is this overlay?
Thank you!
Click to expand...
Click to collapse
I have XYZ device with ZYX firmware can I use it?
As long as you're on a PRA-*** device (with a non-EMUI firmware), you're good to go.
Otherwise DO NOT USE IT FOR THE LOVE OF MANKIND.
Click to expand...
Click to collapse
You seem to use a Mate 9 according to your signature.
So please, do not use it.
Also, it enables what it's "supposed" to be enabled on stock EMUI, including auto-brightness, night-light, ambient display and other features that PRA is capable of.
Read again the whole thread, thanks.

dil3mm4.dev said:
You seem to use a Mate 9 according to your signature.
So please, do not use it.
Also, it enables what it's "supposed" to be enabled on stock EMUI, including auto-brightness, night-light, ambient display and other features that PRA is capable of.
Read again the whole thread, thanks.
Click to expand...
Click to collapse
Thanks!

please help
adb shell su
chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay;chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay/dil3mm4_overlay_PRA.apk
chcon: '/vendor/overlay' to ubject_r:vendor_overlay_file:s0: Read-only file system
chcon: '/vendor/overlay/dil3mm4_overlay_PRA.apk' to ubject_r:vendor_overlay_file:s0: Read-only file system

jeuxtype said:
please help
adb shell su
chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay;chcon ubject_r:vendor_overlay_file:s0 /vendor/overlay/dil3mm4_overlay_PRA.apk
chcon: '/vendor/overlay' to ubject_r:vendor_overlay_file:s0: Read-only file system
chcon: '/vendor/overlay/dil3mm4_overlay_PRA.apk' to ubject_r:vendor_overlay_file:s0: Read-only file system
Click to expand...
Click to collapse
write
Code:
mount -o remount,rw /vendor
after this write needed command

UPDATE
-P compatibility
-Improved brightness levels
DOWNLOAD

When this overlay is used, the phone doesn't detect headphone plug correctly, therefore sound doesn't come out of the speakers sometimes, phone thinks it still has a headphone jack plugged in.

Related

[MOD] Change WiFi hostname - for custom ROMs (Sept 23)

This is useful for identifying phones on the local networks by looking at DHCP lease tables in the routers. It doesn't make your phone appear on Windows networks, since the phone needs to broadcast NetBIOS name for that. If you want your phone to show up on Windows networks (and share files) - you need Samba server, and JimmyChingala is working on one.
ROM developers can insert the option to customize hostname using the way described below in their Spare Parts options. Feel free to do so.
[SOLUTION]
The following shell command does the job of changing WiFi hostname:
echo YOURHOSTNAME > /proc/sys/kernel/hostname
Click to expand...
Click to collapse
For the change to stay, it should be executed on each boot. And here the things start being more problematic.
For custom ROMs:
Most, if not all, custom ROMs include some user init shell script that will be executed on boot, making the solution easy.
Enter the following line in the Terminal / ADB shell:
echo "echo YOURHOSTNAME > /proc/sys/kernel/hostname" >> the_path_and_name_of_userinit_script.sh
chmod 777 the_path_and_name_of_userinit_script.sh
Click to expand...
Click to collapse
Several examples of custom ROMs and their userinit scripts:
Suggested - will work for most ROMs (creates another file in directory of autoexecuted scripts): /etc/init.d/88hostnameinit
Additional possibility for Enomther's ROM: /data/local/userinit.sh
Additional possibility for CyanogenMOD: /sd-ext/userinit.sh
For stock ROMs:
There is no autorun script for stock ROMs, so they have to be added through modifying boot.img. It's a complicated procedure, and even though guides exist for it - I suggest not to mess with it only because of the hostname. The easiest solution would be to create a script file with the line above using Gscript or other scripting solutions, and execute it after each reboot. If anyone really wishes to modify boot.img - I assume that he/she knows enough about Linux/Android since it can be relatively easily done only on Linux, can find the necessary guides with some googling (like I did), and in this case the modification is easiest to do directly in init.rc - changing "hostname localhost" to "hostname name_of_your_choice".
[ORIGINAL POST]
Hi people,
I'm not much of a dev, but I can find my way around with a bit of Google search And sorry about the links that don't link, new user's permissions don't allow me to...
Anyway, after messing with my router today I've noticed that Nexus transmits "localhost" as its host name to DHCP server, causing my DD-WRT to show it as "*". I went to Google and to my surprise, discovered that there isn't such an option in any Nexus ROM yet.
Found this: LINK_www_laslow_net_?p=501
To change your hostname on Cyanogen 5.x, add the following line to the bottom of /system/etc/init.d/01sysctl -- and make sure you make a backup of 01sysctl before editing it!
echo NEWHOSTNAME > /proc/sys/kernel/hostname
Click to expand...
Click to collapse
I tested it, and it didn't work. After booting, the file still read "localhost" in it, and the hostname on DHCP server reflected it.
But, I didn't get frustrated, connected with ADB, manually executed the command:
echo MyHostName > /proc/sys/kernel/hostname
checked that the file was overwritten, disabled WiFi, deleted DHCP lease, enabled WiFi back - and voila, I have a new hostname!
Then I went to search for hostname setting, which got me to /init.rc:
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
Click to expand...
Click to collapse
Well, I guess that's the place. A tiny problem, though - it's in the boot image, which can't be easily modified. Thanks to the latest thread on update.zip creation I can probably do it myself, but I wanted to share the findings and ask for the correct way to implement.
There's a "dirty but functional" way of "disable WiFi - override /proc/sys/kernel/hostname - enable WiFi", and it's probably not a problem to stick it somewhere in the boot sequence, or even write an app that writes those changes to one of the boot scripts and allows configuration of host and domain names. But it's not the best way - DHCP might already give out a lease, and the new host name might not register.
And there's a correct (?) way of doing it, introducing it into init.rc. Since it's "on boot", I suppose that it runs after mounting the partitions - which means that the partitions are already accessible.
In this case, the best way would be executing a small shell script that would check for existence of, say, "/system/etc/settinghostdomainnames.rc" and create a default one if it's not there, then use "import /system/etc/settinghostdomainnames.rc" and set a manual trigger, like the guy is trying to do here:
LINK_groups.google.co.jp_group_android-developers_browse_thread_thread_e2f432707b735ff0
"trigger someeventtobringupnetworkinterface"
That would allow to use a custom setting for host and domain names that can be changed by SW, and adding that as another option into ROM Settings app or external app.
But the guy in question didn't succeed. What did he miss? Would it be better to do something like "on fakesystemproperty=something" and instead of manual trigger, doing "setprop fakesystemproperty something"?
I can probably test it and find out myself, but it would take loads of time compared to one of the kernel devs, and I don't even have the environment set up for modifying boot images. I was kinda hoping that one of the kernel devs would test it. I can write and post the modifications to init.rc and the custom script, they're very simple.
So, who can help me with answering the questions in the thread, and/or testing the modification?
Thanks! It's back.
Oh well, I'll keep preparing Ubuntu VM anyway
OK, first test fired - updated /init.rc in my own boot.img, checked the values. It's working, hostname is indeed modified.
Now I'll try to rewrite /init.rc in such way as to load the hostname setting from elsewhere, while not screwing the security. Will post results soon.
Setting it to the same value as the BT value would be ideal. I'm not sure how you could do that though, because the init scripts run before the frameworks load
Looking forward for a fix to this problem.
Update, but only partially on topic:
God, I hate SH scripting. Couldn't even google a normal tutorial that would explain where I went wrong. A script of 10 lines, and I can't make it work.
Let's see, I need something like this:
#!/system/bin/sh
echo "on service-exited-network_prepare" > /system/etc/net_init.rc
echo " ifup lo" >> /system/etc/net_init.rc
if [ -e "/system/etc/net_init.domain" ];
then
echo "hostname `cat /system/etc/net_init.host`" >> /system/etc/net_init.rc
else
echo "hostname localhost" >> /system/etc/net_init.rc
fi
if [ -e "/system/etc/net_init.domain" ];
then
echo "domainname `cat /system/etc/net_init.domain`" >> /system/etc/net_init.rc
else
echo "domainname localdomain" >> /system/etc/net_init.rc
fi
echo >> /system/etc/net_init.rc
Of course, this thing fails miserably with -
Syntax error: end of file unexpected (expecting "then")
What the hell am I doing wrong? Never used SH before, mostly tcsh and perl.
Thanks.
Oh well, I guess I got the problem.. Unix vs Windows file format. Sorry for bothering.
its always bothered me that you cant change the device name for wifi networks, and ive always looked for a way to change it.
kudos to you for the ambition and diligence to do it!
dont give up, if you can get it smoothed out enough im sure cyanogen will implement it in his next mod. ive always wished there was an option in wifi settings to change device name. itd be very useful for lan ip configuring and when your connected to a random hotspot lol
Ok, after fighting for a day, I still didn't manage to import another .RC file and run on service exit (I don't even see the trace of the process I'm trying to start - the first thing it does is attempting to write log, and there is no log, no matter where I put the start command), but at least for a "quick-and-dirty way" there's a very simple solution, given SD-EXT partition (I believe everyone creates it):
open terminal application, type the following command:
echo "echo YOURHOSTNAME > /proc/sys/kernel/hostname" > /sd-ext/userinit.sh
That would override the hostname of the system before boot completion.
After some reading, I believe there's nothing bad in setting the hostname twice - once default localhost in init.rc, and then overriding it using /proc/sys directory, Linux is designed to cope with that and hopefully so does Android.
So, as to pershoot's request, it's possible to write a small application to read Bluetooth device name value and write it as WiFi hostname, and include it in boot process right before 20userinit.
Now this is a task I'm not suitable for, I have no knowledge of frameworks whatsoever. Anybody up to the task?
Jack_R1 said:
After some reading, I believe there's nothing bad in setting the hostname twice - once default localhost in init.rc, and then overriding it using /proc/sys directory, Linux is designed to cope with that and hopefully so does Android.
So, as to pershoot's request, it's possible to write a small application to read Bluetooth device name value and write it as WiFi hostname, and include it in boot process right before 20userinit.
Now this is a task I'm not suitable for, I have no knowledge of frameworks whatsoever. Anybody up to the task?
Click to expand...
Click to collapse
I requested it and I'm not pershoot
Oops Sorry, my bad. Fever and lots of time in front of the computer don't do me good...
Kudos to you Jack_R1. Watching this.
Let me know if you need any help with shell scripting.
Gonna watch this and try it out later, the solution so far.
is this a stable fix?
is this confirmed to work?
Sorted out, updated with the most current info and several examples of custom ROMs.
Jack_R1 said:
Sorted out, updated with the most current info and several examples of custom ROMs.
Click to expand...
Click to collapse
I am running CM6 with a2sd and somehow the /sd-ext/userinit.rc is not executed. Even if I change permissions of the file to 777, it's not executed.
I also haven't found in init.d the script which executes userinit.rc, might be because I am running custom kernel? (wildmonks).
The only way for me to do it was to put the script in /etc/init.d/88userinit file and change it's permissions to 777
It's /scripts/userinit.sh, not userinit.rc
The execution of /sd-ext/userinit.rc used to be in /init.rc, in boot.img.
But the preferred way for most of the ROMs is to use /etc/init.d/ scripts anyway, since a lot of ROMs use them.
Changed the 1st post to reflect it.

[HOWTO] Remove bash Color Codes

Anyone who uses the latest roms, mods, etc. is probably using bash. Bash is awesome, bash is great bash is...annoying if you use Windows with adb.
Familiar sight?
bash-4.1# ls
ls
←[1;36mbin←[0m ←[1;32minit.rc←[0m ←[1;34msbin←[0m
←[1;34mcache←[0m ←[1;32minit.smdkc110.rc←[0m ←[1;34msdcard←[0m
←[1;34mconfig←[0m ←[1;32minit.smdkc110.sh←[0m ←[1;34msqlite_stmt_journals←[0m
←[1;34mdata←[0m ←[1;36minit_samsung←[0m ←[1;34msys←[0m
←[1;34mdbdata←[0m ←[1;34mlib←[0m ←[1;34msystem←[0m
←[1;32mdefault.prop←[0m ←[1;32mlpm.rc←[0m ←[1;32msystem.prop←[0m
←[1;34mdev←[0m ←[1;34mmnt←[0m ←[1;34mtmp←[0m
←[1;34mefs←[0m ←[1;34mpreinstall←[0m ←[1;34muserdata←[0m
←[1;36metc←[0m ←[1;34mproc←[0m ←[1;36musr←[0m
←[1;32mfota.rc←[0m ←[1;32mrecovery.rc←[0m ←[1;34mvoodoo←[0m
←[1;36minit←[0m ←[1;34mres←[0m
Now my way:
bash-4.1# ls
ls
bin init.rc sbin
cache init.smdkc110.rc sdcard
config init.smdkc110.sh sqlite_stmt_journals
data init_samsung sys
dbdata lib system
default.prop lpm.rc system.prop
dev mnt tmp
efs preinstall userdata
etc proc usr
fota.rc recovery.rc voodoo
init res
Requirements:
Root.
Clockworkmod Recovery.
My busybox.
My color code removal patch.
Patch
http://dl.dropbox.com/u/2056318/bash_nocolor_1.1.zip
Install both via cwm. Make a nandroid backup first, JUST IN CASE.
If my patch hosed ls on your phone, this should fix it. Sorry about that.
http://dl.dropbox.com/u/2056318/bash_nocolor_fix.zip
Great Work!
What is this?
Did you remove all color from bash, or is it just not doing ls in color by default?
I would recommend people use something like mintty or console2 as their terminal on Windows instead of a regular cmd anyway, for anyone who actually uses the terminal frequently. Well, so console2 gets the same stupid behavior as the standard cmd with escape codes in adb for some reason, but it works with bash color escape codes in general (I have them in my $PS1). Mintty does support escape codes in adb shell, and is generally pretty nice, but doesn't have tabs unfortunately. Just a tip for people.
Nice job for those who don't want to change their terminal, of course. I just feel that for power users mintty is a better solution.
It removes them from ls, which is which is the only place the problem will lie for most windows users. I require my busybox, as there are many versions out there, but mine is the latest, and I know it supports ls. My patch removes the ls binary from Android and replaces it with my own symlink.
As for those options, I will stick with my powershell, but thanks. A poweruser should be using Linux anyway (I do normally).
Ah, yeah, that's probably true. But why is the default ls with colors in Android anyway? I normally need to create an alias to set ls to ls --color=auto or something along those lines usually. Is it just not getting the terminal info properly? I'm just curious about this I guess.
I'm a weird person who uses Unix shells on Windows, I guess because I like games too much.
Its not. ls in itself is a binary, not a symlink. It is running through the bash shell. Bash, is what supports colors. By default Android does not run bash, but sh.
Oh huh, didn't realize Android used sh by default. Guess I never paid attention.
Do you drop busybox in /system/bin to install it? That is, if you aren't flashing it from cwm.
Hate to be the bringer of bad news, but something in this breaks WiFi. After installing it, I can no longer connect to my router, it just stalls at "Obtaining address". When I check the router, it's already assigned an address.
I reflashed DL09 cleanly, and it connects right away. I re-apply this fix, and WiFi stops working again.
I did say make a nandroid backup....right?
Anyway, you are correct. Patch has been removed until I can figure something else out.
I did say make a nandroid backup....right?
Anyway, you are correct. Patch has been removed until I can figure something else out. Please revert to an earlier nandroid.
First post updated with a better fix that disables color for bash, system wide. Thanks to enderst from irc for the help.

[APP] LUKS Manager [v2.3] - Encrypted volumes via loopback for rooted phones

Introduction
This is my first Android application and I'm looking for testers and feedback.
LUKS Manager
LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)
Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>
Requirements
The Android device must:
Be rooted
Have a kernel that supports secure dm-crypt modes and loopback devices
Have a current version of BusyBox installed
Have SuperUser app installed
This package contains:
A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the The Guardian Project.
A statically compiled and stripped version of mkdosfs from dosfstools package for the ARM7.
A bash shell script called "luks" that does volume management.
And a native java app that provides a GUI interface to the luks script, a basic file explorer and simple text editor.
Download
You can find more on the apps homepage at:
nemesis2.qx.net/pages/LUKSManager/
Or the Android Market:
market.android.com/details?id=com.nemesis2.luksmanager
Changelog
Version 2.3:
Major rewrite to the luks shell script and GUI app to support user defined volume locations.
Encryption cipher and keysize are now user definable. (kernel support required)
Moved storage of volume information from /mnt/sdcard/luks/.data to /data/data/com.nemesis2.luksmanager/.data
Prompts to upgrade if loop device files are found in SDCard .data directory.
Removed top level restriction on file explorer activity.
Default file system changed from EXT4 to EXT2.
FAT file system support now enabled by default.
Added volume mount and unmount desktop shortcuts.
Added notification when volumes are mounted. (Can be toggled off in preferences)
Added landscape support to the main and volume edit activities.
Added basic SDcard support to install binaries routine.
(Fixes java.lang.NullPointerException on binary install.)
Added toggle to disable binary hash checks on startup. This enables
customized luks scripts and/or binaries.
Small fix to application initialization. (hopefully fixes odd reboot
issue on some devices)
Attempts to unmount volumes on ACTION_SHUTDOWN and MEDIA_EJECT broadcasts.
Additional checks and error handling if no volumes exist.
Additional error handling in luks script during volume mounting and creation.
Added required BusyBox applet checks on startup.
About Dialog additions / changes.
Small text changes (formatting and typo fixes).
Version 2.2:
Recompiled lm.crypsetup binary under android-ndk-r6b.
Hopefully this will stop segfaults on various devices.
Version 2.1:
Added widget:
When volumes are mounted the widget will turn red and display the number of currently mounted volumes.
A single touch unmounts all volumes.
Rewrote luks script and internal routines to use busybox all the time to avoid toolbox/busybox symlink conflicts.
Added the ability to password protect the create/remove buttons, volume properties and preferences dialog.
Improved error handling in luks script on mount.
Added additional scripts: pre-mount and pre-unmount.
Added volume management Activity.
Volume mount points are now user defineable.
The volumes loopback device is now user definable.
Added an internal file editor (to edit bash scripts).
(Editor can be used outside of LUKS Manager to edit files).
Fixed Force Close when mounting with a blank password.
Version 2.0: Added Preferences Activity.
Now allows FAT formatted volumes.
(works w/FreeOTFE on windows)
Improved error handling/cleanup on failed volume creation.
Added lm.mkdosfs binary to assets.
The lm.mkdosfs binary is sha1 hashed and replaced if out-dated or changed.
Remove Binaries nows includes the lm.mkdosfs binary.
Added additional menu options to Activities.
Increased debug logging and added system probe.
(Don't enable for normal usage!)
Added option to launch Explorer on volume mount.
Redirected stderr to stdout using redirectErrorStream.
Added validation checks to volume creation. (non-blank, sanitize filename).
Moved to dp units instead of pixels for display scaling.
Fixed a few items that needed to be .destroyed (oops).
SD Card path fix (typo fix).
File Explorer now saves/recalls list view position on directory changes and when opening files.
About Dialog updates.
Added run script on mount/unmount: <volume>.mount.sh and <volume>.unmount.sh
Added su/root check on startup.
Version 1.9:Renamed cryptsetup to lm.cryptsetup to avoid overwriting pre-existing copies.
LUKS script will use cryptsetup if it exists, solves Samsung Galaxy S2 issues.
(Users will need to manually restore the cryptsetup binary if it was overwritten!)
Added sanity checks to File Explorer. (path /mnt/sdcard must exist)
File Explorer now saves and restores path on rotation change.
Moved about html to assets file instead of an inline string.
Version 1.8: Removed Internet Access Permission (decided not to include ads).
The cryptsetup binary is no longer UPX compressed in an attempt to improve compatibility.
The cryptsetup and luks binaries are now sha1 hashed and replaced if outdated or changed.
Since "Unmount All" can take a while to complete it has been changed to an AsyncTask.
When mounted all volumes will get chmod 777 applied recursively to avoid file permission issues.
Numerous improvements and changes to the internal file explorer.
Slight wording changes to activity titles and About Dialog.
Added change log to About Dialog.
Version 1.7: Added file explorer (no longer requires ASTRO File Manager)
Updated the About Dialog
First Market Release
Version 1.6: updated and optimized the icon and background images
Updated the About Dialog
Updated failure logging to syslog
Version 1.5: now quotes passwords (oops)
Spaces in volume names are converted to underscores: _
About dialog updated
Version 1.4: code refactoring
Added about/homepage menu items
Added "Remove Binaries" to remove /system/bin files: luks and cryptsetup
Added explore menu option to explore to volume location (requires Astro Filemanager)
Added background
Version 1.3: moved binaries into apk and added extractor/binary installer
Version 1.2: first public release
Screen Shots
Any Kernals for the OTA Sense
Nemesis][ said:
Introduction
This is my first Android application and I'm looking for testers and feedback.
LUKS Manager
LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)
Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>
Requirements
The Android device must:
Be rooted
Have a kernel that supports secure dm-crypt modes and loopback devices
Have a current version of BusyBox installed
Have SuperUser app installed
This package contains:
A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the Guardianproject.
A bash shell script called "luks" that does volume management.
And a native java app that provides a GUI interface to the luks script.
Download
You can find more on the apps homepage at:
nemesis2.qx.net/pages/LUKSManager/
(I've been a long time lurker but since I'm a first time poster I'm not allowed to post this is the main Android App Dev section nor am I allowed to post external links. )
Screen Shots
Click to expand...
Click to collapse
Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply
h4ck0rk1d said:
Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply
Click to expand...
Click to collapse
This has been mentioned again and again, there will bo NO custom kernels for the 2.3 update until the source is released. Be patient.
Sent from my MiuiSpeedy
Won't download the full file on my phone using the stock browser and dolphin HD. 1 star because I can't install it. Just joking, but can you put up a mirror please? The download link seems to work fine in Chrome, but mobile browsers it seems to crap out on.
Sent from my PG06100 using XDA App
Download Fixed (I believe)
OK. I believe I've fixed mobile downloads on the server so please try again.
And I've also updated LUKS Manager to v1.4. (lots of little fixes, tweaks)
-N2
Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.
Ron Overdrive said:
Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.
Click to expand...
Click to collapse
Thanks for catching that. Version 1.5 should now quote passwords properly.
Any other issues? (I know I should validate user input more on volume creation; but the luks script should handle failures gracefully.)
-N2
Released v1.6
Version 1.6 notes:
Images updated and optimized using optipng.
Updated the about box text.
Added additional failure logging to syslog.
And did a small bit of code cleanup.
just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.
clarkk said:
just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.
Click to expand...
Click to collapse
Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.
Nemesis][ said:
Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.
Click to expand...
Click to collapse
Thanks looks great now on the screen, still have a problem mounting though, could it auto-detect the location of busybox or have a changeable option?
Some feature recomendations to consider:
* auto-mount select volumes on startup
* auto-dismount all volumes on shutdown
* auto-dismount all volumes on X number of failed lockscreen attempts
* graphical support for moving/linking directories/files into encrypted volumes (so we can link our folders for downloads, camera, dropbox, etc. to the volumes directly)
Sent from my PG06100 using XDA App
Doesn't work on HTC DesireHD/Android 2.3.3 and Tattoo/Cyanogenmod 7.0.3
Code:
# dd if=/dev/zero of=1.vol bs=1024k count=1024
# lm.cryptsetup luksFormat 1.vol
lm.cryptsetup luksFormat 1.vol
...
Verify passphrase: 1
device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/loop0.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).
#
Relevant syslog lines
Code:
<3>[ 3257.202941] device-mapper: table: 254:0: crypt: Error initializing ESSIV hash
<4>[ 3257.203338] device-mapper: ioctl: error adding target to table
Looks like kernel problem... Any way to fix? YES.
Compile sha256_generic.ko as module, insmod it and all works normally.
Important note - kernel compilations with default NDK toolchain creates
broken module - kexec error - bad relocations: 27 - R_ARM_PLT32.
To compile correct module for your kernel use code sorcery arm compiler.
Details -on cyanogenmod's "compile kernel" page.
on which roms it is working ? i have zte blade - i know wrong topic but what rom should i install to have it working ?
xtam said:
on which roms it is working ? i have zte blade - i know wrong topic but what rom should i install to have it working ?
Click to expand...
Click to collapse
I think it'll work on any rom that has root, but I could be wrong. I use the latest CyanogenMod Nightlies.
Xtam, 2.0 GUI starts working for me with cyanogen 7.x ROM. It requires sha256_generic.ko module for aes-cbc-essiv cipher (FreeOTFE volume), but aes-cbc-plain volume works without additional modules.
Ron Overdrive said:
Some feature recomendations to consider:
* auto-mount select volumes on startup
* auto-dismount all volumes on shutdown
* auto-dismount all volumes on X number of failed lockscreen attempts
* graphical support for moving/linking directories/files into encrypted volumes (so we can link our folders for downloads, camera, dropbox, etc. to the volumes directly)
Click to expand...
Click to collapse
Ron,
I'll look into/consider adding some of those. I've add some code to unmount the volumes on shutdown but I'm not 100% sure it's working properly.
I like the idea of unmounting them all on after X number of failed lock screen attempts. Not quite sure how I can hook into that however.
In version 2.1 you can set the mount point; not sure if I'll write a GUI interface for symlinking however.
-N2
I'm having problems unmounting volumes in 2.1. Whenever I attempt to unmount a volume it tells me without any errors its unmounted, but when you try to remount the volume or check the status its still mounted.
I have a Samsung Infuse which is basically an i9000 galaxy S with a bigger screen and like most galaxy S devices I know of, it has internal storage which is mounted to /mnt/sdcard and an external sd card which is mounted to /mnt/sdcard/exteral_sd. I really like the app and it works perfectly, however I have a problem. It wants to create the volume on the internal sdcard instead of the external one. I edited the lukspath in the luks script but it keeps overwriting it when I start up the gui and go to create a volume. Is there a way to make this setting stick in the luks script without recompiling? Or could you update the app to allow people to change where it creates the volume? I just need to be able to create a volume in /mnt/sdcard/external_sd/. Thanks!
Nice app, thank you Nemesis.
Another suggestion for improvement: it would be nice to be able to change a volume password.

[DEV only] Random Development thoughts

I have started this thread as a place to discuss random development thought that probably don't need their own threads, and as a place to discuss issues so other threads don't go too far off topic.
Table of Contents:
DBV for c6843: Posts 1 - 6
GPL: Post 7
F2FS: Post 8
wlan: post 9, 11 -
Optimisation Bookmark: post 10
Original Post 1:
First thought
@dbolivar Have you tried building you (DooMKernel) with CONFIG_DVB_CORE = y/m to see if you can get the TV function to work?
blueether said:
I have started this thread as a place to discuss random development thought that probably don't need their own threads, and as a place to discuss issues so other threads don't go too far off topic.
First thought
@dbolivar Have you tried building you (DooMKernel) with CONFIG_DVB_CORE = y/m to see if you can get the TV function to work?
Click to expand...
Click to collapse
Hi, good start. In fact I have, the differences in the kernel options between C6833 and C6843 (Brazilian model with digital TV) are:
Code:
47c47
< CONFIG_MACH_SONY_TOGARI_BRAZIL=y
---
> CONFIG_MACH_SONY_TOGARI_ROW=y
275d274
< CONFIG_ISDBT_TUNER_SMTEJ11X=y
325a325,327
> CONFIG_TOUCHSCREEN_CLEARPAD=y
> CONFIG_TOUCHSCREEN_CLEARPAD_I2C=y
> CONFIG_TOUCHSCREEN_CLEARPAD_RMI_DEV=y
Yes, I don't know why the Clearpad touchscreen is enabled for the C6833, but not for the C6843; I think it's just garbage (perhaps they made the togari defconfig based off honami, and corrected that when making the togari_brazil defconfig). It doesn't make any difference for me, disabling them keep the touchscreen (MAX1187) functions normal.
Well, back to the point: even when applying these differences to the ZU DooMKernel, the digital TV doesn't work. The app stays a long time in a black screen, and finally closes (FC). I investigated the kmsg and logcat, but nothing useful.
CONFIG_DVB_CORE is "m" by default. I tried insmod'ing every module in /system/lib/modules, but same result. I temporarily gave up, because I don't watch the crap they broadcast on the open TV here. But yeah, it would be good to have everything working...
dbolivar said:
Hi, good start. In fact I have, the differences in the kernel options between C6833 and C6843 (Brazilian model with digital TV) are:
Code:
47c47
< CONFIG_MACH_SONY_TOGARI_BRAZIL=y
---
> CONFIG_MACH_SONY_TOGARI_ROW=y
275d274
< CONFIG_ISDBT_TUNER_SMTEJ11X=y
325a325,327
> CONFIG_TOUCHSCREEN_CLEARPAD=y
> CONFIG_TOUCHSCREEN_CLEARPAD_I2C=y
> CONFIG_TOUCHSCREEN_CLEARPAD_RMI_DEV=y
Yes, I don't know why the Clearpad touchscreen is enabled for the C6833, but not for the C6843; I think it's just garbage (perhaps they made the togari defconfig based off honami, and corrected that when making the togari_brazil defconfig). It doesn't make any difference for me, disabling them keep the touchscreen (MAX1187) functions normal.
Well, back to the point: even when applying these differences to the ZU DooMKernel, the digital TV doesn't work. The app stays a long time in a black screen, and finally closes (FC). I investigated the kmsg and logcat, but nothing useful.
CONFIG_DVB_CORE is "m" by default. I tried insmod'ing every module in /system/lib/modules, but same result. I temporarily gave up, because I don't watch the crap they broadcast on the open TV here. But yeah, it would be good to have everything working...
Click to expand...
Click to collapse
I hadn't got around to diff'ing them I just noticed the DVB line and had a quick look at the brazil defconfig.
I guess there is a binary blob that is needed?
For some reason I have to include the clearpad stuff at the moment in the pimped kernel, I should dig to find out why so the kernel is a tad smaller.
blueether said:
I hadn't got around to diff'ing them I just noticed the DVB line and had a quick look at the brazil defconfig.
I guess there is a binary blob that is needed?
For some reason I have to include the clearpad stuff at the moment in the pimped kernel, I should dig to find out why so the kernel is a tad smaller.
Click to expand...
Click to collapse
Hmm very good insight about the binary blob... It's very possible. I have FTFs for the C6833 and C6843, I'll extract them and compare the file list.
I made it work!! Well, involves some manual steps, but it's a very good progress. I started by comparing the file listing in /system from stock C6833 and C6843 firmwares, and although there is no kernel blob, there ARE some files related to DTV, mostly dynamic libs (.so), some configuration, but most importantly, these two:
Code:
/system/bin/dtvsdserver
/system/bin/dtvserver
So, I insmod'ed every module related to DTV/DVB, and then started these guys... And the TV works! BUT, as soon as I quit the Mobile TV app, the process "dtvserver" is killed with a hangup signal, and opening the app again does not restart it, so I have to manually bring the dtvserver up first (otherwise the same previous issue happens, black screen and finally Mobile TV FC's).
I notice some DTV/DVB modules couldn't be insmod'ed:
Code:
insmod: init_module 'dib3000mc.ko' failed (No such file or directory)
insmod: init_module 'dib7000m.ko' failed (No such file or directory)
insmod: init_module 'dib7000p.ko' failed (No such file or directory)
insmod: init_module 'dib8000.ko' failed (No such file or directory)
insmod: init_module 'dib9000.ko' failed (No such file or directory)
insmod: init_module 'mpq-dmx-hw-plugin.ko' failed (No such file or directory)
insmod: init_module 'tuner-simple.ko' failed (No such file or directory)
But the modules are there, and they are the new ones... I don't get it why they can't be insmod'ed, perhaps something is missing from the kernel config? It could be one of the reasons.
Another thing I've been wondering, is why the DVB modules necessary for the Mobile TV are not loaded automatically, like the wlan module is, for instance. Perhaps a difference in the ramdisk? Something to investigate next.
dbolivar said:
I made it work!! Well, involves some manual steps...
Another thing I've been wondering, is why the DVB modules necessary for the Mobile TV are not loaded automatically, like the wlan module is, for instance. Perhaps a difference in the ramdisk? Something to investigate next.
Click to expand...
Click to collapse
Congrats on getting that far with the DTV, will make for a more complete device for the c6843 users that want to use custom ROMs
Any differences in udev or init.rc or whatever android uses?
Development using the GPL and GPL'd code
The GPL is a very powerful tool, as are the other OSS licences. One has to know how they are used and can/can't be enforced before publishing any code under these licences or modifying code that that been published under a OSS licence. Using a OSS licence brings with it risks and rewords, often these are one and the same.
When we do anything with Android [Linux] kernels we fall under the bounds of the GPL v2 that it is published under. Any modification to the kernel has to be published under the same licence, and we have to publish the newly modified source in a sate that can recreate the binary that you publish to the public/xda.
I'll leave you with this quote from http://programmers.stackexchange.com
...are you prepared to live by it, and let other people use what you've written, rather than just liking it because of what you can get out of it?
Click to expand...
Click to collapse
F2FS mount and sysfs options
Now that we have an F2FS-enabled firmware by default, I've been reading about the mount options and sysfs entries available. As many of us know, there are lots of tweaks out there for EXT4, but what about F2FS? Well, here is the official documentation from the Linux kernel:
https://www.kernel.org/doc/Documentation/filesystems/f2fs.txt
As for the mount options, I think only discard could be interesting (but it's questionable, some people say it's better to schedule a regular fstrim call instead). There are also some sysfs tunables which I think can have a noticeable impact in battery life, and performance. Testing them would require a lot of trial and error. I'm pasting them below for those who don't want to go through the full document:
Code:
================================================================================
SYSFS ENTRIES
================================================================================
Information about mounted f2f2 file systems can be found in
/sys/fs/f2fs. Each mounted filesystem will have a directory in
/sys/fs/f2fs based on its device name (i.e., /sys/fs/f2fs/sda).
The files in each per-device directory are shown in table below.
Files in /sys/fs/f2fs/<devname>
(see also Documentation/ABI/testing/sysfs-fs-f2fs)
..............................................................................
File Content
gc_max_sleep_time This tuning parameter controls the maximum sleep
time for the garbage collection thread. Time is
in milliseconds.
gc_min_sleep_time This tuning parameter controls the minimum sleep
time for the garbage collection thread. Time is
in milliseconds.
gc_no_gc_sleep_time This tuning parameter controls the default sleep
time for the garbage collection thread. Time is
in milliseconds.
gc_idle This parameter controls the selection of victim
policy for garbage collection. Setting gc_idle = 0
(default) will disable this option. Setting
gc_idle = 1 will select the Cost Benefit approach
& setting gc_idle = 2 will select the greedy aproach.
reclaim_segments This parameter controls the number of prefree
segments to be reclaimed. If the number of prefree
segments is larger than the number of segments
in the proportion to the percentage over total
volume size, f2fs tries to conduct checkpoint to
reclaim the prefree segments to free segments.
By default, 5% over total # of segments.
max_small_discards This parameter controls the number of discard
commands that consist small blocks less than 2MB.
The candidates to be discarded are cached until
checkpoint is triggered, and issued during the
checkpoint. By default, it is disabled with 0.
ipu_policy This parameter controls the policy of in-place
updates in f2fs. There are five policies:
0: F2FS_IPU_FORCE, 1: F2FS_IPU_SSR,
2: F2FS_IPU_UTIL, 3: F2FS_IPU_SSR_UTIL,
4: F2FS_IPU_DISABLE.
min_ipu_util This parameter controls the threshold to trigger
in-place-updates. The number indicates percentage
of the filesystem utilization, and used by
F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
max_victim_search This parameter controls the number of trials to
find a victim segment when conducting SSR and
cleaning operations. The default value is 4096
which covers 8GB block address range.
dir_level This parameter controls the directory level to
support large directory. If a directory has a
number of files, it can reduce the file lookup
latency by increasing this dir_level value.
Otherwise, it needs to decrease this value to
reduce the space overhead. The default value is 0.
ram_thresh This parameter controls the memory footprint used
by free nids and cached nat entries. By default,
10 is set, which indicates 10 MB / 1 GB RAM.
@blueether & @dbolivar :
our primary concern should be to get custom wlan (prima/pronto) drivers working on custom compiled kernel for stock ROMs.. once we have that there are a LOT of features which we can add!
so far I havent had much luck but you can find all my tests here
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/testing_stock_4.3_wlan
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/testing_stock_4.3_wlan_clean
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/testing_z1_gpe_port_wlan
A bookmark
Worth the read @dbolivar
http://forum.xda-developers.com/showthread.php?t=2754997
DooMLoRD said:
@blueether & @dbolivar :
our primary concern should be to get custom wlan (prima/pronto) drivers working on custom compiled kernel for stock ROMs.. once we have that there are a LOT of features which we can add!
so far I havent had much luck but you can find all my tests here
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/testing_stock_4.3_wlan
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/testing_stock_4.3_wlan_clean
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/testing_z1_gpe_port_wlan
Click to expand...
Click to collapse
I'm giving it a try - downloaded the latest sources from CodeAurora and applied to your kernel (adjusting Kconfigs, Makefiles and defconfig). The compilation stops here:
Code:
drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c: In function ‘wlan_hdd_send_avoid_freq_event’:
drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c:574:18: warning: assignment makes pointer from integer without a cast
error, forbidden warning: wlan_hdd_cfg80211.c:574
make[3]: *** [drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.o] Error 1
OK, so I edited wlan_hdd_cfg80211.c and changed line 574 to add an explicit cast:
Code:
vendor_event = (struct sk_buff *)cfg80211_vendor_event_alloc(pHddCtx->wiphy,
Then it passes by this point, but stops in following lines with similar errors (not even pasting here). What I noticed from these errors it that CodeAurora's sources seem to be incompatible with Sony's kernel, because for instance, the function cfg80211_vendor_event_alloc is not defined anywhere (ran a grep over all *.c and *.h files in the kernel).
Comparing with a CM11 kernel, this function is also not defined anywhere, but the prima sources are very different, they don't call it. So I thought: let's use CM11's prima sources.
Bingo!
Compiled fine, booted, and with the correspoding firmware in /system/etc/firmware/wlan/prima, WLAN came up normally after boot. :victory:
Now you mentioned something about CM11's prima sources, from what I understood they are not ideal. Is that true? Because there are CM11-based custom kernels which implement intelliplug (dependent on custom WLAN drivers), for instance.
Hope it works for you. In this case, I'll put together a more organized how-to of what I did.
dbolivar said:
I'm giving it a try - downloaded the latest sources from CodeAurora and applied to your kernel (adjusting Kconfigs, Makefiles and defconfig). The compilation stops here:
Code:
drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c: In function ‘wlan_hdd_send_avoid_freq_event’:
drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c:574:18: warning: assignment makes pointer from integer without a cast
error, forbidden warning: wlan_hdd_cfg80211.c:574
make[3]: *** [drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.o] Error 1
OK, so I edited wlan_hdd_cfg80211.c and changed line 574 to add an explicit cast:
Code:
vendor_event = (struct sk_buff *)cfg80211_vendor_event_alloc(pHddCtx->wiphy,
Then it passes by this point, but stops in following lines with similar errors (not even pasting here). What I noticed from these errors it that CodeAurora's sources seem to be incompatible with Sony's kernel, because for instance, the function cfg80211_vendor_event_alloc is not defined anywhere (ran a grep over all *.c and *.h files in the kernel).
Comparing with a CM11 kernel, this function is also not defined anywhere, but the prima sources are very different, they don't call it. So I thought: let's use CM11's prima sources.
Bingo!
Compiled fine, booted, and with the correspoding firmware in /system/etc/firmware/wlan/prima, WLAN came up normally after boot. :victory:
Now you mentioned something about CM11's prima sources, from what I understood they are not ideal. Is that true? Because there are CM11-based custom kernels which implement intelliplug (dependent on custom WLAN drivers), for instance.
Hope it works for you. In this case, I'll put together a more organized how-to of what I did.
Click to expand...
Click to collapse
great!
can you just fork my repo and shift to the branch which worked for you, then send pull request? i will investigate on the Z1...
and yes please do send the steps!
well if we get custom compiled WLAN modules properly working on custom compiled kernel for stock ROM then i can have features like intelli-plug, F2FS, AsyncFS and lots more on stock ROMs!
DooMLoRD said:
great!
can you just fork my repo and shift to the branch which worked for you, then send pull request? i will investigate on the Z1...
and yes please do send the steps!
well if we get custom compiled WLAN modules properly working on custom compiled kernel for stock ROM then i can have features like intelli-plug, F2FS, AsyncFS and lots more on stock ROMs!
Click to expand...
Click to collapse
Well I'm still learning my way around git & GitHub, so I think it will be faster if you just reproduce the steps below:
1) Copy Prima WLAN sources from CM11-based kernel:
I copied from SlimRom's kernel source. Put the sources under drivers/staging/prima.
2) Modify related Kconfig and Makefile:
drivers/staging/Kconfig
Code:
131,132d130
< source "drivers/staging/prima/Kconfig"
<
drivers/staging/Makefile
Code:
58,59d57
< obj-$(CONFIG_PRIMA_WLAN) += prima/
< obj-$(CONFIG_PRONTO_WLAN) += prima/
3) Modify defconfig:
I'm pasting every option related to WLAN. The Prima options should appear after a "make menuconfig".
Code:
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_INTERNAL_REGDB=y
# CONFIG_CFG80211_WEXT is not set
# CONFIG_WIRELESS_EXT_SYSFS is not set
# CONFIG_LIB80211 is not set
# CONFIG_CFG80211_ALLOW_RECONNECT is not set
# CONFIG_MAC80211 is not set
# CONFIG_WIMAX is not set
CONFIG_RFKILL=y
CONFIG_RFKILL_PM=y
CONFIG_RFKILL_LEDS=y
# CONFIG_RFKILL_INPUT is not set
# CONFIG_RFKILL_REGULATOR is not set
# CONFIG_RFKILL_GPIO is not set
...
# CONFIG_WIFI_CONTROL_FUNC is not set
...
CONFIG_WLAN=y
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_LIBRA_SDIOIF is not set
# CONFIG_ATH6K_LEGACY_EXT is not set
CONFIG_WCNSS_CORE=y
CONFIG_WCNSS_CORE_PRONTO=y
CONFIG_WCNSS_MEM_PRE_ALLOC=y
CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y
# CONFIG_ATH_COMMON is not set
# CONFIG_BCMDHD is not set
# CONFIG_BRCMFMAC is not set
# CONFIG_HOSTAP is not set
# CONFIG_IWM is not set
# CONFIG_LIBERTAS is not set
# CONFIG_MWIFIEX is not set
...
#
# Qualcomm Atheros Prima WLAN module
#
CONFIG_PRIMA_WLAN=m
CONFIG_PRONTO_WLAN=y
# CONFIG_PRIMA_WLAN_BTAMP is not set
CONFIG_PRIMA_WLAN_LFR=y
CONFIG_PRIMA_WLAN_OKC=y
CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y
CONFIG_WLAN_FEATURE_11W=y
CONFIG_QCOM_VOWIFI_11R=y
CONFIG_CONFIG_ENABLE_LINUX_REG=y
4) Include Prima WLAN firmware in kernel ZIP file:
Copy from a CM11-based firmware (I used PAC-Rom). Remember to set permissions as 644.
/system/etc/firmware/wlan/prima
Code:
WCNSS_cfg.dat
WCNSS_qcom_cfg.ini
WCNSS_qcom_wlan_nv.bin
5) Include wlan.ko in kernel ZIP file:
Actually I include every compiled kernel module, because we are using a different toolchain and they may benefit from it too. Remember that /system/lib/module/wlan.ko is a symlink, but in my test the target got updated accordingly.
dbolivar said:
Well I'm still learning my way around git & GitHub, so I think it will be faster if you just reproduce the steps below:
1) Copy Prima WLAN sources from CM11-based kernel:
I copied from SlimRom's kernel source. Put the sources under drivers/staging/prima.
2) Modify related Kconfig and Makefile:
drivers/staging/Kconfig
Code:
131,132d130
< source "drivers/staging/prima/Kconfig"
<
drivers/staging/Makefile
Code:
58,59d57
< obj-$(CONFIG_PRIMA_WLAN) += prima/
< obj-$(CONFIG_PRONTO_WLAN) += prima/
3) Modify defconfig:
I'm pasting every option related to WLAN. The Prima options should appear after a "make menuconfig".
Code:
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_INTERNAL_REGDB=y
# CONFIG_CFG80211_WEXT is not set
# CONFIG_WIRELESS_EXT_SYSFS is not set
# CONFIG_LIB80211 is not set
# CONFIG_CFG80211_ALLOW_RECONNECT is not set
# CONFIG_MAC80211 is not set
# CONFIG_WIMAX is not set
CONFIG_RFKILL=y
CONFIG_RFKILL_PM=y
CONFIG_RFKILL_LEDS=y
# CONFIG_RFKILL_INPUT is not set
# CONFIG_RFKILL_REGULATOR is not set
# CONFIG_RFKILL_GPIO is not set
...
# CONFIG_WIFI_CONTROL_FUNC is not set
...
CONFIG_WLAN=y
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_LIBRA_SDIOIF is not set
# CONFIG_ATH6K_LEGACY_EXT is not set
CONFIG_WCNSS_CORE=y
CONFIG_WCNSS_CORE_PRONTO=y
CONFIG_WCNSS_MEM_PRE_ALLOC=y
CONFIG_WCNSS_REGISTER_DUMP_ON_BITE=y
# CONFIG_ATH_COMMON is not set
# CONFIG_BCMDHD is not set
# CONFIG_BRCMFMAC is not set
# CONFIG_HOSTAP is not set
# CONFIG_IWM is not set
# CONFIG_LIBERTAS is not set
# CONFIG_MWIFIEX is not set
...
#
# Qualcomm Atheros Prima WLAN module
#
CONFIG_PRIMA_WLAN=m
CONFIG_PRONTO_WLAN=y
# CONFIG_PRIMA_WLAN_BTAMP is not set
CONFIG_PRIMA_WLAN_LFR=y
CONFIG_PRIMA_WLAN_OKC=y
CONFIG_PRIMA_WLAN_11AC_HIGH_TP=y
CONFIG_WLAN_FEATURE_11W=y
CONFIG_QCOM_VOWIFI_11R=y
CONFIG_CONFIG_ENABLE_LINUX_REG=y
4) Include Prima WLAN firmware in kernel ZIP file:
Copy from a CM11-based firmware (I used PAC-Rom). Remember to set permissions as 644.
/system/etc/firmware/wlan/prima
Code:
WCNSS_cfg.dat
WCNSS_qcom_cfg.ini
WCNSS_qcom_wlan_nv.bin
5) Include wlan.ko in kernel ZIP file:
Actually I include every compiled kernel module, because we are using a different toolchain and they may benefit from it too. Remember that /system/lib/module/wlan.ko is a symlink, but in my test the target got updated accordingly.
Click to expand...
Click to collapse
which branch did u test this with?
also can you please upload the correct firmware (/system/etc/firmware/wlan/prima) which worked for you?
DooMLoRD said:
which branch did u test this with?
also can you please upload the correct firmware (/system/etc/firmware/wlan/prima) which worked for you?
Click to expand...
Click to collapse
The branch from your kernel was master_kk-4.4.2. The Prima WLAN sources were, as I mentioned, from SlimRom's kernel, branch kk4.4.
I'm attaching the firmware to this post.
blueether said:
A bookmark
Worth the read @dbolivar
http://forum.xda-developers.com/showthread.php?t=2754997
Click to expand...
Click to collapse
Wow this is very nice! Follows the same line of research I've been doing, but this is more "elegant" and in-depth, especially because of all the benchmarks and other comparisons he has done. I'll try this approach myself on my custom builds.
One thing I noticed is that we may still have to use the "hammer" approach with the find & replace of the "-O" flags in *.mk and Makefiles I've been doing, because some of them have these flags hardcoded (i.e. they don't take the value from core/combo/TARGET_linux-arm.mk or other base files). I'll tip JustArchi in his thread about it.
Hi guys, I posted this in the general android section and have had no answer, maybe some one here might know?
I'm trying to build AOSP using CM 11's device tree for togari/togari_gpe and have hit a brick wall after solving the first few make errors.
I have to errors, that I suspect are the same problem:
The first is if I just build with make I get this error:
Code:
Import includes file: out/target/product/togari/obj/SHARED_LIBRARIES/copybit.msm8974_intermediates/import_includes
Import includes file: out/target/product/togari/obj/SHARED_LIBRARIES/libmemalloc_intermediates/import_includes
target thumb C++: libqdutils <= hardware/qcom/display/msm8974/libqdutils/profiler.cpp
target thumb C++: libqdutils <= hardware/qcom/display/msm8974/libqdutils/mdp_version.cpp
target thumb C++: libqdutils <= hardware/qcom/display/msm8974/libqdutils/idle_invalidator.cpp
target thumb C++: libqdutils <= hardware/qcom/display/msm8974/libqdutils/comptype.cpp
hardware/qcom/display/msm8974/libqdutils/mdp_version.cpp:33:27: fatal error: linux/msm_mdp.h: No such file or directory
#include <linux/msm_mdp.h>
^
Import includes file: out/target/product/togari/obj/SHARED_LIBRARIES/gps.msm8974_intermediates/import_includes
compilation terminated.
make: *** [out/target/product/togari/obj/SHARED_LIBRARIES/libqdutils_intermediates/mdp_version.o] Error 1
make: *** Waiting for unfinished jobs....
and if I do make bootimage I get this:
Code:
make: *** No rule to make target `out/target/product/togari/kernel', needed by `out/target/product/togari/boot.img'. Stop.
I suspect that both stem from aosp not finding the kernel source?
kernel source is at ~/dev/aosp/kernel/sony/msm8974/ and I'm building in ~/dev/aosp
I'm also trying to build vanir aosp using the same device tree and kernel and make bootimage completes fine.
Any help would be great
Yo, @DooMLoRD, @blueether @dbolivar
You guys have probably registred that Geohot (iPhone, PS3 jailbreaker) has successfully rooted the Galaxy S5 (and can now claim the $18,000 bounty), but i just read that this one-click root tool should work on any device running a pre-June 3rd kernel, i.e Android 4.4.2. The question is, does it work on the Ultra? I'm aware that it's easy to root an UItra AS LONG as the bootloader is unlocked, but this thing circumvents that part, and roots it. I think.
Are there anyone here still left on 4.4.2 that can try?
More here: Click
LordManhattan said:
Yo, @DooMLoRD, @blueether @dbolivar
You guys have probably registred that Geohot (iPhone, PS3 jailbreaker) has successfully rooted the Galaxy S5 (and can now claim the $18,000 bounty), but i just read that this one-click root tool should work on any device running a pre-June 3rd kernel, i.e Android 4.4.2. The question is, does it work on the Ultra? I'm aware that it's easy to root an UItra AS LONG as the bootloader is unlocked, but this thing circumvents that part, and roots it. I think.
Are there anyone here still left on 4.4.2 that can try?
More here: Click
Click to expand...
Click to collapse
Can't say... Will have to test
Sent from my C6902 using XDA Free mobile app
DooMLoRD said:
Can't say... Will have to test
Sent from my C6902 using XDA Free mobile app
Click to expand...
Click to collapse
I made a thread here. It should work.
http://forum.xda-developers.com/showthread.php?t=2783982

Copying english voice prompt files to WOS 2.0 ?

I really want to switch to WOS 2.0, but the one thing preventing me from doing so is that the voice prompt (when running with bluetooth headphones), would be in chinese.
I know that pacefied has english voice prompts (or had, as I believe it's not working in the most recent versions)
So my question is: is it a simple case of copying over some english voice files to the watch?
Could I install WOS 2.0 and then after installation copy the english files ?
I did replace the chinese voiceprompts with the english ones in the NewWearSport.apk, installed the rooted spanished version from here:
https://www.htcmania.com/showthread.php?t=1412777
and replaced the NewWearSport.apk via adb.
Everything installed well and is working well but I don't hear any voiceprompts. Since I don't have that much outdoor activities now due to an injury I couldn't check, why the voiceprompts are not working. I guess it is better to wait for Saratoga79 to have it done.
nhedgehog said:
I did replace the chinese voiceprompts with the english ones in the NewWearSport.apk, installed the rooted spanished version from here:
https://www.htcmania.com/showthread.php?t=1412777
and replaced the NewWearSport.apk via adb.
Everything installed well and is working well but I don't hear any voiceprompts. Since I don't have that much outdoor activities now due to an injury I couldn't check, why the voiceprompts are not working. I guess it is better to wait for Saratoga79 to have it done.
Click to expand...
Click to collapse
You mean you couldn't hear the voice prompts when your bluetooth headphones were connected? Could you hear chinese voice prompts instead?
I realise that Saratoga could probably solve this problem fairly easily (that guy really seems to know what he's doing), but I don't want to keep asking him cos I realise he's busy.
I feel like it must be just a case of replacing files in the file system. Or is it not that simple?
Voiceprompts are in the NewWearSport.apk integrated. I replaced the Chinese ones with the English ones. I didn't check the Chinese ones before. You have to open the apk files to do so. For this you can use several tools. Since my manipulated apk did install properly I guess it is save to assume, that I did it allright.
nhedgehog said:
Voiceprompts are in the NewWearSport.apk integrated. I replaced the Chinese ones with the English ones. I didn't check the Chinese ones before. You have to open the apk files to do so. For this you can use several tools. Since my manipulated apk did install properly I guess it is save to assume, that I did it allright.
Click to expand...
Click to collapse
I see. My assumption was as follows:
When you install an apk, the files are unzipped to the android file system somewhere (e.g. a newwearsport/voiceprompt folder or something). I thought that (without installing a new apk) you could just copy english files directly to the folder. Perhaps there is some technical reason why this isn't possible. I know very little about this stuff.
The version of the voice files in EN is missing some phrases in the new sport app, but the version in Spanish seems to be complete. I will do some tests today, trying to use ES+EN, so no words in CN...
le_lutin said:
When you install an apk, the files are unzipped to the android file system somewhere (e.g. a newwearsport/voiceprompt folder or something). I thought that (without installing a new apk) you could just copy english files directly to the folder.
Click to expand...
Click to collapse
I just had a look on the watch to be on the safe side.
This quoted assumption is wrong. The only trace of the NewWearSport.apk I found was under:
\system\app\NewWearSport\NewWearSport.apk.
Where is a Subfolder mips which contains the actual code as odex file which I didn't touch.
We have some traces in the data folder :
\data\data\com.huami.watch.newsport
but not the voicefiles. So in my opinion the only way to get to this files is via replacing them in the NewWearSport.apk and installing the new version of this apk.
.
nhedgehog said:
I just had a look on the watch to be on the safe side.
This quoted assumption is wrong. The only trace of the NewWearSport.apk I found was under:
\system\app\NewWearSport\NewWearSport.apk.
Where is a Subfolder mips which contains the actual code as odex file which I didn't touch.
We have some traces in the data folder :
\data\data\com.huami.watch.newsport
but not the voicefiles. So in my opinion the only way to get to this files is via replacing them in the NewWearSport.apk and installing the new version of this apk.
.
Click to expand...
Click to collapse
Thanks man - you know this stuff better than I do!
lfom said:
The version of the voice files in EN is missing some phrases in the new sport app, but the version in Spanish seems to be complete. I will do some tests today, trying to use ES+EN, so no words in CN...
Click to expand...
Click to collapse
Sounds good!
I just did a quick and dirty replace of the voices with ES + EN, still a few phrases in CN but I think that all of them are used only for VO2max which is deactivated on Pace.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root, code is for macOS/Linux, probably on Windows it will work if you use "adb.exe" instead of "adb" (untested), apk file must be in current directory.
Code:
adb root
adb remount
adb shell mv /system/app/NewWearSport/NewWearSport.apk /system/app/NewWearSport/NewWearSport.apk_OLD
adb push NewWearSport.apk /system/app/NewWearSport/
adb shell chmod 0644 /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
To revert:
Code:
adb root
adb remount
adb shell rm /system/app/NewWearSport/NewWearSport.apk
adb shell mv /system/app/NewWearSport/NewWearSport.apk_OLD /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
EDIT: attached file removed, please see other post in this thread with all EN version and scripts to install/uninstall.
lfom said:
I just did a quick and dirty replace of the voices with ES + EN, still a few phrases in CN but I think that all of them are used only for VO2max which is deactivated on Pace.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root, code is for macOS/Linux, probably on Windows it will work if you use "adb.exe" instead of "adb" (untested), apk file must be in current directory.
Code:
adb root
adb remount
adb shell mv /system/app/NewWearSport/NewWearSport.apk /system/app/NewWearSport/NewWearSport.apk_OLD
adb push NewWearSport.apk /system/app/NewWearSport/
adb shell chmod 0644 /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
To revert:
Code:
adb root
adb remount
adb shell rm /system/app/NewWearSport/NewWearSport.apk
adb shell mv /system/app/NewWearSport/NewWearSport.apk_OLD /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
Click to expand...
Click to collapse
You're a legend! Will try this out as soon as I get a chance.
Thanks!
le_lutin said:
You're a legend! Will try this out as soon as I get a chance.
Thanks!
Click to expand...
Click to collapse
Please test the attached file, all voices in EN high quality, with scripts to install/remove for macOS, Linux and Win. I haven't tested the BAT scripts, if someone test them, please report back. Thanks.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root (permanent or use temporary)
- Unpack file
- Open command line and change directory to the contents of the file
- To install run "sh install_en_voices.sh" for macOS/Linux or "install_en_voices.bat" for Windows
- To uninstall run "sh remove_en_voices.sh" for macOS/Linux or "remove_en_voices.bat" for Windows
When reboot, watch will re-optimise all app, it's normal, simply wait. No data will be affected.
lfom said:
Please test the attached file, all voices in EN high quality, with scripts to install/remove for macOS, Linux and Win. I haven't tested the BAT scripts, if someone test them, please report back. Thanks.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root (permanent or use temporary)
- Unpack file
- Open command line and change directory to the contents of the file
- To install run "sh install_en_voices.sh" for macOS/Linux or "install_en_voices.bat" for Windows
- To uninstall run "sh remove_en_voices.sh" for macOS/Linux or "remove_en_voices.bat" for Windows
When reboot, watch will re-optimise all app, it's normal, simply wait. No data will be affected.
Click to expand...
Click to collapse
Nice work, will add this to next WOS ROM.
Btw, note that I had some problems with voices using different bitrate, frecuency or channel number comparing to stock CN voices. I face several Bluetooth issues due to this, even bluetooth disconnections, so be advised.
Saratoga79 said:
Nice work, will add this to next WOS ROM.
Btw, note that I had some problems with voices using different bitrate, frecuency or channel number comparing to stock CN voices. I face several Bluetooth issues due to this, even bluetooth disconnections, so be advised.
Click to expand...
Click to collapse
Thanks. And thank you for all the work you've done for the Amazfit community as well. No problems with my testings yesterday, I did a walk and also indoor running for testing. But this was the initial version, a quick build for testing purposes. Many of phrases can be improved, maybe it's better to wait until it's finished.
Regards
I tried it today while running. I got no voicealerts.
Settings:
Bluetooth headset connected but no musicplayer started (music playing is working with bluetooth headset [verified]).
Run - Settings - Training target (not set)
- Alerts - Lap Alert - on
- HR Alert - above 170
- HR Zone - off
- Auto Lap Alert - on
- Pace Alert - off
more settings - Voice prompt - on
- Auto Pause - off
- Auto Lap - off
- Realtime Stats - Heartrate
- Data Screen - 6fields
- 3D Data - on
- BG Color - white
nhedgehog said:
I tried it today while running. I got no voicealerts.
Click to expand...
Click to collapse
I have tested with walk and indoor run and it worked with me, enabled most voice alerts and I could hear warning on pace, heartrate and distance. If you don't connect the headphones in the Accessories part of the activity settings, then try to start playing a music before you start the activity and then pause it using the headset to make sure it's activated.
nhedgehog said:
I tried it today while running. I got no voicealerts.
Settings:
Bluetooth headset connected but no musicplayer started (music playing is working with bluetooth headset [verified]).
Run - Settings - Training target (not set)
- Alerts - Lap Alert - on
- HR Alert - above 170
- HR Zone - off
- Auto Lap Alert - on
- Pace Alert - off
more settings - Voice prompt - on
- Auto Pause - off
- Auto Lap - off
- Realtime Stats - Heartrate
- Data Screen - 6fields
- 3D Data - on
- BG Color - white
Click to expand...
Click to collapse
Try with music, if there is a problem with voice files music will stop playing
Thanks for the support.
Headphones were connected and playing music fine before.
I think I have an idea whats wrong.
1) I run with airplane mode on but bluetooth activated. (PaceON)
2) I did not use the settings accessories to connect with the headphones but did it before with music.
3) Auto Lap - off
Have test this theorie further.
Saratoga79 said:
Nice work, will add this to next WOS ROM.
Btw, note that I had some problems with voices using different bitrate, frecuency or channel number comparing to stock CN voices. I face several Bluetooth issues due to this, even bluetooth disconnections, so be advised.
Click to expand...
Click to collapse
NewWearSport concatenates all the mp3 files needed to form the phrase in a temporary mp3 file.... these means that all mp3 files need to be same bitrate and with no headers (xing, id3, VBRI or another tags at the start or end of the file)

Categories

Resources