[Q] idol 2 mini s problem - Android Q&A, Help & Troubleshooting

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

Related

[Project] Incoming MMS Picture Size Fix

Hey all, this would probably be only interesting to those who are receiving 2kb, 160x120 MMS messages. Using TMO-USA as an example, the X10 received large MMS images with 1.6, but I'm guessing it doesn't recognize the uaprofile of 2.1 and now are getting tiny mms images. This could also help others on other networks that have the same problem.
Cyanogenmod has an option to switch the profile. Someone else on XDA has posted some of the changes, and those can be found here.
I'm thinking that since I don't think we can compile a new mms.apk, maybe it's possible to edit the current mms.apk with the uaprofile from a different phone (probably the t717/equinox for the tmo users)? Hopefully it's not encrypted or anything either...
So off I go into root explorer and I can't find any mms.apk in my x10. hmm, so i adb shell into it and still no mms.apk. I can't get too far if I can't find the mms application, lol.
so does anyone know what SE uses for mms? or if I'm just simply not seeing it?
obviously, i'm new to working with android, i'll pick up more as time goes on thanks for any help!
Bah! Just in case anyone else looks, I think I found it... sigh.
I searched through the /data/data/ folder and found a reference to 'ericssson' (part of what would be the normal uaprofile text) in com.sonyericsson.converstations_preferences.xml... converstations, eh? makes sense... and yes, there's a converstations.apk
so far i've unzipped it and found 'mms_config.xml' that has max file size and dimensions... but i think this might be only for outgoing mms...
I could be wrong, but isn't it conversations.apk
EDIT: nevermind, looks like you already found it lol
Curious
Thanks for trying to work on it. I would love to have a fix to these small picture messages on T-mo US. But is it possible that the small picture sizes have something to do with T-mo's services somehow???
motibbs96 said:
Thanks for trying to work on it. I would love to have a fix to these small picture messages on T-mo US. But is it possible that the small picture sizes have something to do with T-mo's services somehow???
Click to expand...
Click to collapse
It was working fine with 1.6 but when the X10 jumped up to 2.1, mms images were small. So to me, that means that the tmobile no longer recognizes the phone and it goes automatically downsizing all incoming images.
What I'm not sure is if TMO checks the url of the phone's uaprof or if it just looks at the url and just checks it against their own database. I'm thinking the latter.
Another thought might be if TMO just looks at the specs that the phone gives. The reason for this last question is because X10 1.6 had a max size of 640x480 (not sure if this was receiving or sending) at 1 meg (tmo only handles 300k max). with X10 2.1, it states a max size of 1600x1200 and a max size of 1 meg. Maybe it thinks 1600x1200 is too big and it hits some trigger on TMO's side to only send the fallback size (160x120)
I would recommend emailing customer service (and for anyone else having the same issue with their respective provider) and seeing if they can add the uaprof of the x10i (url) to their database. I know this UAprof is from the v24 update. I'm not sure if it's any different for the DT update or the first 2.1 update. It's not a permanent solution but it's all we have for now.
I thought I'd also post an update, in case if anyone has any thoughts on what I might be doing wrong or helpful tips.
I searched the entire system directory for any text within the files that might relate to uaprof or udp or anything like that. Nothing. I think in 'normal' Android builds have a mm_property.conf file where we can change the uaprof info. So for now, I'm concentrating on converstations.apk and that specific file isn't located there (or anywhere). SE has to store this info somewhere so I think it's in a different conf file. But for the hell of it, I did a hex search for anything that might be related to uaprof (just in case a text search missed something). Again, nothing.
SE encrypted converstations.apk. So if it's in there somewhere, we have to decrypt it first. I'm looking into and reading on decrypting and repackaging the apk. Seems easy enough - I just need to learn a little more.
APN Settings
Name: T-Mobile US
APN: epc.tmobile.com
Proxy: 216.155.165.050
Port: 8080
Username: (leave this blank)
Password: (leave this blank)
Server: (leave this blank)
MMSC: http://mms.msg.eng.t-mobile.com/mms/wapenc
MMS Proxy: 216.155.165.050
MMS Port: 8080
MMS Protocol: WAP 2.0 (don't know if this is important)
MCC: 310
MNC: 260
APN Type: (leave this blank)
To create APN settings for your Xperia.
1. Go to 'Settings'
2. Select 'Wireless & networks'
3. Browse down to 'Mobile networks'
4. Browse down to 'Access Point Names'
5. Click the Menu (Left) button
6. Select 'New APN'
7. Key in the detail relating to your provider or carrier
8. Then press the radio button to select it
9. Save settings, reboot phone.
To test your network dial the following on your phone dial keypad to get into test mode: *#*#4636#*#*
Thanks for the help, but the issue isn't an APN setting. Just for giggles, I went ahead and changed the default APN settings to this and can confirm that it still receives small images.
So far I've decompiled the apk but haven't found the settings I need to change
Alright. So I've *properly* decompiled the apk (I'm working on the newest X10i build, v435). It references the UXprof url from framework-res.apk. I found where the url is in that file and changed it to the url for the Tmobile G2 (just to see if that change will work). Unfortunately, I need to recompile framework-res.apk and from everything I've read, it's recommended not to do that.
I'll keep on reading to see if I can do it, but has anyone recompiled framework-res.apk for the x10?
totalundone said:
Alright. So I've *properly* decompiled the apk (I'm working on the newest X10i build, v435). It references the UXprof url from framework-res.apk. I found where the url is in that file and changed it to the url for the Tmobile G2 (just to see if that change will work). Unfortunately, I need to recompile framework-res.apk and from everything I've read, it's recommended not to do that.
I'll keep on reading to see if I can do it, but has anyone recompiled framework-res.apk for the x10?
Click to expand...
Click to collapse
I've dealt with framework-res.apk before. It was just to add the Super Circle Battery, but I can tell you what works.
Compiling the APK seems to encrypt the XML files one by one. If you change any of the resources (like adding images), then you also need to compile a new resources.asrc. Fortunately, since it's a system file, you don't need to sign the APK.
Check this thread for lots of good info on modifying framework-res.apk (thanks to _calum_ and MrRusch):
http://forum.xda-developers.com/showthread.php?t=834806
Important points:
- The XML files and resources.asrc need to be compiled.
- The APK doesn't need to be signed.
- You can compile the XML and resources.asrc with APK Manager, then extract them from the "unsigned" APK it creates, and then reinsert them into a copy of the original APK using WinRAR (or your favorite zip tool).
- Compression should be set to "store" (a.k.a. no compression).
Be sure to have a backup copy of your original framework-res.apk. It's best to leave a copy on your SD card somewhere.
Be careful when replacing framework-res.apk. Copying it with Root Explorer isn't a good idea. I think the permissions get screwed up or something, and you don't have time to change it because it reboots right away. It's better to copy it onto your SD card and use the dd command through ADB.
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Click to expand...
Click to collapse
If you mess up, then you may not be able to boot the phone. Don't panic. ADB is still available even when it hasn't booted yet, so just use dd to replace it with your old one.
wow, i never would've thought the picture sizes had to do with my phone. hope you find a fix for this!
Thanks Grospolina! That info should help me a lot.
I actually tried to use root explorer at first... LOL. Stuck at the SE screen and I thought I bricked the phone but found out that my USB port on the monitor has quit working... Wasted a couple hours there. Sigh, lol.
I was using apktool since it's supposed to be framework-res.apk friendly but it kept on compressing the apk. I tried to adb push the file but it kept on saying I didn't have permissions. So I ended up using xrecovery to 'restore' the file in update.zip. I did a test mms but it was still small so I went ahead an cleared the davlik cache. I checked the file size of the modified framework-res.apk but either clearing the cache brought the original apk back or xrecovery update didn't work because the file size was the same as the original (apktools shrunk it down to nearly half).
anyways, I'll try it with that adb line.
There is one issue though. If I open up the original framework-res.apk file in 7zip, the file I need to edit doesn't appear. I'll try this but am not sure what to do if the xml file I need to replace doesn't appear.
bah, i can't ever get adb to replace a file. it always says that it's not writeable and then when i get su permission set, some other error happens. I'll figure it out... still reading... typical adb newbie issue, haha.
I don't have enough time right now (or in the next day) to keep on working on this but if anyone on tmobile usa with an xperia x10 wants to give it a shot, I've linked the apk below. The only change I've done so far is change a couple lines in style.xml. I'm not sure this is it for sure, but I can't rule it out yet.
sorry not trying to be rude or nething but i think you should say that this post is about the picture size...cuz a lot of times iv noticed that when you flash it erases your apn settings which is what you need to receive mms messeges in in the first place... just a thought
No offense taken!
I edited the title to reflect that it's to fix incoming picture mms size.
I hope you don't take offense, but this ISN'T an APN settings issue. I explained it several times earlier and it's been brought up before. It's a problem that been mitigated with custom roms because they have the ability to change their uaprof to something the network recognizes.
Several networks, one of which includes TMobile USA, default to a MMS picture size of 160x120 if it doesn't recognize the phone. This project's intention is to change the default uaprof in order for Tmobile USA (and eventually any other providers) to a uaprof of a supported handset.
mms - framework-res.apk - custom
I was totally on the wrong track with APN settings. Admit I saw MMS and jumped the gun without searching on anything. Had just been through all the baseband compatibility issues and APN setting seemed related
http://forum.xda-developers.com/showthread.php?t=830102 - theeedy - good job working with the settings on the Semc Camera Application, related in the compression of images taken by the default camera.
http://forum.xda-developers.com/attachment.php?attachmentid=355818&d=1278461264
This is MMS.apk - it's an interesting modification, couldn't find it easily within my phone.. decompiling it broke with Unknown Resources, which of course is referencing - /system/framework/framework-res.apk
I think it's related to someone's custom Framework-res.apk and used the default Android MMS app for ease of modifications. I'd say that could be the way to go about this and using the Android SDK in Eclipse or Netbeans is probably the right track.. not APN settings... sheesh! - Grospolina is on the money
package="com.android.mms"
Here are permission sections - might make sense..
Code:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_DRM" />
<uses-permission android:name="com.sonyericsson.android.permission.SEMC_BACKUP_SERVICE" />
<uses-permission android:name="com.sonyericsson.android.permission.SEMC_CUSTOM_SETTINGS" />
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
<uses-permission android:name="com.android.mms.wap.permission.READ_PUSH" />
<uses-permission android:name="com.android.mms.wap.permission.WRITE_PUSH" />
<permission android:name="com.android.mms.wap.permission.READ_PUSH" android:protectionLevel="signatureOrSystem" />
<permission android:name="com.android.mms.wap.permission.WRITE_PUSH" android:protectionLevel="signatureOrSystem" />
Now your creating your own Framework-res, you need to know the parts that your looking for and what to do with them.. roughly..
Code:
<service android:name="MmsService" android:permission="com.sonyericsson.android.permission.SEMC_CUSTOM_SETTINGS">
<intent-filter>
<action android:name="com.android.mms.MMS_CUSTOM" />
<action android:name="com.android.mms.MMS_SERVICE" />
</intent-filter>
</service>
From here you can define the properties that you need in the RES layout.. you need something along the lines of this in a file called - image_attachment_view.xml - which would define the image properties you are discussing.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.mms.ui.ImageAttachmentView android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/image_attachment_view" android:background="@drawable/attachment_editor_bg" android:paddingRight="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@id/image_content" android:layout_width="fill_parent" android:layout_height="150.0dip" android:layout_weight="1.0" />
<LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content">
<Button android:id="@id/view_image_button" android:layout_width="100.0dip" android:layout_height="50.0dip" android:text="@string/view" style="\?android:attr/buttonStyleSmall" />
<Button android:id="@id/replace_image_button" android:layout_width="100.0dip" android:layout_height="50.0dip" android:text="@string/replace" style="\?android:attr/buttonStyleSmall" />
<Button android:id="@id/remove_image_button" android:layout_width="100.0dip" android:layout_height="50.0dip" android:text="@string/remove" style="\?android:attr/buttonStyleSmall" />
</LinearLayout>
</com.android.mms.ui.ImageAttachmentView>
EDIT: There are also some better MMS applications out there.. before reinventing the wheel perhaps a bit of window shopping?
No problem! Thanks for the info MrHassell. I enjoy reading your posts (chop full of interesting info, haha)
I'll definitely look into your tips there! SE mucked around with the messaging and they don't use mms.apk but conversations.apk. After decompiling conversations.apk, it references outside of converstions.apk (I'm 95% sure of that) for the uaprof. This (I think) makes sense in that the system needs to tell the network its uaprof.
Other MMS applications depend on this system uaprof to receive images and they too, receive small images. Custom roms get around this because they allow changing the uaprof. However, since SE changed the location of some of the interesting strings, I haven't been able to use AOSP or anything like that as a template to find the strings specifically.
I could use a custom rom, but I'm waiting until a stable, feature filled one is available without having to download X, Y, and Z to get features to work. I like messing with my phone but don't want to mess around with an entire rom (yet, I already did that with a Samsung i7500, lol).
So far, the interesting lines (2) is in framework-res.apk. /res/values/strings.xml
>> <string name="config_useragentprofile_url">http://wap.sonyericsson.com/UAprof/%R202.xml</string> (something like this) and h ttp://wap.sonyericsson.com/UAprof/%R101.xml
Which I changed to
>> <string name="config_useragentprofile_url">http://www.htcmms.com.tw/Android/TMO/Hero/ua-profile.xml</string>
Which is the uaprof for the Tmobile G2.
And just for background...
How I think this all works (if anyone works for tmobile usa and knows, please correct me!)
Phone connects to the network OR when the phone receives an MMS
Advertises it's uaprof capabilities to the network
Network looks at the url and either:
goes to the url and assigns those capbilities to that registered phone
or
looks at the url and looks for that url in a local database. Network finds info and assigns MMS values OR doesn't find it and assigns default 160x120 values. Doesn't go to the internet to find those values.
The X10 worked under 1.6. Why? It was rumored to come to the USA and 1.6 would have had the uaprof on their database for testing reasons. 2.1 comes and TMobile USA has already decided not to carry it so they don't add the new url to their database.
totalundone said:
bah, i can't ever get adb to replace a file. it always says that it's not writeable and then when i get su permission set, some other error happens. I'll figure it out... still reading... typical adb newbie issue, haha.
Click to expand...
Click to collapse
The /system directory is read-only by default. You need to mount it as read/write:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
Click to expand...
Click to collapse
If that doesn't work, you could try this:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
exit
exit
Click to expand...
Click to collapse
Also, don't forget to check your phone for a "SuperUser" popup and allow it. In the SuperUser app, this shows up as "Unknown".
Thanks again Grospolina!
Evidently I didn't have it approved by superuser. I thought I did... but forgot that I lost it when I had to reflash a few days ago.
I tried the new framework-res.apk. It didn't crash my phone and it was the new size! unfortunately incoming mms photo sizes are still 160x120 max.
Well... I guess I need to get back to searching ...
just want to say thank you for looking into this. i really want to have the mms picture issues worked out.
thanks again

Weather Bug - got it working

I installed Weather Bug today and to my dismay I could not get it working using location services. It worked fine if I removed the location services check boxes during setup and manually entered the location.
I was not happy with having to use a manual entry for my current location and every time I went into settings and turned on location services the app would force close. I figured it was the lack of location services.
adb remount
adb pull /data/data/com.aws.android/shared_prefs/com.aws.android_preferences.xml
change the line using notepad++ to:
<boolean name="prefs_use_gps" value="true" />
to
<boolean name="prefs_use_gps" value="false" />
push the file back:
adb push com.aws.android_preferences.xml /data/data/com.aws.android/shared_prefs/com.aws.android_preferences.xml
now you can enter settings and enable location services. Just do not enable GPS,
I attached a already modified file. Just rename the txt to xml.
Thanks. Any idea how to get the elite version to work? I added the string from your file, <boolean name="prefs_use_gps" value="false" />, and it did prevent the force close with Location enabled; however, it couldn't find my location. Attached is my com.aws.android.elite_preferences file
I just enable the TetherGPS client when running such apps which crash when trying to access GPS.
richard98 said:
Thanks. Any idea how to get the elite version to work? I added the string from your file, <boolean name="prefs_use_gps" value="false" />, and it did prevent the force close with Location enabled; however, it couldn't find my location. Attached is my com.aws.android.elite_preferences file
Click to expand...
Click to collapse
This is the line that tells it to use the network location. I did not see this line in your file, so I do not know if it will work in your version.
<boolean name="prefs_use_network" value="true" />

[GUIDE][GB]How to add jellybean like WiFi-BT switch in title bar

Add jellybean like Wi-Fi & Bluetooth ON/OFF switch in title_bar.
This is a cool guide to add Wi-Fi or Bluetooth switch in titlebar as you can see in jellybean.
This mod work will on any gingerbread running phone.
Things you need:-
Apktool/Apk-Multitool
Notepad++
Basic knowledge about compiling & decompiling.
Basic knowledge about xml editing & modding.
Settings.apk from your rom
Click to expand...
Click to collapse
Lets start:-
Step-1
First of all decompile your settings.apk
Step-2
Now download this
and extract it.
Open & copy the "res" and paste it in your decompiled "settings" folder
Step-3
Now goto settings/res/xml and open wifi_settings.xml
Here you will see a line like that:
Code:
<CheckBoxPreference android:persistent="false" android:title="@string/wifi_quick_toggle_title" android:key="enable_wifi" android:summary="@string/wifi_quick_toggle_summary" />
Step-4
Add this android:layout="@layout/sachin_wifi_switch" Now it will look like this:
Code:
<CheckBoxPreference android:persistent="false" [COLOR="red"]android:layout="@layout/sachin_wifi_switch"[/COLOR] android:title="@string/wifi_quick_toggle_title" android:key="enable_wifi" android:summary="@string/wifi_quick_toggle_summary" />
now save and close it.
Step-5
Now open bluetooth_settings.xml
and find this:
Code:
<CheckBoxPreference android:title="@string/bluetooth" android:key="bt_checkbox" android:summary="@string/bluetooth_quick_toggle_summary" />
Step-6
Here add this android:layout="@layout/sachin_bt_switch"
and now it will look like this:
Code:
<CheckBoxPreference [COLOR="red"]android:layout="@layout/sachin_bt_switch"[/COLOR] android:title="@string/bluetooth" android:key="bt_checkbox" android:summary="@string/bluetooth_quick_toggle_summary" />
save and close it.
Step-7
Now open AndroidManifest.xml in "Settings" folder.
Here find this:
Code:
<activity android:label="@string/wifi_settings" android:icon="@drawable/mainmenu_icon_wifi_settings" android:name=".wifi.WifiSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
Step-8
After "activity" add this android:theme="@android:style/Theme.NoTitleBar"
like this:
Code:
<activity [COLOR="red"]android:theme="@android:style/Theme.NoTitleBar"[/COLOR] android:label="@string/wifi_settings" android:icon="@drawable/mainmenu_icon_wifi_settings" android:name=".wifi.WifiSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
now find this:
Code:
<activity android:label="@string/bluetooth_settings_title" android:icon="@drawable/mainmenu_icon_bluetooth_settings" android:name=".bluetooth.BluetoothSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
similarly do here, add android:theme="@android:style/Theme.NoTitleBar" after "activity".
like this:
Code:
<activity android:theme="@android:style/Theme.NoTitleBar" android:label="@string/bluetooth_settings_title" android:icon="@drawable/mainmenu_icon_bluetooth_settings" android:name=".bluetooth.BluetoothSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
save and close it.
and you are done with modding.
Now compile & Sign the new Settings.apk
and push it to system/app and change the permission to rw-r-r
Enjoy! Press THANKS if you like it
HIT HARD
HIT OFTEN
#Roman Empire​
Regards:- Sachin Kumar53

Help with Tasker command/script

How can I create a tasker script to automate the amendment of a file in an app?
Basically I wish to add a line of text to a file in the Freedompop app to disable android dialer integration.
I would have to amend the file located at /data/data/com.freedompop.phone/shared_prefs/com.freedompop.phone_preferences.xml
and add this line <boolean name="integrate_with_native_dialer" value="false" />
just before </map>
I have already done this manually with root explorer but its tedious after every app update and I have to do this again manually

[REQ] [HELP] Help to compile LGTeleService without proximity sensor

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

Categories

Resources