I successfully built a CWM with english for P6(But i have some problem) - Huawei Ascend P6, Mate

I can move up and down with the volume keys,But I can not use the power button controls the Enter key。So it just can move up and down but can't Confirm each command. I think the key values of this CWM is wrong.Everyone who can help me to build a CWM for P6 with correct key values and I will be very thank you.
Pictures:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

You need to modify recovery_ui.c before compiling CWM to alter KEY Mapping. Don't forget to define the below in your BoardConfig.mk beforehand.
Just swap out "KEY_MENU" for "KEY_POWER" within "recovery_ui.c"...
BoardConfig.mk:
Code:
BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/[B]*INSERT-MANUFACTURE-NAME[/B]/[B]*INSERT-DEVICE-NAME/recovery_ui.c[/B]
The only issue then you'll have is binding a back key map since as you know we're short a few keys, failing that build a Touch CWM recovery since this issue is addressed.
Bravo on getting a successful and bootable CWM build. Hats off to you sir.

can you help me to build a recovery Binaries.

zhenaguo said:
can you help me to build a recovery Binaries.
Click to expand...
Click to collapse
Another case is this, in BoardConfig.mk
Code:
BOARD_HAS_NO_SELECT_BUTTON := true
If you builded the cwm with their web builder, probably this is the error

can you help me to build a recovery binary.

zhenaguo said:
can you help me to build a recovery binary.
Click to expand...
Click to collapse
I can, but stickman89 know a lot more than me
Post here or pm, i'll try to help you

many thanks . i will pm to you and give you the files

zhenaguo said:
many thanks . i will pm to you and give you the files
Click to expand...
Click to collapse
I still need to complete the repo sync (i'm aroun 90%), pm it to stickman too, he already got all the enviroment set up

Either modify the existing "default_recovery_ui.c" located at [SOURCE FOLDER]/bootable/recovery/ and add the below: (Replace any existing entries if defined, do not remove unrelated entries otherwise)
Code:
int device_handle_key(int key_code, int visible) {
if (visible) {
switch (key_code) {
case KEY_DOWN:
case KEY_VOLUMEDOWN:
return HIGHLIGHT_DOWN;
case KEY_UP:
case KEY_VOLUMEUP:
return HIGHLIGHT_UP;
case KEY_ENTER:
case KEY_POWER:
return SELECT_ITEM;
}
}
return NO_ACTION;
}
for device reset after power button being pressed 5 times add the following to the same file on a new line and below the above entry:
Code:
int device_reboot_now(volatile char* key_pressed, int key_code) {
// Reboot if the power key is pressed five times in a row, with
// no other keys in between.
static int presses = 0;
if (key_code == KEY_POWER) { // power button
++presses;
return presses == 5;
} else {
presses = 0;
return 0;
}
}
or define your own recovery_ui.c via BoardConfig.mk and setup your own. Obviously were missing a return/back key so perhaps building against Touch Recovery is a better idea.
...For now the above should suffice.

Stickman89 said:
Either modify the existing "default_recovery_ui.c" located at [SOURCE FOLDER]/bootable/recovery/ and add the below: (Replace any existing entries if defined, do not remove unrelated entries otherwise)
Code:
int device_handle_key(int key_code, int visible) {
if (visible) {
switch (key_code) {
case KEY_DOWN:
case KEY_VOLUMEDOWN:
return HIGHLIGHT_DOWN;
case KEY_UP:
case KEY_VOLUMEUP:
return HIGHLIGHT_UP;
case KEY_ENTER:
case KEY_POWER:
return SELECT_ITEM;
}
}
return NO_ACTION;
}
for device reset after power button being pressed 5 times add the following to the same file on a new line and below the above entry:
Code:
int device_reboot_now(volatile char* key_pressed, int key_code) {
// Reboot if the power key is pressed five times in a row, with
// no other keys in between.
static int presses = 0;
if (key_code == KEY_POWER) { // power button
++presses;
return presses == 5;
} else {
presses = 0;
return 0;
}
}
or define your own recovery_ui.c via BoardConfig.mk and setup your own. Obviously were missing a return/back key so perhaps building against Touch Recovery is a better idea.
...For now the above should suffice.
Click to expand...
Click to collapse
I have upload the kernel and recovery.fstab to mediafire disk.There are two versions.one i named Kernel1_international_version.The others i named kernel2_Chinese_version.I am sure that each recovery.fstab of them is correct written.So,please help to to build a recovery binary for them.or you can post to someone who can do this work.I will be very thank you.Here is the link:
1.http://www.mediafire.com/download/r3zpk2cq5efv8dx/Kernel1_international_version.zip
2.http://www.mediafire.com/?eydeecerp7dzy7d

Your .fstab looks fine for international version
This **** repo still syncing

zhenaguo said:
I have upload the kernel and recovery.fstab to mediafire disk.There are two versions.one i named Kernel1_international_version.The others i named kernel2_Chinese_version.I am sure that each recovery.fstab of them is correct written.So,please help to to build a recovery binary for them.or you can post to someone who can do this work.I will be very thank you.Here is the link:
1.http://www.mediafire.com/download/r3zpk2cq5efv8dx/Kernel1_international_version.zip
2.http://www.mediafire.com/?eydeecerp7dzy7d
Click to expand...
Click to collapse
How on earth did you flash CWM Recovery without Huawei signing it?
We need to know the procedure you used and any other modifications to CWM source you specifically made in order to get this booting on our device.
Your environment is clearly working, would make more sense if you made these changes. The method
S34Qu4K3 gave in terms of a simple one line fix to BoardConfig.mk will allow CWM selection or alternatively use my method which required a bit more interaction.

I bet that's the Honor 2 CWM (or a huawei dev ;D)
What about CWM builder? Touch recovery should work right? I know, that the power button issue is in the non touch recovery provided by the builder

Zhenaguo add this line to your BoardConfig.mk: (as suggested by S34Qu4K3)
Code:
BOARD_HAS_NO_SELECT_BUTTON := true
It's that simple. If that doesn't work provide me with the following file: /bootable/recovery/default_recovery_ui.c and I'll make the required modifications for our button mapping.
Without knowing how you bypassed encryption to flash said recovery our efforts won't be at all effective.
Since your able to successfully build a bootable CWM you may as well make the above simple modification.

zhenaguo, Hello previously encountered the same problem as you, but was able to resolve it on U9510E, the machine with the same architecture. if you can help it, you would appreciate your help on my phone

Sorry for the off topic but do you think that we 'll be able to use it or as a base for the ascend mate?

ollden said:
Sorry for the off topic but do you think that we 'll be able to use it or as a base for the ascend mate?
Click to expand...
Click to collapse
i guess so. in my U9510 this apk working.

Related

keyboard fix needed!

hi guys, i already attempted to solve my problem by asking in some topics here, but it's like nobody reads my post...
I've downloaded the 6.1 rom update, and wow, thats a beauty, but i have a quite unknown problem with it, i'm using an azerty keyboard version of the excalibur, quite rare in the excalibur world, and, like you will probably gues, the keyboard is typing qwerty, and not azerty...
I looked at keyboard mapping, but thats al for qwerty keyboards, so im nowhere...
sorry for my English it probably sucks cuz i'm just a belgian student
cheers, and thanks!
I will try to look for a fix for this and get back to you as soon as I can. And for your english its okay, I understood what you are looking for.
In the sticky for remapping that you also posted in it says in post #22 that there is a zip file of cabs files for different layouts for different regions. I don't know if they are azerty, but you could start there. If not then in post #27 you could try flashing back to your old original Rom and look for those files and copy or safe them then flash back. Otherwise I would say no 6.1
You may find the person who altered the xT9 to Portugueses may be able to help? Worth a PM.
hey jdoggraz thanks allot man, finally someone who try's to help me!
@pfunkside, i tested those files already, and they didn't work, and about turning back to 6.0: no way! i just like 6.1
@stylez, yeah, maybe, but thats a qwerty keyboard, and with portugueses letters, so it probably won't work...
But, thanks allot so far guys!
if nothing else works, couldnt you just edit the keymap?
gospeed.racer said:
if nothing else works, couldnt you just edit the keymap?
Click to expand...
Click to collapse
Thats why i said about the person who edited to Portugueses as you would just have to edit everything to azerty
it's possible, but i'm a real noob with that, and it's hard to understand how to do it, becaus i'm not english speaking, that's why i'm asking for someone who can do that for me, that should be wonderfull, and help others with the azerty problem.
best regards, Samuel.
here is how the keymap looks, this is an English example. You can see, it even shows you how the values are assigned. You would just need to cross reference what the values are on the different keyboards and change the values to match.
You may get lucky and find someone that has already done this, but if you have a couple hours you could probably get it working pretty easily even if its your first time. Note, you should reboot the device after changing the keymap
Code:
//
// N O T E: This file must be saved as Unicode
//
// This file contains the virtual keys mapping table for the
// Excalibur device. The mapping table is define as follow
//
// VK_TPOUND = 0x78
// VK_TSTAR = 0x77
// VK_TAB = 0x09
//
// We do not support escape value yet. So the key/char values should be
// entered explicitly or by encoding start with 0x
//
// Format:
// {VK VK' CH1 CH2}
// VK -> value from keyboard driver
// VK' -> printed on keys
// CH1 -> symbols produced by Fn + key
// CH2 -> symbols in 123 mode
// KeyIndex -> matched the kdb key index, 0xff -> no key index
{Q Q % % 0x00}
{1 W 1 1 0x01}
{2 E 2 2 0x02}
{3 R 3 3 0x03}
{T T + + 0x04}
{Y Y ( ( 0x05}
{U U ) ) 0x06}
{I I - - 0x07}
{O O _ _ 0x08}
{P P " " 0x09}
{0x78 A # # 0x0a} // VK_TPOUND maps to Device Button A
{4 S 4 4 0x0b}
{5 D 5 5 0x0c}
{6 F 6 6 0x0d}
{G G / / 0x0e}
{H H ? ? 0x0f}
{J J @ @ 0x10}
{K K $ $ 0x11}
{L L = = 0x12}
{0x77 Z * * 0x13} // VK_TSTAR maps to Z
{7 X 7 7 0x14}
{8 C 8 8 0x15}
{9 V 9 9 0x16}
{B B ' ' 0x17}
{N N & & 0x18}
{M M ! ! 0x19}
{0xBC , ; ; 0xff} // 0xBC = VK_COMMA
{0xBE . : : 0xff} // 0xBE = VK_PERIOD
{0 0x09 0 0 0xff} // 0x30 = VK_TAB
{0xE9 0xE9 0xC1 0xC1 0xff} // Launch Camera with Fn
yeah, it seams simple, but for me it isn't problem is, i don't really have time to do it, but i'll try soon if i have some time, thanks man!
I also hope i dont kill my machine
shoot, can't fix it... i need a pro!
grtz
someone?
Ummm so did you try to fix it?
yeah, but i'm a real noob and i really dont understand anything of that mapping, i really need a pro, but, you'll probably all think i'm just to lazy to do it by myselve, but i realy don't have time to do it and the skills to do it...
Copy eT9-Full.cab to your device and run it from there - this patch fixes keyboard mapping problems with the original install.
already done that, but thats a patch for qwerty keyboards
come on, there has to be one pro who can fix this?
acropilot said:
already done that, but thats a patch for qwerty keyboards
come on, there has to be one pro who can fix this?
Click to expand...
Click to collapse
Oh so you want the azerty, I will see what I can do and work on this if I have some spare time.
Also, can you please give me the layout of the azerty or of your keyboard like possibly take a picture and post it on here of your keyboard so I can adjust it accordingly.
here you go:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thanks man, you rock!
outragis said:
Copy eT9-Full.cab to your device and run it from there - this patch fixes keyboard mapping problems with the original install.
Click to expand...
Click to collapse
a question on that:
i have german S620 using german WM6. I'm curious of upgrading to 6.1, but i have a qwertz-keyboard (so german layout model.) is it possible to keep that layout with a cab, too.?
Well, just read the "german fix" thread just below this one, and there seem still to be issues with the layout and some letters not shown in symbols map. .... seems, i gotta keep wm6 for now.

Will this java code work?

I have a new question, so i guess i'l just change the thread title and put my question here instead of making a new thread.
I'm editing the NetworkController.java file in /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ of the Jellybean source synced from Google's android repository.
Will this work?
Code:
case TelephonyManager.NETWORK_TYPE_UMTS:
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
if (mHspaDataDistinguishable) {
mDataIconList = TelephonyIcons.DATA_H[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_h;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3_5g);
} else {
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
}
break;
case TelephonyManager.NETWORK_TYPE_HSPAP:
mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_4g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_4g);
break;
The original is here:
Code:
case TelephonyManager.NETWORK_TYPE_UMTS:
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
case TelephonyManager.NETWORK_TYPE_HSPAP:
if (mHspaDataDistinguishable) {
mDataIconList = TelephonyIcons.DATA_H[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_h;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3_5g);
} else {
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
}
break;
-----------------------------------------------------------------------------Snip---------------------------------------------------------------------------------------
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(email blanked, but is a working email)
Kept asking me for my name and email, was trying to access the android source repository.
Not sure what keywords to search for, but i did try "repo identity loop" which net me nothing.
Did tried to Google, but did not see anything that may look like a solution to my problem.
I'm completely new to these kind of things, so i'm not sure what keyword to search for.
Up to the first page.
Anyone?
Pressed from my BANNED unified search enabled Maguro
Anyone?
Pressed from my BANNED unified search enabled Maguro
seems to me you haven't introduced yourself to git.
edit: link
bk201doesntexist said:
seems to me you haven't introduced yourself to git.
edit: link
Click to expand...
Click to collapse
Thanks, will try it out now
Thanks again, worked now
Updated OP with a new question and changed the thread title.
Anyone knows?
Pressed from my BANNED unified search enabled Maguro
Its hard to tell cause I can't see the changed code vs original code. But it doesn't really work that way. Even an expert would miss something like an incorrect variable or any random code error. The only way to do this type of change is compile it. Compile the stock code first, then the changes. When you get no errors or warnings is when you flash the apk to the device to test.
This is how I've done it in the past. And yes GitHub diff would be best way to show this. Also, since you're only dealing with one package you just have to compile that one apk to test which is very simple compared to whole ROM or kernel. Just run the make command on your package with the changed code.
RogerPodacter;2869t204 said:
Its hard to tell cause I can't see the changed code vs original code. But it doesn't really work that way. Even an expert would miss something like an incorrect variable or any random code error. The only way to do this type of change is compile it. Compile the stock code first, then the changes. When you get no errors or warnings is when you flash the apk to the device to test.
This is how I've done it in the past. And yes GitHub diff would "e best way to show this. Also, since you're only dealing with one package you just have to compile that one apk to test which is very simple compared to whole ROM or kernel. Just run the make command on your package with the changed code.
Click to expand...
Click to collapse
Both the edited and original code is there, but i do agree with you on compiling the apk. I'm compiling a SystemUI.apk btw.
I tried compiling yesterday night, but I can't seem to figure out this part:
Code:
cd device/samsung/maguro/
./extract-files.sh
Mach3.2 said:
Both the edited and original code is there, but i do agree with you on compiling the apk. I'm compiling a SystemUI.apk btw.
I tried compiling yesterday night, but I can't seem to figure out this part:
Code:
cd device/samsung/maguro/
./extract-files.sh
Click to expand...
Click to collapse
It's hard to know without the context but IIRC, that's to copy proprietary binaries over to your working directory (I know this is relevant for Cyanogenmod, don't think it works in AOSP as the sh file doesn't exist).
Originally Posted by Mach3.2
Both the edited and original code is there, but i do agree with you on compiling the apk. I'm compiling a SystemUI.apk btw.
I tried compiling yesterday night, but I can't seem to figure out this part:
cd device/samsung/maguro/
./extract-files.sh
Click to expand...
Click to collapse
It's hard to know without the context but IIRC, that's to copy proprietary binaries over to your working directory (I know this is relevant for Cyanogenmod, don't think it works in AOSP as the sh file doesn't exist).
Click to expand...
Click to collapse
Are you talking about hardware binaries? I downloaded the hardware binaries from AOSP and extracted them using terminal already.
Sorry if I sound like I'm trolling but I'm really new to these kind of things and just trying things out.
Pressed from my BANNED unified search enabled Maguro
You shouldn't need to run the extract files.sh script unless your compiling a whole kernel or ROM.
I think literally all you have to do is sync to the repo that you got that code from. And run the make command in the root of the repo file structure.
Of course it looks like you might be setting up your build setup following one of the tutorials. So get that finished. Then instead of running make on a kernel, run it on your telephone package app.
RogerPodacter said:
You shouldn't need to run the extract files.sh script unless your compiling a whole kernel or ROM.
I think literally all you have to do is sync to the repo that you got that code from. And run the make command in the root of the repo file structure.
Of course it looks like you might be setting up your build setup following one of the tutorials. So get that finished. Then instead of running make on a kernel, run it on your telephone package app.
Click to expand...
Click to collapse
I'll Google once I get home, thanks.
Pressed from my BANNED unified search enabled Maguro
Mach3.2 said:
Are you talking about hardware binaries? I downloaded the hardware binaries from AOSP and extracted them using terminal already.
Sorry if I sound like I'm trolling but I'm really new to these kind of things and just trying things out.
Pressed from my BANNED unified search enabled Maguro
Click to expand...
Click to collapse
Yep those, however I think the sh file pulls some other ones as well e.g. NFC, GPS etc. as Google does not provide them at this point in time.
RogerPodacter said:
You shouldn't need to run the extract files.sh script unless your compiling a whole kernel or ROM.
I think literally all you have to do is sync to the repo that you got that code from. And run the make command in the root of the repo file structure.
Of course it looks like you might be setting up your build setup following one of the tutorials. So get that finished. Then instead of running make on a kernel, run it on your telephone package app.
Click to expand...
Click to collapse
EDIT: Don't worry, it was only relevant for ROM/kernel development.
Unlawful said:
Yep those, however I think the sh file pulls some other ones as well e.g. NFC, GPS etc. as Google does not provide them at this point in time.
You missed one very important step: attaining proprietary binaries which is what the .sh file does. AOSP is full open source meaning it doesn't include any of the prorietary stuff e.g. Google apps, binaries for hardware etc. Also you might want to setup ccache so that it can rebuild a lot faster as well as other environment settings.
Click to expand...
Click to collapse
But I thought he doesn't need the proprietary binaries since he's just trying to build a package apk. I thought you only need the extract files sh script if you want to build and flash your own kernel/ROM.
Unlawful said:
It's hard to know without the context but IIRC, that's to copy proprietary binaries over to your working directory (I know this is relevant for Cyanogenmod, don't think it works in AOSP as the sh file doesn't exist).
Click to expand...
Click to collapse
It's also relevant for AOSP: extract-files.sh is a bash script written by JBQ (Google Software Engineer), designed to pull binaries from a stock rom running on the device. We don't have permission to use this script.
CM also has a extract-files.sh based of it, although theirs has been changed, to fit every other device that is supported by CM team, that needs binaries to work.
RogerPodacter said:
But I thought he doesn't need the proprietary binaries since he's just trying to build a package apk. I thought you only need the extract files sh script if you want to build and flash your own kernel/ROM.
Click to expand...
Click to collapse
This.
:good:
Ok thanks guys, will try it out once I have some free time.
RogerPodacter said:
But I thought he doesn't need the proprietary binaries since he's just trying to build a package apk. I thought you only need the extract files sh script if you want to build and flash your own kernel/ROM.
Click to expand...
Click to collapse
Oops, you're right. I neglected the whole OP and just focused on the sh script
Erm, is it accurate to say that my code did not work since the SystemUI.apk crashed?
I replaced the SystemUI.apk in stock 4.1.1 OTA from takju.

WP7 Shell, Console, Batch files interpreter

Hi Friends.
Standard Cmd.exe seems not working on WP7 probably by any restrictions, then we need own solution. There is a simple WP7 console (paied!!!), but this is childer game only, not a real working tool (some connection features from it are so usable).
There is one BIG problem on CE based systems - Shell context absention, especially Current Directory concept miss. Rainer Keuchel's CELib and Console solves it by ENVIRONMENT registry key, common for every console instance. Desktop Windows / POSIX systems concept of many unique shell contexts is very hard implementable here.There is not problem to make new context in registry - this can be unique key, contain all included processes IDs, environment structure and especially current directory path. But, somebody must release this context, when all processes finish. It can not be user applications dependent, any kernel "garbage collector" must be implemented for it. And, how to refer context to launched process? What do you mean about it - is better simple one context shell then nothing, or long work on multicontext solution?
Another problem is popen and pipes absention on WP7 system. I finished very simple solution last weak, based on stdout to file redirecting, which Microsoft forgets in WP7 API from WM6 one. Then we can make simply dedicated applications (dir.exe, set.exe, copy.exe, delete.exe etc.) in \Windows directory, callable by standard ShellExecuteEx, enrolling ouptut do stdout by printf etc. But, is it good solution? Have you got anybody real pipes working on WP7?
Working console appplication with bath files interpreter give us big possibilities for on-device attempts and programming, simple installators/deinstallators building, WP7 Perl, HaRET, Linux, WM, WinRT, WP8 wrappers working etc. It is not problem now to runs anything in kernel mode on WP7. Are you somebody able to cooperate include native coding? We can make real operating system from Microsoft fart bag named WP7.
Martin7Pro said:
Hi Friends.
Standard Cmd.exe seems not working on WP7 probably by any restrictions, then we need own solution. There is a simple WP7 console (paied!!!), but this is childer game only, not a real working tool (some connection features from it are so usable).
There is one BIG problem on CE based systems - Shell context absention, especially Current Directory concept miss. Rainer Keuchel's CELib and Console solves it by ENVIRONMENT registry key, common for every console instance. Desktop Windows / POSIX systems concept of many unique shell contexts is very hard implementable here.There is not problem to make new context in registry - this can be unique key, contain all included processes IDs, environment structure and especially current directory path. But, somebody must release this context, when all processes finish. It can not be user applications dependent, any kernel "garbage collector" must be implemented for it. And, how to refer context to launched process? What do you mean about it - is better simple one context shell then nothing, or long work on multicontext solution?
Another problem is popen and pipes absention on WP7 system. I finished very simple solution last weak, based on stdout to file redirecting, which Microsoft forgets in WP7 API from WM6 one. Then we can make simply dedicated applications (dir.exe, set.exe, copy.exe, delete.exe etc.) in \Windows directory, callable by standard ShellExecuteEx, enrolling ouptut do stdout by printf etc. But, is it good solution? Have you got anybody real pipes working on WP7?
Working console appplication with bath files interpreter give us big possibilities for on-device attempts and programming, simple installators/deinstallators building, WP7 Perl, HaRET, Linux, WM, WinRT, WP8 wrappers working etc. It is not problem now to runs anything in kernel mode on WP7. Are you somebody able to cooperate include native coding? We can make real operating system from Microsoft fart bag named WP7.
Click to expand...
Click to collapse
Pocket CMD from CE7 ARMv7 works fine via telnet. Tested on my Samsung Omnia 7 and Jaxbot's Samsung Focus. You can see it in action in this screenshot: http://windowsphonehacker.com/articles/all_in_a_days_work-03-03-13
Do I have to rename the zip tp xap and install normally?
No. If you don't know how to install it you probably don't need it as it creates a huge security risk on your phone.
Hmm... , interesting. The same exe in other configuratin I tested on my phones in the past with result : "Too much console ones work immediatelly, close any and try again".
Do you know (or is possible to code) telnet WP7 client, functioning on the same IP as server? Especially with hardware keyboard support?
Martin7Pro said:
Hmm... , interesting. The same exe in other configuratin I tested on my phones in the past with result : "Too much console ones work immediatelly, close any and try again".
Do you know (or is possible to code) telnet WP7 client, functioning on the same IP as server? Especially with hardware keyboard support?
Click to expand...
Click to collapse
Silverlight apps can not connect to localhost, it has been blocked.
Simple batch line interpreter
I tried cmd.exe batch and arguments calling, but it seems does not working for me. Then I will try own attempt.
Single batch line interpreter (*.bat files interpreting precursor):
SHLine.cpp
PHP:
// SHLine.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
//#include <atlstr.h>
/*CString*/
#ifdef _DEBUG
#pragma comment (lib, "libcmtd.lib")
#else
#pragma comment (lib, "libcmt.lib")
#endif
/*CString*/
#include <list>
using namespace std;
typedef list<CString> StringList;
#define SEE_MASK_NOASYNC (0x00000100)
CString ErrorString(DWORD err)
{
CString Error;
try
{
LPTSTR s;
if (::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, err, 0, (LPTSTR)&s, 0, NULL) == 0)
{
Error.AppendFormat(TEXT("Error code : %X"), err);
} /* failed */
else
{ /* success */
LPTSTR p = _tcschr(s, _T('\r'));
if(p != NULL)
{ /* lose CRLF */
*p = _T('\0');
} /* lose CRLF */
Error = s;
::LocalFree(s);
} /* success */
return Error;
}
catch (...)
{
Error.AppendFormat(TEXT("Error code : %X"), err);
return Error;
}
}
HRESULT ShellExecuteWait(const wchar_t * file, const wchar_t * args, long lTimeout)
{
TRACE(L"ShellExecuteWait file=%s, args=%s, long lTimeout=%X\n", file, args, lTimeout);
try
{
SHELLEXECUTEINFO lpExecInfo;
memset(&lpExecInfo, 0, sizeof(SHELLEXECUTEINFO));
lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = file;
lpExecInfo.lpParameters = args;
lpExecInfo.lpDirectory = _T("");
lpExecInfo.lpVerb = _T("open");
lpExecInfo.nShow = SW_MINIMIZE;
lpExecInfo.fMask = 0;
lpExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC;// | SEE_MASK_FLAG_DDEWAIT;//0; lpExecInfo.hwnd = NULL;
lpExecInfo.hInstApp = NULL;//AfxGetInstanceHandle();
if(!ShellExecuteEx(&lpExecInfo))
{
DWORD err = GetLastError();
TRACE(L"ShellExecuteEx Error %d %s\n", err, ErrorString(err));
/// Sleep(100);
return (HRESULT)err;//ERROR_SUCCESS;
}
if (lpExecInfo.hProcess > 0)
{
TRACE(L"ShellExecuteEx WaitForSingleObject hProcess=%X\n", lpExecInfo.hProcess);
DWORD res = ::WaitForSingleObject(lpExecInfo.hProcess, lTimeout/*INFINITE*/);//5000);
TRACE(L"WaitForSingleObject lTimeout=%X, res=%X\n", lTimeout, res);
/// Sleep(100);
if (lTimeout != INFINITE && res != WAIT_OBJECT_0)
{
TerminateProcess(lpExecInfo.hProcess, 0);
TRACE(L"TerminateProcess;\n");
}
CloseHandle(lpExecInfo.hProcess);
}
TRACE(L"return ERROR_SUCCESS;\n");
return ERROR_SUCCESS;
}
catch (...)
{
DWORD err = 0x80070000 | GetLastError();
MessageBox(NULL, ErrorString(err), _T("ShellExecuteWait Error"), MB_OK);
return ERROR_SUCCESS;//(HRESULT)err;
}
}
StringList GetPathList(StringList & slPathList)
{
slPathList.clear();
slPathList.push_front(L"Program Files"); // Only for testing. HKCU\Environment PATH value will splitted instead;
slPathList.push_front(L"My Documents");
return slPathList;
}
CString GetCurrentDirectory(CString & csCurDir)
{
csCurDir = L"Program Files\\SHLine"; // Only for testing. HKCU\Environment CurrentDirectory value will readed instead;
return csCurDir;
}
bool FileExists(const wchar_t * file)
{
WIN32_FIND_DATA FindFileData;
HANDLE hFile = ::FindFirstFile(file, &FindFileData) ;
bool bFound = (hFile && (hFile != INVALID_HANDLE_VALUE));
if(bFound)
{
::FindClose(hFile);
}
return bFound;
}
int _tmain(int argc, _TCHAR* argv[])
{
TRACE(L"_tmain(int argc=%d);\n", argc);
if (argc > 1 && argv[1])
{
CString csRunPath = argv[1];
CString csRunArgs = L"";
if (argc > 2 && argv[2])
{
csRunArgs = argv[2];
for (int i = 3; i <= argc; i++)
{
if (argv[i])
{
csRunArgs = csRunArgs + L" " + argv[i];
}
}
}
CString csCurDir;
GetCurrentDirectory(csCurDir);
HRESULT hRes = ERROR_FILE_NOT_FOUND;
CString csFN = L"\\"+csCurDir+L"\\"+csRunPath/*.GetString()*/;
if (FileExists(csFN))
{
hRes = ShellExecuteWait(csFN, csRunArgs/*.GetString()*/, 60000);
}
if (hRes == ERROR_FILE_NOT_FOUND)
{
csFN = L"\\"+csRunPath;
CString csWin = L"\\Windows\\"+csRunPath;
if (FileExists(csFN) || FileExists(csWin))
{
hRes = ShellExecuteWait(csFN, csRunArgs, 60000); // Full path specified or file is known for CE Shell (included to \\Windows\ directory)
}
if (hRes == ERROR_FILE_NOT_FOUND)
{
StringList slPathList;
GetPathList(slPathList);
DWORD dwPath = 0;
for (StringList::iterator itPath = slPathList.begin(); itPath != slPathList.end(); ++itPath)
{
csFN = L"\\"+*itPath+L"\\"+csRunPath;
if (FileExists(csFN))
{
hRes = ShellExecuteWait(csFN, csRunArgs, 60000);
}
}
}
}
TRACE(L"_tmain returns 0x%X;\n", hRes);
return hRes;
}
TRACE(L"_tmain returns E_INVALIDARG;\n");
return E_INVALIDARG;
}
This interpret will be uploaded to \Windows directory to be used by any appplication. One can be batch files interpreter (call this shell with all lines as paramters), or do any controlling (lines can contain controlling directives as cycles etc.). The .bat extension registering is soluted by CE standard way on unlocked phones.
CD.exe, DIR.exe, ..., etc programs will add standard shell functionality. Output (directories listing etc.) will soluted by stdout file forwarding.
In this way one only shell interpreting application (one current directory only) will allowed immeditelly. Better something then nothing.
EDIT:
I have got batch interpreter working. But, very strange behaviour occures:
1. AygShell does not add exe extension automatically. Then I copied "copy.exe" to "\Windows\copy" etc. It works well. But, it does not work for "start" directive! Start is necessary for Iexplore and other "uncloseable" applications launching to prevent interpreter hanging up. It is interesting too "start.exe" (or "start") everytime renames automatically to "Start" with upcased first letter. Probably "\Windows\Start.html" causes this system behaviour.
2. std::list iterating for multi batch lines interpreting crashes everytime, when lauchched application contains any messagebox. Iterating replacing by numerous cyclus soles it. Unbelievable...
I will publish XAP as soon as. Any filemanager can be used for batch lauching after instllation. I recommend Phone Commander, which is able not only launch, but also edit *.bat files.
Non XAP preliminary beta for testers
1. Copy included files to \Windows directory.
2. Apply registry changes by Batch.reg (can be did automatically from Phone Commander etc.).
3. Try tap to Example.bat from any filemanager (Phone Commander, WP7 Root Tools, wPhoExplorer etc.).
4. Make your own scripts (you can use also automatical shell creating function from Phone Commander menu, rename *.sh file to *.bat and edit it's content by Phone Commander "View" edit function by pencil icon).
"start" and "copy" directives only are implemented still. "copy" is implemented with source and destionation parameters only (copies everytime), switches will added in future versions.
start "filename" [params] = nonblocking shell starting
"filename" [params] (without "start") = blocking shell starting, it waits to application closing (danger for iexplore and any other "uncloseable" applications, use "start" instead). It blocks NonDDE shell directives, DDE (pword.exe, other Office applications, etc.) are nonblocking everytime by principle.
"copy" directive + *.reg files interpreter can be used for simple installator creating for your native applications.
The same principle will used for universal scheduler (for example "switch on wifi every monday morning, switch off ringing and wifi tethering every friday evening" etc.).
"SHLine" part is offered for all console application creators (it interprets one batch line). Use stdout file redirect and ShellExecuteEx(...,L"SHLine.exe",User console input line,...);
jessenic said:
Pocket CMD from CE7 ARMv7 works fine via telnet. Tested on my Samsung Omnia 7 and Jaxbot's Samsung Focus. You can see it in action in this screenshot: http://windowsphonehacker.com/articles/all_in_a_days_work-03-03-13
Click to expand...
Click to collapse
Thanks for a tip. There is working on device Telnet xap screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Xap release will published, when I solute HaRET and Pocket CMD listing switch.
XAP is released.
Download from HaRET WP7 thread.
Console Big Update - try Ping, IPConfig, NetStat, WLanUtils etc.
New Console7 version can offer to you many usable utilities, as cgacutil, etcha, ipconfig, ipconfig6, ipv6, kbdtest, msmqadm, ndisconfig, net, netlogctl, netstat, ping, rnaapp, route, services, shell, tracert, upnpreg and wlantool. With simply user interface you can write commands (or batch or Mort scripts) with big possibilities as on desktop Windows.
Console7 is not so dangerous as HaRET, but you still keep in mind that it can also destroy your operating system and possibly device ...
1. Install XAP.
2. Enable it by Root Manager.
3. Tap to Upeer screen part, tap to Menu button, slide menu left and select "Install pocketcmd shell etc."
4. Wait to reboot.
5. Wait to automatical Console7 start.
6. Type commands in bottom textbox and send it by Enter key. HELP command is available.
7. Try standard commands. Use help , help cmd commands to see full list.
8. Try additional features. Use help, for example:
ipconfig /?
Also copy, delete, etcha. ipconfig, ipconfig6, ipv6, kbdtest, launchuri, md, messagebox, msmqadm, ndisconfig, net, netlogctl, netstat, ping, reboot, regimport, rnaapp, route, services, shell, start, startback, tracert, upnpreg, wlantool directives are offered, some with help by /?.
9. Try Batch and Mort script making by PhoneCommander editor. Batch files (*.bat) are registered authomatically by Console7 installing. MortScripts installator will available as soon as.
10. When you want to risc device Hard Reset, try also "install haret and kernel driver".
11. Try HaRET/Shell switching by yellow buttons.
Remember: PocketCMD using is relatively safe (when you will not delete any system files or directories), but HaRET may be very danger still! Use both on your own risc.

Intermediate: How to Integrate Location Kit into Hotel booking application

Introduction
This article is based on Multiple HMS services application. I have created Hotel Booking application using HMS Kits. We need mobile app for reservation hotels when we are traveling from one place to another place.
In this article, I am going to implement HMS Location Kit & Shared Preferences.
View attachment 5230279
Flutter setup
Refer this URL to setup Flutter.
Software Requirements
1. Android Studio 3.X
2. JDK 1.8 and later
3. SDK Platform 19 and later
4. Gradle 4.6 and later
Steps to integrate service
1. We need to register as a developer account in AppGallery Connect.
2. Create an app by referring to Creating a Project and Creating an App in the Project
3. Set the data storage location based on current location.
4. Enabling Required Services: Location Kit.
5. Generating a Signing Certificate Fingerprint.
6. Configuring the Signing Certificate Fingerprint.
7. Get your agconnect-services.json file to the app root directory.
Important: While adding app, the package name you enter should be the same as your Flutter project’s package name.
Note: Before you download agconnect-services.json file, make sure the required kits are enabled.
Development Process
Create Application in Android Studio.
1. Create Flutter project.
2. App level gradle dependencies. Choose inside project Android > app > build.gradle.
Code:
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
Root level gradle dependencies
Code:
maven {url 'https://developer.huawei.com/repo/'}
classpath 'com.huawei.agconnect:agcp:1.4.1.300'
Add the below permissions in Android Manifest file.
Code:
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="com.huawei.hms.permission.ACTIVITY_RECOGNITION" />
<application ...
</manifest>
3. Refer below URL for cross-platform plugins. Download required plugins.
https://developer.huawei.com/consum...y-V1/flutter-sdk-download-0000001050304074-V1
4. After completing all the steps above, you need to add the required kits’ Flutter plugins as dependencies to pubspec.yaml file. You can find all the plugins in pub.dev with the latest versions.
Code:
dependencies:
flutter:
sdk: flutter
shared_preferences: ^0.5.12+4
bottom_navy_bar: ^5.6.0
cupertino_icons: ^1.0.0
provider: ^4.3.3
huawei_location:
path: ../huawei_location/
flutter:
uses-material-design: true
assets:
- assets/images/
5. After adding them, run flutter pub get command. Now all the plugins are ready to use.
6. Open main.dart file to create UI and business logics.
Location kit
HUAWEI Location Kit assists developers in enabling their apps to get quick and accurate user locations and expand global positioning capabilities using GPS, Wi-Fi, and base station locations.
Fused location: Provides a set of simple and easy-to-use APIs for you to quickly obtain the device location based on the GPS, Wi-Fi, and base station location data.
Activity identification: Identifies user motion status through the acceleration sensor, cellular network information, and magnetometer, helping you adjust your app based on user behaviour.
Geofence: Allows you to set an interested area through an API so that your app can receive a notification when a specified action (such as leaving, entering, or lingering in the area) occurs.
Integration
Permissions
First of all we need permissions to access location and physical data.
Create a PermissionHandler instance,add initState() for initialize.
Code:
final PermissionHandler permissionHandler;
@override
void initState() {
permissionHandler = PermissionHandler(); super.initState();
}
Check Permissions
We need to check device has permission or not using hasLocationPermission() method.
Code:
void hasPermission() async {
try {
final bool status = await permissionHandler.hasLocationPermission();
if(status == true){
showToast("Has permission: $status");
}else{
requestPermission();
}
} on PlatformException catch (e) {
showToast(e.toString());
}
}
If device don’t have permission,then request for Permission to use requestLocationPermission() method.
Code:
void requestPermission() async {
try {
final bool status = await permissionHandler.requestLocationPermission();
showToast("Is permission granted");
} on PlatformException catch (e) {
showToast(e.toString());
}
}
Fused Location
Create FusedLocationPrvoiderClient instance using the init() method and use the instance to call location APIs.
Code:
final FusedLocationProviderClient locationService
@override
void initState() {
locationService = FusedLocationProviderClient(); super.initState();
}
getLastLocation()
Code:
void getLastLocation() async {
try {
Location location = await locationService.getLastLocation();
setState(() {
lastlocation = location.toString();
print("print: " + lastlocation);
});
} catch (e) {
setState(() {
print("error: " + e.toString());
});
}
}
getLastLocationWithAddress()
Create LocationRequest instance and set required parameters.
Code:
final LocationRequest locationRequest;
locationRequest = LocationRequest()
..needAddress = true
..interval = 5000;
void _getLastLocationWithAddress() async {
try {
HWLocation location =
await locationService.getLastLocationWithAddress(locationRequest);
setState(() {
String street = location.street;
String city = location.city;
String countryname = location.countryName;
currentAddress = '$street' + ',' + '$city' + ' , ' + '$countryname';
print("res: $location");
});
showToast(currentAddress);
} on PlatformException catch (e) {
showToast(e.toString());
}
}
Location Update using Call back
Create LocationCallback instance and create callback functions in initstate().
Code:
LocationCallback locationCallback;
@override
void initState() {
locationCallback = LocationCallback(
onLocationResult: _onCallbackResult,
onLocationAvailability: _onCallbackResult,
);
super.initState();
}
void requestLocationUpdatesCallback() async {
if (_callbackId == null) {
try {
final int callbackId = await locationService.requestLocationUpdatesExCb(
locationRequest, locationCallback);
_callbackId = callbackId;
} on PlatformException catch (e) {
showToast(e.toString());
}
} else {
showToast("Already requested location updates.");
}
}
void onCallbackResult(result) {
print(result.toString());
showToast(result.toString());
}
I have created Helper class to store user login information in locally using shared Preferences class.
Code:
class StorageUtil {
static StorageUtil _storageUtil;
static SharedPreferences _preferences;
static Future<StorageUtil> getInstance() async {
if (_storageUtil == null) {
var secureStorage = StorageUtil._();
await secureStorage._init();
_storageUtil = secureStorage;
}
return _storageUtil;
}
StorageUtil._();
Future _init() async {
_preferences = await SharedPreferences.getInstance();
}
// get string
static String getString(String key) {
if (_preferences == null) return null;
String result = _preferences.getString(key) ?? null;
print('result,$result');
return result;
}
// put string
static Future<void> putString(String key, String value) {
if (_preferences == null) return null;
print('result $value');
return _preferences.setString(key, value);
}
}
Result
View attachment 5230281
Tips & Tricks
1. Download latest HMS Flutter plugin.
2. To work with mock location we need to add permissions in Manifest.XML.
3. Whenever you updated plugins, click on pug get.
Conclusion
We implemented simple hotel booking application using Location kit in this article. We have learned how to get Lastlocation, getLocationWithAddress and how to use callback method, in flutter how to store data into Shared Preferences in applications.
Thank you for reading and if you have enjoyed this article, I would suggest you to implement this and provide your experience.
Reference
Location Kit URL
Shared Preferences URL
Read full article
@XDARoni
Spoiler: I guess I'm missing the question part?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

General [CLOSED] AOSP support -- working AOSP12 built from source.

Here is a build of AOSP12r14
This is SD1A.210817.037
{Mod edit: Link removed}
Run flash-base.sh from the corresponding factory image to update bootloader and radio if you like.
Use "fastboot update" to install.
Very minor changes from pure AOSP;
1) selinux is permissive because I haven't got around to fixing a glitch.
2) Dialer/Messaging/Contacts have selective picks from lineageos for dark mode.
3) Dialer includes automatic call recording per the following;
Code:
From 945c17eabfdf9f108b26eda3d54266c0a2255234 Mon Sep 17 00:00:00 2001
Date: Mon, 8 Nov 2021 14:17:51 -0500
Subject: [PATCH] Automatic call recording
Change-Id: Icdb26fa6729e6a13dc6190a42dc75453900a6345
---
.../dialer/app/res/values/cm_strings.xml | 2 ++
.../dialer/app/res/xml/sound_settings.xml | 5 ++++
.../dialer/callrecord/res/values/config.xml | 4 +--
.../android/incallui/CallButtonPresenter.java | 30 +++++++++++++++++--
4 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/java/com/android/dialer/app/res/values/cm_strings.xml b/java/com/android/dialer/app/res/values/cm_strings.xml
index 1dcdb2b81..3f7602d44 100644
--- a/java/com/android/dialer/app/res/values/cm_strings.xml
+++ b/java/com/android/dialer/app/res/values/cm_strings.xml
@@ -38,6 +38,8 @@
<string name="call_recording_format">Audio format</string>
<string name="wb_amr_format" translatable="false">AMR-WB</string>
<string name="aac_format" translatable="false">AAC</string>
+ <string name="auto_call_recording_title">Auto call recording</string>
+ <string name="auto_call_recording_key" translatable="false">auto_call_recording</string>
<string name="call_via">Call via</string>
<string name="call_via_dialog_title">Call via\u2026</string>
diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
index aa025874f..d31ea9e5c 100644
--- a/java/com/android/dialer/app/res/xml/sound_settings.xml
+++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
@@ -83,6 +83,11 @@
android:entryValues="@array/call_recording_encoder_values"
android:defaultValue="0" />
+ <SwitchPreference
+ android:defaultValue="false"
+ android:key="@string/auto_call_recording_key"
+ android:title="@string/auto_call_recording_title"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/java/com/android/dialer/callrecord/res/values/config.xml b/java/com/android/dialer/callrecord/res/values/config.xml
index 7aabd6cac..2832c87bc 100644
--- a/java/com/android/dialer/callrecord/res/values/config.xml
+++ b/java/com/android/dialer/callrecord/res/values/config.xml
@@ -16,8 +16,8 @@
-->
<resources>
- <bool name="call_recording_enabled">false</bool>
+ <bool name="call_recording_enabled">true</bool>
<!-- 1 (MIC) for microphone audio source (default)
4 (VOICE_CALL) if supported by device for voice call uplink + downlink audio source -->
- <integer name="call_recording_audio_source">1</integer>
+ <integer name="call_recording_audio_source">4</integer>
</resources>
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index 0fa833edd..175fe7cc2 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
+import android.os.Handler;
import android.os.Trace;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
@@ -74,6 +75,7 @@ public class CallButtonPresenter
private DialerCall call;
private boolean isInCallButtonUiReady;
private PhoneAccountHandle otherAccount;
+ private boolean isRecording = false;
private CallRecorder.RecordingProgressListener recordingProgressListener =
new CallRecorder.RecordingProgressListener() {
@@ -114,6 +116,11 @@ public class CallButtonPresenter
CallRecorder recorder = CallRecorder.getInstance();
recorder.addRecordingProgressListener(recordingProgressListener);
+ if(recorder.isRecording()){
+ inCallButtonUi.setCallRecordingState(true);
+ } else {
+ inCallButtonUi.setCallRecordingState(false);
+ }
// Update the buttons state immediately for the current call
onStateChange(InCallState.NO_CALLS, inCallPresenter.getInCallState(), CallList.getInstance());
@@ -144,6 +151,8 @@ public class CallButtonPresenter
@Override
public void onStateChange(InCallState oldState, InCallState newState, CallList callList) {
Trace.beginSection("CallButtonPresenter.onStateChange");
+ CallRecorder recorder = CallRecorder.getInstance();
+ boolean isEnabled = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.auto_call_recording_key), false);
if (call != null) {
call.removeListener(this);
}
@@ -152,6 +161,16 @@ public class CallButtonPresenter
} else if (newState == InCallState.INCALL) {
call = callList.getActiveOrBackgroundCall();
+ if (!isRecording && isEnabled && call != null) {
+ isRecording = true;
+ new Handler().postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ callRecordClicked(true);
+ }
+ }, 500);
+ }
+
// When connected to voice mail, automatically shows the dialpad.
// (On previous releases we showed it when in-call shows up, before waiting for
// OUTGOING. We may want to do that once we start showing "Voice mail" label on
@@ -167,6 +186,9 @@ public class CallButtonPresenter
}
call = callList.getIncomingCall();
} else {
+ if (isEnabled && recorder.isRecording()) {
+ recorder.finishRecording();
+ }
call = null;
}
@@ -337,6 +359,7 @@ public class CallButtonPresenter
public void callRecordClicked(boolean checked) {
CallRecorder recorder = CallRecorder.getInstance();
if (checked) {
+ /*
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean warningPresented = prefs.getBoolean(KEY_RECORDING_WARNING_PRESENTED, false);
if (!warningPresented) {
@@ -354,6 +377,10 @@ public class CallButtonPresenter
} else {
startCallRecordingOrAskForPermission();
}
+ */
+ if(!recorder.isRecording()) {
+ startCallRecordingOrAskForPermission();
+ }
} else {
if (recorder.isRecording()) {
recorder.finishRecording();
@@ -566,8 +593,7 @@ public class CallButtonPresenter
&& call.getState() != DialerCallState.CONNECTING;
final CallRecorder recorder = CallRecorder.getInstance();
- final boolean showCallRecordOption = recorder.canRecordInCurrentCountry()
- && !isVideo && call.getState() == DialerCallState.ACTIVE;
+ final boolean showCallRecordOption = !isVideo && call.getState() == DialerCallState.ACTIVE;
otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle());
boolean showSwapSim =
--
2.27.0
Its happening.
refs/heads/android12-d1-s4-release - device/google/gs101 - Git at Google
refs/heads/android12-d1-s4-release - device/google/raviole - Git at Google
refs/heads/android12-d1-s4-release - device/google/raviole-kernel - Git at Google
refs/heads/android-gs-raviole-5.10-android12-d1 - kernel/gs - Git at Google
etc.
Apparently "raviole" is what you get when you cross a "raven" with an "oriole"
96carboard said:
Its happening.
refs/heads/android12-d1-s4-release - device/google/gs101 - Git at Google
refs/heads/android12-d1-s4-release - device/google/raviole - Git at Google
refs/heads/android12-d1-s4-release - device/google/raviole-kernel - Git at Google
refs/heads/android-gs-raviole-5.10-android12-d1 - kernel/gs - Git at Google
etc.
Apparently "raviole" is what you get when you cross a "raven" with an "oriole"
Click to expand...
Click to collapse
Let the games begin....
Now its tagged android-12.0.0_r4
That means it should be sync/buildable now.
Nope, not yet, soon. Apparently the balance of r4 isn't available yet.
Pixel has had very poor aftermarket custom ROM support since the beginning.
Most devs just aren't interested in it. Would be nice if that changes with the 6 series but I won't get my hopes up.
CZ Eddie said:
Pixel has had very poor aftermarket custom ROM support since the beginning.
Most devs just aren't interested in it. Would be nice if that changes with the 6 series but I won't get my hopes up.
Click to expand...
Click to collapse
What are you talking about? ONLY Nexus/Pixel is supported by AOSP.
96carboard said:
What are you talking about? ONLY Nexus/Pixel is supported by AOSP.
Click to expand...
Click to collapse
I don't understand your response.
I've been flashing custom ROM's since the Samsung Skyrocket and while development has generally fallen off a cliff since those days, there are some phones with more active support and Pixel has not been one of the leaders in this regard.
Go look at OnePlus forums and compare custom (not customized stock) ROM quantity to any of the Pixel phone forums.
CZ Eddie said:
I don't understand your response.
I've been flashing custom ROM's since the Samsung Skyrocket and while development has generally fallen off a cliff since those days, there are some phones with more active support and Pixel has not been one of the leaders in this regard.
Go look at OnePlus forums and compare custom (not customized stock) ROM quantity to any of the Pixel phone forums.
Click to expand...
Click to collapse
That's not support, that's broken crap made by people who are so pissed off with the LACK of support that they do it themselves. Kind-of.
Nexus/Pixel are *ACTUALLY* supported in AOSP. You don't need broken hacker projects to make them work. You repo init, repo sync, lunch, make, install.
EDIT: This is AOSP - https://android.googlesource.com/?format=HTML
If your device isn't in there, then its not supported.
The primary reason you buy a Nexus/Pixel is *BECAUSE* it is supported in there and doesn't depend on hacks.
r4 is now all up, time to sync and build from source!
96carboard said:
r4 is now all up, time to sync and build from source!
Click to expand...
Click to collapse
i'm seeing r4 - r7 or am i just dumb?
plasticarmyman said:
i'm seeing r4 - r7 or am i just dumb?
Click to expand...
Click to collapse
There are 4 factory system images available. Maybe they correspond.
Interesting, there seem to be 3 variations. Regular, 64-bit only, and pKVM. The second wont run 32bit code and will therefore create compatibility problems. The last... protected kernel based virtual machine... no idea what the implication is.
I wish I could justify a high end SSD for my build server. Been just sitting here for several minutes waiting for lunch just to spit out the build menu.
And of course, what comes up is aosp_slider-userdebug and aosp_whitefin-userdebug. So... the bootloader version says "slider-1.0-7753224".
The build files for slider don't correspond to what's on the filesystem.
Going to try....
```lunch aosp_raven-userdebug```
And mustn't forget the propblobs.... https://developers.google.com/android/drivers
This looks familiar... BUILD_ID=SD1A.210817.019.C4
Note that its r7 I'm building.
Made it past the first stage of build, now its actually compiling stuff.
[ 3% 4357/125906] build ..... etc.
Hopefully when I look in the morning it will be built and working and not a broken mess.
So, it built and it installed and it sort-of works.
When I put in the sim card, it did a bunch of strange reboot and wipes, but eventually booted. Checked the logs and it was going crazy with a couple of selinux denials;
[ 38.787756] type=1400 audit(1635512778.460:87): avc: denied { read } for comm="pool-3-thread-1" name="ubject_r:vendor_rild_prop:s0" dev="tmpfs" ino=326 scontext=u:rlatform_app:s0:c512,c768 tcontext=ubject_r:vendor_rild_prop:s0 tclass=file permissive=0 app=com.shannon.imsservice
[ 38.788763] type=1107 audit(1635512778.464:88): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=persist.vendor.radio.call_waiting_for_sync_0 pid=4573 uid=10086 gid=10086 scontext=u:rlatform_app:s0:c512,c768 tcontext=ubject_r:vendor_rild_prop:s0 tclass=property_service permissive=0'
Setting it to permissive briefly (i.e. # setenforce 0) lets it do what it has to do.
Not too bad for a first try!
Download: <removed, out of date. See first post.>
UPDATE!!!
Here's a vendor_boot.img (fastboot flash vendor_boot vendor_boot.img) that sets selinux to permissive:
<removed, out of date. See first post.>
That pretty much makes it all work. Obviously making it enforce is better, but this at least is usable now.
Sweet! I think this phone will get alot of love. The hardware is great. The price is right. This will be a great year or so. Until I get antsy and get the Pixel 7 Pro
Since I have AOSP running nicely on this phone, I've started really liking it (really hated it with all the google [bloat|spy]ware. Previously was using a Nexus 6 over Pixel 2XL because of its width. I was a little worried because this phone isn't quite as wide as the N6, but turns out its close enough that I can't really tell the difference.
Really working well.
The only issue I'm having is that the wide angle camera isn't available, which I think is because no camera software I've been able to find has been able to send a zoom level of 0.7 to the hal. The hal switches dynamically between the normal and telephoto based on zoom level.
I think i might try doing aosp (i dont know where to start, but ill try fastboot flash), but have you tried the GrapheneOS camera app? (https://github.com/GrapheneOS/Camera) I have tried the one from here (
https://twitter.com/i/web/status/1454715561368227843) and it works, but i am not sure about on AOSP.
I've just found out that you can flash aosp from flash.android.com
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
AlexDalas said:
I've just found out that you can flash aosp from flash.android.comView attachment 5445805
Click to expand...
Click to collapse
dont think this is AOSP.
tids2k said:
dont think this is AOSP.
Click to expand...
Click to collapse
I am not sure if it is AOSP (think it is, but can never be so sure), but it doesn't have gapps so it's doable for me
edit: i am getting micro g working hopefully

Categories

Resources