yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] dmanbuhnik:
Hi,

I'm creating a simple update pack to replace fonts and apn

all very basic but for some reason i can get a clean run of a script that i want to run

this is the script

#!/sbin/sh
#
# This script gets 1 parameter - the directory which the new files are in (under /cache)
# he then go over each of them, finding where thier matching file in /system and /data are
# and replace them with the new file
# after going over the list of files we then delete the /cache/<name_of_dir>
#
# the purpose of this script is to not hardcoded the path of files we want to replace
#
# Created by dmanbuhnik
# Version 0.5 (12/03/2010)

find_replace_file() {
nfile=$1
dir=$2
echo $nfile
echo $dir
rfile=`find /system -name "$nfile"`
cp /cache/$dir/$nfile rfile
rfile=`find /data -name "$1"`
cp /cache/$dir/$nfile rfile
}

mount /system
mount /data

dir=$1
echo $dir

cd /cache/$dir
pwd
for from_list in * ; do
echo $from_list
find_replace_file $from_list $dir
done

rm -rf /cache/$dir

exit 0

and i'm calling it from the upate-script by:

show_progress 0.1 0
copy_dir PACKAGE:cache CACHE:

show_progress 0.2 0
run_program PACKAGE:listInstall.sh new_fonts

show_progress 0.2 0
run_program PACKAGE:listInstall.sh new_apn

but i get failures when trying to flash it:

E:Error in listInstall.sh
(Status 65280)
E:Failure at line 5:
run_program PACKAGE:listInstall.sh new_fonts

when running the script line by line - all good

but when I try to run the script i get weird failures:

: not foundh: line 12:
new_apn

': No such file or directory
': No such file or directory
: not foundh: line 22: }
: not foundh: line 23:
in /etc/fstabind /system
in /etc/fstabind /data
: not foundh: line 26:
new_apn
: not foundh: line 29:
/sdcard/g.sh: cd: line 30: can't cd to /cache/new_apn
: not foundh: line 31: pwd
/sdcard/g.sh: line 32: syntax error: unexpected word (expecting "do")

please help
[Android Software/Hacking General [Developers Only]] packetlss:
The recovery images use execv() to call the program. This means that shell scripts are not supported.
[Android Software/Hacking General [Developers Only]] dmanbuhnik:
that doesn't make sense, cyan runs the 'backuptools.sh' in the recovery (the script that backup and restore your close source application)
[Android Software/Hacking General [Developers Only]] packetlss:
Indeed, you're correct. I was looking at the wrong code :(

Anyway, make sure that the script runs outside of the updatescript properly. Esp. be vary ofc the commands you use. The recovery environment is based on busybox versions of the commands, and the might not behave exactly the same way you expect them to do.
[Android Software/Hacking General [Developers Only]] dmanbuhnik:
i tried running it as a normal script in recovery env

you can see that errors in the last part of my first thread

i don't understand why they are errors, as i said when running the script commands manually (line by line) everything is great, so i know the shell support the commands but

btw, thank you for you help :)
[Android Software/Hacking General [Developers Only]] dmanbuhnik:
help? pls....
[Android Software/Hacking General [Developers Only]] cauli:
Did you get this fixed? I'm not familiar with shell scripting, hence I might be more hindrance than help, but no one else is posting, so...

1) I'd be inclined to rewrite the script to handle errors, rather than just assume they won't occur.

2) Why not upload a copy of your update.zip & maybe someone will try to test it? (obviously after backing up their own /system & /data)

3) In the new_font case, say, I understand looking in /system but why/where is there also a copy expected within /data to replace?

4) In find_replace_file, why is the 2nd -name pattern "$1" rather than "$nfile"

5) In find_replace_file, why is the destination for both cp's rfile & not $rfile?
[Android Software/Hacking General [Developers Only]] dmanbuhnik:
not yet.

1) no problem but i can't seems to even run the script correctly, after i do i will handle everything

2) the update.zip is not important, the update-script is not running as it should in the recovery as a stand alone script, so lets fix that first and then launch it from the update.zip

3) i'm building this script for the future, i want to be ready if someone will decided to move the directories around

4) you are correct, i will fix that

5) mmm, that looks stupid... let me fix that

ok, no change

running the script in the recovery with:

/sdcard/listInstall new_fonts

will get:

/sbin/sh: ./listInstall.sh: not found

if i try with 'sh /sdcard/listInstall':

: not found.sh: line 12:

': No such file or directory
': No such file or directory
: not found.sh: line 22: }
: not found.sh: line 23:
in /etc/fstabind /system
in /etc/fstabind /data
: not found.sh: line 26:

: not found.sh: line 29:
listInstall.sh: cd: line 30: can't cd to /cache/
: not found.sh: line 31: pwd
listInstall.sh: line 32: syntax error: unexpected word (expecting "do")
[Android Software/Hacking General [Developers Only]] cauli:
The script is looking for files in locations in which they currently don't exist (as you say above, for the future), but then assumes find has returned the location of a file. You need to catch & deal with the cases where it says the file doesn't exist.

A general rule in programming is to construct your own code with rigour, but make no assumptions about your input being well behaved, including data you receive from external function calls. An obvious corollary is that you must handle errors.

Generous debug info is always a good idea when you get into a situation like this too.

BTW I've been stuck staring at even shorter sections of my own code in the past which I 'knew' should work. It's all part of the fun ;)
[Android Software/Hacking General [Developers Only]] Droidzone:
I know this is old, but I was wondering if anyone can solve this issue.

I have a similiar problem.

If I run the following from recovery after mounting /system:

if [ -s /system/etc/data2sd.on ]; then echo Presemt; else echo No; fi;

I get the output: Present

However, if I put it in a script:

#!/sbin/sh
if [ -s /system/etc/data2sd.on ];
then
mkdir /tmp/data2sd ;
cp /system/etc/data*.* /tmp/data2sd/ ;
echo "Data2SD exists" > /tmp/data2sd.os ;
else
#Do nothing
echo "Do nothing" ;
fi;

I get this error:
/tmp # sh /tmp/test.sh
sh /tmp/test.sh
: not foundh: line 10:
: not foundh: line 10:
Do nothing
: not foundh: line 10:
/tmp #

The line 10 seems to be fi;

Can anyone good at this explain?
[HD2 General] paty:
On the Stocks page, it shows the last update time. However, not for weather. Any cab or register change to show the last update time on weather page?

thanks
[HD2 General] samsamuel:
are you sure it doesn't? top right?
[HD2 General] paty:
Really, nothing on the weather page. See jpg.

installed transparent cabs from TouchX. I bought this new phone for 2 weeks. Have not burn new ROM. It is original ROM from factory, Manila 1.0.19211620.0, ROM 1.48.831.0(71294)WWE .

thanks
[Hero CDMA Themes and Apps] jazzneel:
Hi, I had a quick question. Anyone who has bought this, what settings are you using to make it fast and w/o lag? The first time I used the NES emulator it was so fast, now its kinda laggy, and I don't know whats causing it? I've made the frame right at 8, turned the sound off, and am using the virtual keyboard for a dpad and my phone buttons for like A and B.

Thanks!
[HD2 Windows Mobile 6.5 Themes and Apps] waxfresh:
​

What you can expect

I´m going to post Icon Sets with fitting wallpapers from Artists and Designers.

I´ll release 1-2 sets per month.

Those were not designed for Mobile Devices so there are many missing icons for programs

like SPB Time, XDA Shutdown or whatever..

They should just make your home screen and main start menu to an eye candy!

Size & Format

All icons are 128 x 128 and PNG

Note

All icons and wallpapers are not designed by myself!

They are under copyright by the artists. Please don´t request icons for a special program

because I didnt create them & can´t perform magic :)

Hope you enjoy!
[HD2 Windows Mobile 6.5 Themes and Apps] waxfresh:
A set of 149 Icons and 5 fitting wallpapers.

© David Lanham, Iconfactory

David Lanham

03/12 added 2 new Wallpapers​
[HD2 Windows Mobile 6.5 Themes and Apps] waxfresh:
reserved for future entries
[HD2 Windows Mobile 6.5 Themes and Apps] waxfresh:
reserved for future entries 2
[HD2 Windows Mobile 6.5 Themes and Apps] malhznoi:
Waiting For it. :D
[HD2 Windows Mobile 6.5 Themes and Apps] jimecm:
like the idea
[HD2 Windows Mobile 6.5 Themes and Apps] waxfresh:
The first set is already in post #2 ;)
[HD2 Windows Mobile 6.5 Themes and Apps] mike-bravo:
cant say that i like the "style" of the first post, but thats a matter of taste

but keep up the good work

it looks nice and clean

nice post !!!!!
[HD2 Windows Mobile 6.5 Themes and Apps] pongster:
watching this post... looks interesting:)
[HD2 Windows Mobile 6.5 Themes and Apps] malhznoi:
AWESOME Man it's great work .

Thank you. :D
[HD2 Windows Mobile 6.5 Themes and Apps] abumhmmd1:
wow . . . wow . . .

GREAT iDEA

Keep the work

:)​
[General Questions and Answers] lokithefiend:
I've searched all over these forums and i can't seem to find either anyone with the same problem or a fix. My Text messages tab, as well as any app that pulls in text messages, only shows old texts starting from about 2 months ago and going back. I can still access all new texts through the actual email/sms app on my phone, but any apps i go to install can't read any new texts. I have a touch pro 2 on verizon running Mightyrom Love.

Any help will be greatly appreciated
[Nexus One General] Hitorii:
Hello. I just wanted to get some insight on some people who have successfully SWAPPED their phone with an unlocked bootloader because of a manufacturing defect.

My phone originally did not have dust under the screen and I unlocked it. Within 2 weeks it accumulated a TON of dust, called HTC, let them know I was unlocked with dust under the screen, and got my swap going. That was 3-4 weeks ago. I have my new phone (unlocked, however the bottom casing has a sliver of plastic chipped off and the screen isn't flush).

Today I got an email saying my estimated repair bill was $196.00 else I had to pay a triage fee to get my old phone back ( I'm not sure if they will charge the $560.00 for the swap phone as well.) I called and talked to a rep. All he said was that my MB needed to be replaced and shouldn't be charged. He issued and escalation and hopefully I can have this taken care of soon.

If anyone else has had a similar experience, or like stated, SWAPPED an unlocked phone no problem, please let me know how and if you had to ream HTC untill you got what you needed.

PS. My philosophy is if I brick a phone, tough ****. Its my fault. However manufacturing defects as such I have had are unacceptable on a nearly $600.00 unsubsidized phone. I wouldn't mind paying 30-40$ even. But 200 is just outrageous.

Thanks everyone.

Hitorii
[Nexus One General] McFroger3:
LOL, it seems like HTC is saying peoples MB are broken a lot lately.
[Nexus One General] cekle:
I had mine swapped and they didn't mention it at all, most likely because I didn't mention it.
[Nexus One General] Hitorii:
Is your ticket closed?
[Nexus One General] palosjr:
my thoughts exactly... i wonder if they are doing this strictly to people that have unlocked bootloader...
[Nexus One General] Hitorii:
Just a heads up. I PM'ed swetland and he forwarded my message to google's side of HTC and Nexus one, perhaps this will help my cause.

Worst case scenario I'd like my old phone back and pay the 28$ triage fee and send back the one the Swapped phone ( as not to be charged the $560 for the POS scratched up phone they sent me as a "swap"). That's not unreasonable, is it?

Hopefully though someone will get back to me and let me know whats up and see to get it fixed. As a note, my current Nexus One is not unlocked.

Keep the comments rolling. I'd really like tips to deal with customer service, and it's better to have real world proof of someone actually doing this as it set the precedent. Ay?

Hitorii
[Nexus One General] DJFliX:
Currency: Pound Sterling

Item	Price

Level 1 - MB replacement	86,08

Labour	18,00

Delivery	6,87

VAT	19,42

Total	130,37

T_T
[Nexus One General] Hitorii:
Ouch. Mine doesn't even say MB or anything, just a $196.00 USD repair charge. No charge for labor or delivery... I really want this to get fixed today.
[Nexus One General] lazaro17:
I'm in a similar situation now too. I mentioned I was rooted so I couldn't do the swap to begin with. I sent it in for repair and got the $196 price quote too. They wanted to replace a whole motherboard for a dead pixel.

I also escalated on wednesday and today they are being very stern about it not being under warranty.

I did find out that they are wanting to replace motherboards on rooted phones automatically. This is supposed to reinstate your warranty but also have you on a locked bootloader once again.
[Nexus One General] McFroger3:
So they basically charge you $196 to re-lock your boot-loader, what a bunch of crap.:eek:
[Nexus One General] lazaro17:
yes i guess this should be updated on the "relock your bootloader" thread.

so far the only way to relock your bootloader is to mail your phone into htc repair and have them rape you for $196 lol
[Nexus One General] Hitorii:
So did you suck it up and pay? I'm wondering what can be done. They told me I was OK, they let me swap after telling them. If you could go into detail about your exchange of words with them it'd be appreciated.
[Nexus One General] lazaro17:
Not yet I had to escalate my ticket again just to get a price quote on how much it'll be to fix the dead pixel itself (not replacing the whole motherboard).

I have a thread started with my whole story and updates here

http://xdaforums.com/showthread.php?t=644838

They are being super stern about having an unlocked bootloader and voided warranty no matter what I say. So it looks like I'll have to pay one way or the other.

As a last glimmer of hope I messaged swetland as well to see if he'd be able to help any.

P.S. I thought about doing a swap without telling them I was rooted but I was afraid they would later charge me $196 for MB replacement + $530 for new phone.
[Touch Pro2, Tilt 2 Accessories] SilverLynx:
I recently bought an OEM 2150 mah extended battery for my Tilt 2 on eBay, and it was supposed to come with a larger back cover, but it wasn't in the package. Considering the problems I had just getting the battery from the seller, I not really expecting to get the cover, although I have asked.

I can't seem to find a place selling back covers for the Tilt 2 extended battery, no place to seems to have them in stock. ATT.com sells the battery but not back cover. It's annoying.

So my question is will the Touch Pro back cover fit a Tilt 2 body? If the stock cover will fit, then it pretty much stands to reason that an extended battery cover will fit also. But I want to make sure before I drop $15-20 on it.

Thanks for any info!
[Touch Pro2, Tilt 2 Accessories] aadadams:
Try google... I found this with a basic search.

http://www.talkietech.com/htc-tilt-2-extended-battery-door-74h01529-01m-7602.html
[Touch Pro2, Tilt 2 Accessories] SilverLynx:
Thank you!

EDIT:

Unfortunately like every other place, they are out of stock and do not know when they are getting more in...
[Touch Pro2, Tilt 2 Accessories] aadadams:
Sorry, have you tried HTC? Since this is an OEM part maybe they have stock...
[HD2 General] lp1527:
Android on HD2-- Possible? Would be AMAZING....
[HD2 General] aceo07:
NOT YET! Not even close.
[HD2 General] zarathustrax:
It's coming along... there are some developers working on it. Read through this thread for info.

http://xdaforums.com/showthread.php?t=578575
[HD2 General] jongie123:
Looking foward for this.
[HD2 General] lemonspeakers:
I don't want to get them mad, so I'll ask here. Are they working on portin 2.1 or 2.01?
[HD2 General] zarathustrax:
They're still working on getting a working kernal... im not sure if there porting 2 or 2.1.
[HD2 General] MirasHD2:
Android running on a Touch Pro 2

http://www.youtube.com/watch?v=fa1Eu_hzX8Q
[HD2 General] wacky.banana:
Closing this as there are 2 threads in the development section devoted to this topic.

WB
[Desire General] Andaho:
Hi, I'm looking for the best new contract deal for the HTC Desire in the UK.

Unlimited internet is an obvious must-have with a phone like this. Since all networks are roughly the same coverage in my area, I can choose the best value deal. I am personally looking for at least 200 minutes and 200 texts, but of course, I'm happy to have more than I'll use for a better value deal.

I will edit and add to these 3 categories as better contract deals become available.

Or if anyone finds a good deal and posts to this thread, I will add it to this list:

Best 12 Month Deals:

Supplier: [URL="http://www.topcashback.co.uk/share/Andaho/mobilescontract-phones"]Mobiles.co.uk[/URL]
Network: Vodafone
Tariff: Your Plan 300 + Mobile Internet

Minutes: 300
Texts: Unlimited
Internet: Unlimited

Phone Cost: £20
Per Month: £40

Cashback: £50 from [URL="http://www.topcashback.co.uk/ref/Andaho"]TopCashBack.co.uk[/URL]

Total Cost: £450

Best 18 Month Deals:

Supplier: [URL="http://www.topcashback.co.uk/share/Andaho/Mobile_Phones_Direct"]mobilephonesdirect.co.uk[/URL]
Network: T-Mobile
Tariff: £25 Unlimited Web

Minutes: 300
Texts: 300
Internet: Unlimited

Phone Cost: £6
Delivery: £4
Per Month: £25

Cashback: £30 from [URL="http://www.topcashback.co.uk/ref/Andaho"]TopCashBack.co.uk[/URL]

Total Cost: £430

Supplier: [URL="http://www.topcashback.co.uk/share/Andaho/Mobile_Phones_Direct"]mobilephonesdirect.co.uk[/URL]
Network: T-Mobile
Tariff: £20 Unlimited Web

Minutes: 100
Texts: 100
Internet: Unlimited

Phone Cost: £60
Delivery: £4
Per Month: £20

Cashback: £30 from [URL="http://www.topcashback.co.uk/ref/Andaho"]TopCashBack.co.uk[/URL]

Total Cost: £394

Thanks to shawon007 and nubbin for sharing their find in this thread.

Best 24 Month Deals:

---------- I've ordered this one: ----------

Supplier: [URL="http://www.topcashback.co.uk/share/Andaho/tmobile"]T-Mobile.co.uk[/URL]
Tariff: Pay monthly 10 (24 months)

Minutes: 100
Texts: Unlimited
Internet: Unlimited (Massive 3gb fair usage policy)

Phone Cost: £164
Per Month: £10

Cashback: £35 from [URL="http://www.topcashback.co.uk/ref/Andaho"]TopCashBack.co.uk[/URL]

Total Cost: £369

Thanks to shawon007 to bringing this one to my attention.

Supplier: [URL="http://www.topcashback.co.uk/share/Andaho/mobilescontract-phones"]Mobiles.co.uk[/URL]
Network: T-Mobile
Tariff: Web 300

Minutes: 300
Texts: 300
Internet: Unlimited

Phone Cost: £200
Per Month: £15

Cashback: £50 from [URL="http://www.topcashback.co.uk/ref/Andaho"]TopCashBack.co.uk[/URL]

Total Cost: £510

Has anyone else found any other great pre-order deals?

The links to TopCashBack.co.uk are my referral link. If you are not already a member please sign up from my link and I get £1 for recommending you :) They give cashback for all major online shops. They are a site just like QuidCo but do not charge any fees.

Andaho :)
[Desire General] leoni1980:
30gbp per month

300 anytime minutes

unlimited texts

unlimited web

3 months free insurance

18 month contract

FREE PHONE

via mobilephonesdirect.co.uk.
[Desire General] brummiesteven:
At mobiles.co.uk the £30 vodafone tarrif has been reduced to £25.

So:

Free Desire

600 Minutes

Unlimited Texts

Vodafone Passport

for £25

It would then cost an extra £5 ontop for internet. But this is still £5 cheaper than I currently pay for my G1 and it seems one of the few options where the desire is free.
[Desire General] cez10:
i am definitely going for this one, as o2 probably wont have desire in 2-3weeks when my contract runs out, i ll have to move to vodafone which I dont mind
[Desire General] brummiesteven:
Has anyone used mobiles.co.uk? I've seen some pretty bad reviews :(
[Desire General] dickson123:
From what I've read, O2 is the only network that doesn't put a specific MB limit of "fair use" on it's unlimited data plans. Others have 500mb which is tiny. I've tethered my phone to my laptop and had over 15gb in a month before they sent me a polite message saying to go easy on the data.
[Desire General] All Day On XDA:
Carephone warehouse web only deal:

30gbp / month

phone cost: 0

cross network minutes: 900

texts : 500

internet - unlimited

contract length - 2 years
[Desire General] shawon007:
Best Contract deal

IT has got to be this: (For Students etc. or those who want a good phone cheap:)

£60 for phone! £20p/m for 18 months. TOTAL COST = ... £420!!

100 mins, unlimited mobile web. 100 txts.

PAYG handset is selling for upwards of £420. Get yourself a bargain by gettin both a good phone and line rental for less!

BTW. You can swap out the unlimited web and get unlimited txts if you want. No change to price whatsoever.

Someone find a better deal!

www.mobilephonesdirect.com

You have to click "vie all plans" as the better deals are hidden otherwise.
[Desire General] sh500:
What's the exactly link for this deal as the link you've provided seems to be a glorified search website?

Sounds like a T-mobile deal though.
[Desire General] nubbin:
It's here - http://www.mobilephonesdirect.co.uk/Brands/HTC/b509/p31043.aspx - about halfway down the list. :D
[Desire General] jamiepyrite:
Can I bring to people's attention Andaho's links in the first page to this TopCashBack.co.uk site is a reference for him. He gets £1.00 for everyone that signs up through his link, the sly devil!!
[Desire General] sh500:
I believe he has already stated that fact on the bottom of his post.
[Desire General] sh500:
Oh I see it now. As I thought, the T-mobile deals are in line with their new style line deals- Flexible Boosters.

These deals are presumbly for new customers, where for example if you are an existing T-mobile customer, you cannot sign up for any of the T-Mobile deals on there as a new customer - with your existing number?

My T-mobile contract has expired so will need to find out the upgrade prices.
[Desire General] nubbin:
Can't you just end your contract formally if it's expired?; then you become a new customer, surely?

I must say I'm tempted by this deal even though I have a pre-order in with a price of £374, just to spread the cost - but the down side is having a Desire locked to T-Mobile for a few months. Could always get an i-Smart SIM unlocker, I suppose. I could still use the T-Mobile SIM in my car phone.
[Desire General] crazybones:
Similar deals are available from Mobiles.co.uk once you factor in the £50 cash back via Quidco and their site specifically says that the phone is unlocked and no branding.
[Desire General] sh500:
I can end the contract but I'm unsure if I can transfer my existing number over, which is a must for me. I'll have to wait until T-mobile start doing the device directly and give them a call.

I've been with T-mobile for about 15 years and have been happy with the packages over time and indeed their coverage (voice and data). But I may still have a look at Vodafone (and/or Virgin) to see if they can offer something better as a new customer.
[Desire General] brummiesteven:
You will be able to transfer your number but you would need a PAYG Sim to transfer it to (any network) and then transfer the number from the PAYG sim to the new contract sim.

Vodafone have an awesome deal on mobiles.co.uk. Free phone, 600 Minutes and Unlimited texts for £25. Then you pay £5 for internet making it £30 a month - £5 cheaper than my G1 with the same amount of minutes/texts.