yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] fun_:
I'm not ZT-180 user so I'm sorry if it's already public.

system.img and userdata.img are yaffs but 4KiB page size. tools for HSG X5A images can be used for ZT-180 images.

here is my programs:

sites.google.com/site/naobsd/android-tablet/hsg-x5a
[Android Software/Hacking General [Developers Only]] killerbie:
So this means we can open the ZT-180 img files and make custom roms?
[Android Software/Hacking General [Developers Only]] prscott1:
ROM0827

I went ahead and flashed 0827 rom. "Out of the box" it is much more stable than the previous roms. Not a single fc.

Be aware that if you run RPM's batch file - it will replace settings.apk (this is where most of the changes have been made for this release). If you replace the settings.apk, you will lose the 3g connection options -

I'm going to play around with the set of files required to get gapps on 0827 but keep settings in place. The problem will be the compatibility of the framework... jar files.
[Android Software/Hacking General [Developers Only]] Zap!:
Any word of an accelerometer fix? Auto screen rotation works fine, but in games like PapiJump and Labyrinth, the accelerometer is non-existent.
[Android Software/Hacking General [Developers Only]] ayman07:
which busybox are you using? do u mind sharing. everyone says i need a more robust busybox but where am i suppose to get that?

EDIT:

got it!

install busybox from the market, connect to ur tablet. follow the instructions above:

chmod 777 /system/bin/busybox

chmod 777 /system/bin/toolbox (idk if that works but it worked for me)

then TB will work.
[Android Software/Hacking General [Developers Only]] ronr:
Open VPN?

Has anyone tried to install OpenVPN on this device? I can install the setup APK, but when I run it, the log shows a Segmentation Fault is copying files to the SD card.
[Android Software/Hacking General [Developers Only]] prscott1:
Here is a good one that I use. Just unzip - and you can adb push it.
[Android Software/Hacking General [Developers Only]] Christian Buchner:
Ermm. sorry but this is 1 Gigabit DRAM according to the data sheet.

Two chips therefore make up 256 MB of RAM.

So what's the exact type of flash memory then?

Christian
[Android Software/Hacking General [Developers Only]] prscott1:
You need to:

rm /system/bin/cp

there is a problem with it.

and then

ln -s busybox /system/bin/cp

and try again.

Where did you get the openvpn setup.apk?
[Android Software/Hacking General [Developers Only]] hal_9000:
Any chance to get the tools (with the patches included) compiled as Windows executables?
[Android Software/Hacking General [Developers Only]] prscott1:
If you want to install the gapps experience on rom 0827 using rpm's files, you can replace the /system/app folder with this one and it works great! :)

NOTE: replace the /system/app folder on your pc - before running the RPM batch file.
[Android Software/Hacking General [Developers Only]] patmtp35:
many thanks i have rpm my 0827 so could you post the settings.apk please ?

one more question as i m french i'm ussing a wireless usb azerty keyboard but it works in querty , is there somme thing to do to turn it in azerty ?
[Android Software/Hacking General [Developers Only]] akrova:
hey guys, my pc just die cople days ago

is some way i can flash the 0827 by the micro sd?
[Android Software/Hacking General [Developers Only]] rpmccormick:
Nice. I had already done the same thing in 1.0 which I will release soon (all you did is delete most of the apps that already existed in the FW). The one extra one you kept that I deleted was ApplicationsProvider.apk 18KB... is there any reason you are not sticking with the one included in 0827 as I did?

WARNING: If you reinstall apps backed up with Astro (or almost any other backup) they will not appear in Market or update. Instead, when you open Market for the first time on a new firmware, and you goto Downloads, you will seen all your apps listed. You must install them all before exiting Market, or all your previously installed apps will go away.

The only good way to do backup/restore is with Titanium Backup, which I plan to have working in RPMScript1.0. So far I am not having the luck of others here, even after moving busybox to bin instead of xbin and using 777 instead of 755. Are you guys with working TB using 3.4.4? UPDATE: I just got it working with the busybox posted last page (very strange since it was the exact same file size as mine and still reads as the same version in TB, but hey, it works). Thanks prscott1!

BTW: If you donate $3.99 for TB, it will even automatically restore everything after a fresh install (I have not... but if someone wants to thank me for the script, feel free buy me a key and PM me ;) ).

It seems Market Enabler is still needed to find US-only apps (GMaps, Pandora, etc) and to have the recommendations on Market startup. I have never seen 'comments' in Market which is important. Does anyone have a fix for that?

Most startup managers seem to be no good, but with a lot of apps, you have to wait forever after startup before 'su' starts working and letting 'autokiller' do its thing. Can anyone recommend one (or maybe a way to have 'su' and 'autokiller' load first)? Maybe I need to move 'su' back to system/app instead of data/app (and maybe move autokiller there too). Hummm.

Also, has anyone been able to get AdHoc working to 'AndroidTether' or other reliably? If yes, please post the files (not just the change-log)
[Android Software/Hacking General [Developers Only]] rpmccormick:
Please share how you did this. Many of us have tried using Unyaffs as well as many other programs on the .img files, and nobody has ever had success.
[Android Software/Hacking General [Developers Only]] hal_9000:
Look at post 662.
[Android Software/Hacking General [Developers Only]] rpmccormick:
Awesome! Sounds like we can finally make a ROM!

Would you mind posting a zip of unyaffs.exe and mkyaffs2image.exe (that will run under cigwin)? If you can't, can you please post instructions on how to compile the source along with those patch files? I wish I knew linux better :P
[Android Software/Hacking General [Developers Only]] hal_9000:
Well, I'm not the person who made these patches to allow the packing/unpacking of the ".img" files. In fact a few posts above I asked him/her the same as you, a compiled Windows executable.
[Android Software/Hacking General [Developers Only]] rpmccormick:
Ok, well I have compiled unyaffs before under cigwin, so I guess I will teach myself how to compile it with the patch now.
[Android Software/Hacking General [Developers Only]] hal_9000:
Good luck! Please, upload the compiled tools if you have success. ;)
[Android Software/Hacking General [Developers Only]] rpmccormick:
Well, unyaffs was easy... and it works! Now working on mkyaffs2img.
[Android Software/Hacking General [Developers Only]] hal_9000:
Great! I think WowaWiwa should put both (when ready) in the first post. :)
[Android Software/Hacking General [Developers Only]] merlot:
Hello,

I'm new to android and zt-180. Which are those patches? How to apply them? I have read something about RPM's script, but I haven't found an step by step info.

Thank you
[Android Software/Hacking General [Developers Only]] prscott1:
RPM - great work! I may have overlooked that one apk - I'll remove it too.

I almost had the adhoc working for tether on 0827 - I say almost, because I clicked the airplane mode by mistake and now the airplane icon won't leave my notification bar! but I did have all green bars below the airplane when I did usb tether from my N1 to the apad.

I'm facing the same problem as you with the root apps (even some non-root apps) with f'c'ing on startup.

For now, I just uninstall those apps so I get a clean boot. lol
[Android Software/Hacking General [Developers Only]] rpmccormick:
Attached is 'mkyaffs2image.exe' compiled with 4k/128 instead of 2k/64.

We are still missing something though, because I made a ROM and it won't boot. I used unyaffs-4k on the 0827 system.img, then added my RPM-addon files, then used mkyaffs2img-4k to create a new system.img, and then programmed it via BurnTool.

My system.img was appropriately larger, and under a HEX editor the file-layout of my system.img was very similar to the 0827 system.img. I do not know what is missing.
[Android Software/Hacking General [Developers Only]] rpmccormick:
Wait... I thought we were talking about AdHoc WiFi Tether, not USB Tether. Those are 2 very different things. WiFi seems easier, but USB is more useful to me. Don't we need a "Remote NDIS based Internet Sharing Device" driver for Android? Does one exist?
[Android Software/Hacking General [Developers Only]] hal_9000:
What if you don't add or change anything and then simply repack the just unpacked system.img? That way you could see where the differences are.

EDIT: For example, I can think of symbolic links. How are they extracted to Windows? As real NTFS links or may be as ".lnk" files? Are the patched unyaffs-4k and mkyaffs2img-4k treating it the same way?
[Android Software/Hacking General [Developers Only]] prscott1:
the Adhoc wifi tether has always worked for me - I'm on an N1 running froyo and when I turn on my hotspot - I can connect easily from my pad.

I was talking about making the newly implemented 3g access work on rom0827 - and usb tethering from my n1.
[Android Software/Hacking General [Developers Only]] rpmccormick:
Ok, I unyaffed the 0827 system.img, then reyaffed it with no changes as test.img and compared...

The file is the exact same size, and much of the beginning header is the same (with a few minor diffs, but all the FF FF's and 00 00's line up in the beginning). At 4k there is a bunch of stuff in system that is not in test (see pic), then for most of the file it is a bunch of data, none of which lines up (not too surprising, if one file gets packed in a different order the whole thing is off).
[Android Software/Hacking General [Developers Only]] prscott1:
RPM -

I put superuser back in /system and added these lines to my bat file AFTER the /system files are installed:

adb shell chmod 777 /system/build.prop /system/app/* /system/lib/* /system/framework/* /system/etc/permissions/*

adb shell chown system.system /system/build.prop /system/app/* /system/lib/* /system/framework/* /system/etc/permissions/*

This has helped a lot.
[Android Software/Hacking General [Developers Only]] rpmccormick:
What do you mean it has always worked? Your N1 running froyo appears as a "Infrastructure" AP? Most phones (including my G1 running CM6 froyo) appear as an "Ad-Hoc" AP when using WiFi hotspot. It is a known issue with all Android devices that they won't connect to Ad-Hoc networks. There are hacks for the G1 and other phones involving editing files to hard-code a single Ad-Hoc network (as some have been trying to do here with limited success), but AFAIK no Android device can see all available AdHoc networks like they see real Infra APs (and AFAIK all phones cannot pretend to me an Infra AP, but maybe the N1 can).

As for Wired-USB-Tether, the new 3G modem drivers in 0827 should have nothing to do with that... unless 3G modems are based on NDIS, which would make sense I guess... I just did not know that either.

Good to learn things ;)
[Android Software/Hacking General [Developers Only]] prscott1:
Oh, I see your question. I'm on the pad now using a wifi connected to my nexus one 4g connection (in hotspot mode). It's working great. I'm using speedtest on the pad - i'm getting almost 3mbps down and .8 up.

When I turn on usb tethering on my n1, and connect to the 0827 rom/pad, then I see the usb mount when I do netcfg - so was going to see if I could figure out a workaround. lol - may be here all night trying.

I was trying to fake my n1 into looking like a modem. :rolleyes: hehe

I attached a screenshot of my pad - connected to my n1.

And a screenshot of my n1 wifi hotspot configuration while it is active.
[Android Software/Hacking General [Developers Only]] rpmccormick:
RPMScript v1.0 for ZT-180

Ok everyone, here is RPMScript v1.0 which should have all the issues worked out. EDIT: Of course not. Problems with Root. Download 1.0 and then use the v1.1 .bat file attached to this instead of the one in the zip.

Hopfully this will be the last release and the next one will be a custom "system.img" file instead of a script.

DOWNLOAD: http://www.mediafire.com/file/27n4cwaeqr1xten/RPMScript1.0.zip

You must download RPMScript11.zip and replace the .bat file.

RPMScript11.zip is attached at the bottom of this post.

DIRECTIONS:

STEP 1

------

Follow This Guide to get a Google ID (one from an existing device may not work):

http://www.slatedroid.com/wiki/index.php?title=Fix_Market_For_Slates

Basically you create an Android 1.6 'avd' in the Emulator on 1.6 and copy the system.img file in to the 'avd' folder. Then you run it, click market, setup your Google Account, and exit. Finally you run this command to get your new Google ID:

adb shell sqlite3 /data/data/com.google.android.googleapps/databases/accounts.db "select * from meta";

Make note of your Google ID

STEP 2

------

Flash the 0827 image.

Unzip RPMScript0.8.zip to the folder containing "adb.exe".

Double Click the BAT file ("[adb tools folder]\RPM-addon\RPMScript.bat")

Follow the directions in the new menu.

DOWNLOAD: http://www.mediafire.com/file/27n4cwaeqr1xten/RPMScript1.0.zip

(same as link at top)

You must also download RPMScript11.zip below, and replace the .bat file.

EDIT: Added suggestions from Christian Buchner (untested): RPMScript v1.2

If you get 1.2 from the link above, you don't need 1.1 attached below.
[Android Software/Hacking General [Developers Only]] fun_:
sorry, I used my tools as a archiver (just like tar). mkyaffs2image with my patch generate wrong OOB area. (you are right!)

I found a bug. and I also found proper tools here

android.git.kernel.org/?p=platform/external/yaffs2.git;a=tree;f=yaffs2;hb=HEAD

it seems page/OOB size can be specified by args and OOB area bug was fixed. ;)

android_filesystem_config.h is here

android.git.kernel.org/?p=platform/system/core.git;a=blob;f=include/private/android_filesystem_config.h;hb=HEAD
[Android Software/Hacking General [Developers Only]] fun_:
I just update my patch on my site to use yaffs2 from android.git.

it seems generated yaffs2 image is bit different from original firmware. I don't have a time now. sorry.

you should use mkyaffs2image like as
[Android Software/Hacking General [Developers Only]] <Laharl>:
So im trying to get the android 1.6 and this happens

Downloading SDK Platform Android 1.6, API 4, revision 3

RSA premaster secret error
[Android Software/Hacking General [Developers Only]] <Laharl>:
I now LOVE my Tablet!

So I have had this tablet for 5 days and I wasn't very happy with it at all when ever I played a video all the colors would be off (like watching a 3D red/blue movie without the glasses how the colors are out of place) and my screen would shake horribly when I would try and select an app, and all my computers are Windows Vista so I couldn't reflash it because it wouldn't recognize the tablet so I was getting very upset with it.

{Thank goodness for my mother} I was talking to her on the phone and she said I could borrow her netbook which had XP if I wanted to and today I Flashed it with the latest firmware and I am OVERJOYED at how well this thing works now.

This new firmware made my touch screen improve a million times over what it used to be no more shaky screen and also I can now play my xvid avi files in Movies Gallery and it plays PERFECT, before it would either force close or it would have the colors in the wrong places so video playback is a HUGE improvement now!

The only thing is now I have the Cell phone Antenna icon on my status bar that always shows no service but I will take that over all the problems I had before!

I expect to have some Youtube videos online tomorrow I can't wait to start playing with this tablet again I love it!!!!!
[Android Software/Hacking General [Developers Only]] rpmccormick:
My mkyaffs2image.c was edited with the diff (hard coding 4096, 128).

My mkyaffs2image.exe does not have any of those options.

I tried my mkyaffs2image.exe with the "convert" option which did not produce a working .img file either.

Admin@Desk /cygdrive/d/work/android/zt-180/android
$ ./mkyaffs2img-4k
mkyaffs2image: image building tool for YAFFS2 built Aug 30 2010
usage: mkyaffs2image dir image_file [convert]
dir the directory tree to be converted
image_file the output file to hold the image
'convert' produce a big-endian image from a little-endian machine

Admin@Desk /cygdrive/d/work/android/zt-180/android
$ ./mkyaffs2img-4k -f -c 4096 -s 128 system system.img
mkyaffs2image: image building tool for YAFFS2 built Aug 30 2010
Could not stat -f

EDIT: Sorry, I see you edited your site now. Looking in to it. Thanks.

EDIT2: I don't know what to do with the android_filesystem_config.h... Is there any way you can upload the binary so I don't have to compile it myself?
[Android Software/Hacking General [Developers Only]] fun_:
I can provide NetBSD binary if you really want. I don't have Linux/Cygwin environment.

please do same things you did.

download yaffs2 snapshot from android.git, extract it, apply patch, put android_filesystem_config.h into yaffs2/utils/, then run "make" under yaffs2/utils.

please try first if you really want to use it. if something wrong, please tell me with details. I'll help you.
[Android Software/Hacking General [Developers Only]] rpmccormick:
Your download file is called include_private_android_filesystem_config.h

I renamed it a tried putting it EVERYWHERE

I can't get the android.git version (with #include <private/android_filesystem_config.h>) to compile. I do have it in usr/include/private. I also tried changing that line to "#include android_filesystem_config.h" and putting it in the utils directory, and changing the line to #include <android_filesystem_config.h> and putting it in /usr/include.

EDIT: Nevermind, it was the IF DEF's. I just compiled both versions (small/big endian). I will try them out.

Thanks again for all this linux help.
[Android Software/Hacking General [Developers Only]] fun_:
it isn't my file. it is named "android_filesystem_config.h" in android git repository. I can't imagine what name will be used by your browser at download. but you need to specify "android_filesystem_config.h" for it.

did you apply my patch?

my patch replace <private/android...config.h> with "android...config.h". by using "..." instead of <...>, it will be picked from working directory, i.e. yaffs2/utils/.

compile error you reported is for mkyaffsimage. I don't know why it occurred. this is work around,

make mkyaffs2image

OMG, you changed error report while I'm writing reply!!!

please, please apply my patch!!!!!!!!!

OMG^2 you changed again. good luck.
[Android Software/Hacking General [Developers Only]] rpmccormick:
Sorry, I didn't know you had updated your patch. I got it all working now though.

BTW: How do you apply a patch? I have been doing it manually by reading it and then manually editing mkyaffs2image.c

I think it is convert_endian=0 is correct. It is very close, but the offsets are backwards I think. The middle of system.img is full, but my test0.img it is all FF FF. Then, then end of my test0.img is full, but the end of system.img is all FF FF.

I might try to burn test0.img anyway.
[Android Software/Hacking General [Developers Only]] fun_:
just use "patch" command. but edit by hand is OKay if it works.
[Android Software/Hacking General [Developers Only]] rpmccormick:
I made your edits to yaffs_guts.h too (what does that do?) and recompiled.

When I made the test0.img before I forgot to use all the commandline options.

Now I'm getting this error:

Admin@Desk /cygdrive/d/work/android/zt-180/android
$ ./mkyaffs2img-4k -f -c 4096 -s 128 test system.img
Fixstats (-f) option requested but filesystem is not data or android!

(the "test" folder contains unyaffs 0827 system.img only)

Do I have to un/re yaffs under an android os? I guess I could do it all through adb on the SDCARD. It would be much nicer to do it in cygwin though.
[Android Software/Hacking General [Developers Only]] fun_:
hmm... "-f" might not work on cygwin.

please try without "-f".

if it is easy to do on android, please do it.

----

it seems yaffs2 from yaffs.net + my patch + OOB fix generate more proper image...

I'll upload this patch again. sorry for inconvenience.

EDIT: uploaded. please try both from yaffs.net and from android.git.
[Android Software/Hacking General [Developers Only]] killerbie:
looks like rom development is going fast, can't wait to test the first release :D
[Android Software/Hacking General [Developers Only]] rpmccormick:
Why do you say that? I created one with your newest patch on the yaffs2.net source and it looks close, but no close than the other .img file I made using the android.net version without -f on windows (good in beginning, but data vs. empty blocks (FF FF's) not aligned).

Trying it with the -f via adb would be very hard, but I might do it later. I would have to compile both these tools which means I would have to install gcc and make on Android. My head is spinning.
[Android Software/Hacking General [Developers Only]] fun_:
just my thought but I can't say which is better because I can't test on ZT-180. they are still bit different from original firmware, so they may be wrong;)
[Android Software/Hacking General [Developers Only]] fun_:
I found why "-f" is rejected. please use "system" as a name for directory. "-f" checks path and fix permission.
[Android Software/Hacking General [Developers Only]] fun_:
I made 2 images from empty "system" directory and dumped them.

1. yaffs.net

$ ./mkyaffs2image system test1.img
mkyaffs2image: image building tool for YAFFS2 built Aug 31 2010
Processing directory system into image file test1.img
Operation complete.
0 objects in 1 directories
1 NAND pages
$ hexdump -C test1.img
00000000 03 00 00 00 01 00 00 00 ff ff 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 00 00 00 00 00 00 00 00 00 ff ff ff ed 41 00 00 |.............A..|
00000110 e8 03 00 00 e8 03 00 00 c5 d8 7c 4c c5 d8 7c 4c |..........|L..|L|
00000120 c5 d8 7c 4c ff ff ff ff ff ff ff ff ff ff ff ff |..|L............|
00000130 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000001c0 ff ff ff ff ff ff ff ff ff ff ff ff 2b 7f df 03 |............+...|
000001d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00001000 00 10 00 00 01 00 00 00 00 00 00 00 ff ff 00 00 |................|
00001010 30 ff ff ff 05 00 00 00 05 00 00 00 ff ff ff ff |0...............|
00001020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00001080

2. android.git

$ ./mkyaffs2image -f -c 4096 -s 128 system test2.img
$ hexdump -C test2.img
00000000 03 00 00 00 01 00 00 00 ff ff 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100 00 00 00 00 00 00 00 00 00 ff ff ff ed 41 00 00 |.............A..|
00000110 00 00 00 00 00 00 00 00 d2 d8 7c 4c c5 d8 7c 4c |..........|L..|L|
00000120 c5 d8 7c 4c ff ff ff ff ff ff ff ff ff ff ff ff |..|L............|
00000130 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000001c0 ff ff ff ff ff ff ff ff ff ff ff ff 2b 7f df 03 |............+...|
000001d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00001000 00 10 00 00 01 00 00 00 00 00 00 00 ff ff 00 00 |................|
00001010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00001080

0x110-0x117 is uid/gid. "-f" replaces it with 0 in test2.img.

0x1cc-0x1cf is "00 00 00 00" in original firmware.

0x1010-0x101b has some values in test1.img and original firmware.
[Android Software/Hacking General [Developers Only]] Christian Buchner:
I'd say burn both images and see if they boot.
[Android Software/Hacking General [Developers Only]] Zorflieg:
"What could possibly go wrong?" - Mayor of Wrongtown