KieronQuinn / SIMNumberSetter

A small Xposed module to set the SIM card's phone subscriber number
GNU General Public License v3.0
180 stars 19 forks source link

Problem with Lsposed #3

Closed angeluskun closed 1 year ago

angeluskun commented 2 years ago

I installed Lsposed zygisk versión and enabled the module from there AND grated root permission then reboot and the app dosent detect Lsposed and force me to close it

KieronQuinn commented 2 years ago

What device and firmware?

angeluskun commented 2 years ago

Poco x3 pro android 12 CRdroid

KieronQuinn commented 2 years ago

Ok, it should work on that. Please post your LSposed logs.

angeluskun commented 2 years ago
KieronQuinn commented 2 years ago

There's no error in there. Could you send a screenshot of the LSposed page for Sim Number Changer, showing the enabled apps?

angeluskun commented 2 years ago

There's no error in there. Could you send a screenshot of the LSposed page for Sim Number Changer, showing the enabled apps?

Sure :)

angeluskun commented 2 years ago

Screenshot_20220212-124227_LSPosed

KieronQuinn commented 2 years ago

Yeah that should work, I have no idea why it's not doing, sorry.

angeluskun commented 2 years ago

Yeah that should work, I have no idea why it's not doing, sorry.

Dont worry thanks for trying (8

erayrafet commented 2 years ago

I just wanted to add that I get the same error with the app using LSPosed and Magisk 24 on my POCOPHONE F1 AwakenOS Android 12. Probably something to do with Xiaomi.

Ante0 commented 2 years ago

Same on OnePlus 8 Pro, Magisk 24, OOS11

ghost commented 2 years ago

Same here on realme 1 ricedroid 4.5 Android 12.1

Beat-YT commented 2 years ago

Install the riru flavor module as well as the riru version of LSPosed. This worked for me

megapro17 commented 1 year ago

This shit doesn't work at all. Tried with zygisk lsposed, with riru, blacklist is disabled and is still doesn't connect! Magisk and lsposed are working completely fine. Android 13 MIUI 14 Mi 11

KieronQuinn commented 1 year ago

This shit doesn't work at all. Tried with zygisk lsposed, with riru, blacklist is disabled and is still doesn't connect! Magisk and lsposed are working completely fine. Android 13 MIUI 14 Mi 11

https://github.com/KieronQuinn/SIMNumberSetter/issues/2#issuecomment-1036276303

It works for everyone else. Blame MIUI.

megapro17 commented 1 year ago

Angeluskun has not been able to get it to work on an AOSP-based FW either, as well as many other users that are not using MIUI.

Poco x3 pro android 12 CRdroid Same here on realme 1 ricedroid 4.5 Android 12.1 Same on OnePlus 8 Pro, Magisk 24, OOS11 LSPosed and Magisk 24 on my POCOPHONE F1 AwakenOS Android 12

KieronQuinn commented 1 year ago

Angeluskun has not been able to get it to work on an AOSP-based FW either, as well as many other users that are not using MIUI.

Poco x3 pro android 12 CRdroid Same here on realme 1 ricedroid 4.5 Android 12.1 Same on OnePlus 8 Pro, Magisk 24, OOS11 LSPosed and Magisk 24 on my POCOPHONE F1 AwakenOS Android 12

It's still a MIUI-origin device. I can't guarantee support on devices where the proprietary blobs are fucked with by Xiaomi.

Some see success with different LSPosed builds or by disabling other mods. Other devices are known to work. This is not something I can fix.

megapro17 commented 1 year ago

If you can't fix it, then i'll do it myself. And I found a reason. It doesn't work because it fails at getting line1Number, which is not even needed, for changing this value. If i remove this line, i can sucessfuly change a number, and see it on other phone. That function is also deprecated https://developer.android.com/reference/android/telephony/TelephonyManager#getLine1Number()

Fucked up blobs yeah whatever

KieronQuinn commented 1 year ago

You're looking at the wrong class. It's not deprecated at all:

https://cs.android.com/android/platform/superproject/+/refs/heads/master:frameworks/opt/telephony/src/java/com/android/internal/telephony/PhoneInternalInterface.java;drc=5f971bfb26b0f0cf4ddca5da71e89a2690cba919;l=698

If OEMs mess with internal classes, how the hell am I supposed to support them without having every device available? I'm not crippling the app for them - the current number IS used, it's shown to the user to confirm the current number and that the change worked!

megapro17 commented 1 year ago

well, i can agree that miui is not the best made firmware. I was just angry because the app was showing an error related to xposed, when it was something else entirely. Next time, it is better to describe each step in detail so that you understand the problem clearly.

KieronQuinn commented 1 year ago

That is what #10 is for.

megapro17 commented 1 year ago

aren't you going to add some workaround if get sim number is not working?

maulana-kurniawan commented 1 year ago

If you can't fix it, then i'll do it myself.

Hei @megapro17 can i got your modified module app? I have a same problem with current SIM Number Setter app on MIUI 13.

megapro17 commented 1 year ago

If you change a number in the MIUI settings, it's not written to the SIM card, it's only cached in the system. If you set an empty field, it will delete this cached value. So before you make a change you need to clear a field. Go to settings - sim - sim 1 number and set a blank field. Then eject and insert a card, change a number in the application, reeject again and look in settings, it should show a number that is stored in sim.

I will make a better version soon. base.zip

maulana-kurniawan commented 1 year ago

@megapro17 thanks a lot! Really appreciated it!

CodexUnico commented 11 months ago

If you change a number in the MIUI settings, it's not written to the SIM card, it's only cached in the system. If you set an empty field, it will delete this cached value. So before you make a change you need to clear a field. Go to settings - sim - sim 1 number and set a blank field. Then eject and insert a card, change a number in the application, reeject again and look in settings, it should show a number that is stored in sim.

I will make a better version soon. base.zip

Could it be that devices with mediatek chips cause issues??

And the app you provided (base.apk) is not even getting installed on my device.

babyharpsea commented 5 months ago

It's not just Xiaomi, same issue over here, everything is correct, yet it isn't connecting to LSPosed. I have a Samsung a52s

anyuta1166 commented 4 months ago

If you can't fix it, then i'll do it myself. And I found a reason. It doesn't work because it fails at getting line1Number, which is not even needed, for changing this value. If i remove this line, i can sucessfuly change a number, and see it on other phone.

@megapro17 Thanks for your suggestion. I've slightly modified it, and the module works like a charm after modification.

Actually you don't need to comment out the whole getting line1Number stuff.

The issue is that in newer Android versions, you can't get line1Number if it is unset. But you can successfully get it if it is set to any number.

So a small modification makes the module work again:

https://github.com/anyuta1166/SIMNumberSetter/commit/dcdb26ffcd526d540d9f5ae01f0eedee6eceef35