I am newbie. And I learn C Language in my School.
So I try to write this script.
Code:
#include<stdio.h>
#include<stdlib.h>
static FILE* acmd_pipe;
int main(int in,char **str)
{
int fd = atoi(str[2]);
acmd_pipe = fdopen(fd, "wb");
setlinebuf(acmd_pipe);
fprintf(acmd_pipe,"ui_print \n");
fprintf(acmd_pipe,"ui_print %d\n***",in);
int i;
for(i=1;i<=in;i++)
{
fprintf(acmd_pipe,"ui_print %s***\n",str[i]);
}
fclose(acmd_pipe);
}
I compile this program.I add this script to update.zip And when I Flash my update.zip
this is output
Code:
4***2***18***/sdcard/update.zip***(null)***
I know. From my script.
str[0]=2;
str[1]=18;
str[2]="/sdcard/update.zip";
str[3]=null;
My Qusetion!!!!
What is data in str[0],str[1] And str[3] mean?
Sorry for my bad english.
Note I use PX-recovery 0.36 beta
you're writing an updater script ?
those lines aren't good if thats so
voetbalremco said:
you're writing an updater script ?
those lines aren't good if thats so
Click to expand...
Click to collapse
After compile this script will rename to "update-binary" (Is it mean updater script?)
Note * this script write by using C language.
sorry for my bad english *-*
No no thatals fine.
I just dont see the way of compiling your update binary/scripts. L
Sent from my GT-S5660 using xda app-developers app
voetbalremco said:
No no thatals fine.
I just dont see the way of compiling your update binary/scripts. L
Sent from my GT-S5660 using xda app-developers app
Click to expand...
Click to collapse
+
I Compile using gcc (from C4Droid)
Related
Hey guys, i'am newbie in XDA I just want directory init.d work and not use custom kernel....its just simple code..
you just put the code:
# init.d support
busybox run-parts /system/etc/init.d/
In >install-recovery.sh< in directory /system/etc, click instal-recovery.sh and click execute, and you will be get
Init.d work..
________________
YOU CAN TEST INIT.D with 99test(create a new file in /system/etc/init.d
And gift name 99test or other...
And this the code:
( #!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt
),
If have file :
init.d_log_test.txt in
/data/local/temp/
Init.d its work
__________
NOTE: you must have BUSYBOX, you can execute instal-recovery.sh again if 99test not work
Ok, good luck
Sorry if my english so bad
Sent from my GT-S5360 using XDA
shoutokuyaki said:
Hey guys, i'am newbie in XDA I just want directory init.d work and not use custom kernel....its just simple code..
you just put the code:
# init.d support
busybox run-parts /system/etc/init.d/
In >install-recovery.sh< in directory /system/etc, click instal-recovery.sh and click execute, and you will be get
Init.d work..
________________
YOU CAN TEST INIT.D with 99test(create a new file in /system/etc/init.d
And gift name 99test or other...
And this the code:
( #!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt
),
If have file :
init.d_log_test.txt in
/data/local/temp/
Init.d its work
__________
NOTE: you must have BUSYBOX, you can execute instal-recovery.sh again if 99test not work
Ok, good luck
Sorry if my english so bad
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
I ran this
# init.d support
busybox run-parts /system/etc/init.d/
and I guess it ran cuz I got a wall of text. But the 99test didn't execute. But there was a init.d_log_test.txt in /data/local/tml/
So does that mean its working or that it was ALREADY working?
sorry brother but i have already made a thread about this in dev section...
it won't work.
hell_lock said:
sorry brother but i have already made a thread about this in dev section...
Click to expand...
Click to collapse
Sorry if I repost
Sent from my GT-S5360 using XDA
raolemo said:
I ran this
# init.d support
busybox run-parts /system/etc/init.d/
and I guess it ran cuz I got a wall of text. But the 99test didn't execute. But there was a init.d_log_test.txt in /data/local/tml/
So does that mean its working or that it was ALREADY working?
Click to expand...
Click to collapse
Yeah sure..
Sent from my GT-S5360 using XDA
delete /data/local/temp/init.d_log_test.txt then reboot the phone. please check if we could find the same file after reboot.
kurotsugi said:
it won't work.
Click to expand...
Click to collapse
why it will not work? please give me a clue where the fault
Sent from my GT-S5360 using XDA
kurotsugi said:
delete /data/local/temp/init.d_log_test.txt then reboot the phone. please check if we could find the same file after reboot.
Click to expand...
Click to collapse
follow above test. please confirm the result
kurotsugi said:
follow above test. please confirm the result
Click to expand...
Click to collapse
Ok I will try...
Sent from my GT-S5360 using XDA
what language do I need to learn in order to write scripts.
maybe java
Heartlessangel2001 said:
what language do I need to learn in order to write scripts.
Click to expand...
Click to collapse
I dont know what language to learn but you can easily get tut. by googling them. If you are talking about updater scripts then the language used in it is similar to the language used in linux
Sent from my GT-S5360 using XDA
if you mean the one in the app...its java n c+. the one in kernel c+. in init.d script, linux command. the one in updater script, updater binary script.
Please can anybody tell me how??
Thanks in Advance!!
*Derp*
Cant on your phone I think
Sent from my GT-S5660 using xda premium
I know it's possible to change the extension to .zip and open it that way, but I don't think it's a correct way lol
Sent from my HTC Sensation
sorry unpossible
unless you run ubuntu on phone
Sent from my GT-S5830 using xda premium
iok1 said:
I know it's possible to change the extension to .zip and open it that way, but I don't think it's a correct way lol
Sent from my HTC Sensation
Click to expand...
Click to collapse
In that way your unable to edit xmls
Sent from my GT-S5660 using xda premium
Method 1 : Alternatively, you can use a tool called dex2jar ,which is made by a chinese student. It will translate dex to jar file. For the next step, you can use jd-gui, the source code is quite readable as dex2jar makes some optimizations.
Method 2: Another Option is to use Smali It provides BAKSMALI which is a most excellent reverse-engineering tool for DEX files. The tool is made by JesusFreke, he’s famous for making popular ROMs for Android.
Method 4: Android comes with a dissambler called dexdump. The location of this tool is not intuitive, it runs on the Linux platform that hosts Android. Details here.
+ Use APKTool to Decompile, Edit, Translate and Recompile an APK
(Best Method)
Peace
Verbal_Hologram said:
Method 1 : Alternatively, you can use a tool called dex2jar ,which is made by a chinese student. It will translate dex to jar file. For the next step, you can use jd-gui, the source code is quite readable as dex2jar makes some optimizations.
Method 2: Another Option is to use Smali It provides BAKSMALI which is a most excellent reverse-engineering tool for DEX files. The tool is made by JesusFreke, he’s famous for making popular ROMs for Android.
Method 4: Android comes with a dissambler called dexdump. The location of this tool is not intuitive, it runs on the Linux platform that hosts Android. Details here.
+ Use APKTool to Decompile, Edit, Translate and Recompile an APK
(Best Method)
Peace
Click to expand...
Click to collapse
Hey Verbal!
This is your 4th post right?
Congrats
Finally you appeared after those alot of pms!
*Derp*
Yups , But The Problem is i must write 10 x post in "General,Themes & Apps" before i can post in The Devolper-Sector #Newbrules
Verbal_Hologram said:
Yups , But The Problem is i must write 10 x post in "General,Themes & Apps" before i can post in The Devolper-Sector #Newbrules
Click to expand...
Click to collapse
Yea that sucks, i did that too XD
*Derp*
Just some random posts on topics nobody reads »
Sent from my GT-S5660 using xda premium
voetbalremco said:
Just some random posts on topics nobody reads »
Sent from my GT-S5660 using xda premium
Click to expand...
Click to collapse
Hehe
*Derp*
You dont say?
Rip trololol
Sent from my GT-S5660 using xda premium
I'M NOT RESPONSIBLE FOR ANY BRICK I'M JUST SHARING
This RLE is for those who wants custom splash on their beloved ACE.
Enjoy! This file is made by me. Haven't tested, I don't dare repacking boot.img
Rename *whatever* (#) .rle to COOPER.rle and put onto root folder.
Credits:
DooMLoRD for rle converter
Flickr for this photo
Download:
Apple http://www.mediafire.com/?0aprqq7ju8hr5m8
Android robot-like text http://www.mediafire.com/download.php?g93zueta96istvf
At least please give some feedback.
EDIT: The Apple's got a white line on top, will fix later maybe because Flickr doesn't allow any copy-paste so I screenied it.
well, I gotta say that the Apple one is somewhat ironic
Renan Lazarotto said:
well, I gotta say that the Apple one is somewhat ironic
Click to expand...
Click to collapse
Thx! Does it works?
Sent from my GT-P7300B using xda app-developers app
I'm gonna test later, I think it is better to recompile the kernel with the RLE changed. You can try it using the dsixda's Kitchen -> http://forum.xda-developers.com/showthread.php?t=633246. Thanks!
can you make tutorial ??
gametv said:
can you make tutorial ??
Click to expand...
Click to collapse
For making or putting it into ace?
Making:
1.) Grab a png file.
2.) Use the converter by DoomLoRD.
3.)
Code:
adb push #.rle sdcard
adb shell
su
rm COOPER.RLE
cp sdcard/#.rle /
##COMMENT DON'T WRITE RENAME #.RLE TO COOPER.rle this exact name##
*rename binary I don't know what it is * #.rle COOPER.RLE
Sent from my HTC Desire using xda app-developers app
Renan Lazarotto said:
I'm gonna test later, I think it is better to recompile the kernel with the RLE changed. You can try it using the dsixda's Kitchen -> http://forum.xda-developers.com/showthread.php?t=633246. Thanks!
Click to expand...
Click to collapse
Cygwin dependencies file is corrupted
Sent from my HTC Desire using xda app-developers app
panpjp said:
Cygwin dependencies file is corrupted
Sent from my HTC Desire using xda app-developers app
Click to expand...
Click to collapse
Hm... Download cygwin from its site and try again! or use Linux in a Virtual Machine
Renan Lazarotto said:
Hm... Download cygwin from its site and try again! or use Linux in a Virtual Machine
Click to expand...
Click to collapse
It said "clear" is missing when I typed in ./menu . Can you provide clear for me? PLEASE I'M BEGGING YOU.
Sent from my HTC Desire using xda app-developers app
panpjp said:
It said "clear" is missing when I typed in ./menu . Can you provide clear for me? PLEASE I'M BEGGING YOU.
Sent from my HTC Desire using xda app-developers app
Click to expand...
Click to collapse
Never heard of this "clear" before! Try installing cygwin again, and on the package selection window search for clear. Otherwise, I really don't know what is wrong.
Renan Lazarotto said:
Never heard of this "clear" before! Try installing cygwin again, and on the package selection window search for clear. Otherwise, I really don't know what is wrong.
Click to expand...
Click to collapse
Tried re-installing. Can't find clear :crying:
Got this when ./menu
Code:
Welcome to dsixda's Android Kitchen
Please wait .
Error: The application 'clear' is not installed - the kitchen
will not function properly without it. Ensure you did
not miss a step during installation! Refer to the
Android Kitchen FAQ at xda-developers.com for further
assistance.
PLEASE READ THE FAQ BEFORE ASKING QUESTIONS!
I've read the FAQ.
Try asking in the kitchen thread then, I think it is the best lead you can have.
Renan Lazarotto said:
Try asking in the kitchen thread then, I think it is the best lead you can have.
Click to expand...
Click to collapse
Migrating to my PC which has the uncorrupted file after killing 6 viruses (4 PUPS, 1 Trojan *I HATE U FUQ'IN VIRUS DEPLOYER FROM SOMEWHERE ON EARTH* and 1 Adware -.- )
panpjp said:
Migrating to my PC which has the uncorrupted file after killing 6 viruses (4 PUPS, 1 Trojan *I HATE U FUQ'IN VIRUS DEPLOYER FROM SOMEWHERE ON EARTH* and 1 Adware -.- )
Click to expand...
Click to collapse
Remember that you can always use a Virtual Machine with Linux. No problems on there.
Vold.FstabWhat is the alternative of vold.fstab on Android 4.3?
I was modded this file on Jelly Bean 4.2.2 make me able to move all installed apps into external sd using link2sd and can be found in the following folder:
/etc/vold.fstab
i can't find it on Android 4.3, any solution?
thanks
Go to /System and open the Build Prop file, then edit the swap line. Just search for it on the file.
Sent from my GT-I8150 using Tapatalk 4 Beta
About Build.Prop
FelixMG said:
Go to /System and open the Build Prop file, then edit the swap line. Just search for it on the file.
Sent from my GT-I8150 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Thanks for the answer, i want to tell you about 2 lines founded in Build Prop if Set default USB interface or Storage configuration like this attached image..
no..not that..edit this one:
persist.sys.vold.switchexternal=0
change '0' to '1'
Sent from my GT-I8150 using Tapatalk 4
Fixed
kacanghantu said:
no..not that..edit this one:
persist.sys.vold.switchexternal=0
change '0' to '1'
Sent from my GT-I8150 using Tapatalk 4
Click to expand...
Click to collapse
thank you very much guys...it's worked
Special thanks to Kacanghantu
:good::good::good::good::good::good::good:
Here a screenshot.
haky 86 said:
thank you very much guys...it's worked
Special thanks to Kacanghantu
:good::good::good::good::good::good::good:
Here a screenshot.
Click to expand...
Click to collapse
welcome bro..
Sent from my GT-I8150 using Tapatalk 4
Hi, i have a Samsung Galaxy S GT9000 and i don't have that line in my build.prop.file. How can i exchange my sdcard to my emmc
Rui Efe said:
Hi, i have a Samsung Galaxy S GT9000 and i don't have that line in my build.prop.file. How can i exchange my sdcard to my emmc
Click to expand...
Click to collapse
Which ROM are you using?
Enviado de meu GT-I8150 usando Tapatalk 4
FelixMG said:
Which ROM are you using?
Enviado de meu GT-I8150 usando Tapatalk 4
Click to expand...
Click to collapse
Cyanogenmod 10.2/android 4.3
vold.fstab is no longer used in 4.3. Instead, fstab.<device> is now unified. Check the contents of yours. Unfortunately, this means you'll have to unpack your boot.img, modify the ramdisk, repack and reflash.
Refer to http://source.android.com/devices/tech/storage/ although it doesn't provide nearly enough information in my opinion. I end up digging through sources for various devices.
ziddey said:
vold.fstab is no longer used in 4.3. Instead, fstab.<device> is now unified. Check the contents of yours. Unfortunately, this means you'll have to unpack your boot.img, modify the ramdisk, repack and reflash.
Click to expand...
Click to collapse
dammit! It could have been so easy! :V
Any Solution for increasing internal sd ram size ?
Are there any 3rd party programs which can do the task for me ? I dont want to unpack .img file and edit and then repack and reflash. Just too many variables that can go wrong ?
I have Samsung Galaxy i9003 with SlimRoms --- > [ROM][UNOFFICIAL][4.3][A3] Slim Bean build.1.6-WEEKLY-1193
You can see if any of the kernel zips are using the "anykernel" method and modify the script to suit.
If you can't find one, you can download one of the zips from http://forum.xda-developers.com/showthread.php?t=2181820 and figure out how to adapt the relevant ramdisk patching section (look in tmp/otgmod.sh) to suit. It basically dumps the current boot.img, breaks it apart, mods the ramdisk, makes a new boot.img, and then flashes it. Strip out all the irrelevant parts and change the partitions to suit.
Has anyone found a way to do this in 4.4 yet, specifically CM11? Switching with the build.prop isn't working for me.
Sent from my Bionic
Eiht said:
Has anyone found a way to do this in 4.4 yet, specifically CM11? Switching with the build.prop isn't working for me.
Sent from my Bionic
Click to expand...
Click to collapse
I don't follow your phone, but nonetheless, build.prop mods shouldn't have worked in 4.3.
Further, starting in 4.4, the external sdcard is also run through fuse. See http://source.android.com/devices/tech/storage/config-example.html specifically the last section: Emulated primary, physical secondary (like Xoom)
From there, you can understand what needs to be switched. Again, this requires modifying the ramdisk.
I don't know if there's some sort of hack that'd allow you to change a global variable from a child. Perhaps, an init.d script would work at the parent level? If so, you may be able to switch around EXTERNAL_STORAGE and SECONDARY_STORAGE that way. The paths will remain unchanged, but proper android apps should respect the env vars.
Hi
on Kitkat, the mounting are set in the fstab files which are inside the boot.img file.
To edit them, you should unpack the img file, edit the files, then repack it in order to flash it.
The way to unpack them depends on the device manufacturer. For MTK devices, it is here : http://forum.xda-developers.com/showthread.php?t=1587411&page=29
I did it successfully on my Cube tablet in 4.4.
For others, you should find the tools on the web...
kacanghantu said:
no..not that..edit this one:
persist.sys.vold.switchexternal=0
change '0' to '1'
Sent from my GT-I8150 using Tapatalk 4
Click to expand...
Click to collapse
does this method work on Android 4.44? TQ.
i could not find the line you suggested
kacanghantu said:
no..not that..edit this one:
persist.sys.vold.switchexternal=0
change '0' to '1'
Sent from my GT-I8150 using Tapatalk 4
Click to expand...
Click to collapse
i have moto e . andrid version kitket 4.4.4. i have attached my build.prop file. please tell me what should i should do.
maulik trapasiya said:
i have moto e . andrid version kitket 4.4.4. i have attached my build.prop file. please tell me what should i should do.
Click to expand...
Click to collapse
if i am not wrong you cannot move apps to sdcard on kitkat..
HTC Desire 816 Internal to External
Hi,
I know this thread is for Samsung,but I hope you can help me anyway.
I wanted to swap my storages, but so far I haven't found anything for Android 5.0.2..
I've got lollipop with Sense 7 and a rooted insertion Rom.
My question: How to swap the storages on lollipop? Also the build file?
I hope you can help me,
Greetings, Tobi