[Q] My Lazy Batch - Hero CDMA Q&A, Help & Troubleshooting

I made a batch file to manage my phone. It has several automated functions complete with interactive menus.So far I have :
1.ADB = Automatically starts ADB,remounts your device, and opens a cmd prompt for you to work.
2.Shell= Throws you straight into shell
3.Splash Flasher = reboots your phone into the bootloader and flashes a splash screen.
4.Reboot = Reboot, recovery, or bootloader options.
5.Kill = Kills ADB and asks to quite or continue.
6.Exit
What funtions would you guys include to further provoke this lazy @$$ file? I am going to add a recovery flasher but I am currently filling holes to further reduce fall-throughs.

Can I ask what rom are u making this for and how will u use it I'm very interested this sounds very usefull
Root-Hack-Mod-Always™

Related

[GUIDE] Tweak the built in task killer

UPDATE: Use Appkiller to do the same thing if you're not into the whole modding scene
Hi all.
So, I'm a new user to this part of XDA (Those HTC Hero forums have taken quite the dip lately) - received my milestone on Friday, and wow, what can I say - truly blown away from the performance I can get out of it, especially since it is getting along in it's days now too. However, I'm always hungry for as much power as possible .
Something that really shocked me though is that it doesn't seem to me that anyone has played around with the automatic internal memory killer of Android. Basically, it eliminates the need of having a task killer program running at all - allows you to have Android kill your unnecessary tasks for you. But, before I repeat an already-written informational post on this, here's the link to read up about it for yourself: How to configure Android's *internal* taskkiller.
Anyway, here's a quick guide on how to add this to your wonderful Milestone (PLEASE NOTE - THIS METHOD REQUIRES ROOT):
WARNING - Playing around with system files is always dangerous. MAKE SURE YOU DO A NANDROID BACKUP JUST IN CASE. I take no responsibility for any damage what so ever (even though there cannot really be any with this ).
This guide also requires you to know about ADB Commands - google is your best friend in this case. Right now, I'm too lazy to post a guide for that .
Well, now that the formalities are out of the way...
1) Firstly, you need to have the G.O.T Open Recovery. I'm pretty certain I don't have to go into anymore details with this step - it's posted all over the place
2) (OPTIONAL FOR SAFETY. If you don't care much for safety, you may skip this step) Start your phone up as normal (if it's off) and then run the following commands from Terminal/Command Prompt on your computer, using ADB:
Code:
adb shell
su [B][U](Look out on your phone for the Root dialog)[/U][/B]
cat /sys/module/lowmemorykiller/parameters/minfree
This should return a few values that look like this:
Code:
1536,2048,4096,5120,5632,6144
TAKE NOTE OF THESE VALUES. Although it's pretty simple to remove this if it causes problems, keep these values handy somewhere. Never hurt anyone to have another back up plan
3) Mount your SD Card so that you may access it on your computer
4) Browse to OpenRecovery/GOT/bin/boot_script on your SD Card
5) Open the file "71_overclock.sh" with a text editor or something you can use to edit the shell script.
PLEASE NOTE: THIS IS USING THE OVERCLOCKING SCRIPT FROM THE G.O.T OpenRecovery. I AM USING THIS AS IT IS USUALLY RUN AT BOOT, PROVIDING YOU HAVE OVERCLOCKED YOUR PHONE TO ANY OF THE VALUES IN THE G.O.T OVERCLOCK MENU. So, long story short, you need to have selected at least one of the overclocking settings in OpenRecovery for this to work.
6) At the bottom of the file, add the following lines of code:
Code:
echo "1536,2048,4096,5120,15360,23040" > /sys/module/lowmemorykiller/parameters/minfree
THIS IS FOR THE AGGRESSIVE MODE. You can read up yourself for your own desired values in the thread link I posted above, and replace them in the above line of code as desired.
7) Save the file and close. Turn off your phone. Boot into OpenRecovery (You should know how to do this by now).
8) Go back to the overclocking menu and reset your desired clock speed. If you haven't set one before, now's the time to select
9) Restart your phone. To test if your new values have worked, boot your phone as normal, and once it's booted, connect it to your computer again, and load up Terminal/Command Prompt once again. Then, as we did in the beginning, run the following commands:
Code:
adb shell
su [B][U](Look out on your phone for the Root dialog)[/U][/B]
cat /sys/module/lowmemorykiller/parameters/minfree
This should return your newly set values. And voila! Your phone is ready to fly. Although I haven't tested speed differences on the Milestone as such, it really helped on my hero. So, post some feedback and let me know.
-----------------------------------------------------------------------------------------
IF YOU RUN INTO ANY PROBLEMS LIKE BOOTLOOPS/STUCK BOOTS:
Bootloops/stuck boots usually happen when the phone doesn't like the modification you've added to it I have no idea how this will react on other phones. It worked 100% for mine, but if you cannot run this mod, then you can remove it by doing the following:
1) Boot back into OpenRecovery.
2) Go to the G.O.T Modding menu, and then to the Restore Menu.
3) Select to restore the mot_boot_mode file.
4) Restart your phone - this time it should start, but you might notice a drop in speed. This is normal, as we have reset the overclocking to normal.
5) Mount your SD Card again, open the file "71_overclock.sh" again with a text editor or something you can use to edit the shell script.
6) Remove the line you added previously. Save and close. Unmount the SD Card.
7) Turn your phone off and boot back into OpenRecovery. Apply your overclocking again, and reboot your phone. It should boot up fine.
8) Breathe.
----------------------------------------------------------------------------------------
I'll be updating this guide in the near future to possibly include a way of doing this without having to use any overclocking, as well as a more noob friendly version, including ADB How-to's etc. For now, the extra boost in power isn't going to hurt anyone
Credits: androcheck for his original guide on this feature.
Happy speeding,
MrP.
Great job! I will be trying this on my Milestone shortly.
Hopefully this helps with the low amount of RAM our Milestones have.
free market app called autokiller
used for a while on agressive settings , stopped using it 2 weeks ago , I dont see any diffrences at all , great guide tho !
I know - I realised that there's a market app Silly me, seeing as I've used that app on my hero before. *stupid slap*
But, I prefer things like this to be incorperated into the system files as opposed to being set by an app - just one less thing to worry about I suppose. With that said however, either way will work
MrP.
MrPadie said:
I know - I realised that there's a market app Silly me, seeing as I've used that app on my hero before. *stupid slap*
But, I prefer things like this to be incorperated into the system files as opposed to being set by an app - just one less thing to worry about I suppose. With that said however, either way will work
MrP.
Click to expand...
Click to collapse
Great thread!! I was acually thinking about this a couple of days ago, I thought it wasn't possible because we need to modify the init.rc in the boot.img to initialize it... But of course we have our mot_boot_mode that can do that

SUCCESS !! :) FM Radio app by HTC: Reverse Engineer: Please help

I'm working to enable FM radio functionality, RX and TX on HTC Legend and other devices with TI FM chip.
I need help to get this done ASAP. I'm an experienced embedded Linux dev, but I'm pretty new to smartphones and Android.
A few weeks back I managed to muddle my way through on phone gold card creation, downgrading, rooting, CWMod (2.5 ?) installation, CMMod7 nightly install, S-Off and new Radio flash. Since then I haven't flashed anything and probably forgot half of what I learned.
So now I want to flash the best ROM for the purpose of figuring out the audio routing "secrets" of the HTC FM app. Any suggestions for the best ROM for that purpose ?
Next, I could use some pointers to the best posts or web pages to refer to for flashing the HTC Rom, and then later flashing back to CM7. As easy as possible. Can I do something Nandroid like and save the entire state of the phone to easily get me back to where I started with CM7 ?
Yes, I AM a dev, but very much appreciate easy to follow step by steps that don't leave me scratching my head wondering if I'll brick my device or create some other catastrophy . Eg: Should I ignore those error messages or not worry ? Do I have to reboot 5 times while clicking my heels ? Etc.
Once I get the above figured out, perhaps this thread can be used for discussion of the observations and any reverse engineering results.
Thanks !
Well, the best ROM would probably be BlaY0's, as it has the FM functionality. Take a nandroid of that and then install CM (as that's what your developing for, ye?). Then nandroid the CM and you can easily switch between the 2 without the need to set it up again.
BlaY0's ROM is based of the official HTC one, so it would probably do for the reverse engineering stuff. Thus I don't think you'd need to go back to a stock HTC ROM. If you do you can just flash a pre-rooted one (found here) and that would do it.
TheGrammarFreak said:
Well, the best ROM would probably be BlaY0's, as it has the FM functionality. Take a nandroid of that and then install CM (as that's what your developing for, ye?). Then nandroid the CM and you can easily switch between the 2 without the need to set it up again.
BlaY0's ROM is based of the official HTC one, so it would probably do for the reverse engineering stuff. Thus I don't think you'd need to go back to a stock HTC ROM. If you do you can just flash a pre-rooted one (found here) and that would do it.
Click to expand...
Click to collapse
OK, thanks GrammarFreak. BlaY0's ROM 0.7 it is.
Hate to be/seem so newb-ish....
So I'm running CM7 now. So:
(1) Run ROM Manager Backup.
(2) Watch phone go into recovery mode with red triangle and exclamation mark.
(3) Don't freak as the backup will take maybe 10-20 minutes or so.
(4) Phone reboots back to CM7 I presume.
(5) Pull any important data from sdcard including ROM backup files.
(6) Download http://blay0.r3volutionary.net/b-0.7.zip
(7) Run ROM Manager to flash Blayo.
(8) Reboot and mess around with Blayo ROM.
(9) When done messing, optionally save Blayo ROM and mods with ROM Manager Backup.
(10) Use ROM Manager restore to return to CM7 ROM.
Sound good ? I don't even have to remember which key when booting brings up CWMod recovery mode ?
I couldn't find a canonical web page documenting CWMod/ROM Manager and it's usage.
Gee my phone has been stuck in red mode for a while now...
EDIT: So I'm reading threads and getting the impression the red triangle is not what I want. So I run "adb reboot" and will check and see if the backup looks good.
I can understand that the "community" has to somehow pull together to pool info, but my experience seems typical of what so many face.
In order to figure out some sort of semi-foolproof method of doing XYZ it seems I have to search threads all over to collect the full info. 50-100+ page threads are a challenge. Do I start with the first few posts or pages of posts, or should I skip to somewhere near the end for latest info ? Yes I can read to see if first posts are updated etc.
Before I started the rooting process on my phone, I read QUITE a few big threads from begin to end. And I made LOTS of notes to try and figure it all out and avoid problems. And my head got so full it almost exploded, and I almost sorta gave up, dived in, did a few more google searches on the way and thankfully finally ended up with a nicely open device.
But it all seems so ridiculously difficult, UNLESS you happen to come across some very succinct, accurate and informative HOWTO somewhere that works well for you.
/rant off
Ok, I want you to do a couple of things:
Forget about ROM manager, it's a piece or crap and it creates more problems than it solves.
So, you said you performed S-OFF, correct? Did you let the S-OFF procedure install ClockworkMOD recovery? Given the red triangle of doom I doubt it. No worries. Here's what you do:
Download this (it's the ADB tools) to a known location. Then extract the zip to a known location. Open a command window in that location (for the sake of this guide: C:\ADB) So open CMD (start, run, type CMD, hit enter) In CMD type "cd C:\ADB". Plug your phone into the computer (make sure you're using CM). Debugging mode should be on (you'll get a notification in the status bar of your phone). Now, I want you to download this (CWM 2.5) and save it to C:\ADB. In CMD type "adb push recovery.img /sdcard" Wait for it to complete. It will output a file-size, time taken and resultant transfer rate. When it's completed type "adb shell". You'll end up with a "#" and nothing else (if you get a "$" just type "su" and hit enter, and on the phone's screen accept the Superuser request). Now, type "flash_image recovery /sdcard/recovery.img", let it do it's thang. When you see the "#" type "reboot recovery", and your phone will reboot to CWM. This is what I refer to as a win
Now, from clockworkMOD you can use the trackball (move and click) to select "backup/restore" then "backup". Let it do its stuff. Once backed up you can flash B-0.7 and then back that up. Note down the name of each backup so you know which is which
TheGrammarFreak said:
Ok, I want you to do a couple of things:
Forget about ROM manager, it's a piece or crap and it creates more problems than it solves.
So, you said you performed S-OFF, correct? Did you let the S-OFF procedure install ClockworkMOD recovery? Given the red triangle of doom I doubt it. No worries. Here's what you do:
Download this (it's the ADB tools) to a known location. Then extract the zip to a known location. Open a command window in that location (for the sake of this guide: C:\ADB) So open CMD (start, run, type CMD, hit enter) In CMD type "cd C:\ADB". Plug your phone into the computer (make sure you're using CM). Debugging mode should be on (you'll get a notification in the status bar of your phone). Now, I want you to download this (CWM 2.5) and save it to C:\ADB. In CMD type "adb push recovery.img /sdcard" Wait for it to complete. It will output a file-size, time taken and resultant transfer rate. When it's completed type "adb shell". You'll end up with a "#" and nothing else (if you get a "$" just type "su" and hit enter, and on the phone's screen accept the Superuser request). Now, type "flash_image recovery /sdcard/recovery.img", let it do it's thang. When you see the "#" type "reboot recovery", and your phone will reboot to CWM. This is what I refer to as a win
Now, from clockworkMOD you can use the trackball (move and click) to select "backup/restore" then "backup". Let it do its stuff. Once backed up you can flash B-0.7 and then back that up. Note down the name of each backup so you know which is which
Click to expand...
Click to collapse
Thanks for the newb-friendly instructions. Much of I don't need, but may help others.
I'm running Linux, I've had adb etc installed for 2 weeks. I've got the SDK installed w/ Eclipse but never tried it, but have done App Inventor. And I've been poking around in the innards of the various source codes, binaries, firmwares and other files for the last 2 weeks too.
OK, I'll "Forget about ROM manager" and just use CWM after manually rebooting into it with Volume Down or whatever.
I'm pretty positive I'm S-OFF and have CWM 2.5.0.0.7 or so installed. ROM Manager says so. I have CWM on before I S-Offed using the Bell/Virgin modified alpharev boot disk.
I'll do the backup manually with CWM later tonight when I get back to this. I checked the SD and the backup isn't there, although there are still 3 backups I took when I installed CM7 2 weeks ago.
So I guess I do a complete flush or wipe or whatever when installing the new (or a backed up) ROM ? And since the backup is a nandroid type it will absolutely restore to exactly the same state as when the backup was taken ? But the SD card is not touched...
EDIT:
"adb reboot recovery" gives me red triangle of doom.
"adb reboot bootloader" gives me AlphaRev and I see S-Off and HBOOT 1.000000000
Did AlphaRev remove CWM ?
Given that you get the red triangle we can assume you don't have CWM installed to /recovery, you have it in fakeflash. Nothing inherently wrong with that, just FYI
As for your rant in post numero uno, I've often considered trying to put together a comprehensive "document" on the matter, but it'd take an age and would probably raise more questions than it'd answer.
"adb reboot recovery" gives me red triangle of doom.
"adb reboot bootloader" gives me AlphaRev and I see S-Off and HBOOT 1.000000000
Did AlphaRev remove CWM ?
Click to expand...
Click to collapse
See above about fakeflash. You could well use the image I linked above and use flash_image on the phone or fastboot to flash it
Fakeflash is pretty easy, I either do that or do my business in rom manager as I find that easy.
Rom manager method for installing a new rom:
If rom manager isn't installed, do so from the market
start up rom manager
tap "backup current ROM" (I suggest naming your backup, I just use the rom name)
Let it reboot and do it's thing
When it's booted back into CM7, open up rom manager again
tap "install ROM from SD card"
browse your sd for your rom and tap it.
You are presented with 2 check box options
Since we already backed up make sure "backup existing rom" is unchecked
If you are flashing a new rom, make sure "Wipe Data and Cache" is checked
If you are flashing a newer version of the same rom, you can leave this area unchecked as it will not erase the stuff stored on the phones built in memory
Press ok, let it do it's thing and thats it.
Place the fakeflash update.zip from http://forum.xda-developers.com/showthread.php?t=698404 on the root of your sd card
turn off your phone
Hold the volume down button as you press the power button
using the volume buttons, navigate to "recovery"
press power
your phone will reboot to th red triangle (of DOOOM)
Don't panic, hold volume up and press power (if it gives you an error just wait few seconds)
Using the volume buttons to scroll and power for enter choose "apply sdcard:update.zip"
Use the trackball and go to "Nandroid" if you are using ClockWorkMod 2.5.xxx fake flash or "backup and recovery" if you are using ClockWorkMod 3.xxx
hit "backup"
Let it do it's thing
If you're installing a new rom, scroll to "wipe data/factory reset", wait, then choose "wipe cache partition". If your installing a newer version of the same rom, don't bother.
Scroll to "install zip from sdcard"
scroll to "choose zip from sdcard"
choose your zip, let it do it's thing, and thats that.
You're SD is not touched at all during flashing, no need to backup those files.
Wow, can't believe I typed all that out...
TheGrammarFreak said:
As for your rant in post numero uno, I've often considered trying to put together a comprehensive "document" on the matter, but it'd take an age and would probably raise more questions than it'd answer.
See above about fakeflash. You could well use the image I linked above and use flash_image on the phone or fastboot to flash it
Click to expand...
Click to collapse
Re: rant, don't want to come off as complaining, I KNOW documenting semi-foolproof procedures is tons of work, to do properly. I understand a big problem is consideration of the large set of combinations of ROMs, recoveries, apps, S-On/S-Off states, Radios, etc.
OK, cool, I want "realflash" type recovery then. I guess that's one reason to have S-Off ?
I had to slightly alter your first command by appending a '/'.
EDIT: WOOHOO ! Success I think ! Feel free to skip the rest of this post unless you want to hear the details of my adventure...
Thank you ! Editing this post the last hour I wrote "Success ! " here anticipating such, but alas, I have some issue.
I don't know if I have to be extra patient as deodexing happens, Or if I'm stuck in some boot loop... I see "HTC quietly brilliant" and screen flashing on and off and re-writing the HTC spam.
Re: HTC FM app. OK, cool, I see :
ls -l /system/app/HtcFMRadio.apk
-rw-r--r-- root root 826176 2008-08-01 07:00 HtcFMRadio.apk
And bluetooth. Is there any way to switch normal media output, like from TuneIn radio etc, to my cheap new bluetooth headset ? I pushed the button in CM7 and I see I could start a voice dial, but I figured BT would take over all audio I desired routed through it.
-----------------
I did:
adb push recovery.img /sdcard/
adb shell flash_image recovery /sdcard/recovery.img
adb reboot recovery
In the CWM menu I had to select "Nandroid", and then "Backup".
That completed.
I didn't want to bother rebooting, so manually grabbed the backup files:
adb shell ls -l /sdcard/clockworkmod/backup/
adb shell ls -l /sdcard/clockworkmod/backup/2011-02-27.03.19.57/
mkdir cm7backup-2011-02-27.03.19.57
cd cm7backup-2011-02-27.03.19.57
adb pull /sdcard/clockworkmod/backup/2011-02-27.03.19.57/boot.img
adb pull /sdcard/clockworkmod/backup/2011-02-27.03.19.57/cache.img
adb pull /sdcard/clockworkmod/backup/2011-02-27.03.19.57/data.img
adb pull /sdcard/clockworkmod/backup/2011-02-27.03.19.57/nandroid.md5
adb pull /sdcard/clockworkmod/backup/2011-02-27.03.19.57/recovery.img
adb pull /sdcard/clockworkmod/backup/2011-02-27.03.19.57/system.img
Then to be sure:
cat nandroid.md5
md5sum *.img
Yes, looks good ! Now for Blayo:
cd ..
adb push b-0.7.zip /sdcard/
Goto CWM. Version 2.5.0.1, I had a 7 at the end before. Fine I'm sure.
Use volume up/down to select install from a ZIP. Press power to select. Oh, oh, shoulda used the trackball switch as it powered off.
Whoops, press power again and screen comes back, LOL. Choose zip from sdcard and use trackball switch this time. Move and select Blayo b-0.7.zip
Wonderfully wacky confirmation. Error message saying it can't find the zip file. Hmmm....
Reboot a few times and finally do "adb reboot recovery" and retry install from ZIP.
No go, get:
-- Installing: SDCARD:b-0.7.zip
Finding update package...
Opening update package...
E:Can't open sdcard/b-0.7.zip
(bad)
Installation aborted.
Try to open 98 MB zip file. No go. AHA ! corrupted file.
Try download from mirror 2: http://www.dkmdesign.dk/custom_roms/blay0/b-0.7.zip File is supposed to be 126 MB.
Gee I'm glad there's an unzip process that checks the integrity of ROM flashes.
So again:
adb push b-0.7.zip /sdcard/
And install, running..... Done !
Try to use power button to reboot. Use back key and "reboot system now". Cross fingers and offer the gods sacrifices...
See androids on skateboards again. Recall I may have to be patient as deodexing happens... See "HTC quietly brilliant" spam,,, in this context,good. Waiting....
Waiting.... screen flashing on and off and writing the HTC mind control spam.
Try reboot when tired of waiting and same thing. AFAICT, from "adb shell ls * etc" on the filesystem, Blayo ROM is installed but just won't stop flashing the HTC logo.
speedyink said:
If you are flashing a new rom, make sure "Wipe Data and Cache" is checked
Click to expand...
Click to collapse
Thanks. Maybe that's my boot loop or whatever problem now. I didn't recall seeing that option, but should be there with CWMod, so I'll try installing Blayo again after that.
There was some Wipe in main menu, and another w/ factory reset. Also in advanced menu I selected Wipe Dalvik cache. I left the Battery Stats alone. Hmmm. Naah !
Did all 3 wipe twice for good luck. Rebooted in between. Installed. Now waiting... Oh here's the HTC screen again. Time to read the Blayo thread to see how long to wait. etc.
Man what a pain ! Yet likely a world easier than the new paths I attempted to forge on my previous LG Optimus Chic resulting in a hard brick, LOL.
WOOHOO ! Success I think !
Welcome to the BlaY0 universe.. Just remember that many of us went through this journey as well to have our phone in same state Glad you got to fully download the BlaY0 rom from my mirror.. now happy reverse engineering..
Sent from my Legend using XDA App
whitetigerdk said:
Welcome to the BlaY0 universe.. Just remember that many of us went through this journey as well to have our phone in same state Glad you got to fully download the BlaY0 rom from my mirror.. now happy reverse engineering..
Sent from my Legend using XDA App
Click to expand...
Click to collapse
Thanks. Figured I was finished messing with such nasties once I had CM.
(In case you aren't aware, I have scripts that make the FM radio "work" on CM7. I can scan and see RSSI as expected etc. Only "problem" is I haven't figured out the audio routing part yet so no sound, which is why I'm exploring the HTC app for it's special tricks.)
What I want to do now is try running my hcitool scripts and see if they work on Blayo ROM.
If yes, then the Blayo ROM has something the CM7 ROM needs.
If no, then there's likely some magic step required on either stock ROM or CM7 ROM and likely the HTC FM app is doing that step, directly or indirectly.
But the needed hcitool is not on Blayo ROM. I find 3 of the hci utils and install them. Now I can't get hciattach running, which I think is needed for hcitool.
I'm guessing I can edit /init.legend.rc and change service hciattach to enabled. Reboot and no dice. Try running from command line also with no luck. At one point it hung, but now:
# hciattach -n -s 115200 /dev/ttyHS0 texasalt 4000000 flow
Unknown device type or id
# hciattach -n -s 115200 /dev/ttyHS0 any 4000000 flow
Can't set device: Device or resource busy
Can't initialize device: Device or resource busy
# hciattach -n -s 115200 /dev/ttyHS0 any
Can't set device: Device or resource busy
Can't initialize device: Device or resource busy
Waiting with baited breath
Sent from my Legend using XDA App
pjgodd said:
Waiting with baited breath
Sent from my Legend using XDA App
Click to expand...
Click to collapse
Bated ? Baited=fish
Well AFAICT, the world of Bluez bluetooth and hciattach, hcitool, hciconfig and hcidump doesn't get along with the TI BT stack world of btipsd and btipds_cli.
I'll have to bust out the NDK and start trying APIs.
But FIRST, I'm happy to report that btipds_cli is a pretty interesting and cool tool. Once I rebooted, turned BT on and learned the quirky UI, it wasn't too long before I had FM audio coming out of the speakers or the headphone.
I even tried a BT over FM option in another menu, but no go. Next I'll try the FM Tx, cause I'd REALLY like to see if that works.
btipds_cli doesn't seem to want to start FM a second time though, so a few reboots might be needed for testing.
I think it's possible that the "14.start_audiO" option in the "4.fm_Rx/" is the missing link for FM in non HTC ROMs. I don't know yet if it initiates a digital PCM / SCO connection or just switches analog. I don't see any new processes for that but btipsd might be doing the good stuff.
Following this thread with great interest..
Sent from my Legend using XDA App
I still can't get the transmitter to work, despite all the commands seeming successful. Both with hcitool on CM7 and btipsd_ci on Blayo0.7.
So I think one, or both, of the following are the TX issues:
(A) - It is somehow disabled by the hardware. The Tx antenna pin could be tied to ground, perhaps even through a capacitor or something. It may even just be unconnected and unable to transmit a few inches because it's inside an RF shield.
(B) - The firmware file for the FM portion disables TX, yet the registers still respond as if it works.
(A) would be difficult to infeasible to fix.
(B) should be fixable by loading a firmware file from a TI FM chip device that is known to support transmission.
For a TI based device that is known to transmit, I presume firmware files for a TI or TI partner evaluation board may work.
So far I can't get hciattach and hcitool etc working on BlaY0 ROM.
I HAVE, however, gotten btipsd and btipsd_cli to work on CM7. I had to create the /data/btips directory and am running btipsd manually in foreground.
What I find is exactly the same as with my hcitool scripts: everything seems to work but actual sound doesn't exit the device. Even after doing everything else the same as with BlaY0 ROM.
The /etc/firmware files on both ROMs are identical.
So I'm thinking there is some other thing separating the two ROMs. Could be some HTC customized library, or a config file or who knows.
Hi Mike, your work is appreciated, i hope you wil get it to work. We have great legend dev's. Please BlaYo and. Ali Ba, help this guy!
mikereidis said:
I HAVE, however, gotten btipsd and btipsd_cli to work on CM7. I had to create the /data/btips directory and am running btipsd manually in foreground.
Click to expand...
Click to collapse
Then you got as far as I did a few months ago. The btipsd stuff can be found in the original init.legend.rc, if you are interested.
mikereidis said:
So I'm thinking there is some other thing separating the two ROMs. Could be some HTC customized library, or a config file or who knows.
Click to expand...
Click to collapse
"Customized library" applies here, but that's in fact a euphemism for "all kinds of proprietary code in the framework".
I gave up reverse engineering after looking at the disassembled HTC radio application. As I already told you there are loads of pointers to closed source TI code that can be found in the framework (= /system/lib/whatever.so). You will have to reverse engineer all those rpcs, libandroid_servers and god knows whatnot.
ali ba said:
I gave up reverse engineering after looking at the disassembled HTC radio application. As I already told you there are loads of pointers to closed source TI code that can be found in the framework (= /system/lib/whatever.so). You will have to reverse engineer all those rpcs, libandroid_servers and god knows whatnot.
Click to expand...
Click to collapse
Oh, there must be SOME shortcut...
Since I have the FM radio and audio working with the btipsd_cli. I'm not sure the answer would lie in the HTC FM app. Or at least the answer is in btipsd_cli also.
I'd love to find the source to btipsd_cli. I DO have source for TI's fmapp and fmstack-0.12 and I can see they share some, but not all code.
In a log I can see an HCI command is sent when audio starts; I just don't know which one or with which parameters.
btipsd_cli has some rather weird bugs that prevent me from experimenting well with audio routing. When I disable analog, audio keeps playing. At first I thought it was using digital, but now I think it's part of the buginess. When I select various digital options, various weird things happen, including a crash in btipsd for most of them.
If I can run some HCI queries, I might get better clues or the actual answer. I managed to get hciattach to sort of work with "texas" as the type, but I think I need "texasalt" and the binary I have that runs on Blayo doesn't support it. The CM7 binaries wont run on Blayo.
So unless there are some other tools I can use, I'm wondering if it's time to write an NDK app.
Unless I can increase the verbosity of the btipsd logging to tell me everything it's doing. Will check.
These AudioRouting strings aren't in the CM7 libandroid_runtime so I tried pushing the Blayo lib to CM7. GUI never boots fully, but no audio still using the btipsd_cli.
Same when I also replace libandroid_servers.so, bluez-plugin/audio.so and bluez-plugin/input.so
strings blayo/system/lib/libandroid_runtime.so |grep -i audiorouting
FM_RX_DisableAudioRouting
FM_RX_EnableAudioRouting
nativeJFmRx_SetAudioRouting(): Entered
nativeJFmRx_SetAudioRouting: fmapp_set_audio_routing() returned %d
nativeJFmRx_SetAudioRouting(): Exit
nativeJFmRx_disableAudioRouting(): Entered
nativeJFmRx_disableAudioRouting: FM_RX_DisableAudioRouting() returned %d
nativeJFmRx_disableAudioRouting(): Exit
nativeJFmRx_enableAudioRouting(): Entered
nativeJFmRx_enableAudioRouting: FM_RX_EnableAudioRouting() returned %d
nativeJFmRx_enableAudioRouting(): Exit
nativeJFmRx_EnableAudioRouting
nativeJFmRx_DisableAudioRouting
nativeJFmRx_SetAudioRouting
FM_RX_DisableAudioRouting
FM_RX_EnableAudioRouting
DisableAudioRouting
EnableAudioRouting

[Solved] X8 unable to enter xRecovery / Flashmode

Hello,
I've had my phone rooted for a long time and things were working out quite fine (yes, I have a recent xRecovery backup ) but a couple of days ago I wanted to try out something new, and wanted to prepare my system for the installation of a custom kernel.
Long story short: I used the busybox installer from the market, but it couldn't verify the installation process because of some previously installed busybox version (guess it came with my ROM...) So I used the uninstall option within the app and this is were things started to go down the drain:
Now when I reboot the phone, it's no longer possible to enter xRecovery as it was possible before (pressing back button repeatedly, during SonyEricson Logo) instead the it just reboots straight into Android. And in Android all that works is the log screen - all other applications / services crash. (I really can't do anything, as soon as I try to unlock the screen I'm bombarded with Error Messages, and sometimes the phone reboots because so many services fail)
I still can get into the reboot options menu when I press the power button > 1sec, but selecting "reboot into xRecovery" or "reboot into CWM" doesn't work -> it will just reboot normally again.
It also seems impossible to get the phone into flash mode. (Turn Phone off, Unplug USB, hold Back Button, Turn Phone on, Connect USB - and every possible variation I could find just leads to the phone booting into Android)
What I tried to do:
I still have root access when I connect to the phone with adb, so I reinstalled the busybox binary from the "SuperOneClick" package into the /system/xbin/ folder manually -> no change
I checked the debug log (from adb logcat) for errors indicate a problem, but there's no obvious message
I checked the dmesg output for errors / problems, but here everything seems to be fine
I reinstalled xRecovery manually (files from SuperOneClick) via adb by putting the files (xrecovery.tar+chargemon), into /system/bin -> no change
I tried to get into recovery / bootloader mode by using "adb reboot bootloader" and "adb reboot recovery" -> normal reboot
I checked the permissions of the binary files (su, busybox, chargemon) and they're all set to 06755
I checked if all symlinks of system programs that require busybox / su are pointing to existing binaries, and they all seem to be correct
Before I proceed and start trying some things that are not so easily reversible I've got a couple of questions:
What happens if I delete all files in the "/system/" folder? (the xRecovery files are in that folder and I guess xRecovery itself needs a couple of files to work properly)
Do you have any tips / ideas what I could try? I really don't mind resetting the phone as I have backups, it's just that I can't get into the mode where I can reset the phone
Thank you very much!
In your case, i suggest you never ever, ever fiddle up with busybox again... leave that up to chefs.
Also, i think you should try removing the battery for a couple minutes, then put it back and press back, then (while holding it) insert usb cable. That's a surefire way to get into flash mode (At least for me, sometimes it happens to boot normally even if i press back if i don't remove the battery). Also, just to be sure, before connecting your phone in flash mode, press Windows + R [In your keyboard, obviously] and type "devmgmt.msc" [Without the quotes] and see if you get a new device under USB devices. If it has a yellow triangle, right click it and choose update drivers, then point it to the flashtool folder for drivers, it should be able to find them. Good luck.
Use PCC
PCC Brought my phone to its original state when I had soft bricked my phone. It worked as a charm , and it was back to the state like nothing ever happened. Also my phone got unrooted. Everything stock like I had bought it from the store.
Use PCC , thereafter get your phone rooted again , as you had initially done.
Dude are you kidding me???You are doing it wrong man...
to get into flashmood
1. turn your phone off
2.press and hold the back button
3.without leaving the back button insert ur phones cable ..
you don't. need to turn on your phone after doing this....
use pcc or seus to repair it it's a soft brick......
@all that replied: Thank you for your help, I managed to fix the problem, will explain it in next post in case somebody runs into a similar problem
@Drknzz
about the fiddeling: that's how you learn stuff - in the last 36 hours I was forced to dig deep into android, and it was fun - and now I've got a pretty good picture of the system
Your your tip about removing the battery for a cpl of minutes didn't work for me.
I also tried XperiaRebootOptions, but this app also fails putting the phone into FASTBOOT mode - so I'll have to keep searching for an explanation
@Mayank77
I can't use PCC, because I'm running Linux as my O/S of choice and try to keep my VirtualBox locked (when I was very desperate this morning I tried it in a VirtualMachine, but PCC wouldn't connect properly to my phone)
@noobismyname
thanks, but doesn't work in my case
a little description of how you can solve problems (using Linux) with incompatible versions of su and busybox that can occur when Market Apps like BusyBoxInstaller are used in combination with ROMs that require specific Versions of the above tools.
In special cases this might lead to the problem, that you can no longer enter xRecovery or put your phone into fastboot mode (depending on your ROM) but you still have debug access to your phone.
Requirements
Nandroid / xRecovery Backup on your local machine
Android SDK -> adb
Image extraction tool unyaffs
root access to phone
Steps
Extract the backup image
The backup files created by xRecovery use an uncommon format because of the filesystem used in android. Use the tool unyaffs (code dot google dot com/p/unyaffs) to extract the image to a directory of your choice.
log into you phone with adb
open up a terminal, and use $adb shell to connect to your phone. Change to root user $su root
If required: make the partition writeable
$mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
compare files
open a second terminal window and navigate to the folder where you extracted the backup image. Start comparing the content of the directories with each other. Important files are: /system/build.prop, /system/bin/su ->symlink to system/xbin/su, /system/xbin/busybox, ...... (depending on what you messed up)
the command $busybox ls -l /system/targetdir | grep sought_file [/] comes in handy, because it will output the files alphabetically sorted and not in arbitrary order like the default adb ls proproamm
[*]use adb to push files to your device
if you find a missing / missmatching file use $adb push /file/on/your/pc /data/local/tmp to copy the backup file to your mobile
[*]copy files to target directory
use (as root) $ cp /data/local/tmp/file /system/..... to copy your backup into the correct place
[*]check permissions
check the permission of every file you copied and in case you're unsure: they should belong to root, group root, access permission 755 (or 06755 in case of busybox and su)
$ls -l /target/dir | grep filename to check
$chown root /target/file
$chgrp root /target/file
$chmod 755 /target/file
[*]make sure changes are written to disk
flush all pending filesystem changes $sync
[*]reboot
exit the adb session with ctrl+c
and use adb reboot to restart & enjoy your phone

How I bootloader unlocked, rooted and installed CWM 6.04.5 latest on my LG P880 4X HD

Note: this will void your warrenty, and also I will not be responsible for the bricked devices, so proceed with caution,
Read all the instructions carefully, before proceeding, and check if this methods suites you...
Also remeber if you are going to hit thanks for me one time you should thank these guys 100 times, their methods were the ones which helped me post this.
Derjan23
esag21
fire3D
As all of you know this phone was condemned due to its lack of a proper method to unlock the bootloader, so many of the guys banned this phone, I never knew before I switched into it from a Lumia 820 in a refurbished market, when I ealized this phone was not easily breakable I was so worried and cursed much for the seller to cheating me. Also I knew I was going for a cheap buy and I realized I was a fool... but not for long. Enough chit chat.... let's go in deep
*the proper and extremely unofficial method of performing the tasks mentioned in the title..... for ESA-XXX
This method is different than usual way, it can be summerized into;
1. Root your device, and install any CWM version
2. Unlock the bootloader
3. Install the required version of CWM
4. Install any ROM via CWM methods.
Rooting
* Important: You need to be in the firmware update of v20a check it in settings > about device > software
otherwise update to it using LG PC studio
or
this thread (here), but remember you need to do this only once, if you are thinking to do it better in next time, you will relock your bootloader, and that's it...
1. You need files from the following links(I don't have any online space so email me a request on [email protected] and i will mail back you the files) to proceed, so you better download them and copy them to C:/unlock
2. Then open a command prompt as Administrator, and type 'cd C:/unlock'
3. boot into stock recovery by turning off your device and turn it back ON while pressing volume down key. (Vol. Dwn key + power key)
4. Connect it via USB to the computer and type in the cmd;
Code:
adb sideload Superuser.zip
5. After the installation, choose 'reboot to system' from the device to turn it on. And then install an app called 'root checker' from the play store and check if your device is rooted, and if it is, say 'yeah' a bit louder
6. Now install unsecured recovery;
typing in your CMD; make sure you type one by one and hit ENTER
Code:
adb push recovery-clockwork-touch-6.0.3.1-p880.img /sdcard/
adb shell
su
cat/mnt/sdcard/recovery-clockwork-touch-6.0.3.1-p880.img >/dev/block/mmcblk0p1
sync
at this point proceed to next major move without hesitating...
Unlocking the bootloader
1. If you are in the same CMD close it and re-open as admin, and type 'cd C:/unlock' and type one by one of the following and hit ENTER;
Code:
adb shell
su
cat /sys/firmware/fuse/odm_reserved >/data/local/tmp/odm_reserved
echo 0x00000000000000000000000000000000000000000000000000000040000000c8 > /data/local/tmp/odm_reserved
echo /data/local/tmp/odm_reserved >/sys/firmware/fuse/odm_reserved
2. Boot to bootloader
close the early CMD and open a new one as admin;
type;
Code:
adb reboot bootloader
at this point you will see LG logo
the type;
Code:
fastboot oem unlock
and press volume down key and then press power key to proceed (your screen won't show you anything)
at this point you will see nothing your screen will be turn black, count to 30 seconds and remove the battery, and put it back wait to check if the phone starts automatically, if not turn it on.
After the power on connect it via USB and type in the CMD;
Code:
adb reboot bootloader
after the LG logo shown up wait to see if anither screen is shown or a black screen may be,
and then type;
Code:
fastboot getvar all
wait for 15 sec. And remove the battery, put it back and turn the device on.
Now go to the hidden menu(3845*#880#) and check bootloader unlock status. Viola... Unlocked.... Say 'Yeah' more louder than before.
Flashing latest CWM in a non harmful way to the unlock state.
Your downloaded CWM file looks as;
Code:
recovery-clockwork-touch-6.0.*.*-p880.img
* - denotes any numbers
1. copy it to C:/unlock, and open a CMD as admin and cd into unlock folder, and type; type one by one and hit ENTER.
Code:
adb push recovery-clockwork-touch-6.0.*.*-p880.img /sdcard/
adb shell
su
cat /mnt/sdcard/recovery-clockwork-touch-6.0.*.*-p880.img >/dev/block/mmcblk0p1
sync
after boot into recovery after turning your phone off and powering on with (vol. Down + power) combination. Tadaa..... you're in the latest CWM...... now give away big load 'yeah' s...... :laugh:
Now proceed with any ROM flashing, but remember use only the flashing via CWM recovery. I don't suggest any other methods....
Why another thread?
Sent from my OmniROM-powered LG Optimus 4X HD
Ans it is harder than the other methods
Sent from my LG-P880 using Tapatalk
Is it same with v20b
Sent from my LG-P880 using xda app-developers app

[GUIDE] How to convert your Wiko UFeel Prime into a YU Yureka Black (with another Android)

So, i've been tinkering a bit for days over my Wiko UFeel Prime (i had even heard this one is the "clone" of the YU Yureka Black and/or viceversa around) and found a ton of problems at first due to the manufacturer (Tinno) putting a ton of "walls" to make modding impossible, like:
Removing various Fastboot commands (oem unlock, oem unlock-tinno, reboot edl, general bootloader info, refuses reboots to recovery, bootloader and system, etc.);
Making updates/downgrades impossible, just in case last time you've touched the device and upgraded to the latest firmware from Wiko (fun fact: the update app pings a site called https://frogs.wiko-ota.com, but sadly it has never been archived before and nowadays shows chinese text saying how the content doesn't exist) and you're completely stuck with the shady apps and trackers Tinno put on their P7 board;
You couldn't use stuff like adb push or upgrade from recovery because they force you to use their proprietary tool on Windows to do such (they bundle all of their firmware updates into an huge .exe file, despite being inside a .zip file);
And more...
Despite everything, i found one crack into the phone to take advantage of: you can reboot on EDL mode via adb
And that's where my guide begins!
Requirements:​In order to convert your Wiko to a Yureka Black, you must need...
Your Wiko UFeel Prime (whatever firmware, either it is M or N);
Another Android phone (must have: Magisk root, OTG Cable support);
An OTG adapter;
A charging cable (must be able to transfer data);
Preparing your rooted Android device:​Moving on, your device must have the following apps installed
ADB & Fastboot Tools;
Fox's Magisk Module Manager;
Terminal Emulator;
After got the latter, do the following steps afterwards
Open the Fox MMM app;
Tap the search button (placed on the bottom right corner of the screen);
Type "QDL" or "Qualcomm" into the bar;
You should find a tool called QDL For Android NDK;
Tap on "Install";
Tap on "Install Module";
Wait for the module to install;
Reboot your device;
After reboot, open the ADB & Fastboot tools app;
Allow root perms;
As a last step (for now), you must hop over the YU Yureka Black QFIL files page and download the zip file under the Stock M File hyperlink- after doing that, extract the .zip file wherever you want (with your fav file explorer of choice) (for simplicity's sake: extract the zip out of the Download folder. After extraction, rename the "YU5040" etc. etc. folder as simply "yu"- the purpose of it will come in handy further on the guide).
As of now, leave your secondary phone as is and move to the Wiko phone.
Preparing your Wiko UFeel Prime:​If you had setup your secondary phone successfully: preparing your Wiko phone will be 10 times easier than the latter.
Just follow thru the following steps:
Go to Settings;
Tap on the "About" section of your device;
Tap a ton of times on the Build number, until the following will tell you you had unlocked Developer Settings;
Go back;
Tap on Developer Settings;
Scroll until you find USB Debug and enable it;
As a last thing, if you prefer, jump straight to the home menu (on your Wiko), then lay the phone together with the other device on a safe spot where nobody could interfere on the work.
The next title will introduce you to the "delicate" part of the guide: but also the moment where your Wiko will finally get converted as a YU Yureka Black and allow modding!
Converting your Wiko:​Now, follow carefully the steps i'm about to give
On your secondary device​
Open the ADB & Fastboot tools app;
Connect on the device's slot the OTG cable;
On your Wiko​
Connect the charging cable to it's slot;
Connect the cable's end (the USB part) to the OTG slot attached to the other device;
Tap on "Allow" if it asks you about USB debug (or generally allowing a pc to get access to the device);
On your secondary device​
Tap on the "Refresh" button (placed on the top right part of the app's UI);
Scroll on the bottom of the screen;
Type reboot edl on the writing camp;
Tap "Execute" (which is next to the zone where you wrote the command);
If you came this far and your Wiko effectively turned off plus the notification LED started blinking RED: this means your Wiko successfully booted into EDL mode!
Now, let's move on the focus to your secondary device.
On your secondary device​
Quit the ADB & Fastboot tools app;
Open the Terminal Emulator app;
Write the following commands:
Code:
cd /sdcard
cd yu
su
After typed these commands on the terminal, copy and paste this string of code on your terminal:
Code:
qdl --debug --storage emmc --include /sdcard/yu /sdcard/yu/prog_emmc_firehose_8937_ddr.mbn /sdcard/yu/rawprogram_unsparse_upgrade.xml /sdcard/yu/rawprogram_unsparse.xml /sdcard/yu/patch0.xml
Once done, tap send on your keyboard and let the program do it's magic.
The wait should vary depending on your secondary device's specs (approximates 1h at max) and the speed on writing the .mbn, .img, and .tz files inside the folder over the Wiko's board- also, pro-tip, be sure to check often on your secondary device (by tapping it's screen often).
The reason?
it will avoid the device to go into sleep mode (especially if you set the backlight to a short period of time) and once unlocked it restarts the whole flashing all over again, extending the flashing wait the double.
If an accident happens (like it happened in my case) you must resort on disassembling your device's back and short the pins with some tweezers to enter back EDL mode manually, and also repeating the flashing process by pasting again the code string on the terminal.
If you don't know how to disassemble your Wiko: check here.
Also, if you don't know which pins you should press to enter EDL mode: check here aswell.
After the long wait, you should see the following behaviors:
Your secondary device will flag a disconnection on the QDL program (via terminal);
Your Wiko phone will vibrate and start booting up, showing the YUREKA BLACK text as the splash screen;
Now you can finally unlock your bootloader (note: you must type unlock-go to do the latter) and flash your device however you like!​Thanks for following my guide!​---------------------
Credits:
- The Yu Yureka Black modding community;
- Sosavo;
- You, for following my guide!

Categories

Resources