Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "sdcard"
I flashed TWRP in my phone and it didn't boot anymore. I didn't have any image of any operating system in my sdcard and my pc hasn't a sd card slot.
So I started thinking, I googled for some solution, I tried the official tools, but nothing worked. So I started writing an adb script able to download the image from the server and install it in my phone.
While I was doing it I was also explaining my troubles to my no-tech friend. She's not confident with computers, she's able only to turn the pc on and go to Facebook.
She told me "why don't you put your sd card in another phone and download the operating system from it?"
She literally saved my day.
Sometimes we are so busy with our geek things and we forget trivial solutions4
Windows: Replace HDD with higher capacity.
MacBook Air: Start using SD card slot as external storage.10
My boss needed me to run a quick PoC a Raspberry Pi (3B+) for him. Don't worry about imaging the SDC, he says. He will do it, he says.
I guess he had an old Raspbian image file sitting around in his downloads folder or something. Cause this this is seriously out of date.
`sudo apt-get update && sudo apt-get upgrade -y`
168 packages need to be updated, need to fetch 600MB in archives.
Oh, look at that. It's not Lite, its the full version. So I gotta either sit here and purge all the unnecessary packages, or just wait as Wolfram updates.
So I watch some youtube, still updating.
I wash the dishes, still updating.
I take a coffee break, still updating.
Text the fiance, still upgrading.
Yes, even as I post this, it's still upgrading.
All the packages are downloaded at least, but they're still installing. And I'll probably need to reboot after since there are firmware/udev updates and my PoC requires USB + GPIO pins.
At this point, it would have been faster to just re-image the card.
That moment when you clean the cache on android phone with 4GB every time you want to download a new app, even if you have 32GB sdcard
ouuu yeah today arrives my 16Gb sdcard put it in my sdcard work and now PiBook the hardest thing with shitty display from ebay it will be ok but the shity seller send it damaged i get 1/4 refund for not working thick black line ? it has 5 mm shit next mount will get money and i want to invest it to bmx but no i need to buy some old screen from somebody ahhhh bot ok calm down haxk20 its ok you can do it from that display. Ok but when i will buy Bmx and then nothing to invest in i will need to buy a new display fot Pibook for now it will be 7 inch PiBook
Thanks for listening guys2
Porting 8.1 to old device is really pain but thats nothing compared to whats to come.
Google annouced Project Treble and it does that vendor shit is on partition and init files are edited to make them load. Then you can run GSI (Generic System Image). When it was released all developers said that its impossible to bring support for it unofficialy. Then some guys on XDA ported it to Xiaomi phone. Great they proved almost entire XDA wrong. Great. Then few phones did the same. Amazing. Now almost any phone with good dev can be trebelized. Great. Well the device needs 400MB+ partition that is unused so that we can add vendor files there. Well its issue on my phone since i dont have that big unused partition. FUCK. Well i have 11.1GB Virtual SDcard partition. Hmmmm maybe i can resize that partition and create new partition of size 500MB to make it as vendor. OK great. Once thats solved then just copy them and done. WRONGGGGGGGGGGGGG. Its not that easy. First you need to make a script that places all device releated shit into vendor. OK thats easy. Then comes the hard part. Those vendor files have no fucking clue they are in not in system folder. So they start loading shit and ofcourse they will fail if they are not in system. Well most users think we are done thats its over. Its not. HEX editing comes to the rescue. You edit every single blob to make it compatible with vendor partition. OK after that hell pain you are almost done. Just edit init files and try GSI. It will probably fail to boot. Now you search logs for missing crap and slowly add that until it boots.
So this is ahead of me since i dont have 8.1 support yet. But once its done then im coming for you treble. Ohhhhhh how cool would it be to run android P on Xperia P ?
Sure you can skip treble porting but its better if you do it since it makes porting new android version soooooooo much easier.11
In fact I'm a sinful dev, so that I can't easily decide which one is worst. From indenting with tabs, or using nano instead of vim/emacs, to hardcoding database credentials on server, to many hacks and workarounds I use as actual "fixes" when the deadline is upon me and I've tried all I could. But it always led only to my own regret. For instance, my latest sin was that I prefered Debian over Arch and used proprietary graphic drivers to speed up my new setup. But ended up with a curse from St. Ignucius. (check my last rant)
But my worst sin probably goes to when I was "printf-debugging" some issue for a GSM controller on a raspberry pi. I forgot to remove one little print line and deployed the new "fixed" version. I didn't follow that project after that for like a month or so, when the client posted back the device and said that "it just doesn't work anymore". It seemed that raspbian didn't boot beacause the sd card was curroptted. I dd'ed through the card and I noticed that there are billions of lines of "DEBUG:: reading stream from 192.some.shitty.ip", took almost all over the 32G sdcard. Just as I suddenly remembered the cursed line I just added a month ago, I declared the sd card dead with no hesitation, dunce-commented the line (so the history would remember), implemented a time out for the thread containing it, setup a journald unit for my service and removed the redirection of process output to a log file, found a new sd card and installed everything again, and finally posted back the new "fix" to the client.
Moral: Never comfort yourself for the sins you have commited in the past kids, they certainly will come back to you. And also not to do any io especially write to a file on an SD card with ext fs, in a potentially infinite loop with no timeout.
P.S: I'd posted my last rant just before the new week rant last nigh. I really liked the St. Ignucius meme so decided to create a new one. He's very adorable :)1
I just learned that you can use Android Device Monitor in Android Studio to take screenshots.
Until today I was using adb screencap -p /sdcard/filename, totally forgetting the filename, go through all the commands and see what fucking file name I used and do an adb pull. It was a lot of fucking work.1
Oh god where do I start!?
In my current role I've had horrific experiences with management and higher ups.
The first time I knew it would be a problem: I was on a Java project that was due to go live within the month. The devs and PM on the project were all due to move on at the end. I was sitting next to the PM, and overheard him saying "we'll implement [important key feature] in hypercare"... I blew my top at him, then had my managers come and see if I was OK.
That particular project overran with me and the permanent devs having to implement the core features of the app for 6mo after everyone else had left.
I've had to be the bearer of bad news a lot.
I work now and then with the CTO, my worst with her:
We had implemented a prototype for the CEO of a sister company, he was chuffed with it. She said something like "why is it not on brand" - there was no brand, so I winged it and used a common design pattern that the CEO had suggested he would like with the sister company's colours and logo. The CTO said something like "the problem is we have wilful amateurs designing..." wilful amateurs. Having worked in web design since I was 12 I'm better than a wilful amateur, that one cut deep.
I've had loads with PMs recently, they basically go:
PM: we need this obscure set up.
Me & team: why not use common sense set up.
PM: I don't care, just do obscure set up.
The most recent was they wanted £250k infrastructure for something that was being done on an AWS TC2.small.
Also recently, and in another direction:
PM: we want this mobile app deploying to our internal MDM.
Us: we don't know what the hell it is, what is it!?
PM: it's [megacorp]'s survey filler app that adds survey results into their core cloud platform
Us: fair enough, we don't like writing form fillers, let us have a look at it.
*queue MITM plain text login, private company data being stored in plain text at /sdcard/ on android.
Us: really sorry guys, this is in no way secure.
Pm: *in a huff now because I took a dump on his doorstep*
I'll think of more when I can.
Editing rants i wrote more than five minutes past.
Edited on my Huawei P8 mini lite with dual sim slot, golden color with 32gb sdcard.4
Anyone interested in the new Asus ROG phone? It looks super thuggish, and is being marketed as a "gaming phone." I think it looks neat, but 6" is way too big for me, there's no sdcard, and no LTE bands have been listed yet.
But it comes with a really cool docking station, which to me, makes it an ideal parsec rig.
What do you think?6
Was trying to dual boot my laptop with manjaro and windows so I transfered my isos to a USB so that I can image the USB on my desktop without loseing all the isos Well now the fucking desktop won't even post so I grabed my older desktop which doesn't have a hardrive and I can't find any of usbs so I'm booting from a sdcard in a USB multi reader2
what is wrong with android storage access hierarchy?All i want to do is to make a file explorer app which could show user a list of all the files on their device and memory card(if available), but its been days and i cannot find a proper way for that.
I checked all the Environment class methods and context.getFileDir()/other methods of ContextCompat , but they either point to emulated storage or the app's folder, but not the sd card. I have scratched my head and pulled all my hairs out researching a lot deep into this area, but found nothing. The only thing that works sometime is the hardcoded paths( eg new File("/sdcard") ) , but that looks like a terrible hack and i know its not good.
I have also read briefly about Storage Access Framework, but i don't think that's what I want. From what i know, SAF works in the following manner : user opens my app>>clicks on a button>>my app fires an intent to SAF>> SAF opens its own UI>>user selects 1 or multiple file>> and my app recieves those file uris. THAT'S A FILE PICKER, AND I DON'T WANT THAT.
I want the user to see a list of his files in my app only. Because if not, then what's the point of my app with the title "File explorer"?7