[GUIDE] How to properly port RIL part | avoid SIM LOCKING in Sony devices - Sony Cross-Device General

Hey,
I noticed some people started making roms without proper knowledge about porting and it's consequences.
So I'm here to explain how to fix issue of getting sim-locked phones. It occurs mostly to new phones.
1. Ensure you have correctly ported framework.jar - this stage is critical
Explanation:
base - rom/file that is working on our phone, mostly it's our CM10 FXP
port - rom/file that we are porting
a) Decompile framework.jar using apktool (both files from port and base rom)
b) Navigate to: smali/com/android/internal/telephony/
c) Copy& Replace all .smali files that have "RIL" in name - from base to port, it's logical. We want working "gsm drivers".
d) Ensure that PhoneFactory.smali is identical as the one from base rom
e) Compile framework.jar
2. Fix Phone.apk - this is the place where most of people fail in porting, mostly sim locking is caused by forgetting about this
a) Decompile Phone.apk from port rom
b) Navigate to res/values and open bools.xml in Notepad++ or Geany (program is important too)
c) you will have something like this: (focus on red values)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="ignore_sim_network_locked_events">false</bool>
<bool name="sim_network_unlock_allow_dismiss">false</bool>
<bool name="world_phone">false</bool>
<bool name="config_enable_dialer_key_vibration">true</bool>
<bool name="tty_enabled">true</bool>
<bool name="hac_enabled">false</bool>
<bool name="dtmf_type_enabled">false</bool>
<bool name="auto_retry_enabled">false</bool>
<bool name="allow_local_dtmf_tones">true</bool>
<bool name="config_show_onscreen_dial_button">true</bool>
<bool name="send_mic_mute_to_AudioManager">false</bool>
<bool name="has_in_call_noise_suppression">false</bool>
<bool name="allow_emergency_numbers_in_call_log">false</bool>
<bool name="csp_enabled">false</bool>
<bool name="config_voice_privacy_disable">false</bool>
<bool name="config_voice_capable">true</bool>
<bool name="config_built_in_sip_phone">true</bool>
<bool name="config_call_recording">true</bool>
<bool name="config_call_stream_recording">false</bool>
<bool name="config_download_mms_always">true</bool>
<bool name="config_preferred_network_type_when_data_enabled">true</bool>
<bool name="config_smsc_address_encoded">false</bool>
<bool name="config_support_dialing_emergency_number_suffix">true</bool>
<bool name="config_support_dialing_emergency_number_directly">true</bool>
</resources>
Click to expand...
Click to collapse
All those red values are wrong.
This is CORRECTED version:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="ignore_sim_network_locked_events">true</bool>
<bool name="sim_network_unlock_allow_dismiss">true</bool>
<bool name="world_phone">false</bool>
<bool name="config_enable_dialer_key_vibration">true</bool>
<bool name="tty_enabled">true</bool>
<bool name="hac_enabled">false</bool>
<bool name="dtmf_type_enabled">false</bool>
<bool name="auto_retry_enabled">false</bool>
<bool name="allow_local_dtmf_tones">true</bool>
<bool name="config_show_onscreen_dial_button">true</bool>
<bool name="send_mic_mute_to_AudioManager">true</bool>
<bool name="has_in_call_noise_suppression">false</bool>
<bool name="allow_emergency_numbers_in_call_log">false</bool>
<bool name="csp_enabled">false</bool>
<bool name="config_voice_privacy_disable">false</bool>
<bool name="config_voice_capable">true</bool>
<bool name="config_built_in_sip_phone">true</bool>
<bool name="config_call_recording">true</bool>
<bool name="config_call_stream_recording">false</bool>
<bool name="config_download_mms_always">true</bool>
<bool name="config_preferred_network_type_when_data_enabled">true</bool>
<bool name="config_smsc_address_encoded">false</bool>
<bool name="config_support_dialing_emergency_number_suffix">true</bool>
<bool name="config_support_dialing_emergency_number_directly">true</bool>
</resources>
Click to expand...
Click to collapse
So ensure you have the correct values in bools.xml.
Also small explanation:
<bool name="send_mic_mute_to_AudioManager">true</bool>
This is for working microphone in calls, if the value is false microphone doesn't work on our phones.
Click to expand...
Click to collapse
d) Compile Phone.apk
Now use fixed framework.jar and Phone.apk in rom your are porting to our devices.
I hope now you understand the issue.

If anyone inadvertently flashes a ROM which locks the SIM, can this be reversed?

same question as the user above..

It cannot be undone. Please stop asking this is thread for devs.

thanks for this tutorial just starting to port and im researching much as possible and this was helpful.

lozohcum said:
It cannot be undone. Please stop asking this is thread for devs.
Click to expand...
Click to collapse
This cannot be undone in the specific ROM or it can not be undone to the phone itself regardless of which ROM you use?

Sim locked by fabric
After all, thanks for your time
Hello, I have a question... I bought a phone from a carrier named "Telcel", but I have a sim from "Virgin Mobile" and I can't use my sim because the phone is locked by default in "Telcel" network... I was wondering if this would help me to unlock the network without paying for the unlock...
Greetings

how about mobile data fix?

im trying to port aosp renice v2 rom from lenovo k3 note mt6752 same as my c5 ultra e5553 mt6752. wifi gps sound bluetooth works except sim card and camera.
when i start the phone without sim inside, baseband and imei works perfect but everything inside sim information shows unknown.
when i start the phone with sim inside, baseband and imei dont work.
rom is working with stock boot.img
but when i restore back stock system everything works fine
so what could be the issue? there is no custom rom availabe in c5 section we need help

Is this still actual or can we unstick it? The Forum looks a bit leaved with all this sticky dead Threads...
Just asking before i Report it to Moderators. Did the same with the Index since it's outdated since around 4 Year (Incredible)

Related

How do I edit default News, Sport, and Download links in Browser tab?

You can see my attached picture of my browser tab.
1. How can I edit the links you see for News, Sport, and Downloads?
I found the registry entry to edit the default home link for when you tap on the picture of the globe to start Opera. I was able to change that but I can't find the other ones.
2. Also, can I change the text that says "o2 Internet-to-Go" directly below the globe?
Chris Cross said:
You can see my attached picture of my browser tab.
1. How can I edit the links you see for News, Sport, and Downloads?
I found the registry entry to edit the default home link for when you tap on the picture of the globe to start Opera. I was able to change that but I can't find the other ones.
I think it displays whatever you have in your Opera bookmark. To change it, simply edit your bookmark in Opera browser.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Nope, editing the bookmarks doesn't seem to help - I definitively don't have any sports-related bookmarks left. Maybe some file in the Opera directory (\windows\Opera9\)?
chris cross said:
you can see my attached picture of my browser tab.
1. How can i edit the links you see for news, sport, and downloads?
I found the registry entry to edit the default home link for when you tap on the picture of the globe to start opera. I was able to change that but i can't find the other ones.
2. Also, can i change the text that says "o2 internet-to-go" directly below the globe?
Click to expand...
Click to collapse
how you changed it???
Dude10 said:
how you changed it???
Click to expand...
Click to collapse
To change the URL for the globe picture, go to the registry:
HKLM\Software\Opera\Defaults
There you can tap on "HomePageURI" and enter the URL you want.
You can also enter a URL for "DefaultURI" but I'm not sure what that does yet.
I'm still looking for a way to edit the News, Sports, and Downloads links and also how to change the text below the globe. If anyone knows, please help.
tf3dconfig can for sure unblock branded apps in "programs", i don't remember exactely how i did it on mine for browser, but think the same way
EDIT: no, here how (in italian)
Since you are german, you should modify the file InternetPortal-de-DE.xml under \Windows
inside the xml you can also change the browser text
bbonzz said:
tf3dconfig can for sure unblock branded apps in "programs", i don't remember exactely how i did it on mine for browser, but think the same way
EDIT: no, here how (in italian)
Since you are german, you should modify the file InternetPortal-de-DE.xml under \Windows
inside the xml you can also change the browser text
Click to expand...
Click to collapse
Thanks! I'll take a look at it right now. I'll let you know how it goes.
Hmm, well I tried it, but it did not work.
I found the file you mentioned in the Windows folder.
I opened it in my computer (with notepad) and made the changes.
Then I replaced the file (overwriting) into the Windows folder.
I did a soft reset and nothing changed. But if I look at the xml file in the Windows folder, my changes are still there!
Any ideas?
Here is the original data:
Code:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<IncludeUserFavorites>True</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\O2_banner.qtc"
FocusImagePath="\Windows\O2_banner_select_bar.qtc"
Text="o2 Internet-to-Go"
Width="480"
Height="200" />
<OperatorLinks>
<Link
Text="News"
NavigateUrl="http://wml.o2online.de/goto/htc-diamond-om-news"
ImagePath="\Windows\O2_News.qtc" />
<Link
Text="Sport"
NavigateUrl="http://wml.o2online.de/goto/htc-diamond-om-sport"
ImagePath="\Windows\O2_Sports.qtc" />
<Link
Text="Downloads"
NavigateUrl="http://wml.o2online.de/goto/htc-diamond-om-downloads"
ImagePath="\Windows\O2_Download.qtc" />
<Link
Text="YouTube"
Executable="\Windows\youtube.exe"
ImagePath="\Windows\O2_YouTube.qtc" />
</OperatorLinks>
</InternetPortal>
And here is how I changed it:
Code:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<IncludeUserFavorites>True</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\O2_banner.qtc"
FocusImagePath="\Windows\O2_banner_select_bar.qtc"
Text="Internet"
Width="480"
Height="200" />
<OperatorLinks>
<Link
Text="News"
NavigateUrl="http://news.google.com/ncr"
ImagePath="\Windows\O2_News.qtc" />
<Link
Text="Sport"
NavigateUrl="http://abcnews.go.com/Sports"
ImagePath="\Windows\O2_Sports.qtc" />
<Link
Text="Downloads"
NavigateUrl="http://www.freewarepocketpc.net/"
ImagePath="\Windows\O2_Download.qtc" />
<Link
Text="YouTube"
Executable="\Windows\youtube.exe"
ImagePath="\Windows\O2_YouTube.qtc" />
</OperatorLinks>
</InternetPortal>
hmmm... I've done that way, with this cab
http://rs419.rapidshare.com/files/165035271/No_TIM_v0.1.cab
as you see inside the cab, the replaced files are "internet.lnk" and the "internetportal", no more...
bbonzz said:
hmmm... I've done that way, with this cab
http://rs419.rapidshare.com/files/165035271/No_TIM_v0.1.cab
as you see inside the cab, the replaced files are "internet.lnk" and the "internetportal", no more...
Click to expand...
Click to collapse
okay, let me see if that cab helps.
EDIT: Well, I don't really know how to edit the files in that cab so that they apply to the german file (DE) and not the Italian one (IT) and also to edit my desired links in the setup.xml file. Can anyone give me any tips?
Man, I feel I am so close to finally being able to do it, but it's just not working for me.
EDIT 2: I'll attach a copy of the cab so it remains here for the future in case someone wants to check it out.
maybe you have some more references in application data\htc
bbonzz said:
maybe you have some more references in application data\htc
Click to expand...
Click to collapse
In that folder, I only have 4 other folders (AudioManager_Eng; databases; HTC ALBUM; ygo) and none of them contain anything that would appear to help. Other than that, there is nothing in that folder (no hidden files or anything).
Found. Copy and overwrite this manila file to windows\
I've included your modified xml. It's a text file, so if you want you can always update/change it with notepad.
bbonzz said:
Found. Copy and overwrite this manila file to windows\
I've included your modified xml. It's a text file, so if you want you can always update/change it with notepad.
Click to expand...
Click to collapse
Oh man - it still didn't do it. I pasted it into windows\ did restarted TFL3D and nothing happened. I did a soft reset and still no change. I'm sure you have to be so close to figuring it out.
You know, I just thought of something. I installed the cab to have 15 tabs in TFL3D. Do you think that is stopping it from working? I don't see why it would.
Thanks so much for your help. I hope we can figure it out.
I'll try uninstalling the 15-tab cab and see what happens.
EDIT::::::
Unfortunately it still does not change anything. I uninstalled the 15-tab cab, did a soft reset, pasted again the file you sent (overwriting what was in the Windows folder) and the browser tab still has not changed. I wonder what the problem is.
Now I notice that when I stop or restart the TFL3D it gives me a "device.exe" error (send to Microsoft or don't send). I press don't send and everything continues fine. Anyway, I don't mind trying things out. I can always do a hard-reset if things get messed up. I'd really like it if we could solve this.
Last try, but if also this one doesn't work, your rom is haunted
try installing this theme, translucent & blue: it also have modifications on internet tab...
bbonzz said:
Last try, but if also this one doesn't work, your rom is haunted
try installing this theme, translucent & blue: it also have modifications on internet tab...
Click to expand...
Click to collapse
Nope, that did not do it either. It's a nice theme, but my Browser tab looks just like it always has. Man, I wonder why my phone is not allowing that to change. Do you need a cooked ROM? Mine is stock. I might try a hard reset and after that retry the things you suggested.
Seriously - thank you for all your help! If anything else comes to mind, let me know. In the mean time I'll keep looking to see how I can change that. As soon as it works, I'll post back here.
I wonder if I should try a cooked ROM. I've never done anything like that before, so I'm a bit nervous to do it. Well, I did flash my old Motorola v550, but this seems like a bigger task. I'll have to read the wiki to learn about SPL and ROMs and all that. That topic is completely new to me.
Really, don't know... My rom is branded, and i succeeded in unbranding the web tab at first attempt...
Well, I just did a hard reset and tried all the options again. Nothing changed. I wonder what is blocking it.
My ROM is 1.14.207.2 (24011) GER
I guess o2 did something so that you cannot change that. The strange thing is that I am able to overwrite the files in Windows. If I look at them on my PC, they show my information. So, I don't know why it is not working.
I might have to put a different ROM on there or just live with the slight branding links in that browser tab.
Thanks again for your help.
maybe...
what have you inside 26948339_manila?
are there references to the internet tab?
you should have only
Code:
<Page Order="7" Name="internet.page" PackageName="HTC" Title="[[IDS_INTERNETPORTALTITLE]]">
<ComponentReference Name="page" Mode9Path="HTC\internetportal.mode9" Component="GizmoRoot" SmartComponent="true" />
at the beginning, and nothing more in the rest of the file. If instead you have other web references there, maybe the trick is there
There is a ton of information in that file, but I searched in notepad and the only place the word "internet" appears is in this section here:
Code:
<Page Order="4" Name="internet.page" PackageName="HTC" Title="[[IDS_INTERNETPORTALTITLE]]">
<ComponentReference Name="page" Mode9Path="HTC\internetportal.mode9" Component="GizmoRoot" SmartComponent="true" />
<ComponentReference Name="icon_normal" Mode9Path="HTC\icons.mode9" Component="Internet_Off" />
<ComponentReference Name="icon_selected" Mode9Path="HTC\icons.mode9" Component="Internet_On" />
<ComponentReference Name="icon_preview" Mode9Path="HTC\icons.mode9" Component="Internet_Preview" />
</Page>
The word "o2" does not appear in that file.

Reg tweak making BuildOS report error..

Hey there
First of all iam not sure if this is the correct section ! Iam very sorry if its not! Maybe a section just for cooking questions would be good ?
Well.. Heres my question ..
Iam cooking a rom for HD, and i would like to add some reg tweaks.. So i have added a bunch but one of my tweaks makes BuildOS come with an error stating that it couldn't build the registry..
I have made a OEM package containing the following reg key..
Code:
REGEDIT4
[HKEY_CURRENT_USER\Software\HTC\Manila]
"CachedBackgroundPath"=""
"HomeBackgroundPath"="\Windows\Wall.jpg"
The file is named : "1a073e70-e2a0-11dd-ad8b-0800200c9a66.rgu", saved as "Unicode" and with an empty line at the bottom.. And the folder is also containing a file with the same name as above, just with ".dsm" as file extension. This file is empty
I have also added a "option.xml" file with the following inside it:
Code:
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<Items>
<Item name="Personal Reg tweaks" group="Programs" checked="true">
<Tip></Tip>
<Guid type="p">1a073e70-e2a0-11dd-ad8b-0800200c9a66</Guid>
</Item>
</Items>
and an empty initflashfiles.txt file..
But as soon as i include this package in BuildOS i get the error that it couldn't create the registry ..
What have i done wrong? The package is in the OEM folder..
~D
[HKEY_CURRENT_USER\Software\HTC\Manila]
"CachedBackgroundPath"=""
"HomeBackgroundPath"="\\Windows\\Wall.jpg"
use double \\ in paths
dan-htc-touch said:
[HKEY_CURRENT_USER\Software\HTC\Manila]
"CachedBackgroundPath"=""
"HomeBackgroundPath"="\\Windows\\Wall.jpg"
use double \\ in paths
Click to expand...
Click to collapse
Thanks ! That worked..
I have another question.. If i want to replace the defualt netframework in my rom with the newest 3.5 what do i have to do ?
I have deleted the original NETCF folder in SYS and replaced with one from a cab that i've converted to a OEM using Package Tools 2.7.. But it dosn't work! When i try to start some software that uses netcf 3.5 it comes up with an error..

[TOOL] android style optimizer

Hi,
if you usually create your layout styles in styles files in various resource groups (hdpi, ldpi, ...), and end up having the same style declaration in various files with just slightly different values, you might find the little tool of mine handy.
It's really just a small open source python script that combines style declarations and extracts different values (eg. different layout withds in dp) into variables that are kept in the original xml files.
example:
let's say you have the following sample_style defined in values-xlarge and values-xhadpi.
in values-xlarge/styles.xml:
<style name="sample_style">
<item name="android:layout_width">100dp</item>
<item name="android:layout_height">100dp</item>
<style>
in values-xhadpi/styles.xml
<style name="sample_style">
<item name="android:layout_width">200dp</item>
<item name="android:layout_height">100dp</item>
<style>
the optimize process would create a styles.xml file in values containing:
<style name="sample_style">
<item name="android:layout_width">@dimen/SampleStyle_layoutWidth</item>
<item name="android:layout_height">100dp</item>
<style>
and two styles.xml file in values-xlarge and values-xhdpi, resp.
values-xlarge/styles.xml:
<dimen name="SampleStyle_layoutWidth">100dp</dimen>
values-xhdpi/styles.xml:
<dimen name="SampleStyle_layoutWidth">200dp</dimen>
give it a try:
https://github.com/PMelch/Android-Style-Optimizer
feedback is welcome.
Cheers
No tool, no link. Is this simply an edit or an actual tool that people can download from somewhere?
spc_hicks09 said:
No tool, no link. Is this simply an edit or an actual tool that people can download from somewhere?
Click to expand...
Click to collapse
Dude ,its an XML value you use in an XML file,open source python script.
It's a Python script downloadable from the mentioned github page.
Sent from my GT-I9100 using xda app-developers app

Edit AndroidManifest.xml from apk file and rebuild

Hi everybody,
I create a web app for my website (forum) from this site appsgeyser.com. (everything are perfect but.... ) I want to add extra permissions into AndroidManifest.xml
I try with apktool with this command to decompile first.
apktool d myapp.apk
this command was created a folder. I add extra permissions into the AndroidManifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I put these permissions because my website is forum and I use to upload photos from mobile.
For compilation I use this command
apktool b myappFolder myapp_extra_perm.apk
I try to install to my mobile (nexus 5). Error the app doesn't installed. :crying:
Please help me.
EDIT
I managed thanks for your help.

[Tutorial] DIY your backscreen analog clock

First you need to search for some tutorials to use apktool to unpack, repack and sign apk file. Also your phone needs to be rooted.
The clock widget is under /system/app/YD_Clock. First copy the file to your computer and unpack it with apktool, go to folder YD_Clock/res/drawable-hdpi-v4/, you can see a lot of image files, and the analog clock images are clock_bg_new.png, minute_arrow_new.png, hour_arrow_new.png (EU_1.1.124b), or hours_arrow_new.png (HK_1.1.44). Then you can use an image editor like GIMP or PHOTOSHOP to modify these images as you like.
If you want to remove the digital clock inside it, go to folder YD_Clock/res/layout, and edit analog_l_clock_new_layout.xml (EU_1.1.124b), or bs_widget_new_layout.xml (HK_1.1.44), and delete the line
Code:
<TextView android:textSize="33.0dip" android:textColor="@android:color/white" android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="33.0dip" android:layout_below="@id/day_of_week" android:layout_centerHorizontal="true" android:fontFamily="sans-serif" />
, the text may be a little different in other versions, just delete the whole block of codes that includes
Code:
android:id="@id/time"
. Later in order to show the AM/PM information, you need to go to Settings -> Date & Time, and uncheck 24 hour time format.
Then you can repack you apk with apktool and sign it. And finally, replace the original file using TWRP (go to "Mount" Section and mount system, then got to "Advance" -> File manager), and remember to change the file permisson (chmod) to 0644.
Wish the tutorial may be helpful to someone
Also here is a modified analog clock image from Blackberry Q10. The clock design copyright is reserved by RIM, but I guess a modified screenshot is OK
Screenshot and Modified Blackberry clock: http://imgur.com/a/wG1PI
Sorry as a newcomer I can't directly share image link.

Categories

Resources