yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] LeftyGR:
Actually I wasn't sure how feasible that would be to add as a feature. Could FG actually determine what specific app to wipe data for and leave all other data alone? And if that is actually possible could it save that data, wipe it, flash the zip, and then give an option after reboot to replace that data?

Using something arbitrary as an example (this is only an example) like angry birds. Lets say I have it on my phone and I flash some zip file that replaces it somehow. Could game data be saved, then wiped, then re added after a reboot? I use this as an example only because you know how pissed I would be if I lost my progress on a game lol.
[Android Software/Hacking General [Developers Only]] sifat3d:
I tried only one kernel,

This one

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

Maybe it didn't work because its too old/backdated?(works through cwm5) Or my device has different partitions(no int-sd) than the newer "now" devices

IDK.
[Android Software/Hacking General [Developers Only]] apples723:
Saved my device no cwm for me and pimp my rom f+++ed up my phne have like 5 min before phone freezes jusy enough time to flash woth this app
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Yeah it would be totally feasible.

For the backup/restore however, there are apps like Carbon or Titanium Backup already, but yeah it could be neat to have it built into Flash Gordon too.

Finding the apps to wipe should be a piece of cake. Just so you understand the logic of how the FG parser (and I guess most parsers) works :

It extracts the flashable zip you point it to

it will then read the updater-script, line by line

For each line, it will compare if it contains a certain pattern which matches a supported edify command, if it does matches, then it translates it.

For example, if the line contains "package_extract_file(" , then it will translate the line to the bash equivalent "busybox cp -f " while keeping the same arguments(not going into details here).

So all I'd have to do here is to check for each line if it contains a certain amount of characters followed by ".apk" and preceded by a slash ("/"), grab this pattern and wipe the data for the corresponding pattern in /system/app if it exists, then go back to regular translation.

In fact yeah, thi kernel is not supported because it uses binaries and scripts to unpack your current kernel and add its own zImage to it then repack it.

The only kernels currently supported are those that come as boot.img files (just open the zip, if there is a boot.img file at the root of it, chances are it will be flashed properly).

I'll work on adding support for this technique as it seems to be used often (I've never owned a device on which kernels are installed this way).
[Android Software/Hacking General [Developers Only]] trevd:
Hi There, Let me help you out on this one, The unpackbootimage binary and that method of kernel flashing is Koush's AnyKernel sources : https://github.com/koush/AnyKernel ] , The code for unpackbootimage can be found in cyanogenmod github in here https://github.com/CyanogenMod/android_system_core/blob/cm-10.1/mkbootimg/unpackbootimg.c . The unpackbootimage in the github seems the segfault but it's easy to compile another.

There's a python script knocking around which I think is "the original" unpack version written many years ago. you might want to take a look ( or reuse that ) how you would unpack a bootimage just with bash standard comming line tools would be interest , I suppose you could use dd in to unpack the boot image if you fancied that challenge.

I've also am writing my own set of boot image tools ( link in the signature ) , it's a work in progress but is well along. It might give you some pointer in the weird and wonderful ways that boot images can be packed although that's only standard boot images, every OEM seems to have there on special ways.. :good:

Just things you'll want to bear in mind as these are the things that are included in update zips
[Android Software/Hacking General [Developers Only]] zzizikri:
I will try this ... Interesting
[Android Software/Hacking General [Developers Only]] dollyaja:
Gonna try this soon :D

sent from my Xperia J and Galaxy W with customized ICS
[Android Software/Hacking General [Developers Only]] Jeffrianz:
Greatttttt..... Big thx will test
[Android Software/Hacking General [Developers Only]] Jeffrianz:
Report Sir after use this Apps my phone stuck at boot.img splash (not boot into system) and back to recovery try to reboot again still same. try to undone my simple zip with uninstalling zip still same. And make sure all zip file deleted using AROMA file manager.

Thx God I have ROM zip on my sd and reinstalling my AOSP ROM.

And my phone boot again.

But bad news I not make a Nandroid

Sent from Tass
[Android Software/Hacking General [Developers Only]] BrooklynNY:
You were warned to make a nandroid backup
[Android Software/Hacking General [Developers Only]] Mr_S:
Really like this works fine on my Xperia p. One question, could it flash a kernel m

Good work
[Android Software/Hacking General [Developers Only]] Androguide.fr:
If the kernel you wanna flash comes as a boot.img it should flash it properly.
[Android Software/Hacking General [Developers Only]] Mr_S:
Ok I'm on Xperia p with locked bootloader. Will it still work? Can't unlock it

Thanks
[Android Software/Hacking General [Developers Only]] Sobralobo:
I wanted to try it to flash CrossBreeder but it can't pass "Extracting", dunno why. Even after 2 hours running. ^^ But it seems promising. ;)
[Android Software/Hacking General [Developers Only]] mrjoy:
Every zip file shows it is not valid or that it's not a zip package..... How to remove whitespace in the zip. Plz explain the solution, even i shorten the name.
[Android Software/Hacking General [Developers Only]] gavster26:
Delete the spaces between the words of the zips name.

---------- Post added at 10:46 AM ---------- Previous post was at 10:43 AM ----------

Hi is there a maximum zip size im having trouble flashing a walkman mod which is about 30mb it extracts ok starts to flash but after flashing a while it force closes theres no force close message it just boots back to the home screen. Smaller zip sizes flash without any problems.
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Please provide a logcat of the FC.

There's no set max size but it might have timed-out or any other bug basically, hard to say without more info.
[Android Software/Hacking General [Developers Only]] akshay7394:
Andro, will you be using the Play Store's new alpha features? For either this or PmR?
[Android Software/Hacking General [Developers Only]] Androguide.fr:
I don't know, probably. I'm working a new project which made me put all my other stuff on hold, I'm kinda fed-up with PmR, too...

This project is APKreator, it will be an interactive Android development learning/teaching platform, both on the web and on Android.

If you ever used http://codecademy.com, it's kinda using the same concept of exercises with a built-in code editor so the user doesn't just read but practices as well, which I believe is very important for learning, and missing from current Android tutorials.

That way, the user doesn't just get pass things he doesn't understand or drops because it seems too complicated to setup the required tools, or doesn't feel involved enough, doesn't get any feedback on the code he writes etc...

I'm hard at work on this, and the app will definitely take advantage of the new Beta roll-outs feature of the PlayStore before it's released.

If you want to check-out a very early, under-construction version of the website, it's http://apkreator.com

I also posted some screenshots of the app a little while ago, but it has evolved quite a lot since, but to give you an idea : https://plus.google.com/116104837766524942436/posts/gf6Gp9XwvPq
[Android Software/Hacking General [Developers Only]] STAticKY:
Nice job man. Can wait for a polished release :) gonna help a lot of eager power users and wannabe devs get even more out of android. Very nice indeed

TP.
[Android Software/Hacking General [Developers Only]] akshay7394:
That sounds pretty awesome :D I can understand being fed up with pmr :P can't be fun listening to so many people complain about silly things :P /ot
[Android Software/Hacking General [Developers Only]] nitephlight:
does not work on stock rooted bionic on JB... then again most things don't work on motorola phones. :confused:
[Android Software/Hacking General [Developers Only]] akshay7394:
Okay so I'm confused, and I've tried searching but it seems to have worked for others but I seem to be doing something wrong:

How do I flash kernels if they're in the boot.img format? If I select the kernel (which I renamed to boot.img) it says "This file is not a zip!"

What am I doing wrong? :s
[Android Software/Hacking General [Developers Only]] Androguide.fr:
You need to have the boot.img inside a signed zip with an updater-script. Basically, download the recovery flashable version of the kernel you want and select this zip in FlashGordon.

What I meant is that you need to look inside the zip to see if the kernel is a boot.img and not a zImage or ramdisk
[Android Software/Hacking General [Developers Only]] akshay7394:
Okay that makes sense, but are all boot.img kernels recovery flashable? The kernel I want to use us only provided as a boot.img so is there a way I could just put it in a zip file and use it?
[Android Software/Hacking General [Developers Only]] spiderio:
I have to try this... it sound so easy to flash any zip...

I will bookmark this thread and see how it goes
[Android Software/Hacking General [Developers Only]] gavster26:
Request

Hi bro would it be ok for me to include this as a system app in a rom please
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Yeah, of course, no problem man, it's GPL'd ;)

Just try to add a little credit line in your thread and to tell your users that they use this at their own risks, please.
[Android Software/Hacking General [Developers Only]] gavster26:
Have done bro and thank you :D
[Android Software/Hacking General [Developers Only]] h311sdr0id:
Looking Good Brother ! ! !

If there is anything I can do to help, let me know Brother. This project looks amazing. If you need any more space or if you need me to work on the VPS at all, just give me a holler. I just finished building a few custom Machines for some clients, and would really like to do some maintenance on yours whenever you get a chance.

I think we need to setup a buildbox for you. That would make it a whole lot easier.

Again, let me know of you need ANYTHING...

-h311sdr0id

…
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Thanks a lot bro :good:

I'll hit you up on gtalk one of these days, I got another project I'd like to talk with you about which I wanna host on the VPS, but I got some security concerns as it involves letting users build code on the server.

Always hard to catch each other because of the time difference though :(
[Android Software/Hacking General [Developers Only]] kingofnice:
Honestly, I like the UI!
[Android Software/Hacking General [Developers Only]] akshay.mehta9:
Can i use this app to flash a custom kernal?

I'm using this app to flash some zip files and it's works well,but I'm not sure with a kernal because my bootloader is locked.
[Android Software/Hacking General [Developers Only]] thepurepunjabi:
if i have cwm installed camn i use this to falsh my zips ???
[Android Software/Hacking General [Developers Only]] eushaun99:
This app is for people who don't have custom recovery. If you have cwm, you can use this as well if you are too lazy to boot into recovery.
[Android Software/Hacking General [Developers Only]] smartAgent47:
Is this compulsory that the device should be rooted for flashing any zip without having recovery ???

Please reply urgent !!!!
[Android Software/Hacking General [Developers Only]] Androguide.fr:
It all depends on the zip you flash, if it doesn't modify root-restricted partitions such as /data or /system (i.e if your zip is not a kernel, not an app, not a rom, not a set of init.d scripts, not a root exploit etc...), basically if your zip just copies stuff to the sdcard(s) the app won't require root, but in any other case it does.

Short answer: yes.

PS: please avoid quoting OPs, especially when they're that long, with screenshots etc... If you don't mind, please throw CODE tags around your quote to make it of acceptable size for the future readers of the thread.
[Android Software/Hacking General [Developers Only]] nudou350:
Will this work with crossbreeder zip? I've a razr D1 rooted!
[Android Software/Hacking General [Developers Only]] contrinsan:
Looks great but i suppose this doesn't work with every device or with every mod ?

Or maybe i need to do something else besides installing the apk file ?

Did a test with some lockscreenmods on s4 i9505

renamed filenames to blood.zip etc to make it short, chose it with built in file explorer.

Everything looks good, it is extracting, flashing, did dalvik cache clean, i pressed the notification to restart but after rebooting the modded lockscreen flare didn't show up.

I also tried to apply this framework animations but no changes after restart.

Then i tested with my custom recovery (philz touch for i9505) and flashed without a problem.
[Android Software/Hacking General [Developers Only]] nudou350:
Well.. Tried crossbreeder and no success.. Everything goes fine.. But the script does not work
[Android Software/Hacking General [Developers Only]] montecristo1:
Just reporting that 1.2 worked like a charm. I was having issues with a custom recovery kernel so I flash it back to OEM, rooted of course. I needed to flash a zip to get my mms working. Verson 1.1 gave me an a zip error but 1.2 went through. My pic messaging working. Thanks.
[Android Software/Hacking General [Developers Only]] joshuadjohnson22:
This app has really helped the AT&T S4 active community! I'm excited to see how this app will progress... I wonder if there would be a way to have it boot to something else to flash the roms?
[Android Software/Hacking General [Developers Only]] mircea89fzr:
deleted
[Android Software/Hacking General [Developers Only]] joshuadjohnson22:
And just to add to this, there is a hefty bounty going out to a work around to flashing roms. Verizon's s4 has around 3k for a work around and the AT&T s4 and active has close to 1k. If there is a way to flash in the app and boot to something else to finished the flash that could be the future of android modding. AT&T and Verizon have decided to lock all bootloaders down(for now and in the future) , this may be our only hope

Keep up the good work
[Android Software/Hacking General [Developers Only]] Androguide.fr:
That could be worth looking into, definitely.

Theoretically it might be possible to dump the boot & system partitions to images, format them, mount them, chroot to them and let the Rom's updater-script install everything on the actual partitions (after having been translated to bash by Flash Gordon).

Or the other way around, mounting dumps of the current partitions and installing the package on the actual partitions while our dumps are mounted.

I'm also thinking that maybe the on-device odexing script that was featured on the portal a few days ago could be helpful in the process, by getting rid of the dalvik-cache we can probably avoid more reboot-triggering fc's out of the box.

I don't own any of these devices though so I can't really investigate that, but if one of you guys have a way of restoring back to stock and are willing to give a try at solving this problem together, we can probably try to set something up via google talk or ssh.

If you're brave, you can try the following while grabbing a logcat:

Odex your Rom using this script: http://xdaforums.com/showthread.php?p=44228706 (Flashing the zip with flash gordon, then running the odexing from terminal)

(If your Rom is already odexed you can obviously skip this step)

Download a Rom you want to flash (as light a Rom as possible)

Flash it with FlashGordon (if it doesn't accept the zip, tell me I'll provide an "unsecure" version of the app)

Cross your fingers and grab a logcat
[Android Software/Hacking General [Developers Only]] joshuadjohnson22:
:) We do have the ability to ODIN back to stock just as long as we can get into download mode. Let us know what you need from us
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Well, to start off please try the instructions I added in the previous post (the kamikaze way^^), it could help seeing at which point the flashing fails in order to try and work around it.

Are there CM builds even though you guys can't flash them?

Please post the /META-INF/com/google/android/updater-script from the lightest Rom you can find before trying so I can make a quick check of things I know would fail with the current implementation.
[Android Software/Hacking General [Developers Only]] joshuadjohnson22:
Ok, let me find a MF1 user willing to try that out. Our ODIN restore brings us to a pre-release MF1 firmware with no way to get back to the latest. So I have asked one of the users stranded to take the plunge, Thanks for your help!!
[Android Software/Hacking General [Developers Only]] thatbigmoose:
We definitely couldn't pull off CM.. We cannot deviate from the stock kernel or the sig check would fail. Might sound weird but I was thinking what you were but by symlinking all the folders in the /system/ partition onto somewhere in /sdcard/ much like how some older devices symlink /system/app/ onto /sdcard/ so we could flash critical files to the real /system/ partition without the device crashing. Probably wouldn't work but it was something I came up with in my head.

Anyway a good ROM to test with might be the leaked 4.2.3 IIRC Google Edition ROM for the S4 because I remember reading it ran on any stock TouchWiz kernel so we could most likely still boot it.

Edit:just read what you said about using chroot to mount a new kernel so maybe we could boot non-stock kernels, but wouldn't we be running a kernel on top of a kernel then? I'm not that familiar with chroot but I know it's how we can get Ubuntu and other Linux distros to boot on our devices.
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Yeah that's exactly my though too, if we can mount & symlink a "clean" system partition to, say, /data/local/mnt while we extract the rom to the real /system partition and change the mountpoints back at next boot it might work.

Although I don't know, it seems a bit too simple...^^ this would kinda be a way to dual-boot on any device easily so I'd guess someone already had this idea.

If you're willing to try I can help you getting a proper bash translation of the updater-script from your Google Play edition rom, I'll manually fill the blanks the app will probably leave, just drop the updater-script here and I'll give you the corresponding script.
[Android Software/Hacking General [Developers Only]] thatbigmoose:
Give me a little, I think I have that GE ROM saved somewhere on my computer. I'll upload the updater-script next time I'm on my computer.

Additionally, hardware-wise we are different from S4 only in that our screen is a TFT LED and the S4's is AMOLED. That's more of a kernel thing though correct?
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Yeah, correct, LCD-panel is handled by the kernel layer AFAIK.

At least AMOLED ones are, that's for sure as we have colors/gamut control on some kernels on i9300, and it doesn't require any libs whatsoever.
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Nice, gimme a moment, I'll run it through Flash Gordon's parser & translator and finish manually.

I guess you already have busybox & toolbox installed and properly symlinked on your current rom, right?
[Android Software/Hacking General [Developers Only]] thatbigmoose:
Busybox yes, toolbox not sure.

Edit: Gonna have to get rid of that kernel flash in the updater script but I can take care of it if you don't
[Android Software/Hacking General [Developers Only]] Androguide.fr:
Yeah, don't worry, I took the kernel flashing out. Here's the script: http://d-h.st/UvU

Please do the following to run it:

Extract the ROM zip in /sdcard/RecoveryEmulator/tmp/

Download the script and put it in the same folder

Clear your running apps

Open Terminal Emulator and type the following while grabbing a logcat on your computer:

su
chmod 755 /sdcard/RecoveryEmulator/tmp/flash_gordon.sh
sh /sdcard/RecoveryEmulator/tmp/flash_gordon.sh > /sdcard/flash_log.txt

It probably won't work and you'll have to ODIN back to stock, but it should give us some interesting infos about what actually fails.

Once it's done please post /sdcard/flash_log.txt along with the logcat (please dump the logcat to a textfile, ie; adb logcat > ~/logcat.txt)

EDIT: to check you have toolbox installed, just verify you have /system/bin/insmod for example.
[Android Software/Hacking General [Developers Only]] thatbigmoose:
busybox mount -o rw,remount -t auto /
busybox mount -o rw,remount -t auto /system
busybox cp -rfp /sdcard/RecoveryEmulator/tmp/system/* /system/
busybox cp -rfp /sdcard/RecoveryEmulator/tmp/data/* /data/

System's just gonna crash, no?

Edit: And I'm not gonna be able to get that flash_log file because as soon as the device crashes I don't have any way of salvaging any files, flashing back to stock does a raw overwrite of all the device's partitions.

---------- Post added at 08:59 PM ---------- Previous post was at 08:08 PM ----------

I don't know how to change mountpoints but something like this would work fine right? Or just wishful thinking?

Posting these because I'm not 100% sure, just want to check that you think they look right. And then if we can get the device to boot by loading /system/ off the internal sd then we're pretty much home free

symlink("/sdcard/test/system/app", "/system/app");
symlink("/sdcard/test/system/bin", "/system/bin");
symlink("/sdcard/test/system/cameradata", "/system/cameradata");
symlink("/sdcard/test/system/csc", "/system/csc");
symlink("/sdcard/test/system/etc", "/system/etc");
symlink("/sdcard/test/system/fonts", "/system/fonts");
symlink("/sdcard/test/system/framework", "/system/framework");
symlink("/sdcard/test/system/lib", "/system/lib");
symlink("/sdcard/test/system/lost+found", "/system/lost+found");
symlink("/sdcard/test/system/media", "/system/media");
symlink("/sdcard/test/system/music", "/system/music");
symlink("/sdcard/test/system/photoreader", "/system/photoreader");
symlink("/sdcard/test/system/preloaddata", "/system/preloaddata");
symlink("/sdcard/test/system/sipdb", "/system/sipdb");
symlink("/sdcard/test/system/tts", "/system/tts");
symlink("/sdcard/test/system/usr", "/system/usr");
symlink("/sdcard/test/system/vendor", "/system/vendor");
symlink("/sdcard/test/system/VODB", "/system/VODB");
symlink("/sdcard/test/system/voicebargeindata", "/system/voicebargeindata");
symlink("/sdcard/test/system/vold", "/system/vold");
symlink("/sdcard/test/system/wakeupdata", "/system/wakeupdata");
symlink("/sdcard/test/system/wallpaper", "/system/wallpaper");
symlink("/sdcard/test/system/xbin", "/system/xbin");
symlink("/sdcard/test/system/build.", "/system/build.");
symlink("/sdcard/test/system/build.prop", "/system/build.prop");
symlink("/sdcard/test/system/csc_contents", "/system/csc_contents");
symlink("/sdcard/test/system/CSCVersion.txt", "/system/CSCVersion.txt");
symlink("/sdcard/test/system/kern_sec_info", "/system/kern_sec_info");
symlink("/sdcard/test/system/SW_Configuration.xml", "/system/SW_Configuration.xml");
[Android Software/Hacking General [Developers Only]] echonc:
Gya tell me what you need me to do i have a Mf1 device that i have to send back to att within 8 days. So i i will try anything