Error installing framework - Moto X Q&A

I've been banging my head against the wall on this one. With 4.2.2 I could install the framework, decompile, change, recompile an apk without issue.
With 4.4, I am getting this error when I try and install the framework:
C:\Users\Super\APK-Tools\APKtool>apktool if framework-res.apk
W: Config flags size > 36. Exceeding bytes: 0xFFFF.
W: Invalid config flags detected: style-v17-ERR0
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:562)
at brut.androlib.Androlib.installFramework(Androlib.java:473)
at brut.apktool.Main.cmdInstallFramework(Main.java:250)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000100
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:222)
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:214)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 5 more
Click to expand...
Click to collapse
Am I just being stupid? Has anyone been able to install the 4.4 framework?
Thanks.
Environment:
Win7
official framework-res.apk from stock att motox 4.4
apktool.jar v 1.5.2

Well, I got it to work.
FWIW I used apktool_2.0.0b7.jar in linux. Worked without issue.
(It didn't work in windows.)

Just to say that I had the same issue. I took the framework-res.apk from another custom rom and it works on Windows 7 64 bits.
Bad installation with CM11 based rom (Beanstalk)
Good installation with an AOSP based rom (Pure Speed X)

Primokorn said:
Just to say that I had the same issue. I took the framework-res.apk from another custom rom and it works on Windows 7 64 bits.
Bad installation with CM11 based rom (Beanstalk)
Good installation with an AOSP based rom (Pure Speed X)
Click to expand...
Click to collapse
Same here :
Win 7 64bit
Hammerhead - slimkat framework

You need apktool 2 beta for 4.4 apks. Older versions don't use new enough smali/baksmali for KitKat
Sent from my Moto X

imnuts said:
You need apktool 2 beta for 4.4 apks. Older versions don't use new enough smali/baksmali for KitKat
Sent from my Moto X
Click to expand...
Click to collapse
I have apktool 2 beta however I wasn't able to install the framework-res.apk from CM11 based ROMs.
No problem with AOSP 4.4 based ROMs though...
BTW the apktool 2 beta creates other folders during the decompilation like "Original".

i'm curious, how'd you recompile? i just got my dev edition today and my first goal was to pull framework-res and remove the wifi tether entitlement check. decompile and making the edit was easy, but on recompile i got the following error:
invalid resource directory name: /xxx/framework-res/res/values-mcc310-mnc-1
Click to expand...
Click to collapse
if i remove the last dash (i.e. change to values-mcc310-mnc1), it works...but i still get a warning on recompile:
aapt: warning: string 'usb_charge_notification_title' has no default translation in /xxx/framework-res/res; found: da de el es fr nb nl pt sv tr zh_CN zh_TW
Click to expand...
Click to collapse
i pushed the new framework to the phone and so far, it seems to work...but does anyone have any idea what's up with the errors? is it something that will cause any issues? is there a way to resolve it and get a clean decompile/recompile? i've tried using both beta7 and beta8 (which came from the apktool thread, i guess it's not publicly available yet?)

crackers8199 said:
i'm curious, how'd you recompile? i just got my dev edition today and my first goal was to pull framework-res and remove the wifi tether entitlement check. decompile and making the edit was easy, but on recompile i got the following error:
if i remove the last dash (i.e. change to values-mcc310-mnc1), it works...but i still get a warning on recompile:
i pushed the new framework to the phone and so far, it seems to work...but does anyone have any idea what's up with the errors? is it something that will cause any issues? is there a way to resolve it and get a clean decompile/recompile? i've tried using both beta7 and beta8 (which came from the apktool thread, i guess it's not publicly available yet?)
Click to expand...
Click to collapse
To recompile I actually use the old apktool.jar.
Apktool beta 2 enables me to only decompile CM11 stuff.

Primokorn said:
To recompile I actually use the old apktool.jar.
Apktool beta 2 enables me to only decompile CM11 stuff.
Click to expand...
Click to collapse
with the old apktool i get even more errors, and they're not as concise. i guess i should also reiterate this is completely stock, the only things i've done to the phone so far is update to 4.4, unlock bootloader, install twrp and root. other than that, the phone is completely stock.
can you (or anyone, really) tell me if changing that directory name and/or the translation warning i get are going to cause issues? if so (even if not), is there a good way to resolve them?

Related

Differences between Incredible 2.2 Leak #2 (8/1) vs Evo 2.2 Official OTA

I have been working on determining the differences between the latest Incredible 2.2 leak (8/1), versus the official OTA released for the Evo today. It turns out this process is not nearly as straightforward as one would hope. Before getting into the details of how I created this list, here it is for those who do not wish to read the technical details:
Evo ROM: http://forum.xda-developers.com/showthread.php?t=743781
Inc ROM: http://forum.xda-developers.com/showthread.php?t=742242 (full)
Code:
BrcmBluetoothServices.apk
Browser.apk
Calendar.apk
ContactsProvider.apk
EPST.apk
FieldTrial.apk
HTCAlbum.apk
HTCCamera.apk
HtcContacts.apk
HtcDialer.apk
HtcFootprints.apk
HTC_IME.apk
HtcLocationService.apk
htcmsgwidgets.apk
HtcMusic.apk
HtcPhotoWidget.apk
htcsettingwidgets.apk
HTCSetupWizard.apk
HtcSoundRecorder.apk
HtcStreamPlayer.apk
Mail.apk
Maps.apk
Mms.apk
PCSCII.apk
Phone.apk
Settings.apk
SettingsProvider.apk
teeter.apk
VoiceSearch.apk
WifiRouter.apk
Now, these files are *different*. That does not necessarily mean they are newer even though I suspect they are. So here's how I arrived at this list:
Removed any apps which were on the Evo but not on the incredible.
Decoded the package manifest for each app. Unfortunately HTC does not change the version string dilligently, so there were no differences.
Extracted classes.dex from each APK and ran a binary diff. About 20 matched and were eliminated from the list (i.e. same versions).
Here was the fun part. I wasn't convinced that classes.dex from those which did not match were actually different. The differences were likely created during the process of deodexing and the method by which the two releases were deodexed. Thus, I ran baksmali on all the classes.dex files.
Now we have a bunch of smali files. Unfortunately, the process of decompiling strips away variable and function names in some cases. So I ran a normalization against all the code using the following regex patterns:
Code:
s/\d+/N/g ;
s/goto_\w+/goto_N/g ;
s/cond_\w+/cond_N/g ;
s/Nx\w{1,}/HEX/g;
Ran a final diff against both decompiled, normalized trees and flagged any application with differences in the code. And that was the final list.
If anyone sees a flaw in my methods (especially the way I normalized) or has a better way to handle any of this, I'd really like to hear it. I'm planning to provide a patch against 2.2 leak #2 with the newer, aforementioned versions of the apps I have determined are different. I'll also provide an undo patch. I have no idea what the actual, practical differences are with the newer versions but it should be fun to find out. My assumption is that they're more stable since they were officially released today.
Expect some patches shortly.
I'm confused by this thread.
So you only did apps? Because I know for a fact that some of the framework differs.
adrynalyne said:
So you only did apps? Because I know for a fact that some of the framework differs.
Click to expand...
Click to collapse
That's right, have not done framework yet.
I will go so far to say that the final version for Evo and the recent leak for us are very close in versioning, considering that the framework and apps are interchangeable with our leak. Nice to see someone taking the time to find absolute differences though.
Will be interested when this is done. Will you do /bin and /lib as well? Good work
Also, keep in mind that, just like you said, they may not be newer. I've been playing with evo ports for the last few days and some of these apps should not be applied to the Dinc unless you enjoy Sprint specific stuff that doesnt work
Best hybrid for me has been Evo framework with Dinc apps.
adrynalyne said:
Best hybrid for me has been Evo framework with Dinc apps.
Click to expand...
Click to collapse
What's been the end result of using the Evo framework? As in, what improvements have you noticed? The main problem I've had with leak#2 is 3G not coming up at times after a reboot. Does the Evo framework sort that out?
Evo framework seems to make for a swifter device, but it may be a placebo. Also, I've not been losing 3G with it, but once again, it could be coincidence.
Its kind of nice looking to have six bars instead of four though.
I haven't had enough time with it just yet. I am getting higher linpack scores by about 2k on average though.
bin differences:
Code:
debuggerd
getWiMAXPropDaemond
ip
mmcamera_test
reboot
service
setWiMAXPropDaemond
lib differences
Code:
libandroid_runtime.so
libaudio.so
libext2_blkid.so
libext2_com_err.so
libext2_e2p.so
libext2fs.so
libext2_profile.so
libext2_uuid.so
libgsl.so
libhardware_legacy.so
libHTC_mm_property.so
libhtc_ril.so
libloc_api-rpc.so
libloc_api.so
libloc_ext.so
libmediaplayerservice.so
libmedia.so
liboemcamera.so
libopencorehw.so
libopencore_player.so
libopencore_rtsp.so
libstagefright_color_conversion.so
libstagefrighthw.so
libstagefright_omx.so
libstagefright.so
libsurfaceflinger.so
libTVOUT.so
libvomemedia.so
libwebcore.so
If you are interested, I can upload a framework patch I made that replaces the Dinc framework with the Evo framework from their official ota.
Just keep in mind first boot takes forever....
adrynalyne said:
Evo framework seems to make for a swifter device, but it may be a placebo. Also, I've not been losing 3G with it, but once again, it could be coincidence.
Click to expand...
Click to collapse
Interesting. So just framework/ or did you include anything else?
Nice, thanks!
rmk40 said:
Interesting. So just framework/ or did you include anything else?
Click to expand...
Click to collapse
Just /framework.
framework jar differences (did not do APKs yet):
Code:
android.policy.jar
com.htc.framework.jar
framework.jar
Only in evo.framework: com.google.translate.jar
Only in evo.framework: com.sprint.hardware.twinCamDevice.jar
Only in inc.framework: com.cequint.platform.jar
services.jar
adrynalyne said:
If you are interested, I can upload a framework patch I made that replaces the Dinc framework with the Evo framework from their official ota.
Just keep in mind first boot takes forever....
Click to expand...
Click to collapse
*raises hand* INTERESTED!
But, please also provide a reverse patch to go back to the Inc framework if necessary. I'd love to try the Evo framework out.
I'm also thinking of replacing the camera app with the Evo one... I like the on-screen shutter button. It SHOULD work right?
bast525 said:
I'm also thinking of replacing the camera app with the Evo one... I like the on-screen shutter button. It SHOULD work right?
Click to expand...
Click to collapse
Yep, should work.
I get reboots with leak #2
Hmm, I could provide the framework patch, but I dont have a reverse process patch yet.
If you want, head over to androidforums and try test5 in the evo ports thread. I think you will be pleasantly surprised.
adrynalyne said:
Hmm, I could provide the framework patch, but I dont have a reverse process patch yet.
If you want, head over to androidforums and try test5 in the evo ports thread. I think you will be pleasantly surprised.
Click to expand...
Click to collapse
Android Forums isn't easily navigated, so here's the link, and here's a Multiupload link.
Your Evo test 5 is also awesome because now not only do I have six signal bars, I have true H264 recording as well in the camcorder. Awesome.

[GUIDE][LINUX][MIUI] MIUI PatchROM -- BUILD YOUR OWN MIUI ROM

take a look here:
http://forum.xda-developers.com/showthread.php?t=1483332
as of me, am on a awfully slow network to start with and my stupid brother 4matted both of my systems. this nd did away with by linux build environment. not possible for me to download everything to start over. even downloading virtual box will take me two days let alone downloading the maverick
I have a question, are we going to see an official MIUI ROM or do we have to wait someone to port it?
Enviado desde mi LG-P970 usando Tapatalk
I know, it is a veeery noobish question, but how do i get a zipball? I dont get the first step already I already set up Ubuntu, but now I guess, I need your help, then I'll try to build it
-edit-
Do I only need to push download and then download as zip?
Could anyone help me out with the makefile? cause when I follow the steps and after typing: make zipfile
It start doing some stuff, but then aborts and gives out this
Code:
/home/MisterGT/MiCode/tools/apktool d -f /home/MisterGT/MiCode/miui/system/framework/services.jar .build/services_miui
/home/MisterGT/MiCode/tools/apktool: Zeile 77: exec: java: Nicht gefunden.
make: *** [.build/services_miui] Fehler 127
Code:
Translated: ....apktool Line 77: exec: java: Not found.
make: *** [.build/services_miui] Error 127
Hope you can help me, cause then we can get our MIUI quickly, so plsss help me, I am also noob only
I already did this:
Code:
#
# Makefile for P970?
#
# The original zip file, MUST be specified by each product
local-zip-file := ZeusROM.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI_P970.zip
# All apps from original ZIP, but has smali files chanded
local-modified-apps := LogsProvider Phone MediaProvider Settings
# All apks from MIUI execept MIUISystemUI and framework-miui-res.apk
local-miui-apps := Contacts ContactsProvider Mms TelephonyProvider ThemeManager Launcher2 \
DownloadProvider TelocationProvider Notes Music Torch DownloadProviderUi Updater
# All apps need to be removed from original ZIP file
local-remove-apps := AccountAndSyncSettings ApplicationsProvider AppWidgetPicker ArcCamera BluetoothOpp BluetoothPbap BrcmBluetoothServices Calender CalenderProvider Camera CertInstaller ChargingTest Clicker_hi Contacts ContactsProvider covertor DefaultContainerService DM_RsupInput DM_RsupSrn DM_RsupUInput DownloadProvider DownloadProviderUi DrmProvider DrmService ExternalMemoryTest FlexProvider.apk FmRadio FmRadioProvider Fonts Gallery3D Gmail GoogleBackupTransport GoogleCalendarSyncAdapter GoogleContactsSyncAdapter GooglePartnerSetup GoogleQuickSearchBox GoogleServicesFramework HTMLViewer JSFontService Launcher2 LGDebug lgeStreamingPlayer lgeVideoPlayer LGSetupWizard LGSetupWizardAid LibFlashPlayer MarketUpdater MediaProvider MediaUploader memo Mms Music NetworkLocation NetworkLocation NetworkUsage OmaDmclient PackageInstaller PCSync Phone PicoTts PowerControl PowerOff RSstarter RsupInput RsupSrn RsupUInput Screencapture Settings SettingsProvider SetupWizard SoundRecorder Stk Superuser SVGBrowserPlugin SystemUI Talk TelephonyProvider Term TtsService UserDictionaryProvider Vending VonService WapService
# To include the local targets before and after zip the final ZIP file,
# and the local-targets should:
# (1) be defined after including porting.mk if using any global variable(see porting.mk)
# (2) the name should be leaded with local- to prevent any conflict with global targets
local-pre-zip := local-zip-misc
local-after-zip:= local-test
# The local targets after the zip file is generated, could include 'zip2sd' to
# deliver the zip file to phone, or to customize other actions
include $(PORT_BUILD)/porting.mk
# To define any local-target
local-zip-misc:
cp misc/com.google.android.maps.jar $(ZIP_DIR)/system/framework/
@echo Add google apks
cp misc/apk/* $(ZIP_DIR)/system/app/
local-test:
echo "an example action"
Hope it is right... I am using Zeus ROM, as a first try, as you can see...
N00BY0815 said:
I know, it is a veeery noobish question, but how do i get a zipball? I dont get the first step already I already set up Ubuntu, but now I guess, I need your help, then I'll try to build it
-edit-
Do I only need to push download and then download as zip?
Click to expand...
Click to collapse
visit the link from linux (even if it's a VM) and push d/l. its a github repo.
setting up sdk on linux has loads of videos in youtube. then follow the instructions.
Yeah, as you can see from the post below, I already made one more step, and also brought it to start, because i just didnt extract the java sdk correctly... but as I read the java error, I thought I might look in there. But can you help me with the makefile? Is it all correct?
here is as far as i could get till now:
Code:
[email protected]:/home/MisterGT/MiCode/p970# make zipfile
/home/MisterGT/MiCode/tools/apktool d -f /home/MisterGT/MiCode/miui/system/framework/services.jar .build/services_miui
I: Baksmaling...
I: Copying assets and libs...
build .build/services.jar...
--------------------------------------------
cp -r services.jar.out/ .build/services
/home/MisterGT/MiCode/tools/add_miui_smail.sh .build/services_miui .build/services
/home/MisterGT/MiCode/tools/apktool b .build/services .build/services.jar
I: Checking whether sources has changed...
I: Smaling...
W: Could not find resources
I: Building apk file...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /home/MisterGT/MiCode/p970/.build/services.jar, /home/MisterGT/MiCode/p970/.build/services/build/apk]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildApk(Androlib.java:355)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /home/MisterGT/MiCode/p970/.build/services.jar, /home/MisterGT/MiCode/p970/.build/services/build/apk]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 5 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
at java.lang.Runtime.exec(Runtime.java:610)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:78)
... 6 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
... 9 more
make: *** [.build/services.jar] Fehler 1
Might this be due to failed decompiling of apk's? If so, can you help me out on that?
---------- Post added at 05:41 AM ---------- Previous post was at 05:01 AM ----------
OK, I guess I made any fault while decompiling the .jar files. Can anyone provide the decompiled files, that are needed? See in link in the first post. And check if my makefile is correct pls
N00BY0815
I have similar [error 1], but i use custom rom based on 20a (deodex)...
Decompiling and compiling *.jar is not detects errors and runs fine ... I don't have idea to fix it ... read many forums but the solutions have not found...
Code:
Cannot run program "aapt"
likely a problem in this
achyut...huexxx... redy... any ideas?
mix231 said:
N00BY0815
I have similar [error 1], but i use custom rom based on 20a (deodex)...
Decompiling and compiling *.jar is not detects errors and runs fine ... I don't have idea to fix it ... read many forums but the solutions have not found...
Code:
Cannot run program "aapt"
likely a problem in this
Click to expand...
Click to collapse
Check out the APKTool folder. Maybe there is no aapt file in it. If so, just download apktool again and extract it there.
For aapt error
If i read that guide carefuly ,
you need to make path and add the tool folder in your path.
mix231 said:
achyut...huexxx... redy... any ideas?
Click to expand...
Click to collapse
So sorry, I haven't read it.. Got busy this semester, so I'm not doing any android dev activity for now..
Sent from my Black.
N00BY0815 said:
I know, it is a veeery noobish question, but how do i get a zipball? I dont get the first step already I already set up Ubuntu, but now I guess, I need your help, then I'll try to build it
-edit-
Do I only need to push download and then download as zip?
Click to expand...
Click to collapse
NO,NO,NO~!you need to do amount of works.
It's not easy- -
Is someone trying to create a miui ROM?
timvdhoorn said:
Is someone trying to create a miui ROM?
Click to expand...
Click to collapse
It will come soon,but it's chinese version- -
jackoll said:
It will come soon,but it's chinese version- -
Click to expand...
Click to collapse
how can you say it'll come soon???...u know something we all should know??...and adding translations is no big deal. can be done once the ROM is released.
new, more detailed instructions
http://www.miui.com/thread-431923-1-1.html
pan_ataman said:
new, more detailed instructions
http://www.miui.com/thread-431923-1-1.html
Click to expand...
Click to collapse
I can't read that lol
Isn't there english thread?
DiederikC said:
I can't read that lol
Isn't there english thread?
Click to expand...
Click to collapse
It's just the porting tutorial, but no one ever succeed until now.

[TUT] Implementing EPRJ RIL in Custom Roms by Yourself

A. Why change RIL?
Hey, everyone.
As a user that's been using custom roms since our bootloader was unlocked, I'm aware that some of us have some issue with telephony & mobile data (in short, RIL) - occasionally IMEI wouldn't be read on boot, which would lead to device not being registred on network. Sometimes, the network would "die" in a way - you'd get an error when trying to dial a number, and when someone would call you, they'll hear the ringing tone while your cell phone would not ring at all.
The cause of the problem seems to be some lazy coding by official CM developers/maintainers for our device. This was picked up by a developer named kholk, so he did his best to recode it properly, however it was never included into official CM device tree for reasons unknown to me (more info about the issue can be found here: http://review.cyanogenmod.org/#/c/47980/).
Kholk did include his own custom RIL into his EPRJ roms, but the roms are kinda old and have iffy baseband (which seems to be kernel issue, as he's using his own, 3.4 kernel instead of CM's 3.1 kernel in other custom roms).
So, with the help of Adam77Root, I've learned a way on how to implement EPRJ RIL into other custom roms (since I still had RIL issue with default CM RIL in 4.3 roms even) - so far I've tested it with Vanir 4.3, Carbon 4.3, Carbon 4.3.1, and few 4.2.2 roms, and I havent had ANY issues I had in CM RIL.
So, this is a tutorial to show you how you can import EPRJ RIL to any custom rom you'd like, in case you have issues with cell connection.
-this should work on any kernel and any custom rom (4.2.2+)! Tested so far, as far as kernel goes, are iodak 8/8.5, WWJB8/8b, Optimus Prime several versions, Optimus Play! 2.53.
-KK roms tested are P.A. by @dcos which has eprj ril by default, official CM nightlies and several others
-some KK roms, for some reason, don't have x3ril.smali file in their telephony-common.jar. To implement EPRJ RIL in these roms, follow the tutorial up to point 5, and skip that one, since you don't have anything to delete. After point 13, you need to do one additional thing - you need to edit ROM's build.prop settings, look for this line: "#ro.telephony.ril_class=X3RIL", and delete "#" so this line would be included in build.prop. After that, you're ready to flash. Thanks goes to @gerciolisz for the tip on the build.prop settings.
-/As of 24.01.2014. i've added another zip file which contains x3ril.smali taken from P.A. port by dcos - i'd recommend using this one for 4.4.2 roms/
-as of 11.06.2014., I've added x3ril.smali (it's in omni-v1.rar) made by adam, which is based on omni's RIL but has eprj RIL recovery. if you're on 4.4.3 kitkat rom and have issues, i suggest you give this file a try first before others
B. What's needed?
First off, you'll need a few things:
- Android Multitool from http://forum.xda-developers.com/showthread.php?t=2326604, many thanks to @Flextrick
- Read the linked topic - it's the instruction on how to use it, and in case you encounter any errors, that's the place to search for solutions
- Attached is a RAR with two files in it, X3RIL_old.smali and X3RIL_new.smali. You need only one of those - but more info about them will be in the other steps.
- Custom ROM you want to edit
- Common sense
- WinRAR & JAVA
C. How to change RIL?
Steps:
1. First step is to open the .zip of your custom ROM you want to edit, and search for system/framework/telephony-common.jar
2. Extract it to AndroidMultitool/Files, and after extract is done, delete it from .zip
3. Open Android Multitool, under Decompiling select .jar, then select telephony-common.jar in AndroidMultitool/Files, click "decompile"
4. After you're done, check if there were any errors in the Log, in AndroidMultitool main window
5. Head over to AndroidMultitool/Decompiled_jar/telephony-common/com/android/internal/telephony and look for X3RIL.smali. This is CM's RIL implemented in custom roms, which we dont need anymore, so delete it
6. Now, you need to decide wether to use X3RIL_old.smali, which is RIL from EPRJ CM10.2 built on 20130813, or X3RIL_new.smali which is RIL from EPRJ CM10.2 built on 20131007. I'm using 20131007 atm, and it's working without issues
7. When you've decided, move it back into AndroidMultitool/Decompiled_jar/telephony-common/com/android/internal/telephony and rename it to X3RIL.smali
8. Back in AndroidMultitool, under Compilin, select jar, and for folder select AndroidMultitool/Decompiled_jar/telephony-common, press "compile", and check for errors in Log
9. Output should be classes.dex file under AndroidMultitool/Compiled_jar
10. Open telephony-common.jar in AndroidMultitool/Files with WinRar - you should see META-INF folder, with classes.dex file
11. Delete classes.dex file in WinRAR
12. Move classes.dex file from AndroidMultitool/Compiled_jar to telephony-common.jar opened in WinRAR
13. Paste telephony-common.jar into system/framework inside the custom rom .zip file
14. You now have modified ROM ready to flash on our device!
D. Thank You's
Thank you's go out to @kholk for his RIL programming, @dcos for first implementing EPRJ RIL into a rom (his P.A. unofficial port for our device) different than EPRJCM10.2, @Adam77Root for his tutorial that I basically beutified and made sure is easier to understand & his modification of x3ril.smali from omni, @gerciolisz for the tip about build.prop settings, @Flextrick for his Multitool with neat GUI to extract .jar files, and all the other devs of p880 making our device worth every dime I've spent on it.
Flying_Bear said:
Kholk did include his own custom RIL into his EPRJ roms, but the roms are kinda old and have iffy baseband (which seems to be kernel issue, as he's using his own, 3.4 kernel instead of CM's 3.1 kernel in other custom roms).
Click to expand...
Click to collapse
Dude, i think you missed out the clarification for the users on whether or not they need to use the EPRJ Kernel and if anykernel will still work or normal kernels will work etc. Because your bound to have the first person to ask a question will either be, "How do i declare java paths" and "Will 'kernel name here' work with it", this isnt me asking, more of an fyi post (Y)
I do apologize about it, but saves you the time and effort of answering the question every day
MOD EDIT: watch your language please.
penguin449 said:
Dude, i think you missed out the clarification for the users on whether or not they need to use the EPRJ Kernel and if anykernel will still work or normal kernels will work etc. Because your bound to have the first person to ask a question will either be, "How do i declare java paths" and "Will 'kernel name here' work with it", this isnt me asking, more of an fyi post (Y)
I do apologise about it, but saves you the time and effort of answering the question every day
Click to expand...
Click to collapse
np, thanks for the tip. i'll add in OP that it works with any kernel
MODERATOR EDIT: @penguin449 watch your language
I flashed Vanir nightly 171013 with Optimus Prime 2.70 kernel and telephony was completely disabled. I was not able to find or register to the mobile network. I tried modifying the RIL file as explained in this post; initially with the "new" file which didn't seem to solve the problem (still didn't get signal) but I didn't wait I immediately tried flashing the ROM with the "old" RIL instead. Initially there was no signal although I was able to find networks, but after a reboot the phone finally managed to connect to the mobile network.
I'm not sure whether it would've worked after a reboot with the "new" but I'm guessing if it's working with the "old" RIL I got nothing to worry about right?
Vanir is 4.3.1 while OP is for 4.3, i think thats your problem. Different RIL would not help in that case. Flash Anykernel version of OP, or find a version repacked with 4.3.1 ramdisk. Good luck!
Flying_Bear said:
Vanir is 4.3.1 while OP is for 4.3, i think thats your problem. Different RIL would not help in that case. Flash Anykernel version of OP, or find a version repacked with 4.3.1 ramdisk. Good luck!
Click to expand...
Click to collapse
As far as I understood, the 171013 version did not have the RamDisk issue so I figured the CM10.2 version of Optimus Prime kernel should've worked correctly?
So I get it from you that if I flash the original rom with the AnyKernel version of OP it should work fine? (no need for any RIL modifications?)
Yep, anykernel versions of all our kernels xcept iodaks should work on any android version without any modifications.
Is there a way to do this with Linux?
If not, how about uploading modified telephony-common.jar for CM ROMs?
I tried just replacing the whole telephony-common.jar file but I couldn't send or receive any messages. Everything else seemed to work though.
Sent from my LG-P880 using Tapatalk
MilkyJoePD said:
Is there a way to do this with Linux?
If not, how about uploading modified telephony-common.jar for CM ROMs?
I tried just replacing the whole telephony-common.jar file but I couldn't send or receive any messages. Everything else seemed to work though.
Sent from my LG-P880 using Tapatalk
Click to expand...
Click to collapse
not sure really, since i havent worked on linux systems.
and i dont think telephony-common.jar is universal for all roms (i might be mistaken though), so there's no use to upload it. however, if you want, upload your original telephony-common.jar file here and i'll do my best to mod it for you!
Flying_Bear said:
not sure really, since i havent worked on linux systems.
and i dont think telephony-common.jar is universal for all roms (i might be mistaken though), so there's no use to upload it. however, if you want, upload your original telephony-common.jar file here and i'll do my best to mod it for you!
Click to expand...
Click to collapse
I meant it would be a good idea to have a place to download the modified files for specific ROMs.
Here's the (unmodified) file for Vanir.
https://app.box.com/s/embcq9kuemfdkdb1qw63
Thanks.
Sent from my Optimus 4X HD using Tapatalk
MilkyJoePD said:
I meant it would be a good idea to have a place to download the modified files for specific ROMs.
Here's the (unmodified) file for Vanir.
https://app.box.com/s/embcq9kuemfdkdb1qw63
Thanks.
Sent from my Optimus 4X HD using Tapatalk
Click to expand...
Click to collapse
well, we have way too much roms for me to download each one and replace the RIL ^^
anyway, here's your modified telephony-common ^^ enjoy!
Flying_Bear said:
well, we have way too much roms for me to download each one and replace the RIL ^^
anyway, here's your modified telephony-common ^^ enjoy!
Click to expand...
Click to collapse
I suppose there is a lot.
I'll test the Vanir one and report back.
If it works then there's a start. I can send messages so it works so far. The only thing keeping me from staying on a CM ROM is the random signal loss.
Sent from my Optimus 4X HD using Tapatalk
MilkyJoePD said:
I suppose there is a lot.
I'll test the Vanir one and report back.
If it works then there's a start. I can send messages so it works so far. The only thing keeping me from staying on a CM ROM is the random signal loss.
Sent from my Optimus 4X HD using Tapatalk
Click to expand...
Click to collapse
check it out, this should fix that issue completely. and report when you have time ^^
Flying_Bear said:
check it out, this should fix that issue completely. and report when you have time ^^
Click to expand...
Click to collapse
If you want some 4.3.1 repacks done i can do them? or if you want some experience, i have the tools to swap ramdisks on windows in my signature that you could use...
In CM ROMs I get crazy data switches from 3g to E and G. Everything is good so far. Time will tell...
Sent from my Optimus 4X HD using Tapatalk
---------- Post added at 01:22 AM ---------- Previous post was at 01:08 AM ----------
penguin449 said:
If you want some 4.3.1 repacks done i can do them? or if you want some experience, i have the tools to swap ramdisks on windows in my signature that you could use...
Click to expand...
Click to collapse
If you can then that would be great. A download for each CM ROM would open up custom ROMs like never before.
Sort out the SD card/internal memory paths and stock ROMs would be not worth installing.
Sent from my Optimus 4X HD using Tapatalk
penguin449 said:
If you want some 4.3.1 repacks done i can do them? or if you want some experience, i have the tools to swap ramdisks on windows in my signature that you could use...
Click to expand...
Click to collapse
if you've got the time and the will, be my guest - however, i don't think it's quite worth it. Not many people have this issue, and those that do would be better off fixing it by themselves then downloading aged nightlies for the rom they're looking for.
MilkyJoePD said:
In CM ROMs I get crazy data switches from 3g to E and G. Everything is good so far. Time will tell...
Click to expand...
Click to collapse
hm, switches from 3g to 2g seems to show that there is a bad connection where you're at. try enabling 2g only or 3g only in custom rom options or quick tiles, most roms support it these days. that should save your battery for few more %.
Just wanted to say that since replacing the file I haven't had to reboot once to get SMS or network to work.
That's over a month, whereas I was having to reboot about every 2 days.
The G/3G switching has improved, but still more sensitive than stock.
Sent from my Optimus 4X HD using Tapatalk
hey what if.... there is no x3ril.smali?XD there is only ril.smali or many others
edit: its ok there just x3ril was missing
I'm on a odexed ROM (mokee 4.2.2 release) so I don't know what to do with classes.dex file multitool generates.It was meant to be used for deodexed telephony-common.jar files.So I tried these steps:
1_)deodex the ROM (using deodexer 4.3),
2_)implent RIL
3_)odex the ROM(using universal odexer 6.3.1) again which I failed to do as something was wrong with decompiling before odexing.This is probably happening due to deodex process.
I got bootloop after odexing the ROM.So I'm curious if there is a way to do this on an odexed jar file without having to deodex first.
I also tried to simply delete the odex & jar file and replace it with deodexed and eprj RIL implented jar file but the rest of the ROM was odexed so it gave me a bootloop.
I don't know much about these stuff, but I did my best searching for a solution and I'm out of ideas.All I want is to have an odexed rom with EPRJ RIL implented, I'd appreciate any help
ottomanhero said:
I'm on a odexed ROM (mokee 4.2.2 release) so I don't know what to do with classes.dex file multitool generates.It was meant to be used for deodexed telephony-common.jar files.So I tried these steps:
1_)deodex the ROM (using deodexer 4.3),
2_)implent RIL
3_)odex the ROM(using universal odexer 6.3.1) again which I failed to do as something was wrong with decompiling before odexing.This is probably happening due to deodex process.
I got bootloop after odexing the ROM.So I'm curious if there is a way to do this on an odexed jar file without having to deodex first.
I also tried to simply delete the odex & jar file and replace it with deodexed and eprj RIL implented jar file but the rest of the ROM was odexed so it gave me a bootloop.
I don't know much about these stuff, but I did my best searching for a solution and I'm out of ideas.All I want is to have an odexed rom with EPRJ RIL implented, I'd appreciate any help
Click to expand...
Click to collapse
unfortunately, i encountered the same issue, and it's beyond my knowledge on what to do with odexed roms. i bypassed the issue by using a nightly which came after the stable was released (not sure if there are any for mokee though)

[ROM][4.2.2][UNOFFICIAL][DEVS] CyanogenMod 10.1 ALPHA

Unofficial CyanogenMod 10.1
Rom: Unofficial CyanogenMod 10.1
Android version: 4.2.2
Status: Alpha (means not ready as beta or even stable release!)
What doesn't work:
Sound partially, only calls not working right
Wifi
GPS
Bluetooth
Brightness control
Airplane mode
Camera, did work though in earlier version
Disclaimer
I am not responsible for bricked devices, broken hearts, thermonuclear war or you getting fired because the alarm app failed. It's up to you, not to me.
Click to expand...
Click to collapse
Downloads:
Google Drive CM10.1
Mirror, hosted by Burn02
The version differences:
Code:
24/2/14
[LIST]
[*] Using new audio hall
[*] Microphone works now, call still doesn't
10/2/14
[LIST]
[*] Initial audio support
[*] Fixed Wifi symlink for MAC-adres
[*] ICS_AUDIO_BLOB disabled
[/LIST]
01/12/13
[LIST]
[*] ICS_AUDIO_BLOB enabled
[*] Using original audio blobs
[/LIST]
14/11/13
[LIST]
[*] Both Internal storage and external storage working
[*] Build modified init from source
[*] Dalvik with x86 houdini support
[*] More modules build from source
[/LIST]
6/11/13
[LIST]
[*] Only internal storage working
[*] Libc with x86 wrappers support
[*] Pixelflinger/charger with x86 encoder support
[*] Ramdisk changes
[*] Android Build fixes for x86
[*] Add intel specific codes
[/LIST]
Workarounds:
The Rom can bootloop when installed in TWRP. If so use CWM instead for a while till TWRP is working correctly.
Want to help?
This Rom is made by many people that contribute to it, if it is in code, new information or just bug logs. Everybody can help. Make a 'Logcat' about the problems u encounter and post them here. Give a brief explanation of what u did and wanted to archive (we will try our best to get them sorted, eventually) or contribute with code into my github at the moment.
Click to expand...
Click to collapse
Source:
https://www.github.com/HazouPH
About the sound:
When using the rom zip with ICS_BLOBS_ENABLED and adding the right files:
etc/parameter-framework/*
etc/sound.conf
etc/audio_effects.conf
etc/media_codecs.xml
etc/phonecall_es305b_*
lib/hw/alsa.smi.so
lib/hw/audio.primary.smi.so
lib/hw/audio_policy.smi.so
lib/parameter-framework-plugins/*
lib/libasound.so
usr/lib/alsa-lib/*
usr/share/alsa/*
The rom will bootloop and the mediaserver will crash with a log file. See attachment. If u have any idea on how to solve it, i would happily like to know.
Hazou said:
About the sound:
When using the rom zip with ICS_BLOBS_ENABLED and adding the right files:
etc/parameter-framework/*
etc/sound.conf
etc/audio_effects.conf
etc/media_codecs.xml
etc/phonecall_es305b_*
lib/hw/alsa.smi.so
lib/hw/audio.primary.smi.so
lib/hw/audio_policy.smi.so
lib/parameter-framework-plugins/*
lib/libasound.so
usr/lib/alsa-lib/*
usr/share/alsa/*
The rom will bootloop and the mediaserver will crash with a log file. See attachment. If u have any idea on how to solve it, i would happily like to know.
Click to expand...
Click to collapse
Good work Hazou !
I will give you some idea. And why don't you use JB libs ?
1. Replace mediaserver by ICS one
2. Replace /system/lib/hw/audio.primary.smi.so by CyanogenMod file
3. There is a problem with libc.so, so just try to replace this lib with ICS one....
4. Replace /system/lib/libat-manager.so (if exist) by CM one
Do these steps one by one and logcat for each step.
GalaxyUser
GalaxyUser said:
Good work Hazou !
I will give you some idea. And why don't you use JB libs ?
1. Replace mediaserver by ICS one
2. Replace /system/lib/hw/audio.primary.smi.so by CyanogenMod file
3. There is a problem with libc.so, so just try to replace this lib with ICS one....
4. Replace /system/lib/libat-manager.so (if exist) by CM one
Do these steps one by one and logcat for each step.
GalaxyUser
Click to expand...
Click to collapse
Ty, for the suggestions. Some i can already answer
1. We could try this, but then also the libaudioflinger needs replacing. And maybe another file.
2. Can try it, but most likely doesn't work. The stock cyanogenmod one doesn't have the right code the execute our soundcard. I found out that the audio_policy.smi.so is the stock one with just small modifications.
3. Libc can't be switched. To many things depend on libc. And besides that, the code in libc were it goes wrong is the same one as my modified jb libc
4. libat-manager is a specific module for our device. we don't have the right sources to build it. But i can maybe replace it with the one from the 4.2.2 drop of the chineze version. But then it has some restrictions because off the chinese firewall.
Keep up the ideas. Maybe we get there someday
Hazou
Hazou said:
Ty, for the suggestions. Some i can already answer
1. We could try this, but then also the libaudioflinger needs replacing. And maybe another file.
2. Can try it, but most likely doesn't work. The stock cyanogenmod one doesn't have the right code the execute our soundcard. I found out that the audio_policy.smi.so is the stock one with just small modifications.
3. Libc can't be switched. To many things depend on libc. And besides that, the code in libc were it goes wrong is the same one as my modified jb libc
4. libat-manager is a specific module for our device. we don't have the right sources to build it. But i can maybe replace it with the one from the 4.2.2 drop of the chineze version. But then it has some restrictions because off the chinese firewall.
Keep up the ideas. Maybe we get there someday
Hazou
Click to expand...
Click to collapse
Thanks for answer.
1. Try to replace libaudioflinger.so, then provide a logcat please. It may need hex edit (and I can do it).
4. Yes try it because sound need this lib.
I think first answer is the best... If the rom allow logcat access after replacement.
Edit 1: my Razr I is broken but I would like to help
Edit 2: Sound is very hard to works on porting rom (even if it's not the same thing with CM), so perhaps it needs some others files to change
Edit 3: Try to replace these libs too, with the chineze version:
/system/lib/libamc.so
/system/lib/libevent-listener.so
And you need to add FM's lib because ICS libaudioflinger.so needs these files:
Code:
12-05 16:14:35.939 527 527 E AudioHardwareALSA: Cannot load FM HW Module
http://xt890.blogspot.com.ar/2013/12/101-rom-cyanogenmod-build-3-para.html the site over there claims that the wifi is working..can you have a look?
EDIT: the rom download link is your google drive
Hazou said:
Unofficial CyanogenMod 10.1
Click to expand...
Click to collapse
Thanks!.. is a great news...
antkalaitzakis96 said:
http://xt890.blogspot.com.ar/2013/12/101-rom-cyanogenmod-build-3-para.html the site over there claims that the wifi is working..can you have a look?
EDIT: the rom download link is your google drive
Click to expand...
Click to collapse
Y' i know. He asked permission tot post it
Wifi working isn't a very big problem. I want to first hopefully fix the sound, or hope that some ideas might help.
Sent from my GT-P5110 using XDA Premium HD app
Hey can somebody post some screenshots ??
I don't think it's the right thread to post screenshot. This thread is for helping to develop and make all features work.
great .. thanks @Hazou
Enviado desde mi Moto usando Tapatalk
ICuaI said:
I don't think it's the right thread to post screenshot. This thread is for helping to develop and make all features work.
Click to expand...
Click to collapse
What would be the thread to post in, other than the one who actually presents the rom we are taking screenshots of?
hotpokets said:
What would be the thread to post in, other than the one who actually presents the rom we are taking screenshots of?
Click to expand...
Click to collapse
You don't need a screenshot, if this doesn't work yet. This is a thread to make the rom functional. Then it can be released to the regular users like us, who just want to use it regardless of the making process
You can go in every CM10.1-thread in this forum. I am sure that you will find enough screenshots of CM10.1. The rom for our xt890 doesn't have another look.
Or try this alpha-build on your own phone
And now for me I'll stop being of topic
Sorry for that to all the devs
GalaxyUser said:
Thanks for answer.
1. Try to replace libaudioflinger.so, then provide a logcat please. It may need hex edit (and I can do it).
4. Yes try it because sound need this lib.
I think first answer is the best... If the rom allow logcat access after replacement.
Edit 1: my Razr I is broken but I would like to help
Edit 2: Sound is very hard to works on porting rom (even if it's not the same thing with CM), so perhaps it needs some others files to change
Edit 3: Try to replace these libs too, with the chineze version:
/system/lib/libamc.so
/system/lib/libevent-listener.so
And you need to add FM's lib because ICS libaudioflinger.so needs these files:
Code:
12-05 16:14:35.939 527 527 E AudioHardwareALSA: Cannot load FM HW Module
Click to expand...
Click to collapse
So, i tested the methods u supposed.
first off, the roms doesn't need the fm module to work It's like the usb and hdmi audio modules that are expanding the audio functions, but aren't necessary for booting.
Than the rest, i found out that all the libamc, libevent*, libat-* etc. the files were we don't have the source from are the same as the stock jelly ones. So no need to change those. Like the other libs, mediaserver is the same as the one i compiled compared to the chinese 4.2.2 one.
For the libaudioflinger part, if i switch them, they won't boot up there service anymore. Why i doný know, but i have the feeling that the libaudioflinger won't solve the mystery.
Another thing i read from the logcat is that it crashes right at the moment the sound-card (medfieldaudio) aka 0x00000002 is called, after it is set that it can be used. So it seems to me that the alsa lib can't read the device properly. Somewhere allong the line a thing can't reach it or is giving the wrong data. But what....
The next thing i gonna try is making my own alsa module with tinyalsa implementation. To get only the sound working. FM and the audience driver won't work then. Great chance that it won't work, but you gotta try
Hazou said:
So, i tested the methods u supposed.
first off, the roms doesn't need the fm module to work It's like the usb and hdmi audio modules that are expanding the audio functions, but aren't necessary for booting.
Than the rest, i found out that all the libamc, libevent*, libat-* etc. the files were we don't have the source from are the same as the stock jelly ones. So no need to change those. Like the other libs, mediaserver is the same as the one i compiled compared to the chinese 4.2.2 one.
For the libaudioflinger part, if i switch them, they won't boot up there service anymore. Why i doný know, but i have the feeling that the libaudioflinger won't solve the mystery.
Another thing i read from the logcat is that it crashes right at the moment the sound-card (medfieldaudio) aka 0x00000002 is called, after it is set that it can be used. So it seems to me that the alsa lib can't read the device properly. Somewhere allong the line a thing can't reach it or is giving the wrong data. But what....
The next thing i gonna try is making my own alsa module with tinyalsa implementation. To get only the sound working. FM and the audience driver won't work then. Great chance that it won't work, but you gotta try
Click to expand...
Click to collapse
Will this ROM work on Lenovo K900?
charming.arpit said:
Will this ROM work on Lenovo K900?
Click to expand...
Click to collapse
Not out of the box, no.
Sent from my GT-P5110 using XDA Premium HD app
intel released source code for android 4.4
http://software.intel.com/en-us/articles/android-4-4-kitkat-x86-emulator-system-image
if its helpful
Did you guys saw this?
http://software.intel.com/en-us/articles/android-4-4-kitkat-x86-emulator-system-image
drunk_ryder24 said:
http://software.intel.com/en-us/articles/android-4-4-kitkat-x86-emulator-system-image
if its helpful
Click to expand...
Click to collapse
hey this is just
Android* 4.4 (KitKat) x86 Emulator System Image
this is for developers who running a pc (x86) and want to emulate the newest android.
this has nothing to do with our fone.
i think the problem is, this image dont got the drivers for our device.or any drivers expect for emulation.. dont know but thanks for the info that intel is developin
regard

[GUIDE] UPDATED!!! [MOD] How to make Call Log Limit practically Unlimited

Well this Guide with all its spelling mistakes somehow made it to portal
Click to expand...
Click to collapse
For Developers: If you are planning to compile your ROM, and want to use this mod, then read This Post
Background Story:
I was missing the CyberShot Camera too much and found Google Camera has been ported to JB And I also wanted to try the Moded LifeLog app, which somehow was not working on my Pacman Rom.
These were the reasons I Decided to come back to JB Stock Base. I had a previous Nandroid Backup of Lovin's Z2 ROM for XV. I took all my Call-Log and SMS Backups and also took backup of some apps that I used. Then I restored the NAND Backup today.
after that I started restoring the apps+data. Everything was fine.
After few hours of using, As I always do, I took the periodic backup of my Call Logs again. That's when I noticed, the previous Logs were 700+ and now after making some calls, it came down to 500. after Some test, I found out, this is not problem of Backup software.
A little Google search revealed Android has a default call log limit set to 500 Calls.
I searched for Xposed Mod for this, found TrimNot. But it showed error. Most probably, it is only for KK. Then I thought why not MOD it myself?
That's how it all started...
The research & work procedure:
I first thought, OK, I need to find where the Calls are stored. After passing some time with Google, I found, the Logs are stored in a SQlite3 Database, in
Code:
/data/data/com.android.providers.contacts/databases/contacts2.db
There is no limit in this database storage. So, the limit must be in the code.
After another couple of hours, I found that Android checks if the contacts has reached 500 then removes the older. Searching with
Call Log Android
Click to expand...
Click to collapse
in android API reference, where I found some leads on my research.
"public class CallLog" which is under "android.provider.CallLog"
Something told me, to look for this class, in the actual source code. But that's almost 30 GB and I don't have time. from some prior Java knowledge I knew, all class have their own source file, with the same name, So the name would be "CallLog.java"
Now I searched Google, with it and found exactly what I was looking for. The search took me to a Git page android/platform_frameworks_base
And here I found this code.
Java:
private static void removeExpiredEntries(Context context) {
final ContentResolver resolver = context.getContentResolver();
resolver.delete(CONTENT_URI, "_id IN " +
"(SELECT _id FROM calls ORDER BY " + DEFAULT_SORT_ORDER
+ " LIMIT -1 OFFSET 500)", null);
}
The file is located in
Code:
platform_frameworks_base/core/java/android/provider/CallLog.java
and from the name I guessed, this should be inside framework files. Then I went into action. I first tried to de-compile the framework-res.apk file. I used Advanced APKTool by BDFreak
Using the windows search tool, I searched for "call log". I found nothing. Then I tried to de-compile "framework.jar". For this, I followed guide by Rizal Lovins - [Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar
after the de-compiling was Done, I found there is a "android/provider" folder. Yes, it look similar to "platform_frameworks_base/core/java/android/provider/CallLog.java"
So, here should be the files. And I found Two files
Code:
CallLog$Calls.smali
CallLog.smali
I opened both with Notepad++,
CallLog.smali gave me noting.
But after a careful search, I found the exact query inside the ]CallLog$Calls.smali file.
I found this line -
Code:
const-string v2, "_id IN (SELECT _id FROM calls ORDER BY date DESC LIMIT -1 OFFSET 500)"
I just changed 500 to 100000 and I knew my task was done.
I then recompiled the framework.jar and took backup of my original framework.jar (took Nandroid backup ), replaced the original with my modified JAR file. Set the permission rw-r-r or 644. Then rebooted my phone.
Testing:
After the phone started, I made a call, then took backup of the Call Log with Call Log Backup Restore it showed 501.
This means my task is done.
Then I thought, why not share the whole experience today in XDA. So I started Writing this Guide.
F.A.Q.
Why I need more than 500 Call Log ?
- Well I work in Billing Department of a GSM Phone Exchange/Gateway. I periodically cross check my phone Call Logs with the Exchange SoftSwitch Data. Except for that, It's just fun to try something new.
Why this guide has no steps or required steps?
- Because, if anything I missed, those will be added later in the FAQ, from the comments.
Is this tested on any device?
-Yes,
My # Xperia V with LOVINS X™ Z2 ROM 9.2.A.2.5
# Xperia V NeoWave™ ROM
# Xperia TX OmniRom
# Xperia TX (unknown ROM )
# Xperia Z2 (unknown ROM )
# Xperia P Stock ROM
#Xperia P JB based Enigma v7.2 ROM
#CyanogenMod 11 M11 and M12
Can this work on my T/TX/TL/Z/Z1 etc. etc.
- Theoretically it should work on any Device and any ROM. But, practically, I don't know, why don't you try yourself and let me know
I'm newbie, can you provide me more simple guide?
- Well I'm a Newbie myself Just take a Nandroid Backup and start the process. What can go wrong? At most you'll have to restore the backup.
Go to every link and read those too. And Don't forget to Thank those people who provided the Tools and Guides.
Still If you don't understand my guide, read it twice, if it doesn't work read again.
Ha Ha Ha kidding. Here you go A Simple guide
Update:
If you are planning to compile your ROM, and want to use this mod, then read This Post
I switched to NeoWave™ ROM and just as usual applied my MOD. Restored 800+ Call Log from Backup. Now I find another limitation. It's in the Dialer. In the KitKat Call History, there is a Statistics option. Here it always shows
TOTAL: 500 Calls,....
Click to expand...
Click to collapse
So Now I'm digging the sources again to make the stats go higher.
Update: The issue was caused because, after sometimes (any call), the call history automatically turned to 500. Because the framework.jar was odexed and i guess, odex file had the old value set again. And for the NeoWave I used android MultiTool, it showed one error while compiling, Unsigned Short value exceeds, I didn't notice that. My bad. Now I have done the Mod again with Apktool (Lovins shared one) and removed the odex file and then Everything seems fine. Even the Statistics Shows, TOATAL: 1203 Calls, ....
Tested on OmniRom and works as expected. I've used an Xposed module before which does the same thing, but it's always nice to find new ways to implement things without having to use Xposed.
Antiga Prime said:
Tested on OmniRom and works as expected. I've used an Xposed module before which does the same thing, but it's always nice to find new ways to implement things without having to use Xposed.
Click to expand...
Click to collapse
Thanks for the Confirmation. I am updating the Tested Device & ROM. Your device is TX, Right? I guessed from the signeture
Antiga Prime said:
Tested on OmniRom and works as expected. I've used an Xposed module before which does the same thing, but it's always nice to find new ways to implement things without having to use Xposed.
Click to expand...
Click to collapse
Would you like to share the Xposed module you used before?
pollob666 said:
Thanks for the Confirmation. I am updating the Tasted Device & ROM. Your device is TX, Right? I guessed from the signeture
Click to expand...
Click to collapse
Yes, I have a TX.
tianzhisun said:
Would you like to share the Xposed module you used before?
Click to expand...
Click to collapse
It's the same one linked in the OP, except it's named TrimNot, not TimNot. I thought it might be a different one given that the one linked above didn't work for @pollob666, but I guess it's because I'm on a 4.4 ROM.
It's the same one linked in the OP, except it's named TrimNot, not TimNot. I thought it might be a different one given that the one linked above didn't work for @pollob666, but I guess it's because I'm on a 4.4 ROM.
Click to expand...
Click to collapse
Oops.. It was a Typo Yes, TrimNot works on KK but not on JB. that is why I needed to modify my Android Framework.
This is great and I will try it out.
But there is also another ridiculous limitation, that is the maximum of 20 alarms you can have in the clock
acb123 said:
This is great and I will try it out.
But there is also another ridiculous limitation, that is the maximum of 20 alarms you can have in the clock
Click to expand...
Click to collapse
for the clock there is this guide http://forum.xda-developers.com/showpost.php?p=53591001&postcount=6 give it a look
acb123 said:
This is great and I will try it out.
Click to expand...
Click to collapse
After trying, give us the update.
But there is also another ridiculous limitation, that is the maximum of 20 alarms you can have in the clock
Click to expand...
Click to collapse
I didn't notice that. Let's see what we can do about that
pollob666 said:
I didn't notice that. Let's see what we can do about that
Click to expand...
Click to collapse
give a look at the link in the post above yours... it's for z2 but it could work also for other version
Works fine on Xperia P running JB based Enigma v7.2
It works on stock based Xperia P. pollob666 small typo. How about renaming "tasted" to "tested"
usb2 said:
give a look at the link in the post above yours... it's for z2 but it could work also for other version
Click to expand...
Click to collapse
Yeah, saw that, going to try it tomorrow. Hopefully, here I can find some DB sources too.
prasadkumar013 said:
It works on stock based Xperia P. pollob666 small typo. How about renaming "tasted" to "tested"
Click to expand...
Click to collapse
Sorry about that, I guess I'll have to check the whole OP
Please make the steps simple for a newbie
Well, I was looking for this feature since Google invented Android!:good:
I was using MIUI because of they're giving unlimited Call log. Then some one invented TrimNot on Aug 15, 201, I came again to OzcanRom (My Fav). Trim not doesn't work at all.
My question is, Can you make this step more simple. I'm a new bie. :fingers-crossed:
pollob666 said:
Background Story:
I was missing the CyberShot Camera too much and found Google Camera has been ported to JB And I also wanted to try the Moded LifeLog app, which somehow was not working on my Pacman Rom.
These were the reasons I Decided to come back to JB Stock Base. I had a previous Nandroid Backup of Lovin's Z2 ROM for XV. I took all my Call-Log and SMS Backups and also took backup of some apps that I used. Then I restored the NAND Backup today.
after that I started restoring the apps+data. Everything was fine.
After few hours of using, As I always do, I took the periodic backup of my Call Logs again. That's when I noticed, the previous Logs were 700+ and now after making some calls, it came down to 500. after Some test, I found out, this is not problem of Backup software.
A little Google search revealed Android has a default call log limit set to 500 Calls.
I searched for Xposed Mod for this, found TrimNot. But it showed error. Most probably, it is only for KK. Then I thought why not MOD it myself?
That's how it all started...
The research :
I first thought, OK, I need to find where the Calls are stored. After passing some time with Google, I found, the Logs are stored in a SQlite3 Database, in
Code:
/data/data/com.android.providers.contacts/databases/contacts2.db
There is no limit in this database storage. So, the limit must be in the code.
After another couple of hours, I found that Android checks if the contacts has reached 500 then removes the older. Searching with
in android API reference, where I found some leads on my research.
"public class CallLog" which is under "android.provider.CallLog"
Something told me, to look for this class, in the actual source code. But that's almost 30 GB and I don't have time. from some prior Java knowledge I knew, all class have their own source file, with the same name, So the name would be "CallLog.java"
Now I searched Google, with it and found exactly what I was looking for. The search took me to a Git page android/platform_frameworks_base
And here I found this code.
Java:
private static void removeExpiredEntries(Context context) {
final ContentResolver resolver = context.getContentResolver();
resolver.delete(CONTENT_URI, "_id IN " +
"(SELECT _id FROM calls ORDER BY " + DEFAULT_SORT_ORDER
+ " LIMIT -1 OFFSET 500)", null);
}
The file is located in
Code:
platform_frameworks_base/core/java/android/provider/CallLog.java
and from the name I guessed, this should be inside framework files. Then I went into action. I first tried to de-compile the framework-res.apk file. I used Advanced APKTool by BDFreak
Using the windows search tool, I searched for "call log". I found nothing. Then I tried to de-compile "framework.jar". For this, I followed guide by Rizal Lovins - [Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar
after the de-compiling was Done, I found there is a "android/provider" folder. Yes, it look similar to "platform_frameworks_base/core/java/android/provider/CallLog.java"
So, here should be the files. And I found Two files
Code:
CallLog$Calls.smali
CallLog.smali
I opened both with Notepad++,
CallLog.smali gave me noting.
But after a careful search, I found the exact query inside the ]CallLog$Calls.smali file.
I found this line -
Code:
const-string v2, "_id IN (SELECT _id FROM calls ORDER BY date DESC LIMIT -1 OFFSET 500)"
I just changed 500 to 100000 and I knew my task was done.
I then recompiled the framework.jar and took backup of my original framework.jar (took Nandroid backup ), replaced the original with my modified JAR file. Set the permission rw-r-r or 644. Then rebooted my phone.
Testing:
After the phone started, I made a call, then took backup of the Call Log with Call Log Backup Restore it showed 501.
This means my task is done.
Then I thought, why not share the whole experience today in XDA. So I started Writing this Guide.
F.A.Q.
Why I need more than 500 Call Log ?
- Well I work in Billing Department of a GSM Phone Exchange/Gateway. I periodically cross check my phone Call Logs with the Exchange SoftSwitch Data. Except for that, It's just fun to try something new.
Why this guide has no steps or required steps?
- Because, if anything I missed, those will be added later in the FAQ, from the comments.
Is this tested on any device?
-Yes,
My # Xperia V with LOVINS X™ Z2 ROM 9.2.A.2.5
# Xperia TX OmniRom
# Xperia TX (unknown ROM )
# Xperia Z2 (unknown ROM )
# Xperia P Stock ROM
Can this work on my T/TX/TL/Z/Z1 etc. etc.
- Theoretically it should work on any Device and any ROM. But, practically, I don't know, why don't you try yourself and let me know
Click to expand...
Click to collapse
---------- Post added at 11:08 AM ---------- Previous post was at 10:10 AM ----------
Can you please share the framework.jar file that edited and recompiled by you? If you can make a edited framework.jar for OzcanRom 4.2, I will be very thankful. I spent almost two nights on this and failed. Please help. :silly::fingers-crossed:
Antiga Prime said:
Tested on OmniRom and works as expected. I've used an Xposed module before which does the same thing, but
it's always nice to find new ways to implement things without having to use Xposed.
Click to expand...
Click to collapse
A Simpler guide
jamoen said:
My question is, Can you make this step more simple. I'm a new bie. :fingers-crossed:
Can you please share the framework.jar file that edited and recompiled by you? If you can make a edited framework.jar for OzcanRom 4.2, I will be very thankful. I spent almost two nights on this and failed. Please help. :silly::fingers-crossed:
Click to expand...
Click to collapse
No need to Quote the whole OP
My framework.jar won't work for you. We need to modify your ROM's framework.jar if you can provide me that file, I can MOD it for you.
But, I am giving the Simple steps. I would be very happy if you can do it yourself.
I am assuming you already have Notepad++ or Similar text editing tool and know how to pull files from /system
Step 1: Download APKTool of your choice. I used Advanced APKTool by BDFreak
Step 2: Decompile your framework.jar. For this, I followed guide by Rizal Lovins - [Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar
Step 3: Open the CallLog.smali file and any other files that starts with CallLog ( like in my case CallLog$Calls.smali ) in Notepad++ or any other Text Editor.
Step 4: search for "SELECT _id FROM calls ORDER BY" or similar lines. You will find LIMIT -1 OFFSET 500 change 500 with any number you want.
Step 5: Save the modified file smali, and recompile the jar file.
Step 6: Just to be safe, take a NANDROID backup.
Step 7: Take a backup of the original framework.jar, delete it from system and push the modified framework.jar to System and change permission to rw-r-r or 644. Reboot.
Step 8: test
I couldn't find Provider folder. Please help.
I couldn't find Provider folder. Please help.
Failed! Please help
pollob666 said:
No need to Quote the whole OP
Click to expand...
Click to collapse
Thank you for the reply.
I could not find any folder called Provider. Searched all folders and failed to find a call entry.
I took the framework.jar from system folder. Any wrong?
Attached my framework.jar file. Please help me.
Found the string in framework2.jar and edited. Success!!
Please help me to push it again...
Can I use esfile explorer?
---------- Post added at 02:31 PM ---------- Previous post was at 02:09 PM ----------
jamoen said:
Found the string in framework2.jar and edited. Success!!
Please help me to push it again...
Can I use esfile explorer?
Click to expand...
Click to collapse
Unfortunately.. The method failed. Going back to MIUI in tears..
jamoen said:
Found the string in framework2.jar and edited. Success!!
Please help me to push it again...
Can I use esfile explorer?
---------- Post added at 02:31 PM ---------- Previous post was at 02:09 PM ----------
Unfortunately.. The method failed. Going back to MIUI in tears..
Click to expand...
Click to collapse
WOW, you really did it. Sorry I was in training my juniors at office, didn't reply earlier.
You can use es explorer, or if you have adb, then you can use some shell commands. I can give you the commands, if you haven't done it already.
It should work. Let me check and mod a it for you.
Edit: Sorry, I don't have the framework2.jar. ant the ROM is too big for downloading now at office. But for Samsung device, I guess the re-compile process needs a bit working. you need to recompile the file, then open it in 7zip or WinRAR replace the AndroidManifest file with the file of the original, (then sign it then zipalign it not sure for jar file though). Then push it to the system.
pollob666 said:
WOW, you really did it. Sorry I was in training my juniors at office, didn't reply earlier.
You can use es explorer, or if you have adb, then you can use some shell commands. I can give you the commands, if you haven't done it already.
It should work. Let me check and mod a it for you.
Edit: Sorry, I don't have the framework2.jar. ant the ROM is too big for downloading now at office. But for Samsung device, I guess the re-compile process needs a bit working. you need to recompile the file, then open it in 7zip or WinRAR replace the AndroidManifest file with the file of the original, (then sign it then zipalign it not sure for jar file though). Then push it to the system.
Click to expand...
Click to collapse
I double checked it. Again extracted the framework.jar and decompliled it.The string of 100000 is there. But this thing is not working. I don't know why.
Can I share you the framework2.jar with you?
jamoen said:
I double checked it. Again extracted the framework.jar and decompliled it.The string of 100000 is there. But this thing is not working. I don't know why.
Can I share you the framework2.jar with you?
Click to expand...
Click to collapse
I will modify it and upload it for you. But I guess I will need the framework-res.apk with it. if there is any. But, I'm going home now, I'll update you by 11pm.

Categories

Resources