ASUS – rooting MeMO Pad 7 (ME572C)

Rooting device ASUS MeMO Pad 7

Some information [MeMOPad] ME572C of

Talk about the boring part:

Intel Z3560 / Z3580’s CPU, boot.img / fastboot.img / recovery.img of HEAD_PADDING back UNKNOWN_SIZE is 728 bytes, but BOOTSTUBSTACK_SIZE is 8192 bytes.
RootZenFone change it to use, and then release a small update late.
Inside sideload recovery is bad, adb port can not open, when to get there to do a software update or not repaired, guess should not want people to use it? fastboot there SD Download, it seems the future of factory image will be .raw format.
The more interesting part:

fastboot there is a small back door, can be used to do the root of the application:

fastboot oem mount
The first instruction is to mount partitions on the phone, will be mounted at / mnt / data folder, so I’m going to mount the system is ext4 fastboot oem Mount system , that is, you want to mount userdata fastboot oem mount data ext4 can.

fastboot flash The second instruction is to update the information on the phone route, originally only update existing files , but here I do not know why is modified to replace the existing file or upload , it is very interesting, root application ready. Because it is 4.4 and there is open SELinux, so the best way to modify the existing shell file will be executed, when it related to root after the brush into the program to reboot automatically go into.

The idea is simple:

fastboot oem Mount system ext4
fastboot Flash / mnt / system / xbin / su su
Flash /mnt/system/etc/ fastboot
fastboot Flash /mnt/system/Superuser.apk Superuser.apk
Then find a .sh file can be used to modify the plug plug back in the boot judgment if no /system/etc/.installed_su_daemon run the installation program, produced /system/bin/.ext/ , / system / bin /. ext / su , / system / xbin / sugote , / system / xbin / sugote-mksh , / system / xbin / daemonsu …

Windows 10 opgradering – Nej tak

Afinstaller Windows 10 opdaterings app:

Windows 8:

  • Tast Windows + X
  • Klik Kommandoprompt (administrator)
  • I kommando-vindue indtast denne kommando (afslut med Enter):
    wusa /uninstall /kb:3035583
  • Bekræft afinstallering og genstart når du bliver bedt om det.

Windows 7:

  • Klik Start, tast cmd og derefter højre-klik med musen og klik Kør som administrator.
  • I kommando-vindue indtast denne kommando (afslut med Enter):
    wusa /uninstall /kb:3035583
  • Derefter (afslut med Enter):
    wusa /uninstall /kb:2952664
  • Bekræft afinstallering og genstart når du bliver bedt om det.

Hvad nu?

Jeg kan varmt anbefale Open Source. Efter mit ophør på arbejdsmarkedet har jeg endelig fundet kræfter til at sætte mig ind i Linux.

Det er meget bedre. Du vil måske læse nogle af mine opslag om installation af Linux

Setting up a Magento VM (maintenance purpose)

A client recently asked me to move their Magento to another host. A problem arise since the new host do not provide shell access thus maintaining Magento patches became an issue.

I found and forked this from
Credit where credit is due.

Grab the VMDK from here
  • Convert to a qcow2 image

    qemu-img convert -f vmdk -O qcow2 bitnami-magento- magento.qcow2

  • Create a vm and set that is the hard disk image

  • Change all interfaces to virtio 14.04 has paravirtual drivers already installed so is good to go. Why ? Because it will speed up slow as Magento
  • Create a bridge
  • Follow the wiki

  • Add your interfaces as appropriate e.g

    Description=”Example Bridge connection”
    BindsToInterfaces=(eth0 eth1 tap0 enp2s0)

  • Start it and enable it at boot

    sudo netctl start bridge
    sudo netctl enable bridge

  • Change the Nic to use the new bridge (br0) as the Network source

  • Start the VM
  • Configure whatever you like on your vm
    you could use port forwarding, port triggering, dmz, vpn, ssh etc…

As I don’t really care about this little vm (its just for dev purposes) I threw it in the DMZ zone (make sure it has a static IP – I just did a dhcp reservation and set the mac of the vnic)

  • Adding a DNS A record so you don’t have to remember the ip
    log in to your dns registrar (look up terminology) – I use cloudflare so I just added it in there for this blog as

  • Modify your vm
    in /opt/bitnami/apps/magento/conf/htaccess.conf php_value memory_limit 512M

  • Update Apache2 on your vm
    [text] #



DocumentRoot “/opt/bitnami/apps/magento/htdocs”


Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”

DocumentRoot “/opt/bitnami/apps/magento/htdocs”
Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”




DocumentRoot “/opt/bitnami/apps/magento/htdocs”

SSLEngine on

SSLCertificateFile “/opt/bitnami/apps/magento/conf/certs/server.crt”

SSLCertificateKeyFile “/opt/bitnami/apps/magento/conf/certs/server.key”


Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”


DocumentRoot “/opt/bitnami/apps/magento/htdocs”
SSLEngine on
SSLCertificateFile “/opt/bitnami/apps/magento/conf/certs/server.crt”
SSLCertificateKeyFile “/opt/bitnami/apps/magento/conf/certs/server.key”

Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”
[/text] OR
[text] ServerName
DocumentRoot “/opt/bitnami/apps/magento/htdocs”
Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”




DocumentRoot “/opt/bitnami/apps/magento/htdocs”

SSLEngine on

SSLCertificateFile “/opt/bitnami/apps/magento/conf/certs/server.crt”

SSLCertificateKeyFile “/opt/bitnami/apps/magento/conf/certs/server.key”


Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”

DocumentRoot “/opt/bitnami/apps/magento/htdocs”
SSLEngine on
SSLCertificateFile “/opt/bitnami/apps/magento/conf/certs/server.crt”
SSLCertificateKeyFile “/opt/bitnami/apps/magento/conf/certs/server.key”

Include “/opt/bitnami/apps/magento/conf/httpd-app.conf”

nano /opt/bitnami/apps/magento/conf/htaccess.conf

at the bottom in the directories node

[text] SetEnvIf Host
SetEnvIf Host MAGE_RUN_TYPE=website
SetEnvIf Host ^
SetEnvIf Host ^ MAGE_RUN_TYPE=website
[/text] Now uncomment the following file in /opt/bitnami/apps/magento/conf/htaccess.conf

you can put here your magento root folder

path relative to web root

RewriteBase /magento/
[/text] Restart apache in your vm

sudo /opt/bitnami/ restart apache


Replace a String in Multiple Files

I recently had to search a huge amount of files (Magento webshop) and replace an url. I did a search an found this.

Credit where credit is due
Forked from

I recently had to replace every occurrence of a certain word / string in a ton of files spanning multiple directories, and this is the quickest way I’ve found to do it. It uses grep to search for a certain word and if it find its it runs sed to replace the strings you want. Note: This will not work on windows systems
Basic Format

grep -rl matchstring somedir/ | xargs sed -i ‘s/string1/string2/g’

Note: The forward slash ‘/’ delimiter in the sed argument could also be a different delimiter (such as the pipe ‘|’ character). The pipe delimiter might be useful when searching through a lot of html files if you didn’t want to escape the forward slash, for instance.
matchstring is the string you want to match, e.g., “football” string1 would ideally be the same string as matchstring, as the matchstring in the grep command will pipe only files with matchstring in them to sed. string2 is the string that replace string1. There may be times when you want to use grep to find only files that have some matchstring and then replace on a different string in the file than matchstring. For example, maybe you have a lot of files and only want to only replace on files that have the matchstring of ‘phonenumber’ in them, and then replace ‘555-5555’ with ‘555-1337’. Not that great of an example (you could just search files for that phone number instead of the string ‘phonenumber’), but your imagination is probably better than mine.

grep -rl ‘windows’ ./ | xargs sed -i ‘s/windows/linux/g’

This will search for the string ‘windows’ in all files relative to the current directory and replace ‘windows’ with ‘linux’ for each occurrence of the string in each file.

Magento development instance

I had to help a customer setting up a local instance of their Magento webshop.

Credit where credit is due.
Forked from

When the production site is in a state that is ready to copy, here are the steps to take:

  1. Decide on the location for the development instance files.  In this case, we have a separate domain,, and a subdirectory for each test instance.
    [bash] cd /home/mytestserver/public_html/
    mkdir newtestsite
  2. Copy the production server Magento files to the new test server subdirectory.
    [bash] cp -r /home/myprodserver/public_html/* /home/mytestserver/public_html/newtestsite/
    cp /home/myprodserver/public_html/.htaccess /home/mytestserver/public_html/newtestsite/
  3. Create a new empty database on the testserver.
  4. Create a data dump from the production database. The mySQL command is noted below. Replace the all caps items with your information.
    [bash]mysqldump -h DBHOST -u DBUSER -pDBPASS DBNAME > /home/backup/data.sql[/bash]
  5. Import the data dump previously created into the empty database on the test server. Replace the all caps items with the credentials for your new test server database.
    [bash]mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < /home/backup/data.sql[/bash]
  6. Next you’ll need to make some edits. In the test database, go to the core_config_data table and change the values of web/unsecure/base_url and web/secure/base_url to the test server url. E.g. If you do not use an SSL certificate on the development servers, then the value for the unsecure and secure urls are the same. You can make the edits using phpMyAdmin. Below is example SQL for the updates.
    [sql]UPDATE core_config_data SET value="" WHERE path=’web/secure/base_url’;
    UPDATE core_config_data SET value="" WHERE path=’web/unsecure/base_url’;[/sql]
  7. Clear cache files that were copied over from the production site.
    [bash]cd /home/mytestserver/public_html/newtestsite
    rm -rf var/*[/bash]
  8. Edit the local.xml file (app/etc/local.xml). Change the database values to point to the new test database host, database name, user, and password.  If you are using a php cache such as apc, also remove or comment out the lines that use it. It is preferable not to have caching turned on in a development environment so all changes are reflected immediately.
  9. You should now be able to navigate to the new test instance’s frontend and backend.
  10. Go to the backend to make some further changes to the settings (e.g.  The login is the same as the production instance. Below are some of the items you may want to set differently for the development version of the site.
    • Turn on the store demo notice.  System > Configuration > Design > HTML Head > Display Demo Store Notice.
    • Change email addresses used.  For testing, you probably want emails to go to you or other developer, rather than the store owner.
      System > Configuration > Store Email Addresses and Sales Emails.
    • Turn off production payment methods.  For example, you may want to either disable Paypal entirely, or put it in Sandbox mode.  Likewise, you may want to turn on Check / Money Order, or other quick and easy payment method for testing order functionality.
    • Turn off SSL.
      System > Configuration > General > Web > Secure > Use Secure URLs in Frontend.
    • Turn off Google Analytics. 
      System > Configuration > Google API > Google Analytics.
    • Turn off Javascript file merging. 
      System > Configuration > Advanced > Developer > Javascript Settings.
    • Also turn off CSS file merging if it was used.
      System > Configuration > Advanced > Developer >
    • Turn off Caching. 
      System > Cache > Select All, then Disable.  Also Flush Javascript/CSS Cache.
    • Rebuild indices. 
      System > Index Management > Select all, then Rebuild.
    • You may also want to change the admin login or other accounts. 
      System > Permissions > Users.
  11. Also check your .htaccess file on the test instance to make sure that any production-only rewrite rules are removed or commented out.  Its also a good idea to password protect the directory so that only allowed users have access.  Below is an example of the code to add to your .htaccess file after you have set up the password (this is usually an option in your hosting control panel).
    [plain title=”.htaccess”] AuthName "Protected Area"
    AuthType Basic
    AuthUserFile /home/mytestserver/.htpasswds/public_html/newtestsite/passwd
    Require valid-user
  12. Edit your robots.txt file to keep search engine robots away.
    [plain title=”robots.txt”] User-agent: *
    Disallow: /
  13. That’s it!  You now have a copy of your production Magento store ready for development and testing.

Using USB harddrives on RaspberryPi

This is surprisingly easy.

  • Make sure your PI has enough power – at least a 2Ah or better.
  • Mount the root partition your SD card
  • Mount your USB harddrive (ext4 formatted
  • Copy the root partition of the sdcard to a ext4 formatted usb-harddrive.
  • Rebember to sync to ensure all data are flushed from cache.
mount /dev/sdxY /your/sdcard/mountfolder
mount /dev/sdxY /your/usb/mountfolder
cp -r /your/sdcard/mountfolder/* /your/usb/mountfolder

On the boot partition of the sdcard copy the file cmdline.txt -> cmdline.txt.bak.

cp /boot/cmdline.txt /boot/cmdline.txt.bak

Open cmdline.txt and find where it reads


Change it to


Save your file.

Attach your USB drive to your PI, insert your SD card and plugin power. Your PI will boot faster and you dont wear your SD card down.

Thecus: idc vga pinout



|     | PIN | PIN | PIN | PIN | PIN | PIN | PIN | PIN | PIN | PIN |
| VGA |  /  |  15 |  6  |  7  |  1  |  12 |  2  |  14 |  3  |  13 |
| IDC |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10 |
Modtaget fre thecus tech support

Linux: cifs share in fstab

Mount cifs share in fstab

Install cifs-utils (even if you already have Samba and related packages installed):

sudo pacman install cifs-utils

Edit /etc/fstab and add your entry:

//server/share /pathto/mountpoint cifs credentials=/etc/samba/.smbcredentials 0 0

Create the .smbcredentials file in /etc/samba:

$ sudo touch /etc/samba/.smbcredentials
$ sudo nano /etc/samba/.smbcredentials


Make sure you secure your /etc/samba/.smbcredentials file:

sudo chmod 0400 /etc/samba/.smbcredentials

Finally, test the mount with:

sudo mount -a

Linux: XDMCP summary


locally – and locally only

Installer XDM


# pacman -S xorg-xdm


# apt-get install xdm

When installing select xdm as default login manager

Edit as root

# nano /etc/X11/xdm/Xaccess
## remove remark (#) from the line reading
#*        #any host can get a login window

# nano /etc/X11/xdm/Xservers
##add remark (#) for the line - probably last - reading
:0 local ..(rest omitted)

# nano /etc/X11/xdm/xdm-config
## add remark (!) for the line - probably last - reading
DisplayManager.requestPort:    0