Jump to content

ZTE Blade FM Radio chipset + CM7


Guest t0mm13b

Recommended Posts

Guest t0mm13b
Oh man... really i dont know why but it wont work.

All this from adb shell

  • su
  • cd /data/lost+found
  • rm -rf /data/lost+found #wipe everything in there!
  • then push it in by way of unzipping then adb push zteblade_fmtest /data/lost+found
  • chmod 0755 /data/lost+found/zteblade_fmtest
  • cd /data/lost+found
  • ./zteblade_fmtest ....

Remember to be a superuser (via way of su) so your command prompt should show a hash sign, a non superuser user would show a dollar sign.... :D

BTW i noticed from your screenshot you used data/lost+found, you left out the preceding /..... i.e. /data/lost+found (the very first forward-slash....) another thing ... confirm you do not have multiple copies running by entering this

ps -elf | grep zteblade_fmtest and make note of the pid's if you do, and issue kill -1 pid_number for each of them copies, that could be preventing you from overwriting it...

Edited by t0mm13b
Link to comment
Share on other sites

Guest macher
Remember to be a superuser (via way of su) so your command prompt should show a hash sign, a non superuser user would show a dollar sign....

yeaaaah... I'm not so green in this android (linux world) ;p I study IT ;p and still this same ;p I wiped then rebooted and still this same :D It's being boring :D

Link to comment
Share on other sites

Guest macher

I again rebooted then looked in process tree and I didnt find zteblade_fmtest, and guest what?! ;) nothing :D still this same :D

If library for controlling chip(ioctl.h) is not top-secret, please upload it and I try compile it from my side :(

PS. with' /' or without ' /'? whatever, adb shell always start from root so it doesn't difference

Edited by macher
Link to comment
Share on other sites

Guest t0mm13b

Dang!!!! I'll be damned.... :(

fire and brimstone.... :D

My bad... the -v switch for processing got omitted by error....

Have refreshed the github with new binary....

sorry... :D

Link to comment
Share on other sites

Guest t0mm13b
I again rebooted then looked in process tree and I didnt find zteblade_fmtest, and guest what?! :P nothing ;) still this same :D

If library for controlling chip(ioctl.h) is not top-secret, please upload it and I try compile it from my side B)

PS. with' /' or without ' /'? whatever, adb shell always start from root so it doesn't difference

Ahhh ... ioctl.h is not top secret, its actually part of the Android's NDK toolkit, which comes with the includes and the libs necessary for any C code to compile for a android-driven handset... no secret really .... :D just a PITA having to incant magic hocus pocus switches on the command line.... see this .... :(

also - please read the previous posting (#29)...

Edited by t0mm13b
Link to comment
Share on other sites

Guest harry_m
Have refreshed the github with new binary....

sorry... :D

This works for me. It mutes after 5 seconds but can be "revived" with the volume up/down.

Link to comment
Share on other sites

Guest macher

... yeeaaah, now it's work... thanks for great work, and i waiting for some implementation to GUI

ps. man... i had homework for tomorrow... but i tried do something with your program.. and now Im going sleep

ps2. if you will be need some debugers or beta testers just pm to me :D

Link to comment
Share on other sites

# ./zteblade_fmtest -1 -b 0 -j 1 -s 1,10190 -v 10 -a 0

[FM_INIT2NORMAL] - rv = 0; status = 0

[FM_SET_BAND] - rv = 0

[FM_SET_SPACE] - rv = 0

[FM_SEEK] - rv = -1; next station: 10190

[FM_SET_VOL] - rv = 0

[FM_SET_AUDIOTRACK] - rv = 0

Why it returns -1 on SEEK?

Link to comment
Share on other sites

Guest t0mm13b
# ./zteblade_fmtest -1 -b 0 -j 1 -s 1,10190 -v 10 -a 0

[FM_INIT2NORMAL] - rv = 0; status = 0

[FM_SET_BAND] - rv = 0

[FM_SET_SPACE] - rv = 0

[FM_SEEK] - rv = -1; next station: 10190

[FM_SET_VOL] - rv = 0

[FM_SET_AUDIOTRACK] - rv = 0

Why it returns -1 on SEEK?

:D

Good point actually - let me investigate this.... :D the next station is shown as 101.90... hmmmm....

Thanks for the heads up.... :(

Link to comment
Share on other sites

<6>[03-24 10:39:43.071255] [18161: zteblade_fmtest]snd_hph_amp_ctl:0

<6>[03-24 10:39:43.301243] [18161: zteblade_fmtest]snd_hph_amp_ctl:1

<6>[03-24 10:39:47.861243] [235: Playback Thread][audmgr.c:audmgr_enable] session 0xc0719670

<6>[03-24 10:39:47.871248] [1013: audmgr_rpc][audmgr.c:process_audmgr_callback] rpc READY handle=0x00000000

<6>[03-24 10:39:47.871248] [1013: audmgr_rpc][audmgr.c:audmgr_rpc_thread] rpc_reply status 0

<6>[03-24 10:39:48.031236] [1013: audmgr_rpc][audmgr.c:process_audmgr_callback] rpc CODEC_CONFIG volume=0x00000000

<6>[03-24 10:39:48.031236] [235: Playback Thread][adsp.c:msm_adsp_get] opening module AUDPPTASK

<6>[03-24 10:39:48.031236] [235: Playback Thread][adsp.c:msm_adsp_get] module AUDPPTASK has been registered

<6>[03-24 10:39:48.031236] [235: Playback Thread][adsp.c:msm_adsp_enable] enable 'AUDPPTASK'state[0] id[17227122]

<6>[03-24 10:39:48.031236] [23: kadspd][adsp.c:handle_adsp_rtos_mtoa_app] module AUDPPTASK: READY

<6>[03-24 10:39:48.031236] [audpp.c:audpp_dsp_event] ENABLE

<6>[03-24 10:39:49.701281] [audio_out.c:audio_dsp_event] PCMDMAMISSED 32

<6>[03-24 10:39:51.041278] [audpp.c:audpp_dsp_event] DISABLE

<6>[03-24 10:39:51.041278] [235: Playback Thread][audpp.c:audpp_disable] Received CFG_MSG_DISABLE from ADSP

<6>[03-24 10:39:51.041278] [235: Playback Thread][adsp.c:msm_adsp_disable] disable 'AUDPPTASK'

<6>[03-24 10:39:51.041278] [235: Playback Thread][adsp.c:msm_adsp_disable_locked] disable interrupt

<6>[03-24 10:39:51.041278] [235: Playback Thread][adsp.c:msm_adsp_put] closing module AUDPPTASK

<6>[03-24 10:39:51.041278] [235: Playback Thread][audmgr.c:audmgr_disable] session 0xc0719670

<6>[03-24 10:39:51.051273] [1013: audmgr_rpc][audmgr.c:audmgr_rpc_thread] rpc_reply status 0

<3>[03-24 10:39:51.061255] [1013: audmgr_rpc][audmgr.c:process_audmgr_callback] DISABLED

audiomanager is disables playback after some seconds...

Link to comment
Share on other sites

Guest t0mm13b

Update 24th March 2011.

I have updated the OP posting for new exciting dev efforts... the server side stuff works perfectly under x86 Linux, will be pushing out a clockworkmod script shortly.... :D As for the full source, and being a strong believer in open source and sharing... go and have fun... :D

Thanks to all for their support and feedback...

Stay tuned!

Link to comment
Share on other sites

Guest t0mm13b

Good news! its working now... daemon runs in the background, and very easy to control...

Github is updated to reflect the updated changes....

Please refer back to the first posting of this thread for updates! :D w00t! \o/

Edited by t0mm13b
Link to comment
Share on other sites

Guest t0mm13b

Can any clockwork mod script experts point out where it is gone wrong?

Something wrong with the flash script... :D have included this for any eagle eyes to spot the issue?

ui_print("Welcome to t0mm13b's ztebladefmd");

ui_print("Warning: This is EXPERIMENTAL and not official!... ");

ui_print("Extracting ztebladefmd binary to /data/local/tmp");

mount("yaffs2", "MTD", "system", "/system");

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

set_perm(0, 0, 0755, "/data/local/tmp/ztebladefmd");

run_program("/system/xbin/mknod", "-m 0755 /data/local/tmp/ztebladefmdCmds p");

ui_print("Created pipe ztebladefmdCmds");

run_program("/system/xbin/mknod", "-m 0755 /data/local/tmp/ztebladefmdStats p");

ui_print("Create pipe ztebladefmdStats");

unmount("/data");

unmount("/system");

ui_print("Permissions set so anyone can exec it... [no exploiting plzkthxbai :D] lulz");

ui_print("Notify t0mm13b via forums or #zteblade for any feedback. Please reboot!");

For starters it did not put the binary in the /data/local/tmp...

Is there some shutdown script running that purges the /data/local/tmp I wonder?

Link to comment
Share on other sites

Guest Mike_P
Can any clockwork mod script experts point out where it is gone wrong?

Something wrong with the flash script... :D have included this for any eagle eyes to spot the issue?

For starters it did not put the binary in the /data/local/tmp...

Is there some shutdown script running that purges the /data/local/tmp I wonder?

I'm no expert but where is the command to extract the binary?

Link to comment
Share on other sites

Guest t0mm13b
I'm no expert but where is the command to extract the binary?

Have that in place, that part is ok, it's the mknod part am worried about... tbh, it looks iffy..... as it fails to create the pipes... dunno what I'm missing... according to this source for the bootable recovery on github

this function is responsible for executing via run_program in the script, but am definitely missing something here...

Value* RunProgramFn(const char* name, State* state, int argc, Expr* argv[]) {

	if (argc < 1) {

		return ErrorAbort(state, "%s() expects at least 1 arg", name);

	}

	char** args = ReadVarArgs(state, argc, argv);

	if (args == NULL) {

		return NULL;

	}


	char** args2 = malloc(sizeof(char*) * (argc+1));

	memcpy(args2, args, sizeof(char*) * argc);

	args2[argc] = NULL;


	fprintf(stderr, "about to run program [%s] with %d args\n", args2[0], argc);


	pid_t child = fork();

	if (child == 0) {

		execv(args2[0], args2);

		fprintf(stderr, "run_program: execv failed: %s\n", strerror(errno));

		_exit(1);

	}

	int status;

	waitpid(child, &status, 0);

	if (WIFEXITED(status)) {

		if (WEXITSTATUS(status) != 0) {

			fprintf(stderr, "run_program: child exited with status %d\n",

					WEXITSTATUS(status));

		}

	} else if (WIFSIGNALED(status)) {

		fprintf(stderr, "run_program: child terminated by signal %d\n",

				WTERMSIG(status));

	}


	int i;

	for (i = 0; i < argc; ++i) {

		free(args[i]);

	}

	free(args);

	free(args2);


	char buffer[20];

	sprintf(buffer, "%d", status);


	return StringValue(strdup(buffer));

}

It is the way run_program is set up to execute... but is argc needed as in

run_program("/system/xbin/mknod", 2, "-m 0755" ...);

Not 100% sure... there...

Link to comment
Share on other sites

Guest Lew247
Sorry for a stupid question in between but

IS IT OK FOR A NEWBIE TO FLASH IT ON n32

I m in need of it big time

If you "need it big time" Then your using the wrong rom

Use one that has the FM radio already working

Link to comment
Share on other sites

Guest Saransh Agarwal
If you "need it big time" Then your using the wrong rom

Use one that has the FM radio already working

no no its ok it isnt that i cannot live without it

i love cm7

Link to comment
Share on other sites

Guest _amano

We are close to having a CM 7 WITH radio support. Why not have best of all worlds?

Go thommy, go :D

Maybe we will get even RDS powered radio. We will just have to wait and see...

Link to comment
Share on other sites

Guest t0mm13b
We are close to having a CM 7 WITH radio support. Why not have best of all worlds?

Go thommy, go :D

Maybe we will get even RDS powered radio. We will just have to wait and see...

Once I get the RC3 installed and refresh github I will recompile the kernel with Andorko's patches... (am not 100% sure if TomG has his github sync'd)

Yesterday, I got the confirmation from TomG, who has managed to put together a Java interface for the radio, this same principle could be used for other chipsets other than TI or BCM chipsets... stay tuned... :D

Link to comment
Share on other sites

Guest Grimthorpe
run_program("/system/xbin/mknod", 2, "-m 0755" ...);

That should be

run_program("/system/xbin/mknod", 2, "-m", "0755");

Each argument needs to be a separate string.

Link to comment
Share on other sites

Guest t0mm13b
That should be

run_program("/system/xbin/mknod", 2, "-m", "0755");

Each argument needs to be a separate string.

@Grimthorpe: wow!

Thanks a million for taking the time to answer the dilemma I had :D I be damned... meh... never realized... :D

(Well I cheated using a shell script and to make the user execute the shell script.... )

Ok a follow up question - how do you execute a single shell script with no arguments? what would that be?

Cheers :(

Edited by t0mm13b
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.