[REQ] [HELP] Help to compile LGTeleService without proximity sensor - Android Q&A, Help & Troubleshooting

Hello, explaining about the problem and how I tried to solve it (but it did not work):
The LG L80 (Model D385) touchscreen was replaced, device have root, in use the version of Android 4.4.2 (API 19)
I already tried using the hardware disabler (to disable the sensor and the driver), I tried the Xposed module, I changed the
Code:
<feature name = "android.hardware.sensor.proximity" />
line to
Code:
<feature name = "" />
in the file android.hardware.sensor.proximity.xml that is in the /system/etc/permissions directory, I tried some other ways, like some PlayStore apps, however, nothing solved, I saw in some cases in posts here in XDA that recompile without the proximity sensor there is great chance of solving the problem of black screen durate connections, I saw in two link below:
For the Moto X: https://forum.xda-developers.com/moto-x/moto-x-qa/compile-dialer-apk-moto-x-2013-please-t3613212
For Lineage OS: https://forum.xda-developers.com/showpost.php?p=69507586&postcount=253
I tried to use both and replace, but it did not work.
Now, could any member help me recompile the apt file LGTeleService.apk : without the proximity sensor?
APK file to remove the proximity sensor (file extracted directly from my system): https://filehost.net/da033fc1b15d8d27

Related

FM App - little help request

Hi All,
To start off, I don't like the FM app on the xperia x10 mini. I have set about to changing it.
Under Windows XP, this is where I am:
1) Pulled the Radio.apk and FmRxService.apk off of the /system/apps folder
2) Pulled the libfm_stack.so off of the /system/lib folder
3) dex2jar.bat on each item in #1 above
4) Also, EasyApkDisassembler.EN.bat on each item in #1 above to a separate area
5) Viewed the output of #3 above inside jd-gui
6) Read through some of the code and found a missed linkage
7) Saw libfm_stack.so was an ELF File, so probably raw native and no java disasm applicable.
I do not know the next step, so asking for you help. How do I resolve a missed class?
The concrete example is, in the class 'ChipControllerImpl' there is a member variable
.field private mFmChip:Lcom/ti/fm/FmReceiver;
or
private FmReceiver mFmChip;
I can't find the FMReceiver inside the jd-gui (step #6) and I can't find it declared in any files output as of step #4. Also, I tried poking around the file system of the x10 mini and did not see anything that might contain Lcom/ti/fm/FmReceiver. Does anyone know which steps are the next ones to try and locate a missing class?
[EDIT] Putting answer here and leaving the question in case it helps others. I had to delete the Radio.apk out of system/app using adb shell. Then I had to re-install the radio, which put it in with the rest of the dynamic apps. Then I had to uninstall it rather than delete it. This cleaned the app data and allowed successful installation. Following that I edited the smali code and disabled the check about airplane mode and can now run the FM Radio in airplane mode. More editing lies ahead based on this successful proof of concept.
And a little more request for help.
Tried seeing if it does not matter that I don't have that class resolved.
I did this under XP:
1) Used Easy Apk Disassembler
2) (2) DISASSEMBLY a classes.dex with smali
3) Viewed the files int he output directory
4) (3) ASSEMBLY a classes.dex with baksmali
5) Viewed out.dex
6) Removed META-INF and classes.dex in the Radio.apk
7) Added out.dex and renamed as classes.dex
8) (4) Sign an APK
9) Saw the size was a bit bigger than the original Radio.apk, but nothing drastic
10) Tried to install it
Result: Application was able to view permissions and asked if i wanted to replace existing (I had deleted Radio.apk from /system/app already). I said yes to replacement. Then it said Install Failed.
Seems if I can't disassemble and then re-assemble without changes I will be stuck from where I want to go here. Any advice?
moze napisze jutro

[Q] Galaxy Note II Camera Hack (Cyanogenmod)

Hi,
I own a note 2 device where I've installed Cyanogenmod (version 11-20140827-nightly-n7100). I've been trying to mod the original stock camera from samsungs firmware (4.4 kitkat) to run on cyanogenmod with some success but now I'm stuck witch a dependency problem I don't know how to resolve and not even why it is possible. So here is a list of what i did, yet:
- using apktool and smali/backsmali to create deodexed SamsungCamera.apk.
- adding the library dependencies mentioned in androidmanifest.xml in the apktool decompiled folder
- searched for LoadLibrary calls in the smali code to find out that seccamera_jni.so is loaded at runtime
problem: the dependency tree of seccamera_jni.so is incompatible with the libs installed on cyanogenmod -> missing symbols for the Camera(->crash) versus missing symbols for the system (bootloop)
sollution: take seccamera_jni.so and all other libs from the stock ROM it (recursively) depends on and rename the files and their internal dependencies to something like lsb**.so instead of lib**.so.
- write a c progam that implements this sollution
- install everything on the phone and fix the permissions
- run SamsungCamera
results: While the described method removes all library not found issues while retaining the original libs of cyanogenmod i still get one f*ing symbol not found error message:
"java.lang.UnsatisfiedLinkError: dlopen failed could not load "lsbnativehelper.so" needed by "libseccamera_jni.so"; caused by [..endless chain leading to libc.so] Missing Symbol __cxa_finalize in lsbdl.so needed by lsbc.so"
I've looked it up: libdl.so has no external dependencies and refers to __cxa_finalize which is implemented in libc.so which has libdl.so as its only dependency.
So my Questions are: How is this possible? I've checked the libc.so integrated in cyanogenmod and even this one has the same dependencies in libc.so but if this was a problem how could any app using libc work on that system? What is different on the stock room that it won't get the missing symbol even though it has the missing dependency? what am I overlooking?

[Q] idol 2 mini s problem

After trying to enable OTG support following these instructions:
To enable USB host API support you should add a file named
android.hardware.usb.host.xml and containing the following lines:
<permissions>
<feature name="android.hardware.usb.host"/>
</permissions>
into folder
/system/etc/permissions
in that folder find file named
handheld_core_hardware.xml or tablet_core_hardware.xml
and add
<feature name="android.hardware.usb.host" />
into <permissions> section.
Reboot your device. Usb host api should work.
I ended up with my device constantly giving the message "Unfortunately, system UI has stopped". Could this be a hardware damage or just I messed up with the OS ? I would appreciate any possible solutions.

[FIX] Fixing bad sound during video recording / in dictaphone

Fixing bad sound during video recording / in dictaphone for Redmi 3S / 3X / 4X
Also posted on 4pda and in bug-report on MIUI forums
UPD: heavily updated new v.8
Warning: in ZIP format this patch only for Redmi 3S/3X and 4X.
On Redmi 4A available manual install, see below. For Redmi 4 Pro solution here
Please, don't ask me to port on other models, ask someone on forum.
Because without device I can't test all.
Many-many people noticed awful sound quality in videos no matter what camera or ROM used (sample and another)
Was created two bug-reports on official MIUI forum (1, 2)
Also this problem affects at least Redmi 2, 3, 4A, 4Pro, Note 3 Pro.
Basing on this post with fix of similar issue on Nexus 5 created patch for Redmi 3S / 3X, that disabling noise cancellation in camera and apps (but not in-call).
Sound quality now much better: no crackling, no floating volume, just clean more louder sound.
So now this disturbing problem finally fixed.
Sample without and with fix here
Recorded via stock camera (mono, 96 Kbps), phone no moved, music volume not touched.
Someone can notice lack of bass, but I think it's just hardware microphone limitation (designed for voice, not ambient sound).
Nothing more to adjust here, sound just "by default" without effects.
Important information, please read:
how to install TWRP? Follow this or this thread
if phone won't boot apply TWRP > Advanced > Disable DM-verity or flash this zip
if this not helps, then files was edited incorrectly (I can't test all roms). Apply remove ZIP to cancel patch
patch applied for mono-recording in video (stock camera), and for stereo (awesome Snap Camera HDR)
also applied for dictaphone and other applications
noise cancellation during call still works, which good
patch compatible with MIUI firmware and custom rom's (LOS / CM / etc)
patch built-in (but with swapped stereo-channels) into LOS 14.1 by daniel.stuart14 and LOS 13 by FedosIS, don't install it
I don't know does your specific ROM include patch or not, check this yourself
patch directly edits files, not replacing them: it's more correct, because files not universal
you can flash latest version over previous
for custom rom's added auto-restore script: patch will persist even after updating rom
on MIUI you need flash patch after any update via any method
Version history:
8
- fixed swapped stereo channels: now upper mic - left, bottom - right (source)
- disabled noise cancellation for external / microphone headset (strange, but there was a problem)
- added support of Treble ROM's
- vastly improved editing files reliability to prevent mistakes
- at update previous changes not reverts, instead using clean backup file
- therefore patch can't be installed over ancient v.5 (I guess there's few users)
- backup files keeps up when updating the custom firmware, this is necessary for the possibility of canceling
- Magisk modules now can be installed through app
- updated remover ZIP
- updated manual installing guide
7
- now works on Android 8 Oreo and higher
- remover ZIP updated too
6
- fixed low mic volume on newest custom rom's
- during installing performed backup of current files
- therefore revert patch now not editing files in reverse way (hard to maintain) and just renames old
- manual installing a bit changed too
5
- fixed in-call mic volume for those who disabled in-call noise suppression via build.prop (version fits all, 1016/292)
4
- reduced volume from 102 to 96 to avoid distortion
3
- fixed high volume in-call that distorted your voice
- now volume changed only for required devices, not globally
- patch reverts all edits from old versions, implemented protection if patch applied twice
- where was possible edits fits XML-marking
- added comments into script
2
- increased mic volume, but globally
- was bug: in-call corespondent heard you worse due high volume
- now patch directly edits files, not replacing them
- added auto-restore script or custom rom's
1
- initial untested release
- was low mic volume
Installing / updating (v.8):
Just flash via TWRP ZIP that attached to post.
Also there's zip for reverting changes.
And here systemless version for Magisk.
Or manual installing (for 4A too):
If you made mistake or not set required rights / owner / SELinux-context (usually after coping file "outside") phone will not boot.
So better just flash ZIP (only for 3S / 3X / 4X) or be careful.
Note: on Oreo and higher (include Treble) files located into folder /system/vendor/etc
0. You need root.
1. Edit /system/etc/audio_platform_info.xml
2. Find lines contains this and delete them (they can be not present):
Code:
...SND_DEVICE_IN_HANDSET_MIC" acdb_id...
...SND_DEVICE_IN_HEADSET_MIC" acdb_id...
...SND_DEVICE_IN_HANDSET_STEREO_DMIC" acdb_id...
3. Under line <acdb_ids> add this:
Code:
<device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="1"/>
<device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" acdb_id="1"/>
4. Edit file:
For Redmi 3S / 3X / 4X: /system/etc/mixer_paths_qrd_sku1.xml
For Redmi 4A: /system/etc/mixer_paths_qrd_mtp.xml (found by Ymys_ua)
At middle of file find these lines:
Code:
<path name="voice-call">
If after there is two lines with DEC1/DEC2 - remove them.
And replace it for this one line:
Code:
<path name="voice-call"><path name="adc1" /><ctl name="DEC1 Volume" value="84" /><ctl name="DEC2 Volume" value="84" />
5. Find this lines:
Code:
<path name="handset-mic">
<path name="adc1" />
If after there is two lines with DEC1/DEC2 - remove them.
And replace them for this one line:
Code:
<path name="handset-mic"><path name="adc1" /><ctl name="DEC1 Volume" value="96" /><ctl name="DEC2 Volume" value="96" />
6. Find this lines:
Code:
<path name="headset-mic">
<path name="adc2" />
If after there is two lines with DEC1/DEC2 - remove them.
And replace them for this one line:
Code:
<path name="headset-mic"><path name="adc2" /><ctl name="DEC1 Volume" value="99" /><ctl name="DEC2 Volume" value="99" />
7. Find this lines:
Code:
<path name="handset-stereo-dmic-ef">
<path name="adc2" />
If after there is two lines with DEC1/DEC2 - remove them.
And replace it for this one line:
Code:
<path name="handset-stereo-dmic-ef"><path name="adc3" /><ctl name="ADC1 Volume" value="6" /><ctl name="DEC2 MUX" value="ADC1" /><ctl name="MI2S_TX Channels" value="Two" /><ctl name="DEC1 Volume" value="96" /><ctl name="DEC2 Volume" value="96" />
8. Save file and reboot.
For those, who want port on other model:
Main requirement: /system/etc/audio_platform_info.xml must have this lines (or in /system/vendor for Oreo and higher):
Code:
<device name="SND_DEVICE_IN_HANDSET_MIC" acdb_id="1"/>
<device name="SND_DEVICE_IN_HEADSET_MIC" acdb_id="1"/>
<device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" acdb_id="1"/>
may not required: <device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="1"/>
Next you need adjust volumes, reefer to manual install guide. On other models "devices" names for volumes can be different.
To find which used in particular case use logcat (filter "device") and searching in file /system/etc/mixer_paths_*.xml to recreate "chain".
@Bonoboo Thanks a lot! This fix has worked wonders. A must use fix for those who use sound or video recording.
almost same problem or totally different topic?
https://forum.xda-developers.com/xiaomi-redmi-3s/themes/fix-redmi-3s-video-audio-recording-fix-t3482772
groovepeppy said:
almost same problem or totally different topic?
Click to expand...
Click to collapse
That fixes whole recording on custom rom RR, not quality.
I'm facing issues during call.... The other person is not able to hear my voice in between for few seconds
Will this work??
Will you be able to create a systemless/Magisk version for those who do not want to modify system partition? Thank you!
vivekkairi said:
I'm facing issues during call.... The other person is not able to hear my voice in between for few seconds
Will this work?
Click to expand...
Click to collapse
No, this is only for sound quality in videos / apps.
Reason of your problem unknown, but this happens for some users (seems hardware).
It's usually fixes by disabling noise canceling during call.
You need root. Via filemanager edit file /system/build.prop
Find line ro.qc.sdk.audio.fluencetype=fluence
And change it to "none": ro.qc.sdk.audio.fluencetype=none
Save file, reboot and test.
sambassador said:
Will you be able to create a systemless/Magisk version for those who do not want to modify system partition?
Click to expand...
Click to collapse
Here you are (attached), not tested, created by following guide
Please, let me know about result.
P.S. File deleted.
Hii
Can you make me a twrp flash able file regarding turning off noice cancelation..... Actually the biggest problem is I can't root device as of now.. Twrp is installed
vivekkairi said:
Can you make me a twrp flash able file regarding turning off noice cancelation
Click to expand...
Click to collapse
Here you are, only for calling:
Bonoboo said:
Here you are:
Click to expand...
Click to collapse
So just flash this using twrp
Anything else?
I'm not rooted
And how to get back if it doesn't work
vivekkairi said:
So just flash this using twrp
Anything else?
I'm not rooted
And how to get back if it doesn't work
Click to expand...
Click to collapse
Yes, just flash.
No, nothing else.
Root not required.
Flash another revert-zip, attached above.
Bonoboo said:
Yes, just flash.
No, nothing else.
Root not required.
Flash another revert-zip, attached above.
Click to expand...
Click to collapse
OK thanks buddy
Will test it and feedback the result
thanks.. dev
Thanks a lot !
Bonoboo said:
Here you are (attached), not tested, created by following guide
Please, let me know about result.
Click to expand...
Click to collapse
Thank you so much but it doesn't work.. I get an error:
Code:
! Failed: Unable to extract zip file!
Updater process ended with ERROR: 1
I tried to repack the ZIP file too (with 7-Zip 'store' compression) but it didn't work either. Based on the Magisk documentation it seems to be missing some files perhaps like config.sh and module.prop:
https://github.com/topjohnwu/magisk-module-template
Thanks! finally fixed the problem for me. Could it also be adapted to work for snapchat aswell?
vivekkairi said:
OK thanks buddy
Will test it and feedback the result
Click to expand...
Click to collapse
Does that work?...and how is the audio recording quality via WhatsApp?
sambassador said:
it seems to be missing some files perhaps like config.sh and module.prop
Click to expand...
Click to collapse
Later.
hasan291 said:
Could it also be adapted to work for snapchat aswell?
Click to expand...
Click to collapse
It must work in any app.
a07121994 said:
Does that work?...and how is the audio recording quality via WhatsApp?
Click to expand...
Click to collapse
BTW he tried to fix own problem unrelated to thread.
File for OP:
Please make it for Redmi 3
spark995 said:
Please make it for Redmi 3
Click to expand...
Click to collapse
Sorry, I already said in post:
Please, don't ask me to port on other models, ask someone on forum.
Because without device I can't test all.
Click to expand...
Click to collapse

[SOLVED] Installing WebView (rooted Stock ROM)

I am trying to install a clean Android System WebView (packagename: com.android.webview) onto stock LG G5 RS988 RS98821d Android 7.0 that is rooted.
I downloaded an arm64 WebView APK from the Bromite Releases GitHub page:
https://github.com/bromite/bromite/releases
I tried installing the Bromite WebView APK to "/system/app/webview/" (0644 permissions) and rebooted, but the WebView implementation could not be used.
There are instructions regarding installing Bromite System WebView available:
https://github.com/bromite/bromite/wiki/Installing-SystemWebView
From my reading of the installation instructions, "res/xml/config_webview_packages.xml" from "/system/framework/framework-res.apk" must contain the an entry for the package with the particular package name ("com.android.webview" in this case).
After examining the stock "config_webview_packages.xml" member file, it appears that a reference to "com.android.webview" is not present. The "config_webview_packages.xml" XML file also appears to not be easily readable in a text editor. My guess is that it has some kind of signing.
What must be done to get the system to allow the newly installed WebView? My impression is that the "config_webview_packages.xml" XML file must be edited, but it is not clear how to do so, given that it does not appear to be just plain text.
I have attached a copy of the "config_webview_packages.xml" XML member file and the original framework-res.apk file zipped into a ZIP 2.0 archive.
XML files inside apks are compressed, you should unpack the framework-res.apk using a tool for apk editing, not just a zip archiver program. On Android, you can use APK Editor Pro, for example.
By the way, have you already uninstalled Chrome? If Chrome is installed, it will be forced as the standard WebView provider.
tremalnaik said:
XML files inside apks are compressed, you should unpack the framework-res.apk using a tool for apk editing, not just a zip archiver program. On Android, you can use APK Editor Pro, for example.
Click to expand...
Click to collapse
It was my impression that the APK files were zip files with a particular signature block. I shall try a tool like APK Editor Pro and report back.
tremalnaik said:
have you already uninstalled Chrome? If Chrome is installed, it will be forced as the standard WebView provider.
Click to expand...
Click to collapse
I have uninstalled/removed both Chrome and the Android System WebView (Google Apps version).
Ascii3 said:
It was my impression that the APK files were zip files with a particular signature block. I shall try a tool like APK Editor Pro and report back.
Click to expand...
Click to collapse
Now I'm on PC and I remember the name of the tool I use sometimes on PC: APKChanger. It's very complete, although very heavy (about 650MB with my current configuration);
If you have platform tools installed on your pc, or the whole Android Studio, you can also use
Code:
aapt d xmltree framework-res.apk res/xml/config_webview_packages.xml
to see the list of allowed webview packages.
Ascii3 said:
I have uninstalled/removed both Chrome and the Android System WebView (Google Apps version).
Click to expand...
Click to collapse
So we can be sure the problem is not the system forcing Chrome as default WebView provider. So, as Bromite's wiki states, "Changing the package name does not make installation easier/possible;", so the only solution is to add com.android.webview to config_webview_packages.xml, or, if it is already there, remove the requirement for Google's signature on the webview package. EDIT: I checked, on your file com.android.webview is missing, you just need to add it:
Code:
E: webviewproviders (line=20)
E: webviewprovider (line=21)
A: description="Chrome Stable" (Raw: "Chrome Stable")
A: packageName="com.android.chrome" (Raw: "com.android.chrome")
A: availableByDefault=(type 0x12)0xffffffff (Raw: "true")
E: webviewprovider (line=24)
A: description="Google WebView" (Raw: "Google WebView")
A: packageName="com.google.android.webview" (Raw: "com.google.android.webview")
A: availableByDefault=(type 0x12)0xffffffff (Raw: "true")
A: isFallback=(type 0x12)0xffffffff (Raw: "true")
E: webviewprovider (line=27)
A: description="Chrome Beta" (Raw: "Chrome Beta")
A: packageName="com.chrome.beta" (Raw: "com.chrome.beta")
E: signature (line=28)
C: "MIIDwzCCAqugAwIBAgIJAOoj9MXoVhH6MA0GCSqGSIb3DQEBBQUAMHgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDEUMBIGA1UEAwwLY2hyb21lX2JldGEwHhcNMTYwMjI5MTUxNTIzWhcNNDMwNzE3MTUxNTIzWjB4MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4gVmlldzEUMBIGA1UECgwLR29vZ2xlIEluYy4xEDAOBgNVBAsMB0FuZHJvaWQxFDASBgNVBAMMC2Nocm9tZV9iZXRhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo/wW27nRxVqGbFOyXr8jtv2pc2Ke8XMr6Sfs+3JK2licVaAljGFpLtWH4wUdb50w/QQSPALNLSSyuK/94rtp5Jjs4RSJI+whuewV/R6El+mFXBO3Ek5/op4UrOsR91IM4emvS67Ji2u8gp5EmttVgJtllFZCbtZLPmKuTaOkOB+EdWIxrYiHVEEaAcQpEHa9UgWUZ0bMfPj8j3F0w+Ak2ttmTjoFGLaZjuBAYwfdctN1b0sdLT9Lif45kMCb8QwPp0F9/ozs0rrTc+I6vnTS8kfFQfk7GIE4Hgm+cYQEHkIA6gLJxUVWvPZGdulAZw7wPt/neOkazHNZPcV4pYuNLQIDAQABo1AwTjAdBgNVHQ4EFgQU5t7dhcZfOSixRsiJ1E46JhzPlwowHwYDVR0jBBgwFoAU5t7dhcZfOSixRsiJ1E46JhzPlwowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAZO2jB8P1d8ki3KZILvp27a2VM3DInlp8I8UgG3gh7nBQfTrnZr5M1PL8eFHqX7MEvAiGCMTcrPklEhjtcHK/c7BcdeCWq6oL56UK3JTl33RxJcjmjrz3e3VI6ehRSm1feNAkMD0Nr2RWr2LCYheAEmwTPtluLOJS+i7WhnXJzBtg5UpUFEbdFYenqUbDzya+cUVp0197k7hUTs8/Hxs0wf79o/TZXzTBq9eYQkiITonRN8+5QCBl1XmZKV0IHkzGFES1RP+fTiZpIjZT+W4tasHgs9QTTks4CCpyHBAy+uy7tApe1AxCzihgecCfUN1hWIltKwGZS6EE0bu0OXPzaQ=="
E: webviewprovider (line=30)
A: description="Chrome Dev" (Raw: "Chrome Dev")
A: packageName="com.chrome.dev" (Raw: "com.chrome.dev")
E: signature (line=31)
C: "MIIDwTCCAqmgAwIBAgIJAOSN+O0cdii5MA0GCSqGSIb3DQEBBQUAMHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDETMBEGA1UEAwwKY2hyb21lX2RldjAeFw0xNjAyMjkxNzUwMDdaFw00MzA3MTcxNzUwMDdaMHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDETMBEGA1UEAwwKY2hyb21lX2RldjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOYPj6Y9rVt8xizSHDYjDEkDfFZAgSiZ9T6tevkQXsFyfaq3Gk3h2qssi29G6cTPJ2VXFKlVB71wSXv5p9/LEcDQPWQiO3Q2cLmgUXxyhJWXI3g96tPAhZQX2q6SC37ZQdiBR/raMO70DAkvCyBGtNplsvutzSE3oZ7LYfzB8vTbe7zCh3fDYSS/7xb3ZVvFqydHS40uVq1qqg1S80Pge7tW3pDGsPMZN7yA4yfmsvA1rbHm9N8t3Rc9hqzh6OxNAAgRB535YcsWL7iF+mpdFILXk3jLYT0nMvMnB83rsdgnRREjlGQYHl2mh8+6CqujsW/eICDq/LR6BYDyqHhk0ECAwEAAaNQME4wHQYDVR0OBBYEFKzsl07JglgpbeYDYGqsgqRDo+01MB8GA1UdIwQYMBaAFKzsl07JglgpbeYDYGqsgqRDo+01MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBACka6SFF6xAcj8L8O6R36++E09DTiGZEjvKT8eIycgcQQ+p1WUmPb6M2EJpN6zvvSE62ussmXdzf8rIyc0JXA8jbViZt62Y39epNENFxPTLN9QzXlT+w8AW73Ka3cnbOuL5EgoDl8fM79WVlARY3X+wB/jGNrkiGIdRm2IZIeAodWgC2mtXMiferyYBKz2/F2bhnU6DwgCbegS8trFjEWviijWdJ+lBdobn7LRc3orZCtHl8UyvRDi7cye3sK9y3BM39k0g20F21wTNHAonnvL6zbuNgpd+UEsVxDpOeWrEdBFN7Md0CI2wnu8eA8ljJD45v0WWMEoxsIi131g5piNM="
E: webviewprovider (line=33)
A: description="Chrome Canary" (Raw: "Chrome Canary")
A: packageName="com.chrome.canary" (Raw: "com.chrome.canary")
E: signature (line=34)
C: "MIIDxzCCAq+gAwIBAgIJAML7APITsgV7MA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDEWMBQGA1UEAwwNY2hyb21lX2NhbmFyeTAeFw0xNjAyMjkxOTA5MDdaFw00MzA3MTcxOTA5MDdaMHoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDEWMBQGA1UEAwwNY2hyb21lX2NhbmFyeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANXfeAoZlr0ya1HBzIfAz/nLLjpPJeAPvuX5dueaxmiQgv2hNG22acriFuiiJI6TU0t8AIVJD5Ifbc4OOuA0zeFhdzWWGnmTRH6x27WI7bzOKnAqOvv21ZBmE9i8Vo++K13xWdTs3qVn1bn9oUONxFu0wKDzXYZhoj1Jom0RZGjXm16xuPlEuOzMcjiNBDoYuxPAXkMcK/G1gP4P4nAV8Rd/GGIjKRS/SUtcShhoAMOQhs4WIEkUrvEVRwhBDIbpM87oFbCVdBH38r0XS6F6CdhPJsKFhoEfq4c01HZqNmDpCPA8AAcCuSWqmXoTIqs7OqkWgduE2bInbWU7WMaTl+kCAwEAAaNQME4wHQYDVR0OBBYEFB/AsC4iPAqaLoNytNSx29qByI7+MB8GA1UdIwQYMBaAFB/AsC4iPAqaLoNytNSx29qByI7+MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAMb2Td3ro/+MGVnCPAbwBSOZMVLUKGqt6zr8CShW9mtFHnmy29EaWSYYAj1M4+6Vpkq85NsgBEck7rnUjV8A3Q0NKdTys1KRKJqVvQRBN6SwqQenSf/abxQCa8Z+69rh+3BkIU1HLtu5lrMDZwon5H91L5mpORn6vItd20uW132lwSDeUEW2CHslTrodoFuTUcSUlRiq/URfUH3baO1QHXkxpQwrBPKL5deJfcZnxh5MAtAGSQL7gHvayEFlDppETXdDO7vgGTH2dEK2TjKWALbGiKkxSqjRyTNt4/FOj10TqNRdUamj+ydVJgzGQ8bki4Vc6NnKm/r4asusxapkVR4="
E: webviewprovider (line=36)
A: description="Chrome Debug" (Raw: "Chrome Debug")
A: packageName="com.google.android.apps.chrome" (Raw: "com.google.android.apps.chrome")
On Android, I used APK Editor Pro 1.10.0 to modify res/xml/config_webview_packages.xml of /system/framework/framework-res.apk. A new APK with a generic signature was generated with the modification. I used the XML file editing option to select and modify the config_webview_packages.xml. The XML file editing functionality is given to be in beta and appears buggy.
I replaced the original /system/framework/framework-res.apk file with the patched one using the TWRP 3.2.3-0 file manager and attempted to boot to system. The system would start, but get stuck at the LG logo screen. I tried wiping data, and cache in recovery and booting again, but received the same result. I note that adb was available and usable after the boot process got stuck on the LG Logo screen.
My impression is that the patched framework-res.apk file is incompatible or defective. Perhaps APK Editor Pro 1.10.0 malformed the output APK (the XML editing feature appeared unfinished) or that the LG stock ROM expects framework-res.apk to have have a particular signature.
Perhaps a different APK editing tool should be tried. What could the problem be?
I have attached a ZIP archive containing the APK Editor Pro 1.10.0 modified framework-res.apk.
EDIT: Attachment has been removed; the file was defective and should not be used. Attachment is no longer necessary.
I have now patched framewor-res.apk successfully, and Bromite System WebView is working.
Did you use again APk Editor Pro or a PC tool?
The tools I used were Windows tools (and with a Java dependency in the case of Apktool) and were: Apktool 2.3.1 and WinRAR 5.6.1. I found that it is best to avoid newer versions of the tool unless trying to manipulate Android 9 Pie or newer resources.
Ascii3 said:
I have now patched framewor-res.apk successfully, and Bromite System WebView is working.
Click to expand...
Click to collapse
I know this is an old post, but how did you get it to boot?
I'm using apktool 2.5 and seems to be stuck on the boot screen as you were
burny02 said:
I know this is an old post, but how did you get it to boot?
I'm using apktool 2.5 and seems to be stuck on the boot screen as you were
Click to expand...
Click to collapse
From somewhere else it seems that you are now using Apktool 2.3.1.
After comparing my notes, my impression on what you are missing and some related notes:
The modified framework-res.apk should use the unmodified APK file's "AndroidManifest.xml" root file and META-INF directory contents. It is not sufficient for any of the content to be the same after decompiling.
Copy "AndroidManifest.xml" and META-INF directory from original framework-res.apk to modified framework-res.apk using zip program, if contents are different.
v2 APK signing scheme (which includes the APK file itself in validation), if present, would be broken, but the scheme's enforcement is not enforced on /system; v1 APK signing scheme (on APK contents ("AndroidManifest.xml" file and META-INF directory contents)) is still enforced.
I zipaligned output/modified framework-res.apk prior to transferring original "AndroidManifest.xml" file and META-INF directory contents, but I do not believe it matters for the purposes of getting a functional framework-res.apk.
EDIT: Some added things to keep in mind:
Sometimes clearing system cache and the runtimes cache is also necessary before system will boot after framework-res.apk replacement. Also make sure that the permissions of the replaced framework-res.apk file are at minimum whatever the original file permissions were. Depending on what software you use to replace the framework-res.apk file, the permissions set may be different.
I really appreciate the help, still does not work unfortunately.
Here is what I do:
adb pull framework-res.apk
apktool d framework-res.apk (tried most versions, mainly now 2.3.1)
Edit framework-res/res/xml/config-webview-packages.xml to:
Code:
<webviewproviders>
<webviewprovider description="Bromite WebView" packageName="com.android.webview" availableByDefault="true" isFallback="true" />
</webviewproviders>
Removing other dev versions with signatures etc
apktool b framework-res
zipalign -v 4 framework-res.apk framework-res-new.apk
Move META-INF and AndroidManifest.xml from the 1st original framework-res.apk > framework-res-new.apk (Have also tried moving res & resources from the new to the original...7Zip, WinRAR, CLI - Linux)
adb push framework-res-new.apk /system/framwork-res.apk
Modify permissions in TWRP > 0644
Move framework-res.apk from /system/ to /system/framework/framwork-res.apk (I read somewhere this is better than pushing directly. Neither worked)
Clear Davlik & Cache
Reboot
Hangs on boot screen
Any ideas if I am missing something important?
@burny02 - Please clarify whether the framework-res.apk you are trying to modify is for LG G5 stock ROM Android Nougat.
I note that you are using the "isFallback="true"" flag with the webviewprovider tag. The purpose of the isFallback attribute set to true (its default is false) is to specify that the WebView provider should be disabled by deault and should only become available when allow other WebView providers are disabled. Using the attribute with the true value with only a single WebView provider seems improper. I do not know if boot should fail if the attribute is present in the way that it is, but in both scenarios I would recommend its omission.
It has also been a while since I used Apktool versions and do not exactly remember the command lines. Do not take my not pointing to an issue with it as there necessarily not being an issue. One thing I would mention is that one typically first install a frameworks before decompiling and building. For the LG G5 RS988 Android Nougat, I believe installing the framework-res.apk as a framework was sufficient. You would specify on command line "apktool if framework-res.apk" and any tags you wish to explicitly specify, if any.
The moving of framework-res.apk to /system/ before /system/framework/ is oftentimes done by people to try to install a modified framework-res.apk with proper permissions and on a live system before the system crashes and reboots. Once framework-res.apk is copied to /system , but does not replace the framework-res.apk file, proper permissions can be set prior to using that file to replace the live framework-res.apk. It is still important to note that some software disregards permissions set when a file is relocated or copied, so this could be an issue if framework-res.apk is replaced with more restrictive permissions than the original framework-res.apk (less restrictive permissions should not usually be a problem for the app to be used). I particularity do not like the idea of the system crashing and prefer to make such changes offline (such as via the aid of a custom recovery).
Sorted. Got it working. Really appreciate the help, Ascii3
For anyone looking at this in the future, the isFallback back seems to stop booting, regardless of whether it is the only entry or not.
The procedure then works as above:
adb pull framework-res.apk
apktool d framework-res.apk (2.3.4 worked for me - SDK 24 Android 7.1 (LGG5))
Edit framework-res/res/xml/config-webview-packages.xml to:
Code:
<webviewproviders>
<webviewprovider description="Bromite WebView" packageName="com.android.webview" availableByDefault="true" />
</webviewproviders>
apktool b framework-res
Move META-INF and AndroidManifest.xml from the 1st original framework-res.apk > new framework-res-new.apk (Used 7Zip drag & drop)
adb push framework-res-new.apk /system/framework/framwork-res.apk
Modify permissions in TWRP > 0644
Clear Davlik & Cache
Reboot
I found the following unnecessary :
Installing framework (apktool if)
Zip-aligning
Moving to /system prior to /system/framework/ (Using TWRP, live system; it might be necessary)
burny02 said:
Sorted. Got it working. Really appreciate the help, Ascii3
Click to expand...
Click to collapse
Sure.
burny02 said:
For anyone looking at this in the future, the isFallback back seems to stop booting, regardless of whether it is the only entry or not.
Click to expand...
Click to collapse
The isFallback attribute is supposed to only be set to true for no more than one webviewprovider. Explicitly setting it to false (its default) should not be problematic (but does result in a larger config-webview-packages.xml file generated). Setting isFallback to true on the only webviewprovider item is not an intended use and apparently results in no boot.
burny02 said:
I found the following unnecessary :
Zip-aligning
Click to expand...
Click to collapse
I do not think zip-aligning apps is necessary generally . My understanding around the reason to do so is to try to optimize the packaged data to be more efficiently fetched in the manner which Android fetches the data.
@Ascii3 @burny02
Hello guys, sorry to exhume this post but I'm struggling and all other threads are maybe ten years old...
So I'm struggling to replicate what you did! I'm no expert but I can follow basic instructions.
So I do as you say, decompile framework-res.apk, modify the xml file (I just add the line). This step seems okay since I did some errors while editing the file and apktool would not recompile properly. Now this goes fine.
Then I got my freshly recompiled framework-res.apk, but 7zip on linux won't let me insert META-INF and AndroidManifest.xml. So I had to rename the extension .zip, do it, then rename in apk. Could this be an issue? It looks dirty.
Anyway, after this you didn't had to resign the apk? I read everywhere you had to, so I did. I did not zipaligned it since I used a resign tool I found on xda and I could not tell if I had to do it before or after resigning, but since you said you didn't zipalign it I thought whatever.
The problem is the following: after replacing framework-res.apk in /system/framework, the phone won't start, I get stuck on the starting screen and I could extract the following from logging:
01-24 04:15:17.470 +0000 4042 4042 I PackageManager: /system/framework/framework-res.apk changed; collecting certs
01-24 04:15:17.749 +0000 4042 4042 W PackageManager: Failed to scan /system/framework/framework-res.apk: Failed to collect certificates from /system/framework/framework-res.apk
Have you got any ideas of what I did wrong? It's my fourth soft-brick today, I'm getting a bit annoyed.
Thanks in advance
@LeSplendide did you ever get this working? Not sure if I'm having the same trouble, but I followed burny's instructions and my phone fails to boot. I checked logcat but I don't see anything relating to framework-res. I'm using magisk to overlay it because if I touch the /system partition for real, VoLTE stops working on my phone (known issue for this phone). I'm successfully overlaying stuff in /system/app and /system/priv-app so I do have overlaying generally working, though this is the first apk in the framework directory I've tried to overlay. Boy do I want to get this working. I've extensively degoogled and debloated this phone and the only glaring thing that remains is chrome handling webview.
TheShanMan said:
@LeSplendide did you ever get this working? Not sure if I'm having the same trouble, but I followed burny's instructions and my phone fails to boot. I checked logcat but I don't see anything relating to framework-res. I'm using magisk to overlay it because if I touch the /system partition for real, VoLTE stops working on my phone (known issue for this phone). I'm successfully overlaying stuff in /system/app and /system/priv-app so I do have overlaying generally working, though this is the first apk in the framework directory I've tried to overlay. Boy do I want to get this working. I've extensively degoogled and debloated this phone and the only glaring thing that remains is chrome handling webview.
Click to expand...
Click to collapse
I'm sorry I have no idea, rn Webview Implementation says I have Android System Webvew 102.0.5005 so I assume this is chrome webview? But I have no clue what I did or not but I know for sure I fixed my problem which was that Webview would crash when trying to sign in a google account on my MicroG'd LEAOS. Now this works so I guess I did make it work. All I found that could be a clue is a update.zip containing instructions and the webview in question. Iirc, the issue was that the zip needed to be signed so that twrp could flash it, so I think I just signed my zip and it worked but can"t tell for sure.

Categories

Resources