[Resolved] The SIM-card you are trying to use is now roaming.No local SIM is available - General Questions and Answers

ALL CREDITS GOES TO "CAMEL"
For those who experienced this annoyng warning like "The SIM-card you are trying to use is now roaming. No local SIM is available now" I found a working solution. The basic ideea is to update a system property called [gsm.operator.isroaming] to false fast enough that the system belives that is not in roaming. You need root on your device for this workaround to work.
Step 0. Get root access!!!! Adb working!!!
Step 1. Create a file in /system/etc called "install-recovery.sh". If this file exists, append a new line
android# echo "\n/system/etc/camel-roaming &\n" >> /system/etc/install-recovery.sh
This line will execute in background a script named camel-roaming which is placed in system/etc. Change its permission to 755 with
android# chmod 755 /system/etc/install-recovery.sh
Step 2. Create a file in /system/etc called "camel-roaming". This will change roaming parameters once every second. Content of this file will be:
while [ 1 - eq 1 ]
do
setprop gsm.roaming.indicator.needed false
setprop gsm.operator.isroaming false
sleep 1
done
Change its permission to 755 using the same chmod command. Do not use windows notepad for edit because the way that it threats new lines. Use root explorer, midnight commander or simply echo to this file using echo "some text \n" where "\n" stands for a new line.
Reboot your phone and voila! The warning will no more be displayed. It is a chance, probably one in a million to get this warning again if the property is changed by system in less than one second, while our script is sleeping.

:crying:

Don't work for me! :crying:
I use a dual-sim phone (Allview V1 Viper, the same with Gionne Elife E3 / Blue Life Play / General Mobile Discovery, etc).
This solution is valid also for dual-sim phones or only for single-sim?
Thanks!

Related

Preferences Ownership issues?

I have been using JF 1.43 for a few months and loved it. Seeing that Cupcake became mainstream, I took the plunge two days ago and have been having issues. I tried JF 1.51, then a mod, then theDudes, all with some problems. I tried wiping and keeping apps in regular memory just for testing. I finally got a clean install using TheDudesCupcake which worked ok for me. When I pushed my preferences back using adb, it just hung on the "android" screen.
I was getting annoyed at myself for not understanding what was going on . The confounding problem was that the set of prefs that I was restoring had adb disabled, so I couldn't get a logcat to see what was really happening.
Long story shorter...
After some more fresh installs, I think what I have sorted out is that all of my preferences files lost their correct ownership. I found that when I had a program that was crashing, I would log in to an adb shell, use ps to see what user the app was running as, for example app_82. Then, I would chown app_82.app_82 for the directory within /data/data. I would then to it recursively since busybox doesn't have -R for chown by issuing the command chown app_82.app_82 /data/data/com.android.weather/cupcake/* and then chown app_82.app_82 /data/data/com.android.weather
It fixes programs that were having problems accessing their sqlite3 DBs which was the clue in the logs that led me to this solution.
As I am going through I see that it improves the performance and error rate of programs by doing this. Obviously core functionality doesn't have the same ease of repair.
Is this the wrong thing to do here? Is there a better way to restore files after an upgrade so that this doesn't happen again?
I saw that someone wrote a python script to fix these permissions, though I don't understand where they got python to run on Android in the first place. Is there a shell script that can parse an app's uid and fix its supplemental files accordingly?
I tried searching, but may not have used good keywords about this issue.
Any help/advice/info would be appreciated.
The answer
This guy has a python scirpt that nicely spits out a shell script to fix all of them
http://blog.elsdoerfer.name/2009/05/25/android-fix-package-uid-mismatches/
Code:
"""Parse Android's /data/system/packages.xml file and spits out
shell code to fix UIDs.
This helps you fix "Package x.y.z has mismatched uid: 10089 on disk, 10079
in settings" errors.
"""
from xml.dom import minidom
xmldoc = minidom.parse('packages.xml')
packages = xmldoc.getElementsByTagName('package')
ignored = []
for package in packages:
try:
userId = package.attributes['userId'].value
is_shared = False
except KeyError:
userId = package.attributes['sharedUserId'].value
is_shared = True
# do not touch permissions of shared apks (they userid always seems to be 1000)
if not is_shared:
print "busybox chown %s:%s %s" % (userId, userId, package.attributes['codePath'].value)
for subdir in ('', 'databases', 'shared_prefs'): # note we don't touch lib/
print "busybox chown %s %s:%s /data/data/%s/%s" % (
'-R' if subdir else '', userId, userId, package.attributes['name'].value, subdir)
Essentially, you can use adb pull to pull /data/system/packages.xml locally, run this python script on it, and then send each command back. One way to do this on *NIX is
Code:
adb pull /data/system/packages.xml . ; python fix.txt | xargs adb shell

Changing init.rc of LG GW620 / EVE

Hi guys,
I'm trying to make some changes in the init.rc of my LG GW620,
I have add this service:
Code:
service tole_services_sysinit /system/bin/logwrapper /system/bin/sh /system/bin/tole.sysinit
disabled
oneshot
And this at the end of "on boot" section:
Code:
start tole_services_sysinit
And this is the code of /system/bin/tole.sysinit:
Code:
#!/system/bin/sh
setprop ro.modversion "LG EVE/GW620 mod by jros aka tolemaC"
export ROM=tolerom
And have correct permisions:
Code:
# ls -l /system/bin/tole.sysinit
ls -l /system/bin/tole.sysinit
-rwxr-xr-x root root 359 2010-03-11 23:26 tole.sysinit
When phone reboot the property ro.modversion is not set and ROM isn´t in the export list and don't have value.
Yes, I have modify the boot.img and flash it.
To see if init.rc is being processed correctly I have added this lines at export sections (at the beginning of "on init":
Code:
export TERMINFO /system/etc/terminfo
export TERM linux
When reboot TERM and TERMINFO are defined with correct values, but ROM and ro.modversion property aren't defined.
I think that tole_services_sysinit service don´t start, but I don´t know why.
Any ideas?
I have lost too many time with that.
I have see this post:
http://forum.xda-developers.com/showthread.php?t=575144
But I don´t see what is wrong.
Thanks in advance.
EDIT
I have tryed to add the service with not "disable" modifier:
Code:
service tole_services_sysinit /system/bin/tole.sysinit
user root
group root
oneshot
But the result is the same.
One note: Is Android 1.5
Nobody knows?!?
Where can I find help about that?
Someone knows?
What are the permissions on the /system/bin/tole.sysinit file?
Thank you Zacpod.
The permissions:
-rwxr-xr-x root root 359 2010-03-11 23:26 tole.sysinit
And it runs as expected when you type /system/bin/tole.sysinit?
I followed the same tutorial you mentioned above, so I'm not sure why yours isn't working.
Hi Zacpod, I could run /system/bin/tole.sysinit without problems.
I don´t know what was happend, but I have good news.
I have started from scratch, I have flashed with V10G_00 version from LG and I have done a nandroid. Then I have extract boot.img and I have modified init.rc adding a simple service and now works fine.
In this test I have called my service as "toleinit1" and works fine but I have changed the name to "tole_services_sysinit" and then it doesn´t work , I don´t know if is due to length of service name or is due to "_" chars.
Well, now it´s work fine.
Thanks for passing, your response has made me review the issue.

[Q] help scripting sooo close

i am so close
I was able to manipulate a database using sqlite
and wrote the following script
Code:
#stuff
su
sqlite3 /data/data/com.nitrodesk.drois20.nitroid/databases/windroid.db <<SQL_ENTRY_TAG_1
update table
set boolean=0 ;
commit;
.exit
SQL_ENTRY_TAG_1
exit
and called it xxx.sh
i can navigate to the directory and cat the file
cat xxx.sh
shows properly
if I drop in to su and try to execute it I get
xxx.sh not found
chmod 777 xxx.sh
did not help
when I get it to work for sure
i will add it to the phone priortizer app and schedule it.

[guide] Hacking the startup sequence to run your own code

I have been trying to customise my MTK phones with a pre-defined user experience, with sepcific settings etc.
Perhaps one way to achieve this is to check if the device has been facory reset, then use a script to insert specific settings once. For this I need to launch a script early in the boot sequence.
This could be achieved by dismantling the boot.img, altering the init.rc, then re-building, which requires significant work and risks bricking the device. So I looked for a way to run a script without significant re-flashing. here goes:
xlog changes the system log level, and is called just a few times at boot-up. Xlog is run early, and as root, with the parameter boot.
This script renames xlog as xlogboot, introduces a script in place of xlog, which runs another script, startup.sh when xlog is called with parameter boot. All the original parameters are passed to the renamed xlog binary, so the system functionality should not be changed.
I pushed the script to the device, then run it as root. I can now edit /system/bin/startup.sh to run whatever initialisation commands I wish. I have so far tested on a ZTE v965 .
Code:
#!/system/bin/sh
#This script creates a hook into the bootup system of Android
#This hook operates when /system/bin/xlog is called with
#the first parameter 'boot'
#Use this script entirely at your own risk. I highly recommend
#you ensure YOU have a backup of YOUR device before going further
#Public Domain Nick Hill 2014
if [ -e /system/bin/xlogboot ] || [ -e /system/bin/startup.sh ]; then
echo "This script may have already been run, exiting.."
exit 1
fi
if [ ! -e /system/bin/xlog ]
then
echo "This script is not running in an expected environment. Exiting.."
exit 2
fi
if [ $USER != "root" ]
then
echo "This script must be run as root. try running su. Exiting.."
exit 3
fi
touch /system/bin/atestfile
if [ ! -e /system/bin/atestfile ]
then
echo "It appears system folder is not mounted read-write. Remounting..."
mount -o remount,rw /system
else
rm /system/bin/atestfile
fi
echo -e '#!/system/bin/sh\n' > /system/bin/startup.sh
chown root:root /system/bin/startup.sh
chmod 755 /system/bin/startup.sh
mv /system/bin/xlog /system/bin/xlogboot
echo -e '#!/system/bin/sh\n/system/bin/xlogboot $*\nif [ "$1" == "boot" ] \nthen\n/system/bin/startup.sh\nfi\n' >/system/bin/xlog
chown root:shell /system/bin/xlog
chmod 755 /system/bin/xlog
Enjoy!
Make your own custom rom
Problem: You have an android device which you want to give/sell in USA or England. The device has come with an array of auto-starting chinese pop-ups, horrible wallpaper, and a Chinese clock applet. You uninstall all those system apps, replace your widgets with nice English ones. The phone when factory reset, starts in Chinese. Returns the user to tacky wallpaper, and you have lost the nice theming and widgets you have painstakingly installed and set up in the system folder.
Solution: This backup script. I have tested it on a v965, it also appears the file system would be OK on an A766 and many other android devices.
Instructions:
Use my previous script on this thread to create a hacked startup sequence. You must already have the /system/bin/startup.sh in place.
Unpack the tarball
Check the script lists the files you intend to back up. You will need to edit the script for that. I have set it to preserve settings for language, launcher, the 3D clock app factory.widgets.ThreeDDigitalWeatherClock-1.apk , which I think is really cool, wallpaper and the ADB mode.
Copy the install.sh and busybox to a writable directory on your android device.
su (go to root)
In a shell, cd to the directory where you uploaded the files.
sh install.sh
This will create a directory /system/perm-config
When you have the device as you would like it,
cd /system/perm-config
./make-backup.sh
This will ceate a directory tree in /system/perm-config/data folder, containing the backups of specific app data.
If all goes well, next time the phone is factory reset, the defaults are reloaded.
You could then re-flash the system partition of devices, perform a factory reset to take the device to your own defaults. You can use the last script (to hack the startup sequence), and this script to make your own custom ROMs. The script should do it's job even after un-rooting a device.
As usual, use at your own risk. I take no responsibility if your phone bricks, explodes, turns to antimatter, suddenly drops into a parallel dimension or starts receiving calls from the future.

Been trying for over a month and can't get root on LG Phoenix 5

So I've always had a rooted heavily moded android phone but the situation I find my self in all I'm probably going to have acsses to is a cheap LG Phoenix 5 LM-K300AM and very limited acsses to a PC. I could handle that if this phone was rooted. it is so loaded down with BS that the caches accumulated 1.5gb of junk every 2 to 3 hours and there a 1 to 2 second delay most of the time in registering my finger taps on the screen
I need this rooted desperately but I can't find real information about rooting it anywhere and when it comes to computer access I'm so limited I'll only get one shot so it's got to work the first time. I'm even willing l to throw money at this problem
Any ideas let me know
Zantetsukens-cut said:
So I've always had a rooted heavily moded android phone but the situation I find my self in all I'm probably going to have acsses to is a cheap LG Phoenix 5 LM-K300AM and very limited acsses to a PC. I could handle that if this phone was rooted. it is so loaded down with BS that the caches accumulated 1.5gb of junk every 2 to 3 hours and there a 1 to 2 second delay most of the time in registering my finger taps on the screen
I need this rooted desperately but I can't find real information about rooting it anywhere and when it comes to computer access I'm so limited I'll only get one shot so it's got to work the first time. I'm even willing l to throw money at this problem
Any ideas let me know
Click to expand...
Click to collapse
OK so I think I get the idea behind magisk but I need my phones boot.Img file extracted and the phones bootloader will only unlock when the phone it self is unlocked. any ideas?
Nothing not even a "we don't help with prepaid phones" I get it's cheap but it is att's current top prepaid device. but it is also the first phone I've seen where the access to the bootloader is blocked by the network/carrier lock.
Zantetsukens-cut said:
Nothing not even a "we don't help with prepaid phones" I get it's cheap but it is att's current top prepaid device. but it is also the first phone I've seen where the access to the bootloader is blocked by the network/carrier lock.so here
Click to expand...
Click to collapse
Zantetsukens-cut said:
OK so I think I get the idea behind magisk but I need my phones boot.Img file extracted and the phones bootloader will only unlock when the phone it self is unlocked. any ideas?
Click to expand...
Click to collapse
So I had i weird thought the Phoenix 5 comes stock with an AT&T device unlock app and I managed to extract it now in the past I've messed around with an apk editor and and managed to remove ads and activate app that require payment. so is it possible to edit the device unlock app to ignore at&t's condition for unlocking and just do it. If anyone has some app modifying skills I could really use the help
I have a phoenix 5 also. I was under the impression the apk calls home for approval and the unlock code. Can I get a copy of the device unlock apk?
Since Android 6 by default Toybox is part of any Android distribution. This Toybox release is restricted, means SU subcommand isn't supported. Hence all you have to do to get Android rooted is to replace pre-installed Toybox version by Toybox v0.8.5 what isn't restricted, will say contains SU support.
Thanks jwoegerbauer!! Ok, I downloaded toybox-x86_64 from http://landley.net/toybox/downloads/binaries/0.8.5/
I found a method of installing the binary. >
adb push LOCAL_FILE /data/local/tmp/ # replace LOCAL_FILE with the file path of toybox/busybox binary in PC
adb shell
chmod 755 /data/local/tmp/FILE # setting appropriate permission on pushed binary file. Replace FILE with the name of the binary you pushed in first step. Recommended is to use a single word as a name with all lower-case letters
box=/data/local/tmp/FILE # setting up a local variable for usage in next step. Replace FILE as appropriate
$box | $box sed 's/\ /\n/g'| $box sed '$d'| while read line; do $box ln -sf /data/local/tmp/FILE /data/local/tmp/$line; done # We're executing the binary referenced by $box to list all utilities, followed by creation of a list and then for each item in the list, we're creating a symlink in a directory.
I've successfully executed the first 3 commands above. Before I push the button and make symlinks I'd like to know if the binary I downloaded should work .
TIA
Worked great! I got root and removed carrier lock and all the bloat.
deleted
Tacoma56 said:
Thanks jwoegerbauer!! Ok, I downloaded toybox-x86_64 from http://landley.net/toybox/downloads/binaries/0.8.5/
I found a method of installing the binary. >
adb push LOCAL_FILE /data/local/tmp/ # replace LOCAL_FILE with the file path of toybox/busybox binary in PC
adb shell
chmod 755 /data/local/tmp/FILE # setting appropriate permission on pushed binary file. Replace FILE with the name of the binary you pushed in first step. Recommended is to use a single word as a name with all lower-case letters
box=/data/local/tmp/FILE # setting up a local variable for usage in next step. Replace FILE as appropriate
$box | $box sed 's/\ /\n/g'| $box sed '$d'| while read line; do $box ln -sf /data/local/tmp/FILE /data/local/tmp/$line; done # We're executing the binary referenced by $box to list all utilities, followed by creation of a list and then for each item in the list, we're creating a symlink in a directory.
I've successfully executed the first 3 commands above. Before I push the button and make symlinks I'd like to know if the binary I downloaded should work .
TIA
Click to expand...
Click to collapse
What did you do after this? I pushed all the commands and successfully got the older version of toybox installed but SuperSU says I don't have root.

Categories

Resources