Debian Sid 64bit and adb push

Took me only couple of days after rooting and already I was craving for a mod. Decided to start restrainedly though, and downloaded Cyanogenmod (rather lean, no bloat, good tutorials, and a lot of phones supported).
... And bricked my S3 when trying to flash Cyanogen from ext-sdcard. Means, I suddenly had a phone without system (which I wiped as per instructions) AND not-functioning update zips and also, a restore nandroid with 'error - failed'.

/ Participants: Debian Sid, Galaxy S3 I9300, rooted with: Clockworkmod Recovery, Clockworks' superuser/
## What gives?
The symptoms and happenings:
I had (when I rooted) copied superuser and some jpg-s to sdcard with ordinary file manager. And I had no perceivable problems... So I did the same again - copied and to sdcard via file manager.

1. Copying went super-fast, like - poof! ... err, what ... let's see:
-- From CWM-recovery - 'install from zip' - and error, and failed.
I tried (after copying whole sdcard to PC) formatting the sdcard in various ways and copying then stuff back to sdcard:
1,5 Gigs in 5 seconds! Bloody hell, quantum computing! Checked md5-s - and incredibly, they were correct...?... But the usage showed approx 300 Megs of written data in sdacrd... shit this quantum.

Let's go for correct/adviced adb route, then:
2. I installed android-tools-adb from Debian REPO. After playing around with sudo and no-sudo, and after adding file /etc/udev/rules.d/51-android.rules with content:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
-- idVendor number comes when you 'lsusb' and pick your probable sdcard device from output - and it's the first half of ID-number.
I got 'pushing' working ... errr, NO - it took time alright, and gave happy stats - BUT, there appeared NOTHING onto sdcard. Shit and hell...

3. So I thought that maybe Debians' adb is a bit oldish for a newish Android 4.3.1
Downloaded adt-pack - 64bit ! - from dev page, unpacked and tried to run nice new exec 'adb'. What I got was 'No such file or directory'. No error messages. Googled and googled and...:

4. Installed missing 32bit libraries. Yes, 32bit! (Shit and hell and MS!)
sudo apt-get install libc6-i386
sudo apt-get install libncurses5:i386
sudo apt-get install libstdc++6:i386

sudo adb start-server  # and for stop 'sudo adb kill-server'
(sudo) adb devices  # because I am already paranoid with all adb, and add sudo to adb-farting too...
sudo adb remount  # IF you have suspicion that sdcard is NOT -rw mounted.
sudo adb shell  # navigate to your sdcard, keep an eye on it with 'ls -la', to be sure.

Then - holy moment - I did it like that (command as long and precise as possible. Paranoid, I said)
sudo adb push /storage/sdcard1/
I got 'failed' and 'no permission'... fortunately I had shelled before - 'ls' showed - yes, there is a file! I decided to proceed and see what happens - I copied all files and:

## Phone-side,
(Check that /system and /sdcard are still mounted),
'install from zip'
AND, incredibly, it installed both - Cyanogenmod and GApps.
Unplug cable, unmount /system and /sdcard, reboot.
2 min wait looking at spinning Cyanogen-critter (high stroke-risk!)
and welcome to Cyanogen...
The conclusion: 64bit (adb) + 64bit (debian) should equal 64bit (whatever), and IF there is some third player to take to account, then bloody, this 32bit dependency should be THE required dependency. *&^^&%$%$#%#$.

No comments: