yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Firerat:
some app the need to be on system

for instance the GB LatinIME keyb needs to be on system as it doesn't have correct certs

not sure why but in the code system apps dodge cert checks, because they are on system they are trusted

in collectCertificates()

of

frameworks/base/core/java/android/content/pm/PackageParser.java

if ((flags&PARSE_IS_SYSTEM) != 0) {
// If this package comes from the system image, then we
// can trust it... we'll just use the AndroidManifest.xml
// to retrieve its signatures, not validating all of the
// files.
JarEntry jarEntry = jarFile.getJarEntry("AndroidManifest.xml");
certs = loadCertificates(jarFile, jarEntry, readBuffer);
if (certs == null) {
Log.e(TAG, "Package " + pkg.packageName
+ " has no certificates at entry "
+ jarEntry.getName() + "; ignoring!");
jarFile.close();
mParseError = PackageManager.INSTALL_PARSE_FAILED_NO_CERTIFICATES;
return false;
}
if (false) {
Log.i(TAG, "File " + mArchiveSourcePath + ": entry=" + jarEntry
+ " certs=" + (certs != null ? certs.length : 0));
if (certs != null) {
final int N = certs.length;
for (int i=0; i<N; i++) {
Log.i(TAG, " Public key: "
+ certs[i].getPublicKey().getEncoded()
+ " " + certs[i].getPublicKey());
}
}
}

} else {
[G1 Android Development] RayearthX:
I'm preparing my own modded update.zip with full wipe, additional ringtones, apps on system and apps on data and after dealing with some syntax problems I need info on things below:

1. Will "format DATA:" wipe dalvik-cache as well?

2. What's exactly on DATADATA: partition? C3P0LOL mentioned that he is formatting it for some reason.

3. What does the numbers after "set_perm" and "set_perm_recursive" mean exactly? How can I make a directory to be read, write to and execute the content?

Edit:

4. What's the command to wipe battery stats?
[G1 Android Development] Droidzone:
@Firerat,

You're awesome..Your MTD patcher script actually taught me more about flashing and shell scripts than any documentation I came across!
[G1 Android Development] blaster44:
I have problem. I made update.zip package(ROM remix). I want to copy some files to sdcard and data partition. I put this to updater-script:

mount("MTD", "data", "/data");
package_extract_dir("data", "/data");
unmount("/data");
mount("MTD", "sdcard", "/sdcard");
package_extract_dir("sdcard", "/sdcard");
unmount("/sdcard");

sdcard directory was copied, but data no. What is incorrect?
[G1 Android Development] Firerat:
this has been answered a few times already

mount("MTD", "data", "/data");

mount("MTD", "userdata", "/data");
[G1 Android Development] blaster44:
Sorry, man, but i can't speak english very well, and on polish forums i can't find advanced information about updater-script syntax. Thanks!
[G1 Android Development] Firerat:
I often use

https://chrome.google.com/extensions/detail/aapbdbdomjkkjkaonfhkkikfgjllcleb?hl=en
[G1 Android Development] newark_b:
I too would like to know. If you find out please PM me.

EDIT: Since dalvik-cache is on data partition, I guess it would be wiped with the "format DATA" command.
[G1 Android Development] blaster44:
I have second problem. If i added this to updater-script, script works correctly(copied files to data):

mount("MTD", "userdata", "/data");
package_extract_dir("data", "/data");
unmount("/data");

After boot all works correctly, but if i want to install app(from file manager) and if install is in progres, phone was froze and reboot. This code is correct?
[G1 Android Development] Firerat:
you need to correct the file/dir permissions

tbh, there is no real reason why you should be installing apps to data with an update zip

it is much easier to install apps via pm in the rom

pm install -f /sdcard/anapp.apk
[G1 Android Development] blaster44:
But i want to install apps to data from update.zip. Can you tell me, how to use file/dir permissions?

Or

Can I install apps from update.zip via pm install?

Edit:

I'm missing this lines:

_____________________________________

And it must be

or

Or maybe the other way?

edit:

all works now(and installation too, but all apps copied to data report FC on start...

And I tried this too:

Apps also report FC....

[solved]- missing files in data/data.
[G1 Android Development] newark_b:
Quick question, what happens if the phone isn't a Dream/G1? Does it return an error or a false statement?

EDIT: Just reread OP saying that if true, script continues, otherwise it halts. Following question still stands.

Can either the updater-script and/or a shell script determine what type of phone is being used?

I am trying to see if there is a way to have the script check what type of phone it is running on, and then perform commands according to that type of phone; maybe with an if and only if statement? (example: run the check, if phone model comes back as G1 then push only G1-specific files to phone. Or if phone model comes back as OG Droid, only push OG Droid-specific files to phone.). Any help or guidance would be great.
[G1 Android Development] RichieDaze:
Yes you can! both ways are possible.

This is also possible.

If and then statements are supported.

if assert(getprop("ro.product.device") == "trout");
then
# Boot
ui_print("-Writing boot.img");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
endif
[G1 Android Development] Firerat:
assert(package_extract_file("trout.img", "/tmp/boot.img")

better demonstrates how it can be used

have another if statement and sub droid for trout

perfect example here

( but in python, as it is part of a source build )

https://github.com/ezterry/GB-devic...mmit/30ae9e66cb0408f649139651a7a6237e54dd7775

lots of stuff in that, but you can hopefully see whats going on
[G1 Android Development] naboleo:
I'm back on this topic and i'm a bit lost :

I did repalce my device with a brad new DHD and I'm now trying to use the same mechanism for retoring apps...

So i added into the latest Cyanogen 7 rom nearly the same script than Jimmothy posted previously as it was working

mount("yaffs2","MTD", "userdata", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm(1000, 1000, 0771, "/data/app");
set_perm_recursive(1000, 1000, 0755, 0644, "/data/app");
unmount("/data");

So after install the rom /data/app is correctly populated... At least that's what is showing up with ADB.... But as soon as I reboot /data/app is empty again...

I do feel a bit stupid on this case.... Any advice ?
[G1 Android Development] RichieDaze:
Can you post the whole updater-script?
[G1 Android Development] Droidzone:
Amazing stuff..

But are those functions supported in Edify?

Eg: file_getprop

Is it part of the edify code?

How do we do functions similiar to the bash comparison functions in Edify?

Btw..@firerat, after you introduced me to running shell scripts, I now use them extensively.. Added a lot of intelligence to my recovery scripts :)
[G1 Android Development] sirocyl:
I'm not dead!

Hey guys, this thread really has gone far. I've been quite busy and android-less lately, so I haven't been able to learn and explore as much as I wish to.

Ever since my G1's been smashed I've been stuck on a Blackberry, and a Tilt that a friend let me borrow. And Android on the Tilt/Kaiser, while proceeding well, is still not even barely mature enough as a daily yet. (Assuming you install to NAND, it works better from SD partitions but that's another story for another time.)

I do hope and plan to update this documentation. As of now, I'm sure it's extremely out of date (Hero Eclair had just been ported to Dream, remember that?) but anyone willing to help, may PM me with errata and details I should include. Just include the topic name in the PM title, thanks in advance!

By the way, I haven't even read the entire thread yet, 16 pages is quite a bit to cram before school. No worries though, I'll answer anyone I missed soon enough.

Now, I have another thread to catch up on concerning another one of my lost projects!
[G1 Android Development] RichieDaze:
I can't see nothing wrong with this script! This reminds me of way back when we used to edit the recovery.img and after a reboot the changes where blown away.

The now OS controls and verifies the data apps. Some roms even erase added apks in system/app if it is not properly edited. I have had apps also removed by the OS before. Most of these problems arrived when Android added the backup of your apps on their cloud. Maybe (just saying) try to disable the backup/syncing option to see if that does the trick!

@TylTru Since this thread has evolved, you should consider it to be replaced in the general Android hacking and modifications thread. Since multiple device mod-ers come here for reference.
[HD2 General] memoalien:
:confused::confused::confused:

hi guys

I have HD2 for a couple of months now, but on the last 3 days, I found my phone off tried the power bottom and the rest but no action, the only way to turn it on is by removing the battery and return it back. That happened once a day during the night; I m sure it was ok but wake up to find it turned off.

Anyone does have idea about that.

thank you
[HD2 General] dogans:
try updating to the latest official ROM
[HD2 General] Athar Mansoor:
Refer this thread. Same issue being discussed out there..

http://xdaforums.com/showthread.php?t=596484
[HD2 General] memoalien:
i m already using the latest official rom.
[Touch Cruise General] miazza:
I'm trying the gmail app 2.06 but when I try to digit the password, the field remains white and therefore I do not have access to the server.

Do anyone has tried this java app on this mobile ?

miazza
[Hero CDMA General] mroneeyedboh:
I posted a thread a bit back about our phones supposidly being on rev.a when they say rev.o. I called sprint and said the same thing, nothing they can do. Its a software glitch and im getting rev.a speeds. Bull****, my gf has the moment on rev.a sitting next to me and her speeds are way faster than mine. Any idea on how to get sprint to take back my phone and replace it with a google branded phone?
[Hero CDMA General] Avalaunchmods:
well that is a known glitch in the software. what are your running? like all the info under settings/aboutphone
[Hero CDMA General] HeroMeng:
Tell us build number, does it start with 1.29 or 1.56?
[Hero CDMA General] flipzmode:
I know for sure mroneeyedboh has been around long enough that he wouldn't be running 1.29 still. This glitch was not fixed in the 1.29 -> 1.56 update from Sprint a few months back, however it IS fixed by the 1.56 RUU. Grab it from my site and run it and voila, RevA.
[Hero CDMA General] mroneeyedboh:
Thanks flipz. Is it pretty easy to run?
[Hero CDMA General] Kcarpenter:
"Plug and Play" easy... then again I've never bought any plug and play hardware that was as easy as it sounds. ;)

Most of the time you can connect to use and the run the wizzard.exe, if it doesn't work right off the bat. Power Cycle the phone, boot into fastboot and try it there.

EDIT:

Good to see you back around Flipz, you have been tooooo quite recently.
[Hero CDMA General] mroneeyedboh:
On this wizard stuff... where is it at? can I just restart in boot loader and use an update.zip and load it that way?
[Hero CDMA General] mroneeyedboh:
haha nevermind there is a whole thread on it. Thanks flipz.

edit: Now since my phone is running fresh rom currently, when I flash over the 1.56ruu. will I loose my root? Will I have to re-root it and then re-install a rom?
[Hero CDMA General] david7586:
I am pretty sure your speeds are going to stay the same with the RUU flash. I dont think its a good comparison to compare the moment to the hero as their respective radios are different and the moment may fare better under certain conditions or vice versa. I would be interested to see if there is a difference, but I dont believe you will see one.

Also, you will lose root when you flash the new RUU. You can use Flipz's kitchen or manually do the asroot2 method which can be found in our forum in its own thread.
[Hero CDMA General] mroneeyedboh:
yeah i know its not much to root.. I may or may not do it..

What does tha sroot2 have over the first one that came out ( dont know the name )
[Hero CDMA General] smittycg:
Get the $7.00 insurance (open enrollment this month) smash it and take the $100.00 deductible hit. (make sure they cover smashing)
[Hero CDMA General] cooolone2:
Wow... do my eyes deceive me? The EvDO Rev.x is fixed in your 1.56 RUU...

I have known for a fact my phone will not hit rev.A speeds and would love to fix this. I have speed tested to no end, lol, was patiently waiting 2.1 to see what it would bring (BT functionality) lol, but maybe I'll just do it now. :)

Awesome!
[Hero CDMA General] auxny:
go to the store, rip off the one on show from the wire, then throw the slow evdo one at the main cashier and run. thus, the most simple and easiest method to do.
[Hero CDMA General] Darkshneider:
Thats probably the easiest way to get me a Palm Pre. Thanks!
[Hero CDMA General] auxny:
to make things easier, bring a bolt cutter along just in case.
[Hero CDMA General] abcdfv:
Hell, that could work of you changed the esn/meid
[Hero CDMA General] thedudejdog:
the best buy insurance covers smashing. i checked,

me, "so what you're saying is that if i take this phone right now and smash it with a hammer right in front of you i can get a new one?"

best buy guy, "as long as you have all the pieces, yes"

9.99 a month. no deductible. can't beat that. the only thing it doesn't cover is if the phone is lost/stolen.
[Hero CDMA General] auxny:
I would love to test that. just like walk into best buy, crap on it in front of customer service, then say it wont work due to water damage, and see if they fix it or gimme a new one. Just to take it to the limits.
[Hero CDMA General] junior5487:
I have a with google branded phone that was on Rev.0 ran this and now have Rev.A. Dont know if there actually is a difference in speed I will test it in a bit but it was simple. Thanks
[Hero, G2 Touch General] dbcool:
with my old n95 8gb phone i could play my mp3 files on it in the car and as it was connected to my parrott car kit i could hear it thru the cars speakers -

but i cant do it with the hero - yes the hero works perfectly with the car kit - but when you go inot the music player on it - the music only comes out fo the phone -

has anyone any ideas ?
[Hero, G2 Touch General] peterc10:
What parrot car kit have you got? The sound from the MP3 links using A2DP BT profile (designed for highish quality stereo output) and only the latest Parrots use that (my CK3000 does not) All the others only support handsfree BT profile which is mono and poor quality. So it will not pick up the music from the Hero.
[Hero, G2 Touch General] craig0r:
To elaborate, *some* phones will play music through the hands-free profile. iirc, I could do it on my HTC Vogue with WinMo.
[Hero, G2 Touch General] peterc10:
You are right but I have never managed to get my Hero to. If anyone has I would be interested in hearing how. Trouble is it will be mono lo-fi quality.

At least the sat nav voices uses handsfree - on my previous WM mobile the TT voices came through A2DP and I had to get an app to change it

Correction the sat nav voices do not use handsfree profile on the Hero - I think they use A2DP and so my Parrot is unable to pick them up. However they are loud enough to hear on the phone's loudspeaker.
[Touch HD General] nearlygod:
Hi,

since a few days my blackstone is behaving weird.

It doesn´t switch on. Sometimes, i try to switch it on and then after 10 seconds it vibrates and starts, but with the display black. After 1 minute i can use the volume controls and hear the typical sound. So the device has booted into windows but the display is black.

If i connect it to ac the the orange light doesn´t switch on. Hm.

But then i take the battery out for 10 minutes and everything works like always. Until now.

I just managed to flash a stock rom and there is no change.

Anyone had something similar?

thx, nearly
[Touch HD General] hoogo:
check this thread: http://xdaforums.com/showthread.php?p=5779015#post5779015

If your phone is still under warranty I suggest calling HTC and sending it in, you most likely need a new mainboard / motherboard.
[HD2 General] ZombieSheep:
Has anyone else had an issue where mails sent from the HD2 via the standard mail app are appearing twice in conversations? If I reply to someone from the phone, they always get 2 copies, and both appear in the web UI for GMail.

Clarifications...

1) Using IMAP Gmail.

2) Running Dutty's HG 0.8
[HD2 General] ZombieSheep:
Guess its just me, then. :)
[HD2 General] Howling Wolf:
I noticed that also, but I don't know if I was under Dutty's rom or stock one (1.66 fixed stock one at the moment). Annoying indeed.
[HD2 General] zefiltrin:
It's happening to me also, and I'm using Laurentius's WM6.5 ROM.
[HD2 General] paxttel:
got the same probleme on my hd2

i use the official rom 1.66
[HD2 General] aimiliosb:
I also confirm the problem. I'm also using an official ROM.
[HD2 General] Isadora:
That's because in your email settings you've got the "save sent items" ticked - emails don't get sent twice but what happens is that they get synced twice (once from the "sent" folder on your phone and once from the "sent" items in Gmail) Just untick "save sent items" and they'll only show up once in your conversation - you can still see them by going to the [Google Mail] (click on the "+" to expand) / Sent Mail folder
[HD2 General] aimiliosb:
I'm afraid that I cannot find this "save sent items" either under the web settings from my laptop or phone e-mail settings for gmail. Where exactly is that setting? Note that the gmail client of the HD2 uses IMAP (and not POP - it's disabled in gmail) for sending and receiving messages and I think that the setting of saving sent items doesn't apply on IMAP, or does it?
[HD2 General] Isadora:
Can't remember where it is tbh, will have to go looking for it when I can! It's on the phone somewhere - I use gmail via IMAP and had the "double sent message" in the conversations too until I unticked the thing about 6 months ago
[HD2 General] aimiliosb:
OK, thank you. Will continue looking for it. Will tell you if I find it, but until then, if you find it, please tell me.
[HD2 General] Isadora:
ok found it :) from the inbox, go to Menu > Tools > Message tab and untick "Keep copies of sent items in Sent folder"
[HD2 General] aimiliosb:
OK, found it. Had to press "More" first ot go to Inbox (phone was displaying received messages one by one before pressing it). Will test it. Again, thank you.
[HD2 General] wigwam12:
Sir you will be a DON if this works.

I have asked this problem to Google, HTC and Vodaphone and no-one has managed to give me an answer [some suggesting hard reset or send phone for repair!]

I found that when I do a "reply all" it was including my own email in the "To" field and when I delete this only 1 email would get to each recipient [note annecdotal discovery not rigorously tested!]
[HD2 General] Isadora:
I'd like to point out that I'm a girl :p but erm thanks :D
[HD2 General] aimiliosb:
I'm not sure we're having the same problem with wigwam12 (I don't recall my name included in any address - only two copies of the message shown in the web client - but my memory could have failed me), but mine is fixed! Only one copy of the e-mail now in web. Thank you!
[HD2 General] wigwam12:
I have the same "symptoms" ie people getting 2 copies of the email [and 2 shown in the web client].

I just pored over the possible reasons and noticed the inclusion of self to Send list - not sure if it was a factor or not.

Will test later to see if mine is fixed too
[HD2 General] wigwam12:
Isadora you are a Bella DONna!

This has fixed the double-email problem.

When HTC cheekily asked how they did at fixing the problem I pointed they didn't - you did :D

Wish I could find a way now to stop it adding my own address to the "to" field then doing a reply-all
[HD2 General] leepriestenator:
Further Reading that clearly explains the Double Sent Message Issue with GMAIL.

http://mail.google.com/support/bin/answer.py?hl=en&answer=78892

Caution while using

Menu > Tools > Options > Message tab and untick "Keep copies of sent items in Sent folder"

That is a universal rule and will apply to all your Email accounts. You can't assign this option specifically to any particular Email account. So if you happen to have other Email accounts for which you need to save a copy of Sent messages, it might be a problem, unless of course you are using a Sync based system like IMAP4 or ActiveSync, in which case you can select the Sent Items folder under MANAGE FOLDERS to be synced as well.

@Isadoa.. Nice catch. I've been using this thing for years and yet it slipped my mind somehow today.
[HD2 General] bravo261:
agreed...thanks and i'm feeling like a dork
[P3300, MDA Compact III ROM Development] darkspawn88:
Hello guys,i have a problem with my htc and dont know what to do,yesterday i try to make upgrade my rom,first i need to unlock the uspl,i press to rom update utility,it finished 100 % and after that my phone is dead,not working,even cant start,nothing...can i do something?:confused:
[P3300, MDA Compact III ROM Development] raving_nanza:
...

sound like you bricked your phone mate..

go to here and find your original rom..

http://wiki.xda-developers.com/index.php?pagename=Artemis_Upgrades

flash your device with that then do ''uspl cmon''..

http://xdaforums.com/attachment.php?attachmentid=41246&d=1181558635

you can bring it back to life but only with the original rom..

hope i helped you..
[P3300, MDA Compact III ROM Development] raving_nanza:
...

add me to msn and ill walk you through it...
[P3300, MDA Compact III ROM Development] darkspawn88:
yea i think so i brick it,later im gonna try what you said,i wish it gonna work,man myt msn is shinoda88@yandex.ru add me and later we talk if i have any problem,thank you my friend:cool:
[P3300, MDA Compact III ROM Development] darkspawn88:
i download the artemis uspl,and i press the start uspl and it do nohting,it says that there no device connected,my phone is 'OFF'...what should i do?...:cool:
[P3300, MDA Compact III ROM Development] Simon_WM:
Hi,

you could try getting into bootloader then flashing any WM6.1 ROM

i had the same problem, but fixed by by getting to the bootloader stay then upgrade to a new ROM
[Nexus One General] jamesyb0i:
On the HTC/Google manufacturing vid for the nexus one display it shows how the screen is comprised of the LCD, the touch detection surface, and the glass. Well... I've just noticed that I can see the touch layer thing, or at least, it looks like the one showed in the video.

If you are under florescent light and look directly at the phone at eye level, tilt it slightly upwards, about 5 degrees or so, and you (well I) can see white dots all over the screen, the dots seem to be visible where the grid/crosshatch lines intersect.

Just thought it was strange, you can see it with the phone on or off
[Nexus One General] paratox:
that`s normal, everybody can see it.
[Nexus One General] BlueScreenJunky:
yup, just noticed it today ^^; (I've had the phone for 2 weeks)
[Nexus One General] NexusDro:
I noticed it a while ago but I think this is normal.
[Nexus One General] grainysand:
Seems normal. At first I thought the glittering dots were dust, then realized they were aligned in a perfect grid.
[Nexus One General] starkruzr:
I thought it was pretty cool when I saw it. :D
[Nexus One General] gundamboy:
I'm glad that the visibility is less than that of the HD2, when I had the HD2 I ALWAYS noticed it.
[Nexus One General] grainysand:
I thought "oh hey, my phone sparkles in the sun just like vampires from a certain teenybopper series!"
[Nexus One General] Huey85:
I noticed it a while ago and pooped my pants for a second 'cos I thought they were scratches. My face was literally like :eek:
[Nexus One General] jongie123:
Lol,make laughed.
[Nexus One General] cekle:
You can see the crosshatch too if you move the phone around in bright light while the screen is off.

I thought that was damn cool. :)
[Nexus One General] GazzaK:
I'm sure my eyes must be rubbish now, I cannot see what you guys are talking about :rolleyes: