Closed almondnguyen closed 4 years ago
[Archive purpose only] [according to logcat, something is wrong with the RIL class so i'll assume this is file problem]
[file located in ril/telephony/java/com/android/internal/telephony
]
Apparently I am using one borrowed from other device lol
I want to extract this myself, since this device is the first Samsung + MTK phone (so I am sure non-native file will be hard to work with)
[Procedure]
some Google searches suggest it is stored in either
/system/framework/framework.jar
or inside$(THAT_SAME_DIR)/arm/boot.oat
.baksmali framework.jar returns error:
almond@ooboontoo:~/Documents/apk$ java -jar baksmali-2.2.7.jar d framework.jar Exception in thread "main" org.jf.dexlib2.DexFileFactory$DexFileNotFoundException: Could not find entry classes.dex in framework.jar. at org.jf.dexlib2.DexFileFactory$DexEntryFinder.findEntry(DexFileFactory.java:384) at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:89) at org.jf.baksmali.DexInputCommand.loadDexFile(DexInputCommand.java:149) at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:162) at org.jf.baksmali.Main.main(Main.java:102)
so I try to deodex boot.oat using oat2dex I got a folder of different dex(es?), which includes framework( | -classes2 | -classes3).dex Im stuck here dont know how to extract classes.dex (which will then be converted into jar using dex2jar, which hopefully contained the ever-needed RIL classes :> )
Done~. Thank god ShaDis made deodexed ROM lol, simply extract framework.jar there (too bad it is not there)
also, there is no reference of "RIL_class" in build.prop so I guess we dont have that. buhbye o.o/
head to a dead end..
device/samsung/grandppltedx/ril/telephony/java/com/android/internal/telephony/grandpplteRIL.java:143: error: ';' expected private Object responseIccCardStatus(Parcel p) {
little edit: anything with Object
has this problem.
I don't know much about java, so Im pretty much relying on others here /:
Im dumb dumb lol, missed a few brackets "{" and everything breaks~ anyway, newest logs for anyone interested!
almond@ooboontoo:~$ adb logcat | grep telephony
07-19 03:29:33.130 923 923 W System : ClassLoader referenced unknown path: /system/framework/qti-telephony-common.jar
07-19 03:29:33.133 923 923 W System.err: java.lang.ClassNotFoundException: com.qualcomm.qti.internal.telephony.QtiTelephonyComponentFactory
07-19 03:29:33.133 923 923 W System.err: at com.android.internal.telephony.TelephonyComponentFactory.getInstance(TelephonyComponentFactory.java:71)
07-19 03:29:33.134 923 923 W System.err: at com.android.internal.telephony.PhoneFactory.makeDefaultPhone(PhoneFactory.java:133)
07-19 03:29:33.134 923 923 W System.err: at com.android.internal.telephony.PhoneFactory.makeDefaultPhones(PhoneFactory.java:91)
07-19 03:29:33.134 923 923 W System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.internal.telephony.QtiTelephonyComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]]
07-19 03:29:33.781 923 923 W SystemConfig: at com.android.internal.telephony.CarrierAppUtils.disableCarrierAppsUntilPrivileged(CarrierAppUtils.java:78)
07-19 03:29:33.781 923 923 W SystemConfig: at com.android.internal.telephony.SubscriptionInfoUpdater.initializeCarrierApps(SubscriptionInfoUpdater.java:188)
07-19 03:29:33.781 923 923 W SystemConfig: at com.android.internal.telephony.SubscriptionInfoUpdater.<init>(SubscriptionInfoUpdater.java:146)
07-19 03:29:33.781 923 923 W SystemConfig: at com.android.internal.telephony.TelephonyComponentFactory.makeSubscriptionInfoUpdater(TelephonyComponentFactory.java:218)
07-19 03:29:33.781 923 923 W SystemConfig: at com.android.internal.telephony.PhoneFactory.makeDefaultPhone(PhoneFactory.java:229)
07-19 03:29:33.781 923 923 W SystemConfig: at com.android.internal.telephony.PhoneFactory.makeDefaultPhones(PhoneFactory.java:91)
07-19 03:29:34.248 599 618 I Telecom : PhoneAccountRegistrar: [ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0}(icon: Icon(typ=BITMAP size=29x36) -> Icon(typ=BITMAP size=29x36))]: TSI.rPA@AAY
07-19 03:29:34.251 923 923 I Telephony: AccountEntry: Registered phoneAccount: [[ ] PhoneAccount: ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0} Capabilities: CallProvider MultiUser PlaceEmerg SimSub Audio Routes: BESW Schemes: tel voicemail Extras: null GroupId: [da39a3ee5e6b4b0d3255bfef95601890afd80709]] with handle: ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0}
07-19 03:29:34.254 923 923 I Telephony: PstnIncomingCallNotifier: Registering: Handler (com.android.internal.telephony.GsmCdmaPhone) {b509300}
07-19 03:29:34.298 923 923 I Telephony: PstnIncomingCallNotifier: Unregistering: Handler (com.android.internal.telephony.GsmCdmaPhone) {b509300}
07-19 03:29:34.304 599 617 I Telecom : PhoneAccountRegistrar: [ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0}(icon: Icon(typ=BITMAP size=29x36) -> Icon(typ=BITMAP size=29x36))]: TSI.rPA@AAk
07-19 03:29:34.307 923 923 I Telephony: AccountEntry: Registered phoneAccount: [[ ] PhoneAccount: ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0} Capabilities: CallProvider MultiUser PlaceEmerg SimSub Audio Routes: BESW Schemes: tel voicemail Extras: null GroupId: [da39a3ee5e6b4b0d3255bfef95601890afd80709]] with handle: ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0}
07-19 03:29:34.308 923 923 I Telephony: PstnIncomingCallNotifier: Registering: Handler (com.android.internal.telephony.GsmCdmaPhone) {b509300}
07-19 03:29:34.338 599 618 I Telecom : PhoneAccountRegistrar: [ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0}(icon: Icon(typ=BITMAP size=29x36) -> Icon(typ=BITMAP size=29x36))]: TSI.rPA@AAw
07-19 03:29:42.049 923 923 E VvmBootCompletedRcvr: phone account ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0} has invalid subId -1
Nice to hear that! Seems like there are some missing classes there.
Another developer suggested this:
That might be absolutely not working in my experience? Because AOSP RIL would never look for the library libsec-ril.so (because Samsung...). Also, I've build quite a few ROMs before with prebuilt sec-ril libs. You know the drill.
(now that I think about it, why am I using aosp *libril when Samsung RIL opensource @ android_hardware_samsung is available?)
Taking a look at your latest commit. Did you make this change yourself or comparing another RIL class of other device?
I'm not a expert on this but for me that looks like you're calling p.readInt();
without a purpose because you aren't assigning its returned value to something.
Compilation error. In stock it sets the variable in comment (//) to p.readInt() Also, SlteRIL works on herolte, so why not :D (yep, my decision is based on this)
Oops, i didn't noticed that herolte tree has those same lines.
Oh and
Might try it soon. Fixing media, I thought of some stuffs that can go wrong during my nap lol
E VvmBootCompletedRcvr: phone account ComponentInfo{com.android.phone/com.android.services.telephony.TelephonyConnectionService}, [e0184adedf913b076626646d3f52c3b49c39ad6d], UserHandle{0} has invalid subId -1
(lengthy warning)
So......, Now i know that IMEI is stored in ~nvram~ (e5: nvdata)
and
i noticed this (in logcat)
07-22 11:29:24.105 304 4173 D NVRAM : [NVRAM]: info /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvram Permission denied
when
in ueventd.mt6735.rc
(rootdir / )
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvram 0660 root system
(e: I did make clean
& rebuilt the whole things, yep i made a duplication, but it should not affect anything)
also, this is native ueventd, no modification except PERSISTENT (which is not related to RIL i think)
e2: did more researches. Apparently nvram is not even mounted.
grandppltedx:/ $ mount
rootfs on / type rootfs (ro,seclabel)
tmpfs on /sbin type tmpfs (rw,seclabel,relatime,mode=755)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
none on /config type configfs (rw,relatime)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
none on /sys/fs/cgroup type tmpfs (rw,seclabel,relatime,mode=750,gid=1000)
/dev/block/mmcblk0p26 on /system type ext4 (ro,seclabel,relatime,errors=panic,data=ordered)
/dev/block/mmcblk0p29 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,resuid=10010,errors=panic,data=ordered)
/dev/block/mmcblk0p27 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic,data=ordered)
/dev/block/mmcblk0p23 on /protect_f type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered)
/dev/block/mmcblk0p24 on /protect_s type ext4 (rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered)
/dev/block/mmcblk0p11 on /nvdata type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered)
/dev/block/mmcblk0p10 on /efs type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
/sbin/.magisk/block/system on /sbin/.magisk/mirror/system type ext4 (ro,seclabel,relatime,errors=panic,data=ordered)
/sbin/.magisk/block/data on /sbin/.magisk/mirror/data type ext4 (rw,seclabel,relatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,resuid=10010,errors=panic,data=ordered)
/sbin/.magisk/block/data on /sbin/.magisk/modules type ext4 (rw,seclabel,relatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,resuid=10010,errors=panic,data=ordered)
/dev/fuse on /mnt/runtime/default/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/vold/public:179_129 on /mnt/media_rw/6F17-14F4 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
grandppltedx:/ $
fstab.mt6735:
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvram /nvram emmc defaults defaults
e3: but nvdata is mounted, contains stuffs like IMEI, yet nothing happens~ e4: quickly swap back to stock
almond@ooboontoo:~$ adb shell
shell@grandpplte:/ $ mount
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=720172k,nr_inodes=122374,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=720172k,nr_inodes=122374,mode=750,gid=1000 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,size=720172k,nr_inodes=122374,mode=755,gid=1000 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,size=720172k,nr_inodes=122374,mode=700 0 0
tmpfs /mnt/secure/asec tmpfs rw,seclabel,relatime,size=720172k,nr_inodes=122374,mode=700 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system /system ext4 ro,seclabel,relatime,errors=panic,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,resuid=0,errors=panic,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/protect1 /protect_f ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/protect2 /protect_s ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvdata /nvdata ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/EFS /efs ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,size=720172k,nr_inodes=122374,mode=755,gid=1000 0 0
tmpfs /sbin tmpfs rw,seclabel,relatime 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system /sbin/.core/mirror/system ext4 ro,seclabel,relatime,errors=panic,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/userdata /sbin/.core/mirror/bin ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,resuid=0,errors=panic,data=ordered 0 0
/dev/block/loop1 /sbin/.core/img ext4 rw,seclabel,relatime,data=ordered 0 0
/data/knox/tmp_sdcard /mnt/knox sdcardfs rw,seclabel,nosuid,nodev,relatime,mask=0077 0 0
/data/knox/sdcard /mnt/knox/default/knox-emulated sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=1015,multi_user,mask=0006 0 0
/data/knox/sdcard /mnt/knox/read/knox-emulated sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=9997,multi_user,mask=0027 0 0
/data/knox/sdcard /mnt/knox/write/knox-emulated sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=9997,multi_user,mask=0007 0 0
/data/knox/secure_fs/enc_media /mnt/shell/enc_media sdcardfs rw,seclabel,nosuid,nodev,relatime,low_uid=1000,low_gid=1000,gid=9997,multi_user,reserved=20MB 0 0
/data/media /mnt/runtime/default/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,multi_user,mask=0006,reserved=20MB 0 0
/data/media /storage/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,multi_user,mask=0006,reserved=20MB 0 0
/data/media /mnt/runtime/read/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,multi_user,mask=0027,reserved=20MB 0 0
/data/media /mnt/runtime/write/emulated sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,multi_user,mask=0007,reserved=20MB 0 0
/dev/block/vold/public:179,129 /mnt/media_rw/6F17-14F4 vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/public:179,129 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/mnt/media_rw/6F17-14F4 /mnt/runtime/default/6F17-14F4 sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,mask=0006 0 0
/mnt/media_rw/6F17-14F4 /storage/6F17-14F4 sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=1015,mask=0006 0 0
/mnt/media_rw/6F17-14F4 /mnt/runtime/read/6F17-14F4 sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,mask=0022 0 0
/mnt/media_rw/6F17-14F4 /mnt/runtime/write/6F17-14F4 sdcardfs rw,seclabel,nosuid,nodev,noexec,relatime,low_uid=1023,low_gid=1023,gid=9997,mask=0022 0 0
shell@grandpplte:/ $
e5: yep nvram is no mounted; only nvdata is needed. but in stock, no nvram permission denied~. And IMEI is read correctly (of course). Whereas in LOS it is not read.
I've make some search for references: in Lineage hlte-common (note 3); k3gxx (S5 3G) and hero-common (S7) (in a nutshell, some popular Exynos GSM devices)
Some actually changed AOSP codes to accommodate custom RIL changes~. https://github.com/LineageOS/android_device_samsung_hlte-common/commit/44b56c22d0563aeb074ce9c45ed4e32d3c69b63b
I haven't further research stuffs yet (busy, of course :< ), ~but for now I might try modifying libril (from hardware/ril, not hardware/samsung/ril, so I keep maybe-flagship-device-only stuffs like RIL_UNSOL_WB_AMR_STATE away) according to Note 3 tree & my experience.~
take back my words, old way is the better way
Someone reported crash in Network > More (XDA). But my new build does not have this problem. And, it contains non-greyed-out emergency broadcasts settings, which means RIL Emergency unsol is working!~ I guess we need to add more requests/responses from stock RIL.java (PM me thru XDA if anyone want to contribute, I'll send the stock file. Telephony references at LineageOS/Telephony Engineering)
apparently i did not read the manual.
RIL log command here
logcat -b radio
and the logcat ril-log.txt
I'll close this, too lengthy and out of context now
stuffs achived below (2nd comment)
Apparently only until now i know this document about Telephony exists: https://lineageos.org/engineering/Telephony/
Probably getting my hand to work ASAP (too busy with stuffs right now :< )
Again, tysm ShaDis (if you read this lol), the only maker(s?) of deodexed ROMs (so I don't have to spend my time research on how to deodex properly lol!)
REOPEN